@tickernelz/paperclip-pro-server 2026.926.0 → 2026.926.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/build-info.json +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +116 -1
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +79 -6
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +30 -1
- package/dist/routes/openapi.js.map +1 -1
- package/dist/services/adapter-config-field-value.d.ts +12 -0
- package/dist/services/adapter-config-field-value.d.ts.map +1 -0
- package/dist/services/adapter-config-field-value.js +31 -0
- package/dist/services/adapter-config-field-value.js.map +1 -0
- package/dist/services/agent-adapter-config-batch.d.ts +26 -0
- package/dist/services/agent-adapter-config-batch.d.ts.map +1 -0
- package/dist/services/agent-adapter-config-batch.js +174 -0
- package/dist/services/agent-adapter-config-batch.js.map +1 -0
- package/dist/services/heartbeat.d.ts +4 -4
- package/dist/services/issue-model-override-inheritance.d.ts +13 -0
- package/dist/services/issue-model-override-inheritance.d.ts.map +1 -0
- package/dist/services/issue-model-override-inheritance.js +68 -0
- package/dist/services/issue-model-override-inheritance.js.map +1 -0
- package/dist/services/issue-run-model-override.d.ts +19 -4
- package/dist/services/issue-run-model-override.d.ts.map +1 -1
- package/dist/services/issue-run-model-override.js +71 -22
- package/dist/services/issue-run-model-override.js.map +1 -1
- package/dist/services/issues.d.ts.map +1 -1
- package/dist/services/issues.js +21 -0
- package/dist/services/issues.js.map +1 -1
- package/dist/services/native-runtime/native-session-executor.d.ts +1 -1
- package/dist/services/native-runtime/native-session-executor.d.ts.map +1 -1
- package/package.json +20 -20
- package/ui-dist/assets/{AgentAvatar-CWNp7Eqe.js → AgentAvatar-CnpBTXF0.js} +1 -1
- package/ui-dist/assets/{AgentIdentity-Bqzrcghn.js → AgentIdentity-CV55DQtR.js} +1 -1
- package/ui-dist/assets/{Agents.production-Cs7mMvAL.js → Agents.production-5Tba_pW_.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-4bljbHSU.js → CompanyActivity.production-CONFWTe1.js} +1 -1
- package/ui-dist/assets/{CompanyExport-CBh7R3lQ.js → CompanyExport-CiOVCS4y.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-DEleeGzs.js → CompanySkills.production-gv4ej6PI.js} +1 -1
- package/ui-dist/assets/{Costs.production-Dm5j2nxX.js → Costs.production-C6rOIGNV.js} +1 -1
- package/ui-dist/assets/{EmptyState-D62UDLDa.js → EmptyState-DeVTy8IU.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-DfGkmx3G.js → MarkdownBody-Da7yUIDf.js} +1 -1
- package/ui-dist/assets/{MarkdownEditor-ZwstkvWb.js → MarkdownEditor-7JCtdEaZ.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-BWKofGdO.js → OrgChart.production-DYeuFtY_.js} +1 -1
- package/ui-dist/assets/{PageSkeleton-C0pPO_Gb.js → PageSkeleton-DRRnaWWU.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-_auZa0K9.js → RoutineDetail.production-Bt4IHfSD.js} +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-Bj-Q_Ua3.js +5 -0
- package/ui-dist/assets/{Routines.production-D8R6Ujt6.js → Routines.production-BBxSwg2A.js} +1 -1
- package/ui-dist/assets/{SidebarContext-B3vvFvTk.js → SidebarContext-CxjppFTY.js} +1 -1
- package/ui-dist/assets/{StatusIcon-BYqGFWup.js → StatusIcon-j05cEqDO.js} +1 -1
- package/ui-dist/assets/agents-ZcIBncVi.js +1 -0
- package/ui-dist/assets/{badge-CW7lQ_Zd.js → badge-B4sBXDQo.js} +1 -1
- package/ui-dist/assets/{bot-DIsSOxfs.js → bot-CcFVz40n.js} +1 -1
- package/ui-dist/assets/{button-BYQHEF4e.js → button-LkWt40cm.js} +1 -1
- package/ui-dist/assets/{card-CFXZOYds.js → card-DbvoJZ3K.js} +1 -1
- package/ui-dist/assets/{check-Cniv3It0.js → check-CgfxcCMv.js} +1 -1
- package/ui-dist/assets/{checkbox-MLVUJCCS.js → checkbox-CLAkJpms.js} +1 -1
- package/ui-dist/assets/{chevron-down-Dq0fsCvv.js → chevron-down-CpKmud_n.js} +1 -1
- package/ui-dist/assets/{chevron-right-C4o2Lqna.js → chevron-right-IZydUoW5.js} +1 -1
- package/ui-dist/assets/{clipboard-CfEDu5my.js → clipboard-CjMs5cp9.js} +1 -1
- package/ui-dist/assets/{company-members-tdITTHFY.js → company-members-Dyq_pnza.js} +1 -1
- package/ui-dist/assets/createLucideIcon-CZEG6UJ7.js +92 -0
- package/ui-dist/assets/{definition-B5Yyiufk.js → definition-B49KTmLW.js} +1 -1
- package/ui-dist/assets/{dist-DCpDFPbp.js → dist-Cqh7BG-j.js} +1 -1
- package/ui-dist/assets/{dist-bQQ2HFhw.js → dist-pDmgIRxg.js} +1 -1
- package/ui-dist/assets/{environments-awDXeIDD.js → environments-xbdxVBLT.js} +1 -1
- package/ui-dist/assets/{external-link-3uv6Ak2X.js → external-link-BbeUY6zf.js} +1 -1
- package/ui-dist/assets/{file-text-DWMD8a2i.js → file-text-BMJQ4LZs.js} +1 -1
- package/ui-dist/assets/{health-DY_y3c9e.js → health-Bj6kLXe5.js} +1 -1
- package/ui-dist/assets/{heartbeats-BQipXQOf.js → heartbeats-DFiFf4Zf.js} +1 -1
- package/ui-dist/assets/{index-N4w1Oco1.js → index-BRCs87uX.js} +162 -162
- package/ui-dist/assets/index-GCNIGBzC.css +1 -0
- package/ui-dist/assets/{input-B7ODc-rR.js → input-a7SggR2b.js} +1 -1
- package/ui-dist/assets/label-Dnc69R1W.js +5 -0
- package/ui-dist/assets/{loader-circle-DA6xS_rG.js → loader-circle-Cu72DKdC.js} +1 -1
- package/ui-dist/assets/{mention-chips-r4UB4Eiw.js → mention-chips-BEaOTvHT.js} +1 -1
- package/ui-dist/assets/{octagon-alert-DsI0y-RL.js → octagon-alert-DfqJ6RjK.js} +1 -1
- package/ui-dist/assets/{rotate-ccw-D6pz3VoJ.js → rotate-ccw-DiFaj3XM.js} +1 -1
- package/ui-dist/assets/{router-DcMYq5w_.js → router-G1KztA90.js} +1 -1
- package/ui-dist/assets/{save-CvrYa2yq.js → save-D9PtvKKu.js} +1 -1
- package/ui-dist/assets/{select-CV7s_3g2.js → select-DSr2hsz2.js} +1 -1
- package/ui-dist/assets/{sheet-CrBXG9pk.js → sheet-H27vJn3G.js} +1 -1
- package/ui-dist/assets/{skeleton-efW_R0t3.js → skeleton-CPVPMT4g.js} +1 -1
- package/ui-dist/assets/{tabs-4RdauNv3.js → tabs-D8G3-AL7.js} +1 -1
- package/ui-dist/assets/{triangle-alert-DQUol3t5.js → triangle-alert-DiD4Atur.js} +1 -1
- package/ui-dist/assets/{use-adapter-capabilities-pFfW1mOk.js → use-adapter-capabilities-D_QCYxa2.js} +1 -1
- package/ui-dist/assets/{useHiddenSettings-b1eurTXV.js → useHiddenSettings-vbDpbX0U.js} +1 -1
- package/ui-dist/assets/{zap-CKzX0hdL.js → zap-CCqZhqc3.js} +1 -1
- package/ui-dist/index.html +46 -46
- package/ui-dist/sw.js +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-CUcwhS7L.js +0 -5
- package/ui-dist/assets/agents-CNina7HI.js +0 -1
- package/ui-dist/assets/createLucideIcon-CINAT48M.js +0 -92
- package/ui-dist/assets/index-BAoNTaz4.css +0 -1
- package/ui-dist/assets/label-BnqmTeef.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
var ks=Object.defineProperty;var t=(n,c)=>ks(n,"name",{value:c,configurable:!0});import{i as as}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Ps,Lr as As,Pr as Ms,S as Ds,U as Ts,Y as m,nr as A,tr as _}from"./createLucideIcon-CINAT48M.js";import{B as ze,U as qs,b as Ks,ct as Us,o as Es}from"./router-DcMYq5w_.js";import{Ct as Os,O as Ls,bt as Qs,cr as ls,gr as Bs,lr as ee,or as Ge,r as Vs,sr as We,t as $s,v as he,vt as Ye,wt as zs,xt as Gs,yt as Ws}from"./RoutineRunVariablesDialog-CUcwhS7L.js";import{a as J,t as Ys}from"./MarkdownEditor-ZwstkvWb.js";import{t as He}from"./AgentAvatar-CWNp7Eqe.js";import{a as Hs,r as Js}from"./checkbox-MLVUJCCS.js";import{n as Je,t as Xs}from"./tabs-4RdauNv3.js";import{a as Xe,c as Ze,r as es,t as Zs}from"./agents-CNina7HI.js";import{g as et}from"./StatusIcon-BYqGFWup.js";import{r as st,t as je}from"./EmptyState-D62UDLDa.js";import{t as tt}from"./check-Cniv3It0.js";import{t as nt}from"./chevron-down-Dq0fsCvv.js";import{t as cs}from"./chevron-right-C4o2Lqna.js";import{c as ye,i as X,n as ve,s as be,t as we}from"./select-CV7s_3g2.js";import{k as Z,t as F}from"./button-BYQHEF4e.js";import{t as rt}from"./heartbeats-BQipXQOf.js";import{i as it,o as ot}from"./company-members-tdITTHFY.js";import{r as at,t as lt}from"./card-CFXZOYds.js";import{t as ct}from"./PageSkeleton-C0pPO_Gb.js";import{$ as dt,$t as ut,J as mt,Q as pt,X as ft,Y as gt,Z as xt,at as ht,et as jt,fn as yt,ht as M,in as vt,it as bt,mt as wt,nt as Nt,pt as It,rn as Rt,rt as Ct,tt as St}from"./index-N4w1Oco1.js";var l=as(As(),1),s=as(Ps(),1),_t=["coalesce_if_active","always_enqueue","skip_if_active"],Ft=["skip_missed","enqueue_missed_with_cap"],kt={coalesce_if_active:"If a run is already active, keep just one follow-up run queued.",always_enqueue:"Queue every trigger occurrence, even if the routine is already running.",skip_if_active:"Drop new trigger occurrences while a run is still active."},Pt={skip_missed:"Ignore windows that were missed while the scheduler or routine was paused.",enqueue_missed_with_cap:"Catch up missed schedule windows after recovery; sub-hourly schedules are combined into one catch-up run, slower schedules replay each missed window up to a cap."};function ss(n){n&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)}t(ss,"autoResizeTextarea");var At="__built_in_routines",ts={sortField:"title",sortDir:"asc",groupBy:"folder",collapsedGroups:[]};function ns(n){try{const c=localStorage.getItem(n);if(c)return{...ts,...JSON.parse(c)}}catch{}return{...ts}}t(ns,"getRoutineViewState");function Mt(n,c){localStorage.setItem(n,JSON.stringify(c))}t(Mt,"saveRoutineViewState");function q(n){if(!n)return Number.NEGATIVE_INFINITY;const c=new Date(n).getTime();return Number.isFinite(c)?c:Number.NEGATIVE_INFINITY}t(q,"timestampValue");function rs(n,c){return(n??"").localeCompare(c??"",void 0,{sensitivity:"base"})}t(rs,"compareNullableText");function Dt(n){return{...n,description:n.description.trim()||null,projectId:n.projectId||null,folderId:n.folderId||null,assigneeAgentId:n.assigneeAgentId||null}}t(Dt,"buildRoutineMutationPayload");function Tt(n,c,d,b,g){if(c==="none")return[{key:"__all",label:null,items:n}];if(c==="folder"){const i=he(n,o=>o.folderId??"__unfiled");return Object.keys(i).sort((o,j)=>{if(o==="__unfiled"||j==="__unfiled")return o===j?0:o==="__unfiled"?1:-1;const w=g.get(o),I=g.get(j),O=(Number.isFinite(w?.position)?w.position:Number.POSITIVE_INFINITY)-(Number.isFinite(I?.position)?I.position:Number.POSITIVE_INFINITY);return O!==0?O:(w?.name??"Unknown folder").localeCompare(I?.name??"Unknown folder",void 0,{sensitivity:"base"})||o.localeCompare(j)}).map(o=>({key:o,label:o==="__unfiled"?"Unfiled":g.get(o)?.name??"Unknown folder",items:i[o]}))}if(c==="project"){const i=he(n,o=>o.projectId??"__no_project");return Object.keys(i).sort((o,j)=>{const w=o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",I=j==="__no_project"?"No project":d.get(j)?.name??"Unknown project";return w.localeCompare(I)}).map(o=>({key:o,label:o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",items:i[o]}))}const x=he(n,i=>i.assigneeAgentId??"__unassigned");return Object.keys(x).sort((i,o)=>{const j=i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",w=o==="__unassigned"?"Unassigned":b.get(o)?.name??"Unknown agent";return j.localeCompare(w)}).map(i=>({key:i,label:i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",items:x[i]}))}t(Tt,"buildRoutineGroups");function is(n){return n.originKind==="built_in_agent_bundle"}t(is,"isBuiltInRoutine");function qt(n,c,d,b,g){const x=n.filter(is),i=Tt(n.filter(o=>!is(o)),c,d,b,g).filter(o=>o.items.length>0).map(o=>x.length>0&&c==="none"&&o.key==="__all"?{...o,label:"Custom routines"}:o);return x.length===0?i:[...i,{key:At,label:"Built-in routines",items:x}]}t(qt,"buildRoutineSections");function Kt(n,c,d){const b=d==="asc"?1:-1;return[...n].sort((g,x)=>{let i=0;return c==="title"?i=rs(g.title,x.title):c==="created"?i=q(g.createdAt)-q(x.createdAt):c==="lastRun"?i=q(g.lastRun?.triggeredAt??g.lastTriggeredAt)-q(x.lastRun?.triggeredAt??x.lastTriggeredAt):i=q(g.updatedAt)-q(x.updatedAt),i!==0?i*b:rs(g.title,x.title)})}t(Kt,"sortRoutines");function os(n){return n==="runs"?"/routines?tab=runs":"/routines"}t(os,"buildRoutinesTabHref");function Ut({label:n,count:c,isOpen:d}){return(0,s.jsxs)("div",{className:`flex items-center gap-2 rounded-lg border border-border px-3 py-2${d?" mb-1":""}`,children:[(0,s.jsxs)(ls,{className:"flex items-center gap-1.5",children:[(0,s.jsx)(cs,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform [[data-state=open]>&]:rotate-90"}),(0,s.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:n})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:c})]})}t(Ut,"RoutineSectionHeader");function cn(){const{selectedCompanyId:n}=Ts(),{setBreadcrumbs:c}=st(),d=Ms(),b=Es(),[g,x]=Us(),{pushToast:i}=yt(),o=(0,l.useRef)(null),j=(0,l.useRef)(null),w=(0,l.useRef)(null),I=(0,l.useRef)(null),[O,K]=(0,l.useState)(!1),[se,L]=(0,l.useState)(null),[Q,te]=(0,l.useState)(null),[ds,Ne]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),[B,V]=(0,l.useState)([]),[Ie,Re]=(0,l.useState)([]),[us,Ce]=(0,l.useState)(null),[ms,Se]=(0,l.useState)(null),[k,ie]=(0,l.useState)(null),[$,z]=(0,l.useState)(!1),[_e,oe]=(0,l.useState)(!1),P=g.get("tab")==="runs"?"runs":"routines",[p,R]=(0,l.useState)({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),G=n?`paperclip:routines-view:${n}`:"paperclip:routines-view",[u,Fe]=(0,l.useState)(()=>ns(G)),f=bt(g.get("folder"));(0,l.useEffect)(()=>{c([{label:"Routines"}])},[c]),(0,l.useEffect)(()=>{Fe(ns(G))},[G]);const{data:ke,isLoading:ps,error:ae}=A({queryKey:m.routines.list(n),queryFn:t(()=>J.list(n),"queryFn"),enabled:!!n}),{data:h,isLoading:Pe}=A({queryKey:m.folders.list(n,"routine"),queryFn:t(()=>M.list(n,"routine"),"queryFn"),enabled:!!n&&P==="routines"}),{data:C}=A({queryKey:m.agents.list(n),queryFn:t(()=>Zs.list(n),"queryFn"),enabled:!!n}),{data:S}=A({queryKey:m.projects.list(n,{includeArchived:!0}),queryFn:t(()=>et.list(n,{includeArchived:!0}),"queryFn"),enabled:!!n}),{data:Ae}=A({queryKey:m.access.companyUserDirectory(n),queryFn:t(()=>ot.listUserDirectory(n),"queryFn"),enabled:!!n}),{data:le,isLoading:fs,error:gs}=A({queryKey:[...m.issues.list(n),"routine-executions"],queryFn:t(()=>ze.list(n,{originKind:"routine_execution"}),"queryFn"),enabled:!!n&&P==="runs"}),Me=m.liveRuns(n),ce=vt({companyId:n,resourceKey:"live-runs",queryKey:Me,enabled:!!n&&P==="runs",refetchInterval:!1,leaderOnly:!0}),{data:de,dataUpdatedAt:xs}=A({queryKey:Me,queryFn:t(()=>rt.liveRunsForCompany(n),"queryFn"),enabled:ce.enabled,refetchInterval:ce.refetchInterval});Rt(ce,de,xs),(0,l.useEffect)(()=>{ss(j.current)},[p.title,$]);const hs=(0,l.useMemo)(()=>it({agents:C,projects:(S??[]).filter(e=>!e.archivedAt),members:Ae?.users}),[C,Ae?.users,S]),N=_({mutationFn:t(()=>J.create(n,Dt(p)),"mutationFn"),onSuccess:t(async e=>{R({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),z(!1),oe(!1),await d.invalidateQueries({queryKey:m.routines.list(n)}),i({title:"Routine created",body:e.assigneeAgentId?"Add the first trigger to turn it into a live workflow.":"Draft saved. Add a default agent before enabling automation.",tone:"success"}),b(`/routines/${e.id}?tab=triggers`)},"onSuccess")}),De=_({mutationFn:t(e=>M.create(n,{kind:"routine",...e}),"mutationFn"),onSuccess:t(async e=>{if(K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")}),Ie.length>0){const r=Ie;Re([]);try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e.id}))),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])}catch(a){i({title:"Folder created, move failed",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"});return}}else Y(e.id);i({title:"Folder created",body:e.name,tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Failed to save folder",body:e instanceof Error?e.message:"Paperclip could not save the folder.",tone:"error"})},"onError")}),ue=_({mutationFn:t(({folderId:e,payload:r})=>M.update(n,e,r),"mutationFn"),onSuccess:t(async()=>{K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")})},"onSuccess"),onError:t(e=>{i({title:"Folder save failed",body:e instanceof Error?e.message:"Paperclip could not update the folder.",tone:"error"})},"onError")}),Te=_({mutationFn:t(e=>M.delete(n,e),"mutationFn"),onSuccess:t(async(e,r)=>{f===r&&Y("all"),te(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Folder deleted",body:"Items moved to Unfiled.",tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Folder delete failed",body:e instanceof Error?e.message:"Paperclip could not delete the folder.",tone:"error"})},"onError")}),qe=_({mutationFn:t(({itemId:e,folderId:r})=>M.moveItem(n,{kind:"routine",itemId:e,folderId:r}),"mutationFn"),onSuccess:t(async()=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])},"onSuccess"),onError:t(e=>{i({title:"Move failed",body:e instanceof Error?e.message:"Paperclip could not move the routine.",tone:"error"})},"onError")}),js=_({mutationFn:t(({id:e,data:r})=>ze.update(e,r),"mutationFn"),onSuccess:t(async()=>{await d.invalidateQueries({queryKey:[...m.issues.list(n),"routine-executions"]})},"onSuccess")}),Ke=_({mutationFn:t(({id:e,status:r})=>J.update(e,{status:r}),"mutationFn"),onMutate:t(({id:e})=>{Se(e)},"onMutate"),onSuccess:t(async(e,r)=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r.id)})])},"onSuccess"),onSettled:t(()=>{Se(null)},"onSettled"),onError:t(e=>{i({title:"Failed to update routine",body:e instanceof Error?e.message:"Paperclip could not update the routine.",tone:"error"})},"onError")}),Ue=_({mutationFn:t(({id:e,data:r})=>J.run(e,{...r?.variables&&Object.keys(r.variables).length>0?{variables:r.variables}:{},...r?.assigneeAgentId!==void 0?{assigneeAgentId:r.assigneeAgentId}:{},...r?.projectId!==void 0?{projectId:r.projectId}:{},...r?.executionWorkspaceId!==void 0?{executionWorkspaceId:r.executionWorkspaceId}:{},...r?.executionWorkspacePreference!==void 0?{executionWorkspacePreference:r.executionWorkspacePreference}:{},...r?.executionWorkspaceSettings!==void 0?{executionWorkspaceSettings:r.executionWorkspaceSettings}:{}}),"mutationFn"),onMutate:t(({id:e})=>{Ce(e)},"onMutate"),onSuccess:t(async(e,{id:r})=>{ie(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r)})])},"onSuccess"),onSettled:t(()=>{Ce(null)},"onSettled"),onError:t(e=>{i({title:"Routine run failed",body:e instanceof Error?e.message:"Paperclip could not start the routine run.",tone:"error"})},"onError")}),me=(0,l.useMemo)(()=>Gs(),[$]),ys=(0,l.useMemo)(()=>Ws(),[$]),vs=(0,l.useMemo)(()=>Os((C??[]).filter(e=>e.status!=="terminated"),me).map(e=>({id:e.id,label:e.name,searchText:`${e.name} ${e.role} ${e.title??""}`})),[C,me]),bs=(0,l.useMemo)(()=>(S??[]).filter(e=>!e.archivedAt).map(e=>({id:e.id,label:e.name,searchText:e.description??""})),[S]),U=(0,l.useMemo)(()=>new Map((C??[]).map(e=>[e.id,e])),[C]),E=(0,l.useMemo)(()=>new Map((S??[]).map(e=>[e.id,e])),[S]),Ee=(0,l.useMemo)(()=>new Map((h?.folders??[]).map(e=>[e.id,e])),[h]),ws=(0,l.useMemo)(()=>Ls(de,le),[de,le]),y=(0,l.useMemo)(()=>(ke??[]).filter(e=>e.status!=="archived"),[ke]),Oe=(0,l.useMemo)(()=>u.groupBy!=="folder"||f==="all"?y:f==="unfiled"?y.filter(e=>!e.folderId):y.filter(e=>e.folderId===f),[f,u.groupBy,y]),pe=(0,l.useMemo)(()=>{if(!h)return h;const e=new Map;let r=0;for(const a of y)a.folderId?e.set(a.folderId,(e.get(a.folderId)??0)+1):r+=1;return{...h,allCount:y.length,unfiledCount:r,folders:h.folders.map(a=>({...a,itemCount:e.get(a.id)??0}))}},[h,y]),D=(0,l.useMemo)(()=>Kt(Oe,u.sortField,u.sortDir),[Oe,u.sortDir,u.sortField]),Ns=(0,l.useMemo)(()=>qt(D,u.groupBy,E,U,Ee),[U,Ee,E,u.groupBy,D]),Is=(0,l.useMemo)(()=>qs("Recent Runs",os("runs"),"issues"),[]),Le=p.assigneeAgentId?U.get(p.assigneeAgentId)??null:null,Qe=p.projectId?E.get(p.projectId)??null:null,Be=ht(h?.folders??[],f),W=(h?.folders.length??0)>0,fe=P==="routines"&&u.groupBy==="folder"&&W;function ge(e){Fe(r=>{const a={...r,...e};return Mt(G,a),a})}t(ge,"updateRoutineView");function Ve(e){const r=e==="runs"?"runs":"routines";(0,l.startTransition)(()=>{b(os(r))})}t(Ve,"handleTabChange");function Y(e){x(r=>{const a=new URLSearchParams(r),v=Ct(e);return v?a.set("folder",v):a.delete("folder"),a})}t(Y,"setFolderSelection");function T(e=[]){Re(e),L(null),K(!0)}t(T,"openCreateFolder");function $e(){R(e=>({...e,folderId:f==="all"||f==="unfiled"?null:f})),z(!0)}t($e,"openCreateRoutine");async function Rs(e){const r=B;if(r.length!==0)try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e}))),V([]),re(!1),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Routines moved",body:`${r.length} routine${r.length===1?"":"s"} filed.`,tone:"success"})}catch(a){i({title:"Failed to move routines",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"})}}t(Rs,"moveSelectedRoutines");function Cs(e){ie(e)}t(Cs,"handleRunNow");function Ss(e,r){if(!r&&!e.assigneeAgentId){i({title:"Default agent required",body:"Set a default agent before enabling routine automation.",tone:"warn"});return}Ke.mutate({id:e.id,status:wt(e.status,!r)})}t(Ss,"handleToggleEnabled");function _s(e){Ke.mutate({id:e.id,status:e.status==="archived"?"active":"archived"})}return t(_s,"handleToggleArchived"),n?ps?(0,s.jsx)(ct,{variant:"issues-list"}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Routines"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Recurring work definitions that materialize into auditable execution tasks."})]}),(0,s.jsxs)(F,{onClick:$e,children:[(0,s.jsx)(Z,{className:"mr-2 h-4 w-4"}),"Create routine"]})]}),(0,s.jsxs)(Xs,{value:P,onValueChange:Ve,children:[(0,s.jsx)(ut,{align:"start",value:P,onValueChange:Ve,items:[{value:"routines",label:"Routines"},{value:"runs",label:"Recent Runs"}]}),(0,s.jsxs)(Je,{value:"routines",className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[y.length," routine",y.length===1?"":"s"]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)(es,{children:[(0,s.jsx)(Ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Sort",children:[(0,s.jsx)(Bs,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Sort"})]})}),(0,s.jsx)(Xe,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["updated","Updated"],["created","Created"],["lastRun","Last run"],["title","Title"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.sortField===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>{ge(u.sortField===e?{sortDir:u.sortDir==="asc"?"desc":"asc"}:{sortField:e,sortDir:e==="title"?"asc":"desc"})},"onClick"),children:[(0,s.jsx)("span",{children:r}),u.sortField===e?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:u.sortDir==="asc"?"Asc":"Desc"}):null]},e))})})]}),(0,s.jsxs)(es,{children:[(0,s.jsx)(Ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Group",children:[(0,s.jsx)(Ks,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Group"})]})}),(0,s.jsx)(Xe,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["folder","Folder"],["project","Project"],["assignee","Agent"],["none","None"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.groupBy===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>ge({groupBy:e,collapsedGroups:[]}),"onClick"),children:[(0,s.jsx)("span",{children:r}),u.groupBy===e?(0,s.jsx)(tt,{className:"h-3.5 w-3.5"}):null]},e))})})]}),u.groupBy==="folder"&&!W?(0,s.jsxs)(F,{variant:"outline",size:"sm",onClick:t(()=>T(),"onClick"),children:[(0,s.jsx)(Z,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]}):null,fe?(0,s.jsx)(F,{variant:"ghost",size:"sm",className:"text-xs",onClick:t(()=>re(e=>!e),"onClick"),children:ne?"Done":"Select"}):null]})]}),u.groupBy==="folder"?(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(xt,{result:pe,selection:f,allLabel:"All routines",onClick:t(()=>Ne(!0),"onClick")})}):null]}),(0,s.jsx)(Je,{value:"runs",children:(0,s.jsx)(Vs,{issues:le??[],isLoading:fs,error:gs,agents:C,projects:S,liveIssueIds:ws,viewStateKey:"paperclip:routine-recent-runs-view",issueLinkState:Is,onUpdateIssue:t((e,r)=>js.mutate({id:e,data:r}),"onUpdateIssue")})})]}),(0,s.jsx)(Js,{open:$,onOpenChange:t(e=>{N.isPending||z(e)},"onOpenChange"),children:(0,s.jsxs)(Hs,{showCloseButton:!1,className:"flex max-h-(--sz-calc-18) max-w-3xl flex-col gap-0 overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"shrink-0 flex flex-wrap items-center justify-between gap-3 border-b border-border/60 px-5 py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"New routine"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Define the recurring work first. Default project and agent are optional for draft routines."})]}),(0,s.jsx)(F,{variant:"ghost",size:"sm",onClick:t(()=>{z(!1),oe(!1)},"onClick"),disabled:N.isPending,children:"Cancel"})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,s.jsx)("div",{className:"px-5 pt-5 pb-3",children:(0,s.jsx)("textarea",{ref:j,className:"w-full resize-none overflow-hidden bg-transparent text-xl font-semibold outline-none placeholder:text-muted-foreground/50",placeholder:"Routine title",rows:1,value:p.title,onChange:t(e=>{R(r=>({...r,title:e.target.value})),ss(e.target)},"onChange"),onKeyDown:t(e=>{if(e.key==="Enter"&&!e.metaKey&&!e.ctrlKey&&!e.nativeEvent.isComposing){e.preventDefault(),o.current?.focus();return}e.key==="Tab"&&!e.shiftKey&&(e.preventDefault(),p.assigneeAgentId?p.projectId?o.current?.focus():I.current?.focus():w.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,s.jsx)("div",{className:"px-5 pb-3",children:(0,s.jsx)("div",{className:"overflow-x-auto overscroll-x-contain",children:(0,s.jsxs)("div",{className:"inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap",children:[(0,s.jsx)("span",{children:"For"}),(0,s.jsx)(Ye,{ref:w,value:p.assigneeAgentId,options:vs,recentOptionIds:me,placeholder:"Responsible",noneLabel:"No responsible",searchPlaceholder:"Search responsible...",emptyMessage:"No responsible found.",onChange:t(e=>{e&&zs(e),R(r=>({...r,assigneeAgentId:e}))},"onChange"),onConfirm:t(()=>{p.projectId?o.current?.focus():I.current?.focus()},"onConfirm"),renderTriggerValue:t(e=>e?Le?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(He,{agent:Le,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"truncate",children:e.label}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Responsible"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=U.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(He,{agent:r,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):null,(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"in"}),(0,s.jsx)(Ye,{ref:I,value:p.projectId,options:bs,recentOptionIds:ys,placeholder:"Project",noneLabel:"No project",searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:t(e=>{e&&Qs(e),R(r=>({...r,projectId:e}))},"onChange"),onConfirm:t(()=>o.current?.focus(),"onConfirm"),renderTriggerValue:t(e=>e&&Qe?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:Qe.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Project"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=E.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:r?.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"filed in"}),(0,s.jsxs)(we,{value:p.folderId??"__unfiled",onValueChange:t(e=>R(r=>({...r,folderId:e==="__unfiled"?null:e})),"onValueChange"),children:[(0,s.jsx)(be,{className:"h-8 w-auto min-w-32 border-0 bg-muted/50 px-2 shadow-none",children:(0,s.jsx)(ye,{})}),(0,s.jsxs)(ve,{children:[(0,s.jsx)(X,{value:"__unfiled",children:"Unfiled"}),(h?.folders??[]).map(e=>(0,s.jsx)(X,{value:e.id,children:e.name},e.id))]})]})]})})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-4",children:(0,s.jsx)(Ys,{ref:o,value:p.description,onChange:t(e=>R(r=>({...r,description:e})),"onChange"),placeholder:"Add instructions...",bordered:!1,contentClassName:"min-h-(--sz-160px) text-sm text-muted-foreground",mentions:hs,onSubmit:t(()=>{!N.isPending&&p.title.trim()&&p.projectId&&p.assigneeAgentId&&N.mutate()},"onSubmit")})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-3",children:(0,s.jsxs)(Ge,{open:_e,onOpenChange:oe,children:[(0,s.jsxs)(ls,{className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Advanced delivery settings"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Keep policy controls secondary to the work definition."})]}),_e?(0,s.jsx)(nt,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(cs,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsx)(We,{className:"pt-3",children:(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Concurrency"}),(0,s.jsxs)(we,{value:p.concurrencyPolicy,onValueChange:t(e=>R(r=>({...r,concurrencyPolicy:e})),"onValueChange"),children:[(0,s.jsx)(be,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(ve,{children:_t.map(e=>(0,s.jsx)(X,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:kt[p.concurrencyPolicy]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Catch-up"}),(0,s.jsxs)(we,{value:p.catchUpPolicy,onValueChange:t(e=>R(r=>({...r,catchUpPolicy:e})),"onValueChange"),children:[(0,s.jsx)(be,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(ve,{children:Ft.map(e=>(0,s.jsx)(X,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:Pt[p.catchUpPolicy]})]})]})})]})})]}),(0,s.jsxs)("div",{className:"shrink-0 flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"After creation, Paperclip takes you straight to trigger setup. Draft routines stay paused until you add a default agent."}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:items-end",children:[(0,s.jsxs)(F,{onClick:t(()=>N.mutate(),"onClick"),disabled:N.isPending||!p.title.trim(),children:[(0,s.jsx)(Z,{className:"mr-2 h-4 w-4"}),N.isPending?"Creating...":"Create routine"]}),N.isError?(0,s.jsx)("p",{className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Failed to create routine"}):null]})]})]})}),ae?(0,s.jsx)(lt,{children:(0,s.jsx)(at,{className:"pt-6 text-sm text-destructive",children:ae instanceof Error?ae.message:"Failed to load routines"})}):null,P==="routines"?(0,s.jsxs)("div",{className:Ds(fe&&"flex gap-4"),children:[fe?(0,s.jsx)(dt,{result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"routines",loading:Pe,onSelect:Y,onCreate:t(()=>T(),"onCreate"),onRename:t((e,r)=>ue.mutate({folderId:e.id,payload:{name:r}}),"onRename"),onEdit:t(e=>{L(e),K(!0)},"onEdit"),onDelete:te}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[u.groupBy==="folder"&&W?(0,s.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:f==="all"?(0,s.jsx)(Et,{label:"All routines",count:D.length}):(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(jt,{color:Be?.color}),(0,s.jsx)("span",{className:"truncate font-medium",children:f==="unfiled"?"Unfiled":Be?.name??"Folder"}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[D.length," routine",D.length===1?"":"s"]})]})}):null,u.groupBy==="folder"&&!W&&!Pe&&y.length>0?(0,s.jsx)(mt,{storageKey:`paperclip:routines-folder-nudge:${n??"none"}`,itemLabelPlural:"routines",onCreateFolder:t(()=>T(),"onCreateFolder")}):null,ne?(0,s.jsx)(gt,{selectedCount:B.length,folders:h?.folders??[],onMove:t(e=>{Rs(e)},"onMove"),onCreateAndMove:t(()=>T(B),"onCreateAndMove"),onClear:t(()=>V([]),"onClear"),onDone:t(()=>{re(!1),V([])},"onDone")}):null,y.length===0?(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(je,{icon:ee,message:"No active routines. Use Create routine to define the first recurring workflow."})}):D.length===0?(0,s.jsxs)("div",{className:"py-12",children:[(0,s.jsx)(je,{icon:ee,message:f==="all"?"No routines match this view.":"This folder is empty."}),f!=="all"?(0,s.jsx)("div",{className:"mt-3 flex justify-center",children:(0,s.jsxs)(F,{size:"sm",onClick:$e,children:[(0,s.jsx)(Z,{className:"mr-2 h-3.5 w-3.5"}),"New routine in this folder"]})}):null]}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:Ns.map(e=>{const r=!u.collapsedGroups.includes(e.key);return(0,s.jsxs)(Ge,{open:r,onOpenChange:t(a=>{ge({collapsedGroups:a?u.collapsedGroups.filter(v=>v!==e.key):[...u.collapsedGroups,e.key]})},"onOpenChange"),children:[e.label?(0,s.jsx)(Ut,{label:e.label,count:e.items.length,isOpen:r}):null,(0,s.jsx)(We,{children:e.items.map(a=>(0,s.jsx)(It,{routine:a,projectById:E,agentById:U,runningRoutineId:us,statusMutationRoutineId:ms,href:`/routines/${a.id}`,runNowButton:!0,divider:!1,onRunNow:Cs,onToggleEnabled:Ss,onToggleArchived:_s,selectMode:ne,selected:B.includes(a.id),onSelectChange:t((v,xe)=>{V(H=>xe?Array.from(new Set([...H,v.id])):H.filter(Fs=>Fs!==v.id))},"onSelectChange"),extraMenuItems:(0,s.jsx)(Nt,{folders:h?.folders??[],currentFolderId:a.folderId??null,onMove:t(v=>{const xe=a.folderId??null;qe.mutate({itemId:a.id,folderId:v}),i({title:"Routine moved",body:v?`Moved "${a.title}" to ${h?.folders.find(H=>H.id===v)?.name??"folder"}.`:`Moved "${a.title}" to Unfiled.`,tone:"success",action:{label:"Undo",onClick:t(()=>qe.mutate({itemId:a.id,folderId:xe}),"onClick")}})},"onMove"),onCreateAndMove:t(()=>T([a.id]),"onCreateAndMove")})},a.id))})]},e.key)})})]})]}):null,(0,s.jsx)(pt,{open:O,kind:"routine",folder:se,pending:De.isPending||ue.isPending,onOpenChange:K,onSubmit:t(e=>{se?ue.mutate({folderId:se.id,payload:e}):De.mutate(e)},"onSubmit")}),(0,s.jsx)(ft,{open:Q!==null,folder:Q,itemLabelPlural:"routines",pending:Te.isPending,onOpenChange:t(e=>{e||te(null)},"onOpenChange"),onConfirm:t(()=>{Q&&Te.mutate(Q.id)},"onConfirm")}),(0,s.jsx)(St,{open:ds,onOpenChange:Ne,result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"Routines",onSelect:Y,onCreate:t(()=>T(),"onCreate")}),(0,s.jsx)($s,{open:k!==null,onOpenChange:t(e=>{e||ie(null)},"onOpenChange"),companyId:n,routineName:k?.title??null,agents:C??[],projects:S??[],defaultProjectId:k?.projectId??null,defaultAssigneeAgentId:k?.assigneeAgentId??null,variables:k?.variables??[],isPending:Ue.isPending,onSubmit:t(e=>{k&&Ue.mutate({id:k.id,data:e})},"onSubmit")})]}):(0,s.jsx)(je,{icon:ee,message:"Select a company to view routines."})}t(cn,"Routines");function Et({label:n,count:c}){return(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(ee,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate font-medium",children:n}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[c," routine",c===1?"":"s"]})]})}t(Et,"FolderIconHeader");export{cn as Routines};
|
|
1
|
+
var ks=Object.defineProperty;var t=(n,c)=>ks(n,"name",{value:c,configurable:!0});import{i as as}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Ps,Lr as As,Pr as Ms,S as Ds,U as Ts,Y as m,nr as A,tr as _}from"./createLucideIcon-CZEG6UJ7.js";import{B as ze,U as qs,b as Ks,ct as Us,o as Es}from"./router-G1KztA90.js";import{Ct as Os,O as Ls,bt as Qs,cr as ls,gr as Bs,lr as ee,or as Ge,r as Vs,sr as We,t as $s,v as he,vt as Ye,wt as zs,xt as Gs,yt as Ws}from"./RoutineRunVariablesDialog-Bj-Q_Ua3.js";import{a as J,t as Ys}from"./MarkdownEditor-7JCtdEaZ.js";import{t as He}from"./AgentAvatar-CnpBTXF0.js";import{a as Hs,r as Js}from"./checkbox-CLAkJpms.js";import{n as Je,t as Xs}from"./tabs-D8G3-AL7.js";import{a as Xe,c as Ze,r as es,t as Zs}from"./agents-ZcIBncVi.js";import{g as et}from"./StatusIcon-j05cEqDO.js";import{r as st,t as je}from"./EmptyState-DeVTy8IU.js";import{t as tt}from"./check-CgfxcCMv.js";import{t as nt}from"./chevron-down-CpKmud_n.js";import{t as cs}from"./chevron-right-IZydUoW5.js";import{c as ye,i as X,n as ve,s as be,t as we}from"./select-DSr2hsz2.js";import{k as Z,t as F}from"./button-LkWt40cm.js";import{t as rt}from"./heartbeats-DFiFf4Zf.js";import{i as it,o as ot}from"./company-members-Dyq_pnza.js";import{r as at,t as lt}from"./card-DbvoJZ3K.js";import{t as ct}from"./PageSkeleton-DRRnaWWU.js";import{$ as dt,$t as ut,J as mt,Q as pt,X as ft,Y as gt,Z as xt,at as ht,et as jt,fn as yt,ht as M,in as vt,it as bt,mt as wt,nt as Nt,pt as It,rn as Rt,rt as Ct,tt as St}from"./index-BRCs87uX.js";var l=as(As(),1),s=as(Ps(),1),_t=["coalesce_if_active","always_enqueue","skip_if_active"],Ft=["skip_missed","enqueue_missed_with_cap"],kt={coalesce_if_active:"If a run is already active, keep just one follow-up run queued.",always_enqueue:"Queue every trigger occurrence, even if the routine is already running.",skip_if_active:"Drop new trigger occurrences while a run is still active."},Pt={skip_missed:"Ignore windows that were missed while the scheduler or routine was paused.",enqueue_missed_with_cap:"Catch up missed schedule windows after recovery; sub-hourly schedules are combined into one catch-up run, slower schedules replay each missed window up to a cap."};function ss(n){n&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)}t(ss,"autoResizeTextarea");var At="__built_in_routines",ts={sortField:"title",sortDir:"asc",groupBy:"folder",collapsedGroups:[]};function ns(n){try{const c=localStorage.getItem(n);if(c)return{...ts,...JSON.parse(c)}}catch{}return{...ts}}t(ns,"getRoutineViewState");function Mt(n,c){localStorage.setItem(n,JSON.stringify(c))}t(Mt,"saveRoutineViewState");function q(n){if(!n)return Number.NEGATIVE_INFINITY;const c=new Date(n).getTime();return Number.isFinite(c)?c:Number.NEGATIVE_INFINITY}t(q,"timestampValue");function rs(n,c){return(n??"").localeCompare(c??"",void 0,{sensitivity:"base"})}t(rs,"compareNullableText");function Dt(n){return{...n,description:n.description.trim()||null,projectId:n.projectId||null,folderId:n.folderId||null,assigneeAgentId:n.assigneeAgentId||null}}t(Dt,"buildRoutineMutationPayload");function Tt(n,c,d,b,g){if(c==="none")return[{key:"__all",label:null,items:n}];if(c==="folder"){const i=he(n,o=>o.folderId??"__unfiled");return Object.keys(i).sort((o,j)=>{if(o==="__unfiled"||j==="__unfiled")return o===j?0:o==="__unfiled"?1:-1;const w=g.get(o),I=g.get(j),O=(Number.isFinite(w?.position)?w.position:Number.POSITIVE_INFINITY)-(Number.isFinite(I?.position)?I.position:Number.POSITIVE_INFINITY);return O!==0?O:(w?.name??"Unknown folder").localeCompare(I?.name??"Unknown folder",void 0,{sensitivity:"base"})||o.localeCompare(j)}).map(o=>({key:o,label:o==="__unfiled"?"Unfiled":g.get(o)?.name??"Unknown folder",items:i[o]}))}if(c==="project"){const i=he(n,o=>o.projectId??"__no_project");return Object.keys(i).sort((o,j)=>{const w=o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",I=j==="__no_project"?"No project":d.get(j)?.name??"Unknown project";return w.localeCompare(I)}).map(o=>({key:o,label:o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",items:i[o]}))}const x=he(n,i=>i.assigneeAgentId??"__unassigned");return Object.keys(x).sort((i,o)=>{const j=i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",w=o==="__unassigned"?"Unassigned":b.get(o)?.name??"Unknown agent";return j.localeCompare(w)}).map(i=>({key:i,label:i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",items:x[i]}))}t(Tt,"buildRoutineGroups");function is(n){return n.originKind==="built_in_agent_bundle"}t(is,"isBuiltInRoutine");function qt(n,c,d,b,g){const x=n.filter(is),i=Tt(n.filter(o=>!is(o)),c,d,b,g).filter(o=>o.items.length>0).map(o=>x.length>0&&c==="none"&&o.key==="__all"?{...o,label:"Custom routines"}:o);return x.length===0?i:[...i,{key:At,label:"Built-in routines",items:x}]}t(qt,"buildRoutineSections");function Kt(n,c,d){const b=d==="asc"?1:-1;return[...n].sort((g,x)=>{let i=0;return c==="title"?i=rs(g.title,x.title):c==="created"?i=q(g.createdAt)-q(x.createdAt):c==="lastRun"?i=q(g.lastRun?.triggeredAt??g.lastTriggeredAt)-q(x.lastRun?.triggeredAt??x.lastTriggeredAt):i=q(g.updatedAt)-q(x.updatedAt),i!==0?i*b:rs(g.title,x.title)})}t(Kt,"sortRoutines");function os(n){return n==="runs"?"/routines?tab=runs":"/routines"}t(os,"buildRoutinesTabHref");function Ut({label:n,count:c,isOpen:d}){return(0,s.jsxs)("div",{className:`flex items-center gap-2 rounded-lg border border-border px-3 py-2${d?" mb-1":""}`,children:[(0,s.jsxs)(ls,{className:"flex items-center gap-1.5",children:[(0,s.jsx)(cs,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform [[data-state=open]>&]:rotate-90"}),(0,s.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:n})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:c})]})}t(Ut,"RoutineSectionHeader");function cn(){const{selectedCompanyId:n}=Ts(),{setBreadcrumbs:c}=st(),d=Ms(),b=Es(),[g,x]=Us(),{pushToast:i}=yt(),o=(0,l.useRef)(null),j=(0,l.useRef)(null),w=(0,l.useRef)(null),I=(0,l.useRef)(null),[O,K]=(0,l.useState)(!1),[se,L]=(0,l.useState)(null),[Q,te]=(0,l.useState)(null),[ds,Ne]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),[B,V]=(0,l.useState)([]),[Ie,Re]=(0,l.useState)([]),[us,Ce]=(0,l.useState)(null),[ms,Se]=(0,l.useState)(null),[k,ie]=(0,l.useState)(null),[$,z]=(0,l.useState)(!1),[_e,oe]=(0,l.useState)(!1),P=g.get("tab")==="runs"?"runs":"routines",[p,R]=(0,l.useState)({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),G=n?`paperclip:routines-view:${n}`:"paperclip:routines-view",[u,Fe]=(0,l.useState)(()=>ns(G)),f=bt(g.get("folder"));(0,l.useEffect)(()=>{c([{label:"Routines"}])},[c]),(0,l.useEffect)(()=>{Fe(ns(G))},[G]);const{data:ke,isLoading:ps,error:ae}=A({queryKey:m.routines.list(n),queryFn:t(()=>J.list(n),"queryFn"),enabled:!!n}),{data:h,isLoading:Pe}=A({queryKey:m.folders.list(n,"routine"),queryFn:t(()=>M.list(n,"routine"),"queryFn"),enabled:!!n&&P==="routines"}),{data:C}=A({queryKey:m.agents.list(n),queryFn:t(()=>Zs.list(n),"queryFn"),enabled:!!n}),{data:S}=A({queryKey:m.projects.list(n,{includeArchived:!0}),queryFn:t(()=>et.list(n,{includeArchived:!0}),"queryFn"),enabled:!!n}),{data:Ae}=A({queryKey:m.access.companyUserDirectory(n),queryFn:t(()=>ot.listUserDirectory(n),"queryFn"),enabled:!!n}),{data:le,isLoading:fs,error:gs}=A({queryKey:[...m.issues.list(n),"routine-executions"],queryFn:t(()=>ze.list(n,{originKind:"routine_execution"}),"queryFn"),enabled:!!n&&P==="runs"}),Me=m.liveRuns(n),ce=vt({companyId:n,resourceKey:"live-runs",queryKey:Me,enabled:!!n&&P==="runs",refetchInterval:!1,leaderOnly:!0}),{data:de,dataUpdatedAt:xs}=A({queryKey:Me,queryFn:t(()=>rt.liveRunsForCompany(n),"queryFn"),enabled:ce.enabled,refetchInterval:ce.refetchInterval});Rt(ce,de,xs),(0,l.useEffect)(()=>{ss(j.current)},[p.title,$]);const hs=(0,l.useMemo)(()=>it({agents:C,projects:(S??[]).filter(e=>!e.archivedAt),members:Ae?.users}),[C,Ae?.users,S]),N=_({mutationFn:t(()=>J.create(n,Dt(p)),"mutationFn"),onSuccess:t(async e=>{R({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),z(!1),oe(!1),await d.invalidateQueries({queryKey:m.routines.list(n)}),i({title:"Routine created",body:e.assigneeAgentId?"Add the first trigger to turn it into a live workflow.":"Draft saved. Add a default agent before enabling automation.",tone:"success"}),b(`/routines/${e.id}?tab=triggers`)},"onSuccess")}),De=_({mutationFn:t(e=>M.create(n,{kind:"routine",...e}),"mutationFn"),onSuccess:t(async e=>{if(K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")}),Ie.length>0){const r=Ie;Re([]);try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e.id}))),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])}catch(a){i({title:"Folder created, move failed",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"});return}}else Y(e.id);i({title:"Folder created",body:e.name,tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Failed to save folder",body:e instanceof Error?e.message:"Paperclip could not save the folder.",tone:"error"})},"onError")}),ue=_({mutationFn:t(({folderId:e,payload:r})=>M.update(n,e,r),"mutationFn"),onSuccess:t(async()=>{K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")})},"onSuccess"),onError:t(e=>{i({title:"Folder save failed",body:e instanceof Error?e.message:"Paperclip could not update the folder.",tone:"error"})},"onError")}),Te=_({mutationFn:t(e=>M.delete(n,e),"mutationFn"),onSuccess:t(async(e,r)=>{f===r&&Y("all"),te(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Folder deleted",body:"Items moved to Unfiled.",tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Folder delete failed",body:e instanceof Error?e.message:"Paperclip could not delete the folder.",tone:"error"})},"onError")}),qe=_({mutationFn:t(({itemId:e,folderId:r})=>M.moveItem(n,{kind:"routine",itemId:e,folderId:r}),"mutationFn"),onSuccess:t(async()=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])},"onSuccess"),onError:t(e=>{i({title:"Move failed",body:e instanceof Error?e.message:"Paperclip could not move the routine.",tone:"error"})},"onError")}),js=_({mutationFn:t(({id:e,data:r})=>ze.update(e,r),"mutationFn"),onSuccess:t(async()=>{await d.invalidateQueries({queryKey:[...m.issues.list(n),"routine-executions"]})},"onSuccess")}),Ke=_({mutationFn:t(({id:e,status:r})=>J.update(e,{status:r}),"mutationFn"),onMutate:t(({id:e})=>{Se(e)},"onMutate"),onSuccess:t(async(e,r)=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r.id)})])},"onSuccess"),onSettled:t(()=>{Se(null)},"onSettled"),onError:t(e=>{i({title:"Failed to update routine",body:e instanceof Error?e.message:"Paperclip could not update the routine.",tone:"error"})},"onError")}),Ue=_({mutationFn:t(({id:e,data:r})=>J.run(e,{...r?.variables&&Object.keys(r.variables).length>0?{variables:r.variables}:{},...r?.assigneeAgentId!==void 0?{assigneeAgentId:r.assigneeAgentId}:{},...r?.projectId!==void 0?{projectId:r.projectId}:{},...r?.executionWorkspaceId!==void 0?{executionWorkspaceId:r.executionWorkspaceId}:{},...r?.executionWorkspacePreference!==void 0?{executionWorkspacePreference:r.executionWorkspacePreference}:{},...r?.executionWorkspaceSettings!==void 0?{executionWorkspaceSettings:r.executionWorkspaceSettings}:{}}),"mutationFn"),onMutate:t(({id:e})=>{Ce(e)},"onMutate"),onSuccess:t(async(e,{id:r})=>{ie(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r)})])},"onSuccess"),onSettled:t(()=>{Ce(null)},"onSettled"),onError:t(e=>{i({title:"Routine run failed",body:e instanceof Error?e.message:"Paperclip could not start the routine run.",tone:"error"})},"onError")}),me=(0,l.useMemo)(()=>Gs(),[$]),ys=(0,l.useMemo)(()=>Ws(),[$]),vs=(0,l.useMemo)(()=>Os((C??[]).filter(e=>e.status!=="terminated"),me).map(e=>({id:e.id,label:e.name,searchText:`${e.name} ${e.role} ${e.title??""}`})),[C,me]),bs=(0,l.useMemo)(()=>(S??[]).filter(e=>!e.archivedAt).map(e=>({id:e.id,label:e.name,searchText:e.description??""})),[S]),U=(0,l.useMemo)(()=>new Map((C??[]).map(e=>[e.id,e])),[C]),E=(0,l.useMemo)(()=>new Map((S??[]).map(e=>[e.id,e])),[S]),Ee=(0,l.useMemo)(()=>new Map((h?.folders??[]).map(e=>[e.id,e])),[h]),ws=(0,l.useMemo)(()=>Ls(de,le),[de,le]),y=(0,l.useMemo)(()=>(ke??[]).filter(e=>e.status!=="archived"),[ke]),Oe=(0,l.useMemo)(()=>u.groupBy!=="folder"||f==="all"?y:f==="unfiled"?y.filter(e=>!e.folderId):y.filter(e=>e.folderId===f),[f,u.groupBy,y]),pe=(0,l.useMemo)(()=>{if(!h)return h;const e=new Map;let r=0;for(const a of y)a.folderId?e.set(a.folderId,(e.get(a.folderId)??0)+1):r+=1;return{...h,allCount:y.length,unfiledCount:r,folders:h.folders.map(a=>({...a,itemCount:e.get(a.id)??0}))}},[h,y]),D=(0,l.useMemo)(()=>Kt(Oe,u.sortField,u.sortDir),[Oe,u.sortDir,u.sortField]),Ns=(0,l.useMemo)(()=>qt(D,u.groupBy,E,U,Ee),[U,Ee,E,u.groupBy,D]),Is=(0,l.useMemo)(()=>qs("Recent Runs",os("runs"),"issues"),[]),Le=p.assigneeAgentId?U.get(p.assigneeAgentId)??null:null,Qe=p.projectId?E.get(p.projectId)??null:null,Be=ht(h?.folders??[],f),W=(h?.folders.length??0)>0,fe=P==="routines"&&u.groupBy==="folder"&&W;function ge(e){Fe(r=>{const a={...r,...e};return Mt(G,a),a})}t(ge,"updateRoutineView");function Ve(e){const r=e==="runs"?"runs":"routines";(0,l.startTransition)(()=>{b(os(r))})}t(Ve,"handleTabChange");function Y(e){x(r=>{const a=new URLSearchParams(r),v=Ct(e);return v?a.set("folder",v):a.delete("folder"),a})}t(Y,"setFolderSelection");function T(e=[]){Re(e),L(null),K(!0)}t(T,"openCreateFolder");function $e(){R(e=>({...e,folderId:f==="all"||f==="unfiled"?null:f})),z(!0)}t($e,"openCreateRoutine");async function Rs(e){const r=B;if(r.length!==0)try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e}))),V([]),re(!1),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Routines moved",body:`${r.length} routine${r.length===1?"":"s"} filed.`,tone:"success"})}catch(a){i({title:"Failed to move routines",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"})}}t(Rs,"moveSelectedRoutines");function Cs(e){ie(e)}t(Cs,"handleRunNow");function Ss(e,r){if(!r&&!e.assigneeAgentId){i({title:"Default agent required",body:"Set a default agent before enabling routine automation.",tone:"warn"});return}Ke.mutate({id:e.id,status:wt(e.status,!r)})}t(Ss,"handleToggleEnabled");function _s(e){Ke.mutate({id:e.id,status:e.status==="archived"?"active":"archived"})}return t(_s,"handleToggleArchived"),n?ps?(0,s.jsx)(ct,{variant:"issues-list"}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Routines"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Recurring work definitions that materialize into auditable execution tasks."})]}),(0,s.jsxs)(F,{onClick:$e,children:[(0,s.jsx)(Z,{className:"mr-2 h-4 w-4"}),"Create routine"]})]}),(0,s.jsxs)(Xs,{value:P,onValueChange:Ve,children:[(0,s.jsx)(ut,{align:"start",value:P,onValueChange:Ve,items:[{value:"routines",label:"Routines"},{value:"runs",label:"Recent Runs"}]}),(0,s.jsxs)(Je,{value:"routines",className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[y.length," routine",y.length===1?"":"s"]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)(es,{children:[(0,s.jsx)(Ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Sort",children:[(0,s.jsx)(Bs,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Sort"})]})}),(0,s.jsx)(Xe,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["updated","Updated"],["created","Created"],["lastRun","Last run"],["title","Title"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.sortField===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>{ge(u.sortField===e?{sortDir:u.sortDir==="asc"?"desc":"asc"}:{sortField:e,sortDir:e==="title"?"asc":"desc"})},"onClick"),children:[(0,s.jsx)("span",{children:r}),u.sortField===e?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:u.sortDir==="asc"?"Asc":"Desc"}):null]},e))})})]}),(0,s.jsxs)(es,{children:[(0,s.jsx)(Ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Group",children:[(0,s.jsx)(Ks,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Group"})]})}),(0,s.jsx)(Xe,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["folder","Folder"],["project","Project"],["assignee","Agent"],["none","None"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.groupBy===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>ge({groupBy:e,collapsedGroups:[]}),"onClick"),children:[(0,s.jsx)("span",{children:r}),u.groupBy===e?(0,s.jsx)(tt,{className:"h-3.5 w-3.5"}):null]},e))})})]}),u.groupBy==="folder"&&!W?(0,s.jsxs)(F,{variant:"outline",size:"sm",onClick:t(()=>T(),"onClick"),children:[(0,s.jsx)(Z,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]}):null,fe?(0,s.jsx)(F,{variant:"ghost",size:"sm",className:"text-xs",onClick:t(()=>re(e=>!e),"onClick"),children:ne?"Done":"Select"}):null]})]}),u.groupBy==="folder"?(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(xt,{result:pe,selection:f,allLabel:"All routines",onClick:t(()=>Ne(!0),"onClick")})}):null]}),(0,s.jsx)(Je,{value:"runs",children:(0,s.jsx)(Vs,{issues:le??[],isLoading:fs,error:gs,agents:C,projects:S,liveIssueIds:ws,viewStateKey:"paperclip:routine-recent-runs-view",issueLinkState:Is,onUpdateIssue:t((e,r)=>js.mutate({id:e,data:r}),"onUpdateIssue")})})]}),(0,s.jsx)(Js,{open:$,onOpenChange:t(e=>{N.isPending||z(e)},"onOpenChange"),children:(0,s.jsxs)(Hs,{showCloseButton:!1,className:"flex max-h-(--sz-calc-18) max-w-3xl flex-col gap-0 overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"shrink-0 flex flex-wrap items-center justify-between gap-3 border-b border-border/60 px-5 py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"New routine"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Define the recurring work first. Default project and agent are optional for draft routines."})]}),(0,s.jsx)(F,{variant:"ghost",size:"sm",onClick:t(()=>{z(!1),oe(!1)},"onClick"),disabled:N.isPending,children:"Cancel"})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,s.jsx)("div",{className:"px-5 pt-5 pb-3",children:(0,s.jsx)("textarea",{ref:j,className:"w-full resize-none overflow-hidden bg-transparent text-xl font-semibold outline-none placeholder:text-muted-foreground/50",placeholder:"Routine title",rows:1,value:p.title,onChange:t(e=>{R(r=>({...r,title:e.target.value})),ss(e.target)},"onChange"),onKeyDown:t(e=>{if(e.key==="Enter"&&!e.metaKey&&!e.ctrlKey&&!e.nativeEvent.isComposing){e.preventDefault(),o.current?.focus();return}e.key==="Tab"&&!e.shiftKey&&(e.preventDefault(),p.assigneeAgentId?p.projectId?o.current?.focus():I.current?.focus():w.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,s.jsx)("div",{className:"px-5 pb-3",children:(0,s.jsx)("div",{className:"overflow-x-auto overscroll-x-contain",children:(0,s.jsxs)("div",{className:"inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap",children:[(0,s.jsx)("span",{children:"For"}),(0,s.jsx)(Ye,{ref:w,value:p.assigneeAgentId,options:vs,recentOptionIds:me,placeholder:"Responsible",noneLabel:"No responsible",searchPlaceholder:"Search responsible...",emptyMessage:"No responsible found.",onChange:t(e=>{e&&zs(e),R(r=>({...r,assigneeAgentId:e}))},"onChange"),onConfirm:t(()=>{p.projectId?o.current?.focus():I.current?.focus()},"onConfirm"),renderTriggerValue:t(e=>e?Le?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(He,{agent:Le,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"truncate",children:e.label}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Responsible"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=U.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(He,{agent:r,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):null,(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"in"}),(0,s.jsx)(Ye,{ref:I,value:p.projectId,options:bs,recentOptionIds:ys,placeholder:"Project",noneLabel:"No project",searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:t(e=>{e&&Qs(e),R(r=>({...r,projectId:e}))},"onChange"),onConfirm:t(()=>o.current?.focus(),"onConfirm"),renderTriggerValue:t(e=>e&&Qe?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:Qe.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Project"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=E.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:r?.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"filed in"}),(0,s.jsxs)(we,{value:p.folderId??"__unfiled",onValueChange:t(e=>R(r=>({...r,folderId:e==="__unfiled"?null:e})),"onValueChange"),children:[(0,s.jsx)(be,{className:"h-8 w-auto min-w-32 border-0 bg-muted/50 px-2 shadow-none",children:(0,s.jsx)(ye,{})}),(0,s.jsxs)(ve,{children:[(0,s.jsx)(X,{value:"__unfiled",children:"Unfiled"}),(h?.folders??[]).map(e=>(0,s.jsx)(X,{value:e.id,children:e.name},e.id))]})]})]})})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-4",children:(0,s.jsx)(Ys,{ref:o,value:p.description,onChange:t(e=>R(r=>({...r,description:e})),"onChange"),placeholder:"Add instructions...",bordered:!1,contentClassName:"min-h-(--sz-160px) text-sm text-muted-foreground",mentions:hs,onSubmit:t(()=>{!N.isPending&&p.title.trim()&&p.projectId&&p.assigneeAgentId&&N.mutate()},"onSubmit")})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-3",children:(0,s.jsxs)(Ge,{open:_e,onOpenChange:oe,children:[(0,s.jsxs)(ls,{className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Advanced delivery settings"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Keep policy controls secondary to the work definition."})]}),_e?(0,s.jsx)(nt,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(cs,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsx)(We,{className:"pt-3",children:(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Concurrency"}),(0,s.jsxs)(we,{value:p.concurrencyPolicy,onValueChange:t(e=>R(r=>({...r,concurrencyPolicy:e})),"onValueChange"),children:[(0,s.jsx)(be,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(ve,{children:_t.map(e=>(0,s.jsx)(X,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:kt[p.concurrencyPolicy]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Catch-up"}),(0,s.jsxs)(we,{value:p.catchUpPolicy,onValueChange:t(e=>R(r=>({...r,catchUpPolicy:e})),"onValueChange"),children:[(0,s.jsx)(be,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(ve,{children:Ft.map(e=>(0,s.jsx)(X,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:Pt[p.catchUpPolicy]})]})]})})]})})]}),(0,s.jsxs)("div",{className:"shrink-0 flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"After creation, Paperclip takes you straight to trigger setup. Draft routines stay paused until you add a default agent."}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:items-end",children:[(0,s.jsxs)(F,{onClick:t(()=>N.mutate(),"onClick"),disabled:N.isPending||!p.title.trim(),children:[(0,s.jsx)(Z,{className:"mr-2 h-4 w-4"}),N.isPending?"Creating...":"Create routine"]}),N.isError?(0,s.jsx)("p",{className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Failed to create routine"}):null]})]})]})}),ae?(0,s.jsx)(lt,{children:(0,s.jsx)(at,{className:"pt-6 text-sm text-destructive",children:ae instanceof Error?ae.message:"Failed to load routines"})}):null,P==="routines"?(0,s.jsxs)("div",{className:Ds(fe&&"flex gap-4"),children:[fe?(0,s.jsx)(dt,{result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"routines",loading:Pe,onSelect:Y,onCreate:t(()=>T(),"onCreate"),onRename:t((e,r)=>ue.mutate({folderId:e.id,payload:{name:r}}),"onRename"),onEdit:t(e=>{L(e),K(!0)},"onEdit"),onDelete:te}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[u.groupBy==="folder"&&W?(0,s.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:f==="all"?(0,s.jsx)(Et,{label:"All routines",count:D.length}):(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(jt,{color:Be?.color}),(0,s.jsx)("span",{className:"truncate font-medium",children:f==="unfiled"?"Unfiled":Be?.name??"Folder"}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[D.length," routine",D.length===1?"":"s"]})]})}):null,u.groupBy==="folder"&&!W&&!Pe&&y.length>0?(0,s.jsx)(mt,{storageKey:`paperclip:routines-folder-nudge:${n??"none"}`,itemLabelPlural:"routines",onCreateFolder:t(()=>T(),"onCreateFolder")}):null,ne?(0,s.jsx)(gt,{selectedCount:B.length,folders:h?.folders??[],onMove:t(e=>{Rs(e)},"onMove"),onCreateAndMove:t(()=>T(B),"onCreateAndMove"),onClear:t(()=>V([]),"onClear"),onDone:t(()=>{re(!1),V([])},"onDone")}):null,y.length===0?(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(je,{icon:ee,message:"No active routines. Use Create routine to define the first recurring workflow."})}):D.length===0?(0,s.jsxs)("div",{className:"py-12",children:[(0,s.jsx)(je,{icon:ee,message:f==="all"?"No routines match this view.":"This folder is empty."}),f!=="all"?(0,s.jsx)("div",{className:"mt-3 flex justify-center",children:(0,s.jsxs)(F,{size:"sm",onClick:$e,children:[(0,s.jsx)(Z,{className:"mr-2 h-3.5 w-3.5"}),"New routine in this folder"]})}):null]}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:Ns.map(e=>{const r=!u.collapsedGroups.includes(e.key);return(0,s.jsxs)(Ge,{open:r,onOpenChange:t(a=>{ge({collapsedGroups:a?u.collapsedGroups.filter(v=>v!==e.key):[...u.collapsedGroups,e.key]})},"onOpenChange"),children:[e.label?(0,s.jsx)(Ut,{label:e.label,count:e.items.length,isOpen:r}):null,(0,s.jsx)(We,{children:e.items.map(a=>(0,s.jsx)(It,{routine:a,projectById:E,agentById:U,runningRoutineId:us,statusMutationRoutineId:ms,href:`/routines/${a.id}`,runNowButton:!0,divider:!1,onRunNow:Cs,onToggleEnabled:Ss,onToggleArchived:_s,selectMode:ne,selected:B.includes(a.id),onSelectChange:t((v,xe)=>{V(H=>xe?Array.from(new Set([...H,v.id])):H.filter(Fs=>Fs!==v.id))},"onSelectChange"),extraMenuItems:(0,s.jsx)(Nt,{folders:h?.folders??[],currentFolderId:a.folderId??null,onMove:t(v=>{const xe=a.folderId??null;qe.mutate({itemId:a.id,folderId:v}),i({title:"Routine moved",body:v?`Moved "${a.title}" to ${h?.folders.find(H=>H.id===v)?.name??"folder"}.`:`Moved "${a.title}" to Unfiled.`,tone:"success",action:{label:"Undo",onClick:t(()=>qe.mutate({itemId:a.id,folderId:xe}),"onClick")}})},"onMove"),onCreateAndMove:t(()=>T([a.id]),"onCreateAndMove")})},a.id))})]},e.key)})})]})]}):null,(0,s.jsx)(pt,{open:O,kind:"routine",folder:se,pending:De.isPending||ue.isPending,onOpenChange:K,onSubmit:t(e=>{se?ue.mutate({folderId:se.id,payload:e}):De.mutate(e)},"onSubmit")}),(0,s.jsx)(ft,{open:Q!==null,folder:Q,itemLabelPlural:"routines",pending:Te.isPending,onOpenChange:t(e=>{e||te(null)},"onOpenChange"),onConfirm:t(()=>{Q&&Te.mutate(Q.id)},"onConfirm")}),(0,s.jsx)(St,{open:ds,onOpenChange:Ne,result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"Routines",onSelect:Y,onCreate:t(()=>T(),"onCreate")}),(0,s.jsx)($s,{open:k!==null,onOpenChange:t(e=>{e||ie(null)},"onOpenChange"),companyId:n,routineName:k?.title??null,agents:C??[],projects:S??[],defaultProjectId:k?.projectId??null,defaultAssigneeAgentId:k?.assigneeAgentId??null,variables:k?.variables??[],isPending:Ue.isPending,onSubmit:t(e=>{k&&Ue.mutate({id:k.id,data:e})},"onSubmit")})]}):(0,s.jsx)(je,{icon:ee,message:"Select a company to view routines."})}t(cn,"Routines");function Et({label:n,count:c}){return(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(ee,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate font-medium",children:n}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[c," routine",c===1?"":"s"]})]})}t(Et,"FolderIconHeader");export{cn as Routines};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E=Object.defineProperty;var r=(t,o)=>E(t,"name",{value:o,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as M,Lr as q}from"./createLucideIcon-
|
|
1
|
+
var E=Object.defineProperty;var r=(t,o)=>E(t,"name",{value:o,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as M,Lr as q}from"./createLucideIcon-CZEG6UJ7.js";var e=_(q(),1),L=_(M(),1),w=(0,e.createContext)(null),v=768;function j({children:t}){const[o,g]=(0,e.useState)(()=>window.innerWidth<v),[n,a]=(0,e.useState)(()=>window.innerWidth>=v),[i,l]=(0,e.useState)(!1),[c,u]=(0,e.useState)(!1);(0,e.useEffect)(()=>{const s=window.matchMedia("(max-width: 767px)"),S=r(h=>{g(h.matches),a(!h.matches)},"onChange");return s.addEventListener("change",S),()=>s.removeEventListener("change",S)},[]);const d=!1,p=!1,m=!1,b=(0,e.useCallback)(s=>{},[]),C=(0,e.useCallback)(()=>{},[]),f=(0,e.useCallback)(s=>{},[]),x=(0,e.useCallback)(()=>a(s=>!s),[]),k=(0,e.useMemo)(()=>({sidebarOpen:n,setSidebarOpen:a,toggleSidebar:x,isMobile:o,collapsed:d,setCollapsed:b,toggleCollapsed:C,collapseLocked:p,peeking:m,setPeeking:f,forceCollapsed:c,setForceCollapsed:u,routeRequestsCollapsed:i,setRouteRequestsCollapsed:l}),[n,a,x,o,d,b,C,p,m,f,c,u,i,l]);return(0,L.jsx)(w.Provider,{value:k,children:t})}r(j,"SidebarProvider");function I(){const t=(0,e.useContext)(w);if(!t)throw new Error("useSidebar must be used within SidebarProvider");return t}r(I,"useSidebar");export{I as n,j as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var U=Object.defineProperty;var n=(e,r)=>U(e,"name",{value:r,configurable:!0});import{i as x}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as M,Lr as T,S as g,Xn as o,t as l}from"./createLucideIcon-
|
|
1
|
+
var U=Object.defineProperty;var n=(e,r)=>U(e,"name",{value:r,configurable:!0});import{i as x}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as M,Lr as T,S as g,Xn as o,t as l}from"./createLucideIcon-CZEG6UJ7.js";import{a as P,c as G,r as D}from"./agents-ZcIBncVi.js";import{i as W,o as b,s as _}from"./EmptyState-DeVTy8IU.js";import{A as C,j as v,t as z}from"./button-LkWt40cm.js";import{n as j}from"./clipboard-CjMs5cp9.js";import{t as $}from"./loader-circle-Cu72DKdC.js";import{t as H}from"./octagon-alert-DfqJ6RjK.js";var V=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],B=l("archive",V),F=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],I=l("circle-x",F),Y=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],L=l("clock",Y),A=[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],J=l("cloud-off",A),K=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],X=l("git-merge",K),Q=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Z=l("git-pull-request",Q);function w(e={}){return{workspaceCommandId:e.workspaceCommandId??null,runtimeServiceId:e.runtimeServiceId??null,serviceIndex:e.serviceIndex??null}}n(w,"sanitizeWorkspaceRuntimeControlTarget");function ee(e,r){return r?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(r)}`:e}n(ee,"withCompanyScope");function i(e,r,t=""){return ee(`/projects/${encodeURIComponent(e)}${t}`,r)}n(i,"projectPath");var Ie={repositoryOptions:n(e=>o.get(`/companies/${e}/project-repositories`),"repositoryOptions"),setRepositories:n((e,r)=>o.put(i(e,void 0,"/repositories"),{repositoryIds:r}),"setRepositories"),list:n((e,r={})=>{const t=new URLSearchParams;r.includeArchived&&t.set("includeArchived","true");const a=t.toString();return o.get("/companies/"+encodeURIComponent(e)+"/projects"+(a?"?"+a:""))},"list"),get:n((e,r)=>o.get(i(e,r)),"get"),create:n((e,r)=>o.post(`/companies/${e}/projects`,r),"create"),update:n((e,r,t)=>o.patch(i(e,t),r),"update"),listWorkspaces:n((e,r)=>o.get(i(e,r,"/workspaces")),"listWorkspaces"),createWorkspace:n((e,r,t)=>o.post(i(e,t,"/workspaces"),r),"createWorkspace"),updateWorkspace:n((e,r,t,a)=>o.patch(i(e,a,`/workspaces/${encodeURIComponent(r)}`),t),"updateWorkspace"),controlWorkspaceRuntimeServices:n((e,r,t,a,s={})=>o.post(i(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-services/${t}`),w(s)),"controlWorkspaceRuntimeServices"),controlWorkspaceCommands:n((e,r,t,a,s={})=>o.post(i(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-commands/${t}`),w(s)),"controlWorkspaceCommands"),removeWorkspace:n((e,r,t)=>o.delete(i(e,t,`/workspaces/${encodeURIComponent(r)}`)),"removeWorkspace"),remove:n((e,r)=>o.delete(i(e,r)),"remove")};function Le(e){if(!e)return null;let r;try{r=new URL(e.trim())}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||r.username||r.password)return null;const t=r.protocol==="https:"?"https":"http",a=r.pathname||"/";return`${t}://${r.host.toLowerCase()}${a}`}n(Le,"normalizeExternalObjectHref");var re=l("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),te={unknown:_,open:b,waiting:L,running:$,succeeded:v,failed:I,blocked:H,closed:C,archived:B,auth_required:j,unreachable:J},ne=_;function Se(e){return te[e]??ne}n(Se,"externalObjectIconForCategory");var ae={archive:B,check:v,"check-circle":v,circle:C,"circle-dot":b,clock:L,github:re,"git-merge":X,"git-pull-request":Z,key:j,loader:$,"x-circle":I};function Oe(e){return e?ae[e]??null:null}n(Oe,"externalObjectIconForKey");var oe={unknown:"Not yet resolved",open:"Open",waiting:"Waiting",running:"Running",succeeded:"Succeeded",failed:"Failed",blocked:"Blocked",closed:"Closed",archived:"Archived",auth_required:"Authorization required",unreachable:"Unreachable"};function ce(e){return oe[e]??e.replace(/_/g," ")}n(ce,"externalObjectCategoryLabel");var ie={unknown:"Not yet refreshed",fresh:"Fresh",stale:"Stale",auth_required:"Requires auth",unreachable:"Unreachable"};function se(e){return ie[e]??e.replace(/_/g," ")}n(se,"externalObjectLivenessLabel");function Re(e){const r=e.statusLabel?.trim();if(r)return r;const t=e.providerKey==="url"&&e.objectType==="link",a=!!(e.providerKey&&e.objectType);return e.statusCategory==="unknown"&&a&&!t?e.liveness==="fresh"?"Status unavailable":se(e.liveness):ce(e.statusCategory)}n(Re,"externalObjectDisplayStatusLabel");var S={muted:0,neutral:1,success:2,info:3,warning:4,danger:5};function le(e){return e?S[e]??0:0}n(le,"externalObjectToneSeverity");var ue={github:"GitHub",github_pull_request:"GitHub",github_issue:"GitHub",hubspot:"HubSpot",linear:"Linear",jira:"Jira",notion:"Notion",asana:"Asana"};function de(e){if(!e)return"External";const r=ue[e];return r||e.split(/[._-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}n(de,"externalObjectProviderLabel");var pe={pull_request:"pull request",issue:"issue",deployment:"deployment",workflow_run:"workflow run",ticket:"ticket",lead:"lead",url_link:"URL"};function fe(e){return e?pe[e]??e.replace(/_/g," "):"object"}n(fe,"externalObjectTypeLabel");function Ee(e,r,t){const a=t?.trim();return a||(e==="url"&&r==="link"?"URL":`${de(e)} ${fe(r)}`)}n(Ee,"externalObjectDisplayLabel");function me(e){if(!e)return null;const r=e.highestSeverity;return!r||le(r)<=S.muted?null:r}n(me,"dominantExternalObjectTone");function Ne(e){if(!e)return 0;const r=me(e);return r?e.objects.filter(t=>t.statusTone===r).length:0}n(Ne,"externalObjectDominantCount");var k=x(T(),1),O="(prefers-reduced-motion: reduce)";function he(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(O).matches}n(he,"getInitialValue");function qe(){const[e,r]=(0,k.useState)(he);return(0,k.useEffect)(()=>{if(typeof window>"u"||!window.matchMedia)return;const t=window.matchMedia(O),a=n(s=>r(s.matches),"handler");return r(t.matches),t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[]),e}n(qe,"usePrefersReducedMotion");var c=x(M(),1),ve=["backlog","todo","in_progress","in_review","done","cancelled","blocked"];function f(e){return e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}n(f,"statusLabel");function ke(e){if(!e||e.state==="none")return"Blocked";if(e.reason==="active_child"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · waiting on active sub-task ${e.sampleBlockerIdentifier}`:r===1?"Blocked · waiting on 1 active sub-task":`Blocked · waiting on ${r} active sub-tasks`}if(e.reason==="active_dependency"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · covered by active dependency ${e.sampleBlockerIdentifier}`:r===1?"Blocked · covered by 1 active dependency":`Blocked · covered by ${r} active dependencies`}if(e.reason==="stalled_review"){const r=e.stalledBlockerCount,t=e.sampleStalledBlockerIdentifier??e.sampleBlockerIdentifier;return r===1&&t?`Blocked · review stalled on ${t}`:r===1?"Blocked · review stalled with no clear next step":`Blocked · ${r} reviews stalled with no clear next step`}if(e.reason==="attention_required"){const r=e.attentionBlockerCount||e.unresolvedBlockerCount,t=`${r} ${r===1?"blocker needs":"blockers need"} attention`,a=e.coveredBlockerCount;return a>0?`Blocked · ${t}; ${a} covered by active work`:`Blocked · ${t}`}return"Blocked"}n(ke,"blockedAttentionLabel");function ye({status:e,externalConversationState:r,blockerAttention:t,onChange:a,className:s,showLabel:m,size:R="md"}){const[E,y]=(0,k.useState)(!1),d=e==="in_review"&&r==="waiting"?"idle":e,N=e==="blocked"&&t?.state==="covered",h=e==="blocked"?ke(t):f(d),p=(0,c.jsx)(W,{status:N?"in_queue":d,size:R,className:g(a&&!m&&"cursor-pointer",s),title:h});if(!a)return m?(0,c.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[p,(0,c.jsx)("span",{className:"text-sm",children:f(d)})]}):p;const q=m?(0,c.jsxs)("button",{type:"button","aria-label":`Change status (current: ${h})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[p,(0,c.jsx)("span",{className:"text-sm",children:f(d)})]}):(0,c.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change status (current: ${h})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",children:p});return(0,c.jsxs)(D,{open:E,onOpenChange:y,children:[(0,c.jsx)(G,{asChild:!0,children:q}),(0,c.jsx)(P,{className:"w-40 p-1",align:"start",children:ve.map(u=>(0,c.jsxs)(z,{variant:"ghost",size:"sm",className:g("w-full justify-start gap-2 text-xs",u===e&&"bg-accent"),onClick:n(()=>{a(u),y(!1)},"onClick"),children:[(0,c.jsx)(ye,{status:u,size:"lg"}),f(u)]},u))})]})}n(ye,"StatusIcon");export{w as _,Ee as a,I as b,Se as c,de as d,le as f,Ie as g,Le as h,ce as i,Oe as l,re as m,qe as n,Re as o,fe as p,me as r,Ne as s,ye as t,se as u,Z as v,B as x,L as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var o=(e,t)=>m(e,"name",{value:t,configurable:!0});import{i as l}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as g,Ht as u,Lr as f,S as d,Vt as C,Xn as s,Yn as v,t as h}from"./createLucideIcon-CZEG6UJ7.js";import{B as $,F as I,H as R,L as k,V as U}from"./zap-CCqZhqc3.js";var _=l(f(),1),i=l(g(),1);function T({...e}){return(0,i.jsx)(U,{"data-slot":"popover",...e})}o(T,"Popover");function x({...e}){return(0,i.jsx)(R,{"data-slot":"popover-trigger",...e})}o(x,"PopoverTrigger");function P({className:e,align:t="center",sideOffset:n=4,disablePortal:r=!1,...p}){const c=(0,i.jsx)(k,{"data-slot":"popover-content",align:t,sideOffset:n,className:d("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...p});return r?c:(0,i.jsx)($,{children:c})}o(P,"PopoverContent");function j({...e}){return(0,i.jsx)(I,{"data-slot":"popover-anchor",...e})}o(j,"PopoverAnchor");function E({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"popover-title",className:d("font-medium",e),...t})}o(E,"PopoverTitle");function F({className:e,...t}){return(0,i.jsx)("p",{"data-slot":"popover-description",className:d("text-muted-foreground",e),...t})}o(F,"PopoverDescription");var y=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],K=h("folder",y);function w(e,t){return t?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(t)}`:e}o(w,"withCompanyScope");function a(e,t,n=""){return w(`/agents/${encodeURIComponent(e)}${n}`,t)}o(a,"agentPath");var z={list:o(e=>s.get(`/companies/${e}/agents`),"list"),org:o(e=>s.get(`/companies/${e}/org`),"org"),listConfigurations:o(e=>s.get(`/companies/${e}/agent-configurations`),"listConfigurations"),get:o(async(e,t)=>{try{return await s.get(a(e,t))}catch(n){if(!(n instanceof v)||n.status!==409||!t||C(e))throw n;const r=u(e);if(!r)throw n;const p=(await s.get(`/companies/${t}/agents`)).filter(c=>c.status!=="terminated"&&u(c.urlKey)===r);if(p.length!==1)throw n;return s.get(a(p[0].id,t))}},"get"),getConfiguration:o((e,t)=>s.get(a(e,t,"/configuration")),"getConfiguration"),listConfigRevisions:o((e,t)=>s.get(a(e,t,"/config-revisions")),"listConfigRevisions"),getConfigRevision:o((e,t,n)=>s.get(a(e,n,`/config-revisions/${t}`)),"getConfigRevision"),rollbackConfigRevision:o((e,t,n)=>s.post(a(e,n,`/config-revisions/${t}/rollback`),{}),"rollbackConfigRevision"),create:o((e,t)=>s.post(`/companies/${e}/agents`,t),"create"),hire:o((e,t)=>s.post(`/companies/${e}/agent-hires`,t),"hire"),update:o((e,t,n)=>s.patch(a(e,n),t),"update"),updatePermissions:o((e,t,n)=>s.patch(a(e,n,"/permissions"),t),"updatePermissions"),batchAdapterConfigPreview:o(e=>s.post("/agents/batch/adapter-config/preview",{agentIds:e}),"batchAdapterConfigPreview"),batchAdapterConfig:o((e,t)=>s.post("/agents/batch/adapter-config",{agentIds:e,values:t}),"batchAdapterConfig"),instructionsBundle:o((e,t)=>s.get(a(e,t,"/instructions-bundle")),"instructionsBundle"),updateInstructionsBundle:o((e,t,n)=>s.patch(a(e,n,"/instructions-bundle"),t),"updateInstructionsBundle"),instructionsFile:o((e,t,n)=>s.get(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"instructionsFile"),saveInstructionsFile:o((e,t,n)=>s.put(a(e,n,"/instructions-bundle/file"),t),"saveInstructionsFile"),deleteInstructionsFile:o((e,t,n)=>s.delete(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"deleteInstructionsFile"),pause:o((e,t)=>s.post(a(e,t,"/pause"),{}),"pause"),resume:o((e,t)=>s.post(a(e,t,"/resume"),{}),"resume"),clearError:o((e,t)=>s.post(a(e,t,"/clear-error"),{}),"clearError"),approve:o((e,t)=>s.post(a(e,t,"/approve"),{}),"approve"),terminate:o((e,t)=>s.post(a(e,t,"/terminate"),{}),"terminate"),remove:o((e,t)=>s.delete(a(e,t)),"remove"),listKeys:o((e,t)=>s.get(a(e,t,"/keys")),"listKeys"),skills:o((e,t)=>s.get(a(e,t,"/skills")),"skills"),syncSkills:o((e,t,n,r)=>s.post(a(e,r,"/skills/sync"),{desiredSkills:t,mode:n}),"syncSkills"),createKey:o((e,t,n,r)=>s.post(a(e,n,"/keys"),{name:t,...r?{scope:r}:{}}),"createKey"),revokeKey:o((e,t,n)=>s.delete(a(e,n,`/keys/${encodeURIComponent(t)}`)),"revokeKey"),runtimeState:o((e,t)=>s.get(a(e,t,"/runtime-state")),"runtimeState"),taskSessions:o((e,t)=>s.get(a(e,t,"/task-sessions")),"taskSessions"),resetSession:o((e,t,n)=>s.post(a(e,n,"/runtime-state/reset-session"),{taskKey:t??null}),"resetSession"),adapterModels:o((e,t,n)=>{const r=new URLSearchParams;n?.refresh&&r.set("refresh","1"),n?.provider&&r.set("provider",n.provider),n?.environmentId&&r.set("environmentId",n.environmentId);const p=r.size>0?`?${r.toString()}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models${p}`)},"adapterModels"),detectModel:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),"detectModel"),testEnvironment:o((e,t,n)=>s.post(`/companies/${e}/adapters/${t}/test-environment`,n),"testEnvironment"),getAdapterAuthSignal:o((e,t,n)=>{const r=n?`?environmentId=${encodeURIComponent(n)}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/auth-signal${r}`)},"getAdapterAuthSignal"),invoke:o((e,t,n={})=>s.post(a(e,t,"/heartbeat/invoke"),n),"invoke"),wakeup:o((e,t,n)=>s.post(a(e,n,"/wakeup"),t),"wakeup"),retryFailedRun:o(async(e,t,n)=>{const r=await s.post(a(e,n,"/wakeup"),{source:"on_demand",triggerDetail:"manual",reason:"retry_failed_run",failedRunId:t});if("id"in r){if(["failed","timed_out","cancelled","interrupted"].includes(r.status))throw new Error("The previous retry has already stopped. Refresh the task and retry its latest failed run.");return{runId:r.id,issueId:null}}if("actionId"in r){if(r.status==="failed"||r.status==="cancelled")throw new Error("This retry could not start. Open the task to review its current access and recovery state.");return{runId:r.runId,issueId:r.issueId}}throw new Error(r.message??"Retry was skipped.")},"retryFailedRun"),loginWithClaude:o((e,t)=>s.post(a(e,t,"/claude-login"),{}),"loginWithClaude"),startAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions`,n),"startAdapterAuthLogin"),getAdapterAuthLoginStatus:o((e,t,n)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}`,{cache:"no-store"}),"getAdapterAuthLoginStatus"),getActiveAdapterAuthLoginSession:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/active`,{cache:"no-store"}),"getActiveAdapterAuthLoginSession"),cancelAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}/cancel`,{}),"cancelAdapterAuthLogin"),getClaudeOAuthTokenStatus:o(e=>s.get(`/companies/${encodeURIComponent(e)}/claude-oauth-token-status`),"getClaudeOAuthTokenStatus"),startClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions`,{adapterType:"claude_local",...t}),"startClaudeSetupTokenLogin"),getClaudeSetupTokenLoginStatus:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}`),"getClaudeSetupTokenLoginStatus"),getActiveClaudeSetupTokenLoginSession:o(e=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/active`,{cache:"no-store"}),"getActiveClaudeSetupTokenLoginSession"),getClaudeSetupTokenLoginPrompt:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/prompt`),"getClaudeSetupTokenLoginPrompt"),submitClaudeSetupTokenBrowserCode:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/code`,{browserCode:n}),"submitClaudeSetupTokenBrowserCode"),completeClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/completion`,{}),"completeClaudeSetupTokenLogin"),cancelClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/cancel`,{}),"cancelClaudeSetupTokenLogin"),availableSkills:o(()=>s.get("/skills/available"),"availableSkills")};export{P as a,x as c,j as i,K as n,F as o,T as r,E as s,z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{i as a}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as d,Lr as c,S as u,d as v}from"./createLucideIcon-
|
|
1
|
+
var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{i as a}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as d,Lr as c,S as u,d as v}from"./createLucideIcon-CZEG6UJ7.js";import{r as g}from"./button-LkWt40cm.js";var h=a(c(),1),f=a(d(),1),l=g("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-(--tp-color-box-shadow) overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function y({className:e,variant:r="default",asChild:i=!1,...o}){const n=i?v:"span";return(0,f.jsx)(n,{"data-slot":"badge","data-variant":r,className:u(l({variant:r}),e),...o})}t(y,"Badge");export{l as n,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t}from"./createLucideIcon-
|
|
1
|
+
import{t}from"./createLucideIcon-CZEG6UJ7.js";var e=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],r=t("bot",e);export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var w=Object.defineProperty;var l=(t,r)=>w(t,"name",{value:r,configurable:!0});import{i as y}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as E,Lr as D,S as B,V as C,d as S,t as c}from"./createLucideIcon-CINAT48M.js";var F=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],T=c("circle-check",F),V=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],M=c("circle",V),j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],P=c("plus",j),K={backlog:"text-muted-foreground border-muted-foreground",todo:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",in_progress:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",in_review:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",done:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",cancelled:"text-neutral-500 border-neutral-500",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},R="text-muted-foreground border-muted-foreground",U={backlog:"text-muted-foreground",todo:"text-amber-600 dark:text-amber-400",in_progress:"text-blue-600 dark:text-blue-400",in_review:"text-violet-600 dark:text-violet-400",done:"text-green-600 dark:text-green-400",cancelled:"text-neutral-500",blocked:"text-red-600 dark:text-red-400"},W="text-muted-foreground",i={gray:"bg-[#F5F3F0] text-[#52585D] border-[#A8AEB2] dark:bg-[#6e696024] dark:text-[#9A958A] dark:border-[#9e958a73]",blue:"bg-[#DBEAFE] text-[#1D4ED8] border-[#2563EB] dark:bg-[#2563eb2e] dark:text-[#2563EB] dark:border-[#2563eb73]",amber:"bg-[#FEF3C7] text-[#B45309] border-[#F59E0B] dark:bg-[#f59e0b24] dark:text-[#F59E0B] dark:border-[#f59e0b73]",green:"bg-[#DCFCE7] text-[#188A3C] border-[#22C55E] dark:bg-[#22c55e1f] dark:text-[#22C55E] dark:border-[#22c55e73]",violet:"bg-[#EDE9FE] text-[#5B21B6] border-[#7C3AED] dark:bg-[#7c3aed2e] dark:text-[#7C3AED] dark:border-[#7c3aed73]",red:"bg-[#FEE2E2] text-[#991B1B] border-[#DC2626] dark:bg-[#dc26262e] dark:text-[#DC2626] dark:border-[#dc262673]"},G={active:`border ${i.green}`,running:`border ${i.blue}`,scheduled_retry:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",paused:`border ${i.amber}`,idle:`border ${i.gray}`,archived:"bg-muted text-muted-foreground",planned:"bg-muted text-muted-foreground",achieved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",completed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",timed_out:"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",ok:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",warning:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",error:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",info:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",terminated:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",pending:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",queued:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",pending_approval:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",revision_requested:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",approved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",rejected:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",draft:"bg-muted text-muted-foreground",backlog:"bg-muted text-muted-foreground",todo:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",in_progress:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",in_review:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",done:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",cancelled:"bg-muted text-muted-foreground",allowed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",denied:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",block:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","require-approval":"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",redacted:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300","rate-limit":"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",deferred:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",hidden:"bg-muted text-muted-foreground",quarantined:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","runtime-error":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",healthy:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",degraded:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unchecked:"bg-muted text-muted-foreground"},H="bg-muted text-muted-foreground",J="text-[#1D4ED8] dark:text-[#2563EB]",Q="bg-blue-500/10 border-blue-500/30 text-blue-600 dark:text-blue-400",X={info:"border-[#2563EB]/40 bg-[#DBEAFE]/50 text-[#1D4ED8] dark:border-[#2563eb59] dark:bg-[#2563eb14] dark:text-[#93C5FD]",warning:"border-[#F59E0B]/50 bg-[#FEF3C7]/60 text-[#B45309] dark:border-[#f59e0b59] dark:bg-[#f59e0b12] dark:text-[#F59E0B]",danger:"border-destructive/40 bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},Y={idle:"--status-agent-idle",active:"--status-agent-idle",running:"--status-agent-running",paused:"--status-agent-paused",error:"--status-agent-error"},Z="--status-agent-idle",ee={idle:"--status-task-backlog",backlog:"--status-task-backlog",todo:"--status-task-todo",in_progress:"--status-task-in_progress",in_review:"--status-task-in_review",done:"--status-task-done",blocked:"--status-task-blocked",cancelled:"--status-task-cancelled"},re="--status-task-backlog",te={idle:"--status-task-icon-backlog",backlog:"--status-task-icon-backlog",todo:"--status-task-icon-todo",in_progress:"--status-task-icon-in_progress",in_review:"--status-task-icon-in_review",done:"--status-task-icon-done",blocked:"--status-task-icon-blocked",cancelled:"--status-task-icon-cancelled",in_queue:"--status-task-icon-in_queue"},ae="--status-task-icon-backlog",de={running:"bg-blue-400 animate-pulse",active:"bg-green-400",paused:"bg-yellow-400",idle:"bg-yellow-400",pending_approval:"bg-amber-400",error:"bg-red-400",archived:"bg-neutral-400"},oe="bg-neutral-400",ne={critical:"text-red-600 dark:text-red-400",high:"text-orange-600 dark:text-orange-400",medium:"text-yellow-600 dark:text-yellow-400",low:"text-blue-600 dark:text-blue-400"},be="text-yellow-600 dark:text-yellow-400",se={unknown:"text-muted-foreground border-muted-foreground",open:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",waiting:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",running:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",succeeded:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",merged:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",failed:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",closed:"text-neutral-500 border-neutral-500",archived:"text-neutral-500 border-neutral-500",auth_required:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",unreachable:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},ge="text-muted-foreground border-muted-foreground",ue={unknown:"bg-muted text-muted-foreground",open:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",waiting:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",running:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",closed:"bg-muted text-muted-foreground",archived:"bg-muted text-muted-foreground",auth_required:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unreachable:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},le="bg-muted text-muted-foreground",ie={unknown:"",fresh:"",stale:"opacity-70 [border-style:dashed]",auth_required:"[border-style:dashed]",unreachable:"[border-style:dashed]"},z=y(D(),1),m=l(t=>typeof t=="boolean"?`${t}`:t===0?"0":t,"falsyToString"),f=C,A=l((t,r)=>e=>{var o;if(r?.variants==null)return f(t,e?.class,e?.className);const{variants:g,defaultVariants:d}=r,k=Object.keys(g).map(a=>{const n=e?.[a],s=d?.[a];if(n===null)return null;const b=m(n)||m(s);return g[a][b]}),u=e&&Object.entries(e).reduce((a,n)=>{let[s,b]=n;return b===void 0||(a[s]=b),a},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((a,n)=>{let{class:s,className:b,...p}=n;return Object.entries(p).every(_=>{let[v,x]=_;return Array.isArray(x)?x.includes({...d,...u}[v]):{...d,...u}[v]===x})?[...a,s,b]:a},[]);return f(t,k,h,e?.class,e?.className)},"cva"),q=y(E(),1),N=A("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-(--tp-color-background-color-border-color-box-shadow-opacity) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",cta:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-9","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),O=z.forwardRef(l(function({className:r,variant:e="default",size:o="default",asChild:g=!1,...d},k){const u=g?S:"button";return(0,q.jsx)(u,{ref:k,"data-slot":"button","data-variant":e,"data-size":o,className:B(N({variant:e,size:o,className:r})),...d})},"Button"));O.displayName="Button";export{M as A,G as C,ee as D,ae as E,re as O,J as S,te as T,U as _,oe as a,ne as b,X as c,ue as d,le as f,R as g,K as h,de as i,T as j,P as k,i as l,ge as m,N as n,Y as o,se as p,A as r,Z as s,O as t,ie as u,W as v,H as w,be as x,Q as y};
|
|
1
|
+
var w=Object.defineProperty;var l=(t,r)=>w(t,"name",{value:r,configurable:!0});import{i as y}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as E,Lr as D,S as B,V as C,d as S,t as c}from"./createLucideIcon-CZEG6UJ7.js";var F=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],T=c("circle-check",F),V=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],M=c("circle",V),j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],P=c("plus",j),K={backlog:"text-muted-foreground border-muted-foreground",todo:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",in_progress:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",in_review:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",done:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",cancelled:"text-neutral-500 border-neutral-500",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},R="text-muted-foreground border-muted-foreground",U={backlog:"text-muted-foreground",todo:"text-amber-600 dark:text-amber-400",in_progress:"text-blue-600 dark:text-blue-400",in_review:"text-violet-600 dark:text-violet-400",done:"text-green-600 dark:text-green-400",cancelled:"text-neutral-500",blocked:"text-red-600 dark:text-red-400"},W="text-muted-foreground",i={gray:"bg-[#F5F3F0] text-[#52585D] border-[#A8AEB2] dark:bg-[#6e696024] dark:text-[#9A958A] dark:border-[#9e958a73]",blue:"bg-[#DBEAFE] text-[#1D4ED8] border-[#2563EB] dark:bg-[#2563eb2e] dark:text-[#2563EB] dark:border-[#2563eb73]",amber:"bg-[#FEF3C7] text-[#B45309] border-[#F59E0B] dark:bg-[#f59e0b24] dark:text-[#F59E0B] dark:border-[#f59e0b73]",green:"bg-[#DCFCE7] text-[#188A3C] border-[#22C55E] dark:bg-[#22c55e1f] dark:text-[#22C55E] dark:border-[#22c55e73]",violet:"bg-[#EDE9FE] text-[#5B21B6] border-[#7C3AED] dark:bg-[#7c3aed2e] dark:text-[#7C3AED] dark:border-[#7c3aed73]",red:"bg-[#FEE2E2] text-[#991B1B] border-[#DC2626] dark:bg-[#dc26262e] dark:text-[#DC2626] dark:border-[#dc262673]"},G={active:`border ${i.green}`,running:`border ${i.blue}`,scheduled_retry:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",paused:`border ${i.amber}`,idle:`border ${i.gray}`,archived:"bg-muted text-muted-foreground",planned:"bg-muted text-muted-foreground",achieved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",completed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",timed_out:"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",ok:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",warning:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",error:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",info:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",terminated:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",pending:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",queued:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",pending_approval:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",revision_requested:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",approved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",rejected:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",draft:"bg-muted text-muted-foreground",backlog:"bg-muted text-muted-foreground",todo:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",in_progress:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",in_review:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",done:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",cancelled:"bg-muted text-muted-foreground",allowed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",denied:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",block:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","require-approval":"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",redacted:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300","rate-limit":"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",deferred:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",hidden:"bg-muted text-muted-foreground",quarantined:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","runtime-error":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",healthy:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",degraded:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unchecked:"bg-muted text-muted-foreground"},H="bg-muted text-muted-foreground",J="text-[#1D4ED8] dark:text-[#2563EB]",Q="bg-blue-500/10 border-blue-500/30 text-blue-600 dark:text-blue-400",X={info:"border-[#2563EB]/40 bg-[#DBEAFE]/50 text-[#1D4ED8] dark:border-[#2563eb59] dark:bg-[#2563eb14] dark:text-[#93C5FD]",warning:"border-[#F59E0B]/50 bg-[#FEF3C7]/60 text-[#B45309] dark:border-[#f59e0b59] dark:bg-[#f59e0b12] dark:text-[#F59E0B]",danger:"border-destructive/40 bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},Y={idle:"--status-agent-idle",active:"--status-agent-idle",running:"--status-agent-running",paused:"--status-agent-paused",error:"--status-agent-error"},Z="--status-agent-idle",ee={idle:"--status-task-backlog",backlog:"--status-task-backlog",todo:"--status-task-todo",in_progress:"--status-task-in_progress",in_review:"--status-task-in_review",done:"--status-task-done",blocked:"--status-task-blocked",cancelled:"--status-task-cancelled"},re="--status-task-backlog",te={idle:"--status-task-icon-backlog",backlog:"--status-task-icon-backlog",todo:"--status-task-icon-todo",in_progress:"--status-task-icon-in_progress",in_review:"--status-task-icon-in_review",done:"--status-task-icon-done",blocked:"--status-task-icon-blocked",cancelled:"--status-task-icon-cancelled",in_queue:"--status-task-icon-in_queue"},ae="--status-task-icon-backlog",de={running:"bg-blue-400 animate-pulse",active:"bg-green-400",paused:"bg-yellow-400",idle:"bg-yellow-400",pending_approval:"bg-amber-400",error:"bg-red-400",archived:"bg-neutral-400"},oe="bg-neutral-400",ne={critical:"text-red-600 dark:text-red-400",high:"text-orange-600 dark:text-orange-400",medium:"text-yellow-600 dark:text-yellow-400",low:"text-blue-600 dark:text-blue-400"},be="text-yellow-600 dark:text-yellow-400",se={unknown:"text-muted-foreground border-muted-foreground",open:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",waiting:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",running:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",succeeded:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",merged:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",failed:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",closed:"text-neutral-500 border-neutral-500",archived:"text-neutral-500 border-neutral-500",auth_required:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",unreachable:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},ge="text-muted-foreground border-muted-foreground",ue={unknown:"bg-muted text-muted-foreground",open:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",waiting:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",running:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",closed:"bg-muted text-muted-foreground",archived:"bg-muted text-muted-foreground",auth_required:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unreachable:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},le="bg-muted text-muted-foreground",ie={unknown:"",fresh:"",stale:"opacity-70 [border-style:dashed]",auth_required:"[border-style:dashed]",unreachable:"[border-style:dashed]"},z=y(D(),1),m=l(t=>typeof t=="boolean"?`${t}`:t===0?"0":t,"falsyToString"),f=C,A=l((t,r)=>e=>{var o;if(r?.variants==null)return f(t,e?.class,e?.className);const{variants:g,defaultVariants:d}=r,k=Object.keys(g).map(a=>{const n=e?.[a],s=d?.[a];if(n===null)return null;const b=m(n)||m(s);return g[a][b]}),u=e&&Object.entries(e).reduce((a,n)=>{let[s,b]=n;return b===void 0||(a[s]=b),a},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((a,n)=>{let{class:s,className:b,...p}=n;return Object.entries(p).every(_=>{let[v,x]=_;return Array.isArray(x)?x.includes({...d,...u}[v]):{...d,...u}[v]===x})?[...a,s,b]:a},[]);return f(t,k,h,e?.class,e?.className)},"cva"),q=y(E(),1),N=A("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-(--tp-color-background-color-border-color-box-shadow-opacity) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",cta:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-9","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),O=z.forwardRef(l(function({className:r,variant:e="default",size:o="default",asChild:g=!1,...d},k){const u=g?S:"button";return(0,q.jsx)(u,{ref:k,"data-slot":"button","data-variant":e,"data-size":o,className:B(N({variant:e,size:o,className:r})),...d})},"Button"));O.displayName="Button";export{M as A,G as C,ee as D,ae as E,re as O,J as S,te as T,U as _,oe as a,ne as b,X as c,ue as d,le as f,R as g,K as h,de as i,T as j,P as k,i as l,ge as m,N as n,Y as o,se as p,A as r,Z as s,O as t,ie as u,W as v,H as w,be as x,Q as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,t)=>i(r,"name",{value:t,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as d,Lr as c,S as e}from"./createLucideIcon-
|
|
1
|
+
var i=Object.defineProperty;var a=(r,t)=>i(r,"name",{value:t,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as d,Lr as c,S as e}from"./createLucideIcon-CZEG6UJ7.js";var m=o(c(),1),s=o(d(),1);function x({className:r,interactive:t=!1,...n}){return(0,s.jsx)("div",{"data-slot":"card",className:e("bg-card text-card-foreground flex flex-col gap-6 rounded-lg border py-6",t&&"cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r),...n})}a(x,"Card");function p({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-header",className:e("@container/card-header grid auto-rows-min grid-rows-(--gtr-1) items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-(--gtc-17) [.border-b]:pb-6",r),...t})}a(p,"CardHeader");function g({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-title",className:e("leading-none font-semibold",r),...t})}a(g,"CardTitle");function v({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-description",className:e("text-muted-foreground text-sm",r),...t})}a(v,"CardDescription");function b({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-action",className:e("col-start-2 row-span-2 row-start-1 self-start justify-self-end",r),...t})}a(b,"CardAction");function j({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-content",className:e("px-6",r),...t})}a(j,"CardContent");function C({className:r,...t}){return(0,s.jsx)("div",{"data-slot":"card-footer",className:e("flex items-center px-6 [.border-t]:pt-6",r),...t})}a(C,"CardFooter");export{C as a,v as i,b as n,p as o,j as r,g as s,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as c}from"./createLucideIcon-
|
|
1
|
+
import{t as c}from"./createLucideIcon-CZEG6UJ7.js";var e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],o=c("check",e);export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var rt=Object.defineProperty;var s=(t,e)=>rt(t,"name",{value:e,configurable:!0});import{i as Re}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as at,Lr as st,S as _,a as pe,c as me,f as ct,i as Z,l as N,m as A,n as ge,r as re,s as C,t as Pe,u as it}from"./createLucideIcon-CINAT48M.js";import{Q as ut}from"./mention-chips-r4UB4Eiw.js";import{a as dt,i as lt,n as ft,r as je,t as pt}from"./dist-bQQ2HFhw.js";import{$ as mt,G as gt,J as ht,K as ye,Q as xt,U as vt,X as bt,Y as Ct,et as Mt,q as Ee,tt as wt}from"./zap-CKzX0hdL.js";import{C as _t,S as It,T as Dt,b as kt,d as St,f as Rt,g as Pt,h as jt,m as yt,p as Et,v as Tt,w as Ot,x as Nt,y as he}from"./MarkdownEditor-ZwstkvWb.js";import{t as Te}from"./check-Cniv3It0.js";import{t as At}from"./chevron-right-C4o2Lqna.js";import{A as Lt,t as Ft}from"./button-BYQHEF4e.js";var i=Re(st(),1),o=Re(at(),1),zt=Object.defineProperty,O=s((t,e)=>zt(t,"name",{value:e,configurable:!0}),"__name$2"),xe="Checkbox",[Gt,No]=me(xe),[$t,ve]=Gt(xe);function Oe(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:a,disabled:c,form:u,name:d,onCheckedChange:f,required:p,value:x="on",internal_do_not_use_render:g}=t,[l,m]=pe({prop:r,defaultProp:a??!1,onChange:f,caller:xe}),[b,M]=i.useState(null),[k,y]=i.useState(null),S=i.useRef(!1),[w,R]=i.useReducer(P=>P+1,0),F=b?!!u||!!b.closest("form"):!0,K={checked:l,disabled:c,setChecked:m,control:b,setControl:M,name:d,form:u,value:x,hasConsumerStoppedPropagationRef:S,userInteractionCount:w,onUserInteraction:R,required:p,defaultChecked:T(a)?!1:a,isFormControl:F,bubbleInput:k,setBubbleInput:y};return(0,o.jsx)($t,{scope:e,...K,children:Ne(g)?g(K):n})}s(Oe,"CheckboxProvider");O(Oe,"CheckboxProvider");var Kt="CheckboxTrigger",Ut=i.forwardRef(O(s(function({__scopeCheckbox:e,onKeyDown:r,onClick:n,...a},c){const{control:u,value:d,disabled:f,checked:p,required:x,setControl:g,setChecked:l,hasConsumerStoppedPropagationRef:m,onUserInteraction:b,isFormControl:M,bubbleInput:k}=ve(Kt,e),y=A(c,g),S=i.useRef(p);return i.useEffect(()=>{const w=u?.form;if(w){const R=O(()=>l(S.current),"reset");return w.addEventListener("reset",R),()=>w.removeEventListener("reset",R)}},[u,l]),(0,o.jsx)(N.button,{type:"button",role:"checkbox","aria-checked":T(p)?"mixed":p,"aria-required":x,"data-state":be(p),"data-disabled":f?"":void 0,disabled:f,value:d,...a,ref:y,onKeyDown:C(r,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:C(n,w=>{b(),l(R=>T(R)?!0:!R),k&&M&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})},"CheckboxTrigger2"),"CheckboxTrigger")),Bt=i.forwardRef(O(s(function(e,r){const{__scopeCheckbox:n,name:a,checked:c,defaultChecked:u,required:d,disabled:f,value:p,onCheckedChange:x,form:g,...l}=e;return(0,o.jsx)(Oe,{__scopeCheckbox:n,checked:c,defaultChecked:u,disabled:f,required:d,onCheckedChange:x,name:a,form:g,value:p,internal_do_not_use_render:s(({isFormControl:m})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ut,{...l,ref:r,__scopeCheckbox:n}),m&&(0,o.jsx)(qt,{__scopeCheckbox:n})]}),"internal_do_not_use_render")})},"Checkbox2"),"Checkbox")),Vt="CheckboxIndicator",Xt=i.forwardRef(O(s(function(e,r){const{__scopeCheckbox:n,forceMount:a,...c}=e,u=ve(Vt,n);return(0,o.jsx)(Z,{present:a||T(u.checked)||u.checked===!0,children:(0,o.jsx)(N.span,{"data-state":be(u.checked),"data-disabled":u.disabled?"":void 0,...c,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator2"),"CheckboxIndicator")),Yt="CheckboxBubbleInput",qt=i.forwardRef(O(s(function({__scopeCheckbox:e,onClick:r,...n},a){const{control:c,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:p,required:x,disabled:g,name:l,value:m,form:b,bubbleInput:M,setBubbleInput:k}=ve(Yt,e),y=A(a,k),S=ht(c),w=i.useRef(!1),R=i.useRef(f),F=i.useRef(d);i.useEffect(()=>{const P=M;if(!P)return;const U=window.HTMLInputElement.prototype,te=Object.getOwnPropertyDescriptor(U,"checked").set,z=d!==F.current;F.current=d;const B=R.current!==f;R.current=f;const ie=!(z&&u.current);if(B&&te){w.current=!z;const H=new Event("click",{bubbles:ie});P.indeterminate=T(f),te.call(P,T(f)?!1:f),P.dispatchEvent(H),w.current=!1}},[M,f,u,d]);const K=i.useRef(T(f)?!1:f);return(0,o.jsx)(N.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??K.current,required:x,disabled:g,name:l,value:m,form:b,...n,tabIndex:-1,ref:y,onClick:C(r,P=>{w.current&&P.stopPropagation()}),style:{...n.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput2"),"CheckboxBubbleInput"));function Ne(t){return typeof t=="function"}s(Ne,"isFunction");O(Ne,"isFunction");function T(t){return t==="indeterminate"}s(T,"isIndeterminate$1");O(T,"isIndeterminate");function be(t){return T(t)?"indeterminate":t?"checked":"unchecked"}s(be,"getState");O(be,"getState");var Ht=Object.defineProperty,v=s((t,e)=>Ht(t,"name",{value:e,configurable:!0}),"__name$1"),le=["Enter"," "],Wt=["ArrowDown","PageUp","Home"],Ae=["ArrowUp","PageDown","End"],Qt=[...Wt,...Ae],Jt={ltr:[...le,"ArrowRight"],rtl:[...le,"ArrowLeft"]},Zt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ae="Menu",[Q,en,tn]=dt(ae),[$,Le]=me(ae,[tn,Ee,je]),se=Ee(),Fe=je(),[ze,L]=$(ae),[nn,ee]=$(ae),on=v(t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:a,onOpenChange:c,modal:u=!0}=t,d=se(e),[f,p]=i.useState(null),x=i.useRef(!1),g=ge(c),l=lt(a);return i.useEffect(()=>{const m=v(()=>{x.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=v(()=>x.current=!1,"handlePointer");return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.useEffect(()=>{if(!r)return;const m=v(()=>g(!1),"handleBlur");return window.addEventListener("blur",m),()=>window.removeEventListener("blur",m)},[r,g]),(0,o.jsx)(ye,{...d,children:(0,o.jsx)(ze,{scope:e,open:r,onOpenChange:g,content:f,onContentChange:p,children:(0,o.jsx)(nn,{scope:e,onClose:i.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:x,dir:l,modal:u,children:n})})})},"Menu"),Ge=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e,c=se(n);return(0,o.jsx)(vt,{...c,...a,ref:r})},"MenuAnchor2"),"MenuAnchor")),$e="MenuPortal",[rn,Ke]=$($e,{forceMount:void 0}),an=v(t=>{const{__scopeMenu:e,forceMount:r,children:n,container:a}=t,c=L($e,e);return(0,o.jsx)(rn,{scope:e,forceMount:r,children:(0,o.jsx)(Z,{present:r||c.open,children:(0,o.jsx)(mt,{asChild:!0,container:a,children:n})})})},"MenuPortal"),j="MenuContent",[sn,Ce]=$(j),cn=i.forwardRef(v(s(function(e,r){const n=Ke(j,e.__scopeMenu),{forceMount:a=n.forceMount,...c}=e,u=L(j,e.__scopeMenu),d=ee(j,e.__scopeMenu);return(0,o.jsx)(Q.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Z,{present:a||u.open,children:(0,o.jsx)(Q.Slot,{scope:e.__scopeMenu,children:d.modal?(0,o.jsx)(un,{...c,ref:r}):(0,o.jsx)(dn,{...c,ref:r})})})})},"MenuContent2"),"MenuContent")),un=i.forwardRef(v(s(function(e,r){const n=L(j,e.__scopeMenu),a=i.useRef(null),c=A(r,a);return i.useEffect(()=>{const u=a.current;if(u)return Ct(u)},[]),(0,o.jsx)(Me,{...e,ref:c,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:C(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:s(()=>n.onOpenChange(!1),"onDismiss")})},"MenuRootContentModal2"),"MenuRootContentModal")),dn=i.forwardRef(v(s(function(e,r){const n=L(j,e.__scopeMenu);return(0,o.jsx)(Me,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:s(()=>n.onOpenChange(!1),"onDismiss")})},"MenuRootContentNonModal2"),"MenuRootContentNonModal")),ln=ct("MenuContent.ScrollLock"),Me=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,loop:a=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,disableOutsideScroll:M,...k}=e,y=L(j,n),S=ee(j,n),w=se(n),R=Fe(n),F=en(n),[K,P]=i.useState(null),U=i.useRef(null),te=A(r,U,y.onContentChange),z=i.useRef(0),B=i.useRef(""),ie=i.useRef(0),H=i.useRef(null),De=i.useRef("right"),ue=i.useRef(0),tt=M?bt:i.Fragment,nt=M?{as:ln,allowPinchZoom:!0}:void 0,ot=v(h=>{const X=B.current+h,G=F().filter(E=>!E.disabled),W=document.activeElement,de=G.find(E=>E.ref.current===W)?.textValue,ne=We(G.map(E=>E.textValue),X,de),Y=G.find(E=>E.textValue===ne)?.ref.current;v(s((function E(ke){B.current=ke,window.clearTimeout(z.current),ke!==""&&(z.current=window.setTimeout(()=>E(""),1e3))}),"updateSearch"),"updateSearch")(X),Y&&setTimeout(()=>Y.focus())},"handleTypeaheadSearch");i.useEffect(()=>()=>window.clearTimeout(z.current),[]),xt();const V=i.useCallback(h=>De.current===H.current?.side&&Je(h,H.current?.area),[]);return(0,o.jsx)(sn,{scope:n,searchRef:B,onItemEnter:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),onItemLeave:i.useCallback(h=>{V(h)||(U.current?.focus(),P(null))},[V]),onTriggerLeave:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:i.useCallback(h=>{H.current=h},[]),children:(0,o.jsx)(tt,{...nt,children:(0,o.jsx)(Mt,{asChild:!0,trapped:c,onMountAutoFocus:C(u,h=>{h.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,o.jsx)(wt,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,children:(0,o.jsx)(ft,{asChild:!0,...R,dir:S.dir,orientation:"vertical",loop:a,currentTabStopId:K,onCurrentTabStopIdChange:P,onEntryFocus:C(p,h=>{S.isUsingKeyboardRef.current||h.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,o.jsx)(gt,{role:"menu","aria-orientation":"vertical","data-state":_e(y.open),"data-radix-menu-content":"",dir:S.dir,...w,...k,ref:te,style:{outline:"none",...k.style},onKeyDown:C(k.onKeyDown,h=>{const X=h.target.closest("[data-radix-menu-content]")===h.currentTarget,G=h.ctrlKey||h.altKey||h.metaKey,W=h.key.length===1;X&&(h.key==="Tab"&&h.preventDefault(),!G&&W&&ot(h.key));const de=U.current;if(h.target!==de||!Qt.includes(h.key))return;h.preventDefault();const ne=F().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);Ae.includes(h.key)&&ne.reverse(),qe(ne)}),onBlur:C(e.onBlur,h=>{h.currentTarget.contains(h.target)||(window.clearTimeout(z.current),B.current="")}),onPointerMove:C(e.onPointerMove,q(h=>{const X=h.target,G=ue.current!==h.clientX;if(h.currentTarget.contains(X)&&G){const W=h.clientX>ue.current?"right":"left";De.current=W,ue.current=h.clientX}}))})})})})})})},"MenuContentImpl2"),"MenuContentImpl")),fn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{role:"group",...a,ref:r})},"MenuGroup2"),"MenuGroup")),pn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{...a,ref:r})},"MenuLabel2"),"MenuLabel")),fe="MenuItem",Se="menu.itemSelect",we=i.forwardRef(v(s(function(e,r){const{disabled:n=!1,onSelect:a,...c}=e,u=i.useRef(null),d=ee(fe,e.__scopeMenu),f=Ce(fe,e.__scopeMenu),p=A(r,u),x=i.useRef(!1),g=v(()=>{const l=u.current;if(!n&&l){const m=new CustomEvent(Se,{bubbles:!0,cancelable:!0});l.addEventListener(Se,b=>a?.(b),{once:!0}),it(l,m),m.defaultPrevented?x.current=!1:d.onClose()}},"handleSelect");return(0,o.jsx)(Ue,{...c,ref:p,disabled:n,onClick:C(e.onClick,g),onPointerDown:s(l=>{e.onPointerDown?.(l),x.current=!0},"onPointerDown"),onPointerUp:C(e.onPointerUp,l=>{x.current||l.currentTarget?.click()}),onKeyDown:C(e.onKeyDown,l=>{n||l.target!==l.currentTarget||f.searchRef.current!==""&&l.key===" "||le.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem2"),"MenuItem")),Ue=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,disabled:a=!1,textValue:c,...u}=e,d=Ce(fe,n),f=Fe(n),p=i.useRef(null),x=A(r,p),[g,l]=i.useState(!1),[m,b]=i.useState("");return i.useEffect(()=>{const M=p.current;M&&b((M.textContent??"").trim())},[u.children]),(0,o.jsx)(Q.ItemSlot,{scope:n,disabled:a,textValue:c??m,children:(0,o.jsx)(pt,{asChild:!0,...f,focusable:!a,children:(0,o.jsx)(N.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...u,ref:x,onPointerMove:C(e.onPointerMove,q(M=>{a?d.onItemLeave(M):(d.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:C(e.onPointerLeave,q(M=>d.onItemLeave(M))),onFocus:C(e.onFocus,()=>l(!0)),onBlur:C(e.onBlur,()=>l(!1))})})})},"MenuItemImpl2"),"MenuItemImpl")),mn=i.forwardRef(v(s(function(e,r){const{checked:n=!1,onCheckedChange:a,...c}=e;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:n,children:(0,o.jsx)(we,{role:"menuitemcheckbox","aria-checked":J(n)?"mixed":n,...c,ref:r,"data-state":ce(n),onSelect:C(c.onSelect,()=>a?.(J(n)?!0:!n),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem2"),"MenuCheckboxItem")),[gn,hn]=$("MenuRadioGroup",{value:void 0,onValueChange:v(()=>{},"onValueChange")}),xn=i.forwardRef(v(s(function(e,r){const{value:n,onValueChange:a,...c}=e,u=ge(a);return(0,o.jsx)(gn,{scope:e.__scopeMenu,value:n,onValueChange:u,children:(0,o.jsx)(fn,{...c,ref:r})})},"MenuRadioGroup2"),"MenuRadioGroup")),vn="MenuRadioItem",bn=i.forwardRef(v(s(function(e,r){const{value:n,...a}=e,c=hn(vn,e.__scopeMenu),u=n===c.value;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:u,children:(0,o.jsx)(we,{role:"menuitemradio","aria-checked":u,...a,ref:r,"data-state":ce(u),onSelect:C(a.onSelect,()=>c.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},"MenuRadioItem2"),"MenuRadioItem")),Be="MenuItemIndicator",[Ve,Cn]=$(Be,{checked:!1}),Mn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,forceMount:a,...c}=e,u=Cn(Be,n);return(0,o.jsx)(Z,{present:a||J(u.checked)||u.checked===!0,children:(0,o.jsx)(N.span,{...c,ref:r,"data-state":ce(u.checked)})})},"MenuItemIndicator2"),"MenuItemIndicator")),wn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})},"MenuSeparator2"),"MenuSeparator")),Xe="MenuSub",[_n,Ye]=$(Xe),In=v(t=>{const{__scopeMenu:e,children:r,open:n=!1,onOpenChange:a}=t,c=L(Xe,e),u=se(e),[d,f]=i.useState(null),[p,x]=i.useState(null),g=ge(a);return i.useEffect(()=>(c.open===!1&&g(!1),()=>g(!1)),[c.open,g]),(0,o.jsx)(ye,{...u,children:(0,o.jsx)(ze,{scope:e,open:n,onOpenChange:g,content:p,onContentChange:x,children:(0,o.jsx)(_n,{scope:e,contentId:re(),triggerId:re(),trigger:d,onTriggerChange:f,children:r})})})},"MenuSub"),oe="MenuSubTrigger",Dn=i.forwardRef(v(s(function(e,r){const n=L(oe,e.__scopeMenu),a=ee(oe,e.__scopeMenu),c=Ye(oe,e.__scopeMenu),u=Ce(oe,e.__scopeMenu),d=i.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=u,x={__scopeMenu:e.__scopeMenu},g=i.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);i.useEffect(()=>g,[g]),i.useEffect(()=>{const m=f.current;return()=>{window.clearTimeout(m),p(null)}},[f,p]);const l=A(r,c.onTriggerChange);return(0,o.jsx)(Ge,{asChild:!0,...x,children:(0,o.jsx)(Ue,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?c.contentId:void 0,"data-state":_e(n.open),...e,ref:l,onClick:s(m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},"onClick"),onPointerMove:C(e.onPointerMove,q(m=>{u.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:C(e.onPointerLeave,q(m=>{g();const b=n.content?.getBoundingClientRect();if(b){const M=n.content?.dataset.side,k=M==="right",y=k?-5:5,S=b[k?"left":"right"],w=b[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:S,y:b.top},{x:w,y:b.top},{x:w,y:b.bottom},{x:S,y:b.bottom}],side:M}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(m),m.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:C(e.onKeyDown,m=>{e.disabled||m.target!==m.currentTarget||u.searchRef.current!==""&&m.key===" "||Jt[a.dir].includes(m.key)&&(n.onOpenChange(!0),n.content?.focus(),m.preventDefault())})})})},"MenuSubTrigger2"),"MenuSubTrigger")),kn="MenuSubContent",Sn=i.forwardRef(v(s(function(e,r){const n=Ke(j,e.__scopeMenu),{forceMount:a=n.forceMount,align:c="start",...u}=e,d=L(j,e.__scopeMenu),f=ee(j,e.__scopeMenu),p=Ye(kn,e.__scopeMenu),x=i.useRef(null),g=A(r,x);return(0,o.jsx)(Q.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Z,{present:a||d.open,children:(0,o.jsx)(Q.Slot,{scope:e.__scopeMenu,children:(0,o.jsx)(Me,{id:p.contentId,"aria-labelledby":p.triggerId,...u,ref:g,align:c,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:s(l=>{f.isUsingKeyboardRef.current&&x.current?.focus(),l.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:s(l=>l.preventDefault(),"onCloseAutoFocus"),onFocusOutside:C(e.onFocusOutside,l=>{l.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:C(e.onEscapeKeyDown,l=>{f.onClose(),l.preventDefault()}),onKeyDown:C(e.onKeyDown,l=>{const m=l.currentTarget.contains(l.target),b=Zt[f.dir].includes(l.key);m&&b&&(d.onOpenChange(!1),p.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent2"),"MenuSubContent"));function _e(t){return t?"open":"closed"}s(_e,"getOpenState");v(_e,"getOpenState");function J(t){return t==="indeterminate"}s(J,"isIndeterminate");v(J,"isIndeterminate");function ce(t){return J(t)?"indeterminate":t?"checked":"unchecked"}s(ce,"getCheckedState");v(ce,"getCheckedState");function qe(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}s(qe,"focusFirst");v(qe,"focusFirst");function He(t,e){return t.map((r,n)=>t[(e+n)%t.length])}s(He,"wrapArray");v(He,"wrapArray");function We(t,e,r){const n=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,a=r?t.indexOf(r):-1;let c=He(t,Math.max(a,0));n.length===1&&(c=c.filter(d=>d!==r));const u=c.find(d=>d.toLowerCase().startsWith(n.toLowerCase()));return u!==r?u:void 0}s(We,"getNextMatch");v(We,"getNextMatch");function Qe(t,e){const{x:r,y:n}=t;let a=!1;for(let c=0,u=e.length-1;c<e.length;u=c++){const d=e[c],f=e[u],p=d.x,x=d.y,g=f.x,l=f.y;x>n!=l>n&&r<(g-p)*(n-x)/(l-x)+p&&(a=!a)}return a}s(Qe,"isPointInPolygon");v(Qe,"isPointInPolygon");function Je(t,e){return e?Qe({x:t.clientX,y:t.clientY},e):!1}s(Je,"isPointerInGraceArea");v(Je,"isPointerInGraceArea");function q(t){return e=>e.pointerType==="mouse"?t(e):void 0}s(q,"whenMouse");v(q,"whenMouse");var Rn=on,Pn=Ge,jn=an,yn=cn,En=pn,Tn=we,On=mn,Nn=xn,An=bn,Ln=Mn,Fn=wn,zn=In,Gn=Dn,$n=Sn,Kn=Object.defineProperty,I=s((t,e)=>Kn(t,"name",{value:e,configurable:!0}),"__name"),Ie="DropdownMenu",[Un,Ao]=me(Ie,[Le]),D=Le(),[Bn,Ze]=Un(Ie),Vn=I(t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:a,defaultOpen:c,onOpenChange:u,modal:d=!0}=t,f=D(e),p=i.useRef(null),[x,g]=pe({prop:a,defaultProp:c??!1,onChange:u,caller:Ie});return(0,o.jsx)(Bn,{scope:e,triggerId:re(),triggerRef:p,contentId:re(),open:x,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(l=>!l),[g]),modal:d,children:(0,o.jsx)(Rn,{...f,open:x,onOpenChange:g,dir:n,modal:d,children:r})})},"DropdownMenu"),Xn="DropdownMenuTrigger",Yn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,disabled:a=!1,...c}=e,u=Ze(Xn,n),d=D(n),f=A(r,u.triggerRef);return(0,o.jsx)(Pn,{asChild:!0,...d,children:(0,o.jsx)(N.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...c,ref:f,onPointerDown:C(e.onPointerDown,p=>{!a&&p.button===0&&p.ctrlKey===!1&&(u.onOpenToggle(),u.open||p.preventDefault())}),onKeyDown:C(e.onKeyDown,p=>{a||(["Enter"," "].includes(p.key)&&u.onOpenToggle(),p.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})},"DropdownMenuTrigger2"),"DropdownMenuTrigger")),qn=I(t=>{const{__scopeDropdownMenu:e,...r}=t,n=D(e);return(0,o.jsx)(jn,{...n,...r})},"DropdownMenuPortal"),Hn="DropdownMenuContent",Wn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=Ze(Hn,n),u=D(n),d=i.useRef(!1);return(0,o.jsx)(yn,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...a,ref:r,onCloseAutoFocus:C(e.onCloseAutoFocus,f=>{d.current||c.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:C(e.onInteractOutside,f=>{const p=f.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,g=p.button===2||x;(!c.modal||g)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent2"),"DropdownMenuContent")),Qn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(En,{...c,...a,ref:r})},"DropdownMenuLabel2"),"DropdownMenuLabel")),Jn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Tn,{...c,...a,ref:r})},"DropdownMenuItem2"),"DropdownMenuItem")),Zn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(On,{...c,...a,ref:r})},"DropdownMenuCheckboxItem2"),"DropdownMenuCheckboxItem")),eo=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Nn,{...c,...a,ref:r})},"DropdownMenuRadioGroup2"),"DropdownMenuRadioGroup")),to=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(An,{...c,...a,ref:r})},"DropdownMenuRadioItem2"),"DropdownMenuRadioItem")),no=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Ln,{...c,...a,ref:r})},"DropdownMenuItemIndicator2"),"DropdownMenuItemIndicator")),oo=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Fn,{...c,...a,ref:r})},"DropdownMenuSeparator2"),"DropdownMenuSeparator")),ro=I(t=>{const{__scopeDropdownMenu:e,children:r,open:n,onOpenChange:a,defaultOpen:c}=t,u=D(e),[d,f]=pe({prop:n,defaultProp:c??!1,onChange:a,caller:"DropdownMenuSub"});return(0,o.jsx)(zn,{...u,open:d,onOpenChange:f,children:r})},"DropdownMenuSub"),ao=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Gn,{...c,...a,ref:r})},"DropdownMenuSubTrigger2"),"DropdownMenuSubTrigger")),so=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)($n,{...c,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent2"),"DropdownMenuSubContent")),co=Vn,io=Yn,uo=qn,lo=Wn,fo=Qn,po=Jn,mo=Zn,go=eo,ho=to,et=no,xo=oo,vo=ro,bo=ao,Co=so,Mo=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Lo=Pe("ellipsis",Mo),wo=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fo=Pe("trash-2",wo);function zo({...t}){return(0,o.jsx)(co,{"data-slot":"dropdown-menu",...t})}s(zo,"DropdownMenu");function Go({...t}){return(0,o.jsx)(io,{"data-slot":"dropdown-menu-trigger",...t})}s(Go,"DropdownMenuTrigger");function $o({className:t,sideOffset:e=4,...r}){return(0,o.jsx)(uo,{children:(0,o.jsx)(lo,{"data-slot":"dropdown-menu-content",sideOffset:e,className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...r})})}s($o,"DropdownMenuContent");function Ko({className:t,inset:e,variant:r="default",...n}){return(0,o.jsx)(po,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":r,className:_("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}s(Ko,"DropdownMenuItem");function Uo({className:t,children:e,checked:r,...n}){return(0,o.jsxs)(mo,{"data-slot":"dropdown-menu-checkbox-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r,...n,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(et,{children:(0,o.jsx)(Te,{className:"size-4"})})}),e]})}s(Uo,"DropdownMenuCheckboxItem");function Bo({...t}){return(0,o.jsx)(go,{"data-slot":"dropdown-menu-radio-group",...t})}s(Bo,"DropdownMenuRadioGroup");function Vo({className:t,children:e,...r}){return(0,o.jsxs)(ho,{"data-slot":"dropdown-menu-radio-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(et,{children:(0,o.jsx)(Lt,{className:"size-2 fill-current"})})}),e]})}s(Vo,"DropdownMenuRadioItem");function Xo({className:t,inset:e,...r}){return(0,o.jsx)(fo,{"data-slot":"dropdown-menu-label","data-inset":e,className:_("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}s(Xo,"DropdownMenuLabel");function Yo({className:t,...e}){return(0,o.jsx)(xo,{"data-slot":"dropdown-menu-separator",className:_("bg-border -mx-1 my-1 h-px",t),...e})}s(Yo,"DropdownMenuSeparator");function qo({className:t,...e}){return(0,o.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:_("text-muted-foreground ml-auto text-xs tracking-widest",t),...e})}s(qo,"DropdownMenuShortcut");function Ho({...t}){return(0,o.jsx)(vo,{"data-slot":"dropdown-menu-sub",...t})}s(Ho,"DropdownMenuSub");function Wo({className:t,inset:e,children:r,...n}){return(0,o.jsxs)(bo,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:_("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n,children:[r,(0,o.jsx)(At,{className:"ml-auto size-4"})]})}s(Wo,"DropdownMenuSubTrigger");function Qo({className:t,...e}){return(0,o.jsx)(Co,{"data-slot":"dropdown-menu-sub-content",className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),...e})}s(Qo,"DropdownMenuSubContent");function Jo({delayDuration:t=0,...e}){return(0,o.jsx)(yt,{"data-slot":"tooltip-provider",delayDuration:t,...e})}s(Jo,"TooltipProvider");function Zo({...t}){return(0,o.jsx)(jt,{"data-slot":"tooltip",...t})}s(Zo,"Tooltip");function er({...t}){return(0,o.jsx)(Pt,{"data-slot":"tooltip-trigger",...t})}s(er,"TooltipTrigger");function tr({className:t,sideOffset:e=0,children:r,...n}){return(0,o.jsx)(Et,{children:(0,o.jsxs)(Rt,{"data-slot":"tooltip-content",sideOffset:e,className:_("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...n,children:[r,(0,o.jsx)(St,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}s(tr,"TooltipContent");function nr({...t}){return(0,o.jsx)(Tt,{"data-slot":"dialog",...t})}s(nr,"Dialog");function or({...t}){return(0,o.jsx)(Dt,{"data-slot":"dialog-trigger",...t})}s(or,"DialogTrigger");function _o({...t}){return(0,o.jsx)(_t,{"data-slot":"dialog-portal",...t})}s(_o,"DialogPortal");function rr({...t}){return(0,o.jsx)(he,{"data-slot":"dialog-close",...t})}s(rr,"DialogClose");function Io({className:t,...e}){return(0,o.jsx)(It,{"data-slot":"dialog-overlay",className:_("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100 motion-reduce:animate-none motion-reduce:transition-none",t),...e})}s(Io,"DialogOverlay");function ar({className:t,children:e,showCloseButton:r=!0,...n}){return(0,o.jsxs)(_o,{"data-slot":"dialog-portal",children:[(0,o.jsx)(Io,{}),(0,o.jsxs)(kt,{"data-slot":"dialog-content",className:_("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] data-[state=closed]:slide-out-to-top-[1%] data-[state=open]:slide-in-from-top-[1%] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0 motion-reduce:animate-none motion-reduce:transition-none",t),...n,children:[e,r&&(0,o.jsxs)(he,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,o.jsx)(ut,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}s(ar,"DialogContent");function sr({className:t,...e}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:_("flex flex-col gap-2 text-center sm:text-left",t),...e})}s(sr,"DialogHeader");function cr({className:t,showCloseButton:e=!1,children:r,...n}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:_("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n,children:[r,e&&(0,o.jsx)(he,{asChild:!0,children:(0,o.jsx)(Ft,{variant:"outline",children:"Close"})})]})}s(cr,"DialogFooter");function ir({className:t,...e}){return(0,o.jsx)(Ot,{"data-slot":"dialog-title",className:_("text-lg leading-none font-semibold",t),...e})}s(ir,"DialogTitle");function ur({className:t,...e}){return(0,o.jsx)(Nt,{"data-slot":"dialog-description",className:_("text-muted-foreground text-sm",t),...e})}s(ur,"DialogDescription");function dr({className:t,...e}){return(0,o.jsx)("textarea",{"data-slot":"textarea",className:_("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 min-w-0 w-full max-w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}s(dr,"Textarea");function lr({className:t,...e}){return(0,o.jsx)(Bt,{"data-slot":"checkbox",className:_("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-(--rad-4) border shadow-xs transition-shadow outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:(0,o.jsx)(Xt,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,o.jsx)(Te,{className:"size-3.5"})})})}s(lr,"Checkbox");export{Lo as A,Yo as C,Wo as D,Qo as E,Go as O,Vo as S,Ho as T,Uo as _,ar as a,Xo as b,sr as c,or as d,Zo as f,zo as g,er as h,rr as i,Fo as k,_o as l,Jo as m,dr as n,ur as o,tr as p,nr as r,cr as s,lr as t,ir as u,$o as v,qo as w,Bo as x,Ko as y};
|
|
1
|
+
var rt=Object.defineProperty;var s=(t,e)=>rt(t,"name",{value:e,configurable:!0});import{i as Re}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as at,Lr as st,S as _,a as pe,c as me,f as ct,i as Z,l as N,m as A,n as ge,r as re,s as C,t as Pe,u as it}from"./createLucideIcon-CZEG6UJ7.js";import{Q as ut}from"./mention-chips-BEaOTvHT.js";import{a as dt,i as lt,n as ft,r as je,t as pt}from"./dist-pDmgIRxg.js";import{$ as mt,G as gt,J as ht,K as ye,Q as xt,U as vt,X as bt,Y as Ct,et as Mt,q as Ee,tt as wt}from"./zap-CCqZhqc3.js";import{C as _t,S as It,T as Dt,b as kt,d as St,f as Rt,g as Pt,h as jt,m as yt,p as Et,v as Tt,w as Ot,x as Nt,y as he}from"./MarkdownEditor-7JCtdEaZ.js";import{t as Te}from"./check-CgfxcCMv.js";import{t as At}from"./chevron-right-IZydUoW5.js";import{A as Lt,t as Ft}from"./button-LkWt40cm.js";var i=Re(st(),1),o=Re(at(),1),zt=Object.defineProperty,O=s((t,e)=>zt(t,"name",{value:e,configurable:!0}),"__name$2"),xe="Checkbox",[Gt,No]=me(xe),[$t,ve]=Gt(xe);function Oe(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:a,disabled:c,form:u,name:d,onCheckedChange:f,required:p,value:x="on",internal_do_not_use_render:g}=t,[l,m]=pe({prop:r,defaultProp:a??!1,onChange:f,caller:xe}),[b,M]=i.useState(null),[k,y]=i.useState(null),S=i.useRef(!1),[w,R]=i.useReducer(P=>P+1,0),F=b?!!u||!!b.closest("form"):!0,K={checked:l,disabled:c,setChecked:m,control:b,setControl:M,name:d,form:u,value:x,hasConsumerStoppedPropagationRef:S,userInteractionCount:w,onUserInteraction:R,required:p,defaultChecked:T(a)?!1:a,isFormControl:F,bubbleInput:k,setBubbleInput:y};return(0,o.jsx)($t,{scope:e,...K,children:Ne(g)?g(K):n})}s(Oe,"CheckboxProvider");O(Oe,"CheckboxProvider");var Kt="CheckboxTrigger",Ut=i.forwardRef(O(s(function({__scopeCheckbox:e,onKeyDown:r,onClick:n,...a},c){const{control:u,value:d,disabled:f,checked:p,required:x,setControl:g,setChecked:l,hasConsumerStoppedPropagationRef:m,onUserInteraction:b,isFormControl:M,bubbleInput:k}=ve(Kt,e),y=A(c,g),S=i.useRef(p);return i.useEffect(()=>{const w=u?.form;if(w){const R=O(()=>l(S.current),"reset");return w.addEventListener("reset",R),()=>w.removeEventListener("reset",R)}},[u,l]),(0,o.jsx)(N.button,{type:"button",role:"checkbox","aria-checked":T(p)?"mixed":p,"aria-required":x,"data-state":be(p),"data-disabled":f?"":void 0,disabled:f,value:d,...a,ref:y,onKeyDown:C(r,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:C(n,w=>{b(),l(R=>T(R)?!0:!R),k&&M&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})},"CheckboxTrigger2"),"CheckboxTrigger")),Bt=i.forwardRef(O(s(function(e,r){const{__scopeCheckbox:n,name:a,checked:c,defaultChecked:u,required:d,disabled:f,value:p,onCheckedChange:x,form:g,...l}=e;return(0,o.jsx)(Oe,{__scopeCheckbox:n,checked:c,defaultChecked:u,disabled:f,required:d,onCheckedChange:x,name:a,form:g,value:p,internal_do_not_use_render:s(({isFormControl:m})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ut,{...l,ref:r,__scopeCheckbox:n}),m&&(0,o.jsx)(qt,{__scopeCheckbox:n})]}),"internal_do_not_use_render")})},"Checkbox2"),"Checkbox")),Vt="CheckboxIndicator",Xt=i.forwardRef(O(s(function(e,r){const{__scopeCheckbox:n,forceMount:a,...c}=e,u=ve(Vt,n);return(0,o.jsx)(Z,{present:a||T(u.checked)||u.checked===!0,children:(0,o.jsx)(N.span,{"data-state":be(u.checked),"data-disabled":u.disabled?"":void 0,...c,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator2"),"CheckboxIndicator")),Yt="CheckboxBubbleInput",qt=i.forwardRef(O(s(function({__scopeCheckbox:e,onClick:r,...n},a){const{control:c,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:p,required:x,disabled:g,name:l,value:m,form:b,bubbleInput:M,setBubbleInput:k}=ve(Yt,e),y=A(a,k),S=ht(c),w=i.useRef(!1),R=i.useRef(f),F=i.useRef(d);i.useEffect(()=>{const P=M;if(!P)return;const U=window.HTMLInputElement.prototype,te=Object.getOwnPropertyDescriptor(U,"checked").set,z=d!==F.current;F.current=d;const B=R.current!==f;R.current=f;const ie=!(z&&u.current);if(B&&te){w.current=!z;const H=new Event("click",{bubbles:ie});P.indeterminate=T(f),te.call(P,T(f)?!1:f),P.dispatchEvent(H),w.current=!1}},[M,f,u,d]);const K=i.useRef(T(f)?!1:f);return(0,o.jsx)(N.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??K.current,required:x,disabled:g,name:l,value:m,form:b,...n,tabIndex:-1,ref:y,onClick:C(r,P=>{w.current&&P.stopPropagation()}),style:{...n.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput2"),"CheckboxBubbleInput"));function Ne(t){return typeof t=="function"}s(Ne,"isFunction");O(Ne,"isFunction");function T(t){return t==="indeterminate"}s(T,"isIndeterminate$1");O(T,"isIndeterminate");function be(t){return T(t)?"indeterminate":t?"checked":"unchecked"}s(be,"getState");O(be,"getState");var Ht=Object.defineProperty,v=s((t,e)=>Ht(t,"name",{value:e,configurable:!0}),"__name$1"),le=["Enter"," "],Wt=["ArrowDown","PageUp","Home"],Ae=["ArrowUp","PageDown","End"],Qt=[...Wt,...Ae],Jt={ltr:[...le,"ArrowRight"],rtl:[...le,"ArrowLeft"]},Zt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ae="Menu",[Q,en,tn]=dt(ae),[$,Le]=me(ae,[tn,Ee,je]),se=Ee(),Fe=je(),[ze,L]=$(ae),[nn,ee]=$(ae),on=v(t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:a,onOpenChange:c,modal:u=!0}=t,d=se(e),[f,p]=i.useState(null),x=i.useRef(!1),g=ge(c),l=lt(a);return i.useEffect(()=>{const m=v(()=>{x.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=v(()=>x.current=!1,"handlePointer");return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.useEffect(()=>{if(!r)return;const m=v(()=>g(!1),"handleBlur");return window.addEventListener("blur",m),()=>window.removeEventListener("blur",m)},[r,g]),(0,o.jsx)(ye,{...d,children:(0,o.jsx)(ze,{scope:e,open:r,onOpenChange:g,content:f,onContentChange:p,children:(0,o.jsx)(nn,{scope:e,onClose:i.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:x,dir:l,modal:u,children:n})})})},"Menu"),Ge=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e,c=se(n);return(0,o.jsx)(vt,{...c,...a,ref:r})},"MenuAnchor2"),"MenuAnchor")),$e="MenuPortal",[rn,Ke]=$($e,{forceMount:void 0}),an=v(t=>{const{__scopeMenu:e,forceMount:r,children:n,container:a}=t,c=L($e,e);return(0,o.jsx)(rn,{scope:e,forceMount:r,children:(0,o.jsx)(Z,{present:r||c.open,children:(0,o.jsx)(mt,{asChild:!0,container:a,children:n})})})},"MenuPortal"),j="MenuContent",[sn,Ce]=$(j),cn=i.forwardRef(v(s(function(e,r){const n=Ke(j,e.__scopeMenu),{forceMount:a=n.forceMount,...c}=e,u=L(j,e.__scopeMenu),d=ee(j,e.__scopeMenu);return(0,o.jsx)(Q.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Z,{present:a||u.open,children:(0,o.jsx)(Q.Slot,{scope:e.__scopeMenu,children:d.modal?(0,o.jsx)(un,{...c,ref:r}):(0,o.jsx)(dn,{...c,ref:r})})})})},"MenuContent2"),"MenuContent")),un=i.forwardRef(v(s(function(e,r){const n=L(j,e.__scopeMenu),a=i.useRef(null),c=A(r,a);return i.useEffect(()=>{const u=a.current;if(u)return Ct(u)},[]),(0,o.jsx)(Me,{...e,ref:c,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:C(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:s(()=>n.onOpenChange(!1),"onDismiss")})},"MenuRootContentModal2"),"MenuRootContentModal")),dn=i.forwardRef(v(s(function(e,r){const n=L(j,e.__scopeMenu);return(0,o.jsx)(Me,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:s(()=>n.onOpenChange(!1),"onDismiss")})},"MenuRootContentNonModal2"),"MenuRootContentNonModal")),ln=ct("MenuContent.ScrollLock"),Me=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,loop:a=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,disableOutsideScroll:M,...k}=e,y=L(j,n),S=ee(j,n),w=se(n),R=Fe(n),F=en(n),[K,P]=i.useState(null),U=i.useRef(null),te=A(r,U,y.onContentChange),z=i.useRef(0),B=i.useRef(""),ie=i.useRef(0),H=i.useRef(null),De=i.useRef("right"),ue=i.useRef(0),tt=M?bt:i.Fragment,nt=M?{as:ln,allowPinchZoom:!0}:void 0,ot=v(h=>{const X=B.current+h,G=F().filter(E=>!E.disabled),W=document.activeElement,de=G.find(E=>E.ref.current===W)?.textValue,ne=We(G.map(E=>E.textValue),X,de),Y=G.find(E=>E.textValue===ne)?.ref.current;v(s((function E(ke){B.current=ke,window.clearTimeout(z.current),ke!==""&&(z.current=window.setTimeout(()=>E(""),1e3))}),"updateSearch"),"updateSearch")(X),Y&&setTimeout(()=>Y.focus())},"handleTypeaheadSearch");i.useEffect(()=>()=>window.clearTimeout(z.current),[]),xt();const V=i.useCallback(h=>De.current===H.current?.side&&Je(h,H.current?.area),[]);return(0,o.jsx)(sn,{scope:n,searchRef:B,onItemEnter:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),onItemLeave:i.useCallback(h=>{V(h)||(U.current?.focus(),P(null))},[V]),onTriggerLeave:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:i.useCallback(h=>{H.current=h},[]),children:(0,o.jsx)(tt,{...nt,children:(0,o.jsx)(Mt,{asChild:!0,trapped:c,onMountAutoFocus:C(u,h=>{h.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,o.jsx)(wt,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,children:(0,o.jsx)(ft,{asChild:!0,...R,dir:S.dir,orientation:"vertical",loop:a,currentTabStopId:K,onCurrentTabStopIdChange:P,onEntryFocus:C(p,h=>{S.isUsingKeyboardRef.current||h.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,o.jsx)(gt,{role:"menu","aria-orientation":"vertical","data-state":_e(y.open),"data-radix-menu-content":"",dir:S.dir,...w,...k,ref:te,style:{outline:"none",...k.style},onKeyDown:C(k.onKeyDown,h=>{const X=h.target.closest("[data-radix-menu-content]")===h.currentTarget,G=h.ctrlKey||h.altKey||h.metaKey,W=h.key.length===1;X&&(h.key==="Tab"&&h.preventDefault(),!G&&W&&ot(h.key));const de=U.current;if(h.target!==de||!Qt.includes(h.key))return;h.preventDefault();const ne=F().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);Ae.includes(h.key)&&ne.reverse(),qe(ne)}),onBlur:C(e.onBlur,h=>{h.currentTarget.contains(h.target)||(window.clearTimeout(z.current),B.current="")}),onPointerMove:C(e.onPointerMove,q(h=>{const X=h.target,G=ue.current!==h.clientX;if(h.currentTarget.contains(X)&&G){const W=h.clientX>ue.current?"right":"left";De.current=W,ue.current=h.clientX}}))})})})})})})},"MenuContentImpl2"),"MenuContentImpl")),fn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{role:"group",...a,ref:r})},"MenuGroup2"),"MenuGroup")),pn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{...a,ref:r})},"MenuLabel2"),"MenuLabel")),fe="MenuItem",Se="menu.itemSelect",we=i.forwardRef(v(s(function(e,r){const{disabled:n=!1,onSelect:a,...c}=e,u=i.useRef(null),d=ee(fe,e.__scopeMenu),f=Ce(fe,e.__scopeMenu),p=A(r,u),x=i.useRef(!1),g=v(()=>{const l=u.current;if(!n&&l){const m=new CustomEvent(Se,{bubbles:!0,cancelable:!0});l.addEventListener(Se,b=>a?.(b),{once:!0}),it(l,m),m.defaultPrevented?x.current=!1:d.onClose()}},"handleSelect");return(0,o.jsx)(Ue,{...c,ref:p,disabled:n,onClick:C(e.onClick,g),onPointerDown:s(l=>{e.onPointerDown?.(l),x.current=!0},"onPointerDown"),onPointerUp:C(e.onPointerUp,l=>{x.current||l.currentTarget?.click()}),onKeyDown:C(e.onKeyDown,l=>{n||l.target!==l.currentTarget||f.searchRef.current!==""&&l.key===" "||le.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem2"),"MenuItem")),Ue=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,disabled:a=!1,textValue:c,...u}=e,d=Ce(fe,n),f=Fe(n),p=i.useRef(null),x=A(r,p),[g,l]=i.useState(!1),[m,b]=i.useState("");return i.useEffect(()=>{const M=p.current;M&&b((M.textContent??"").trim())},[u.children]),(0,o.jsx)(Q.ItemSlot,{scope:n,disabled:a,textValue:c??m,children:(0,o.jsx)(pt,{asChild:!0,...f,focusable:!a,children:(0,o.jsx)(N.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...u,ref:x,onPointerMove:C(e.onPointerMove,q(M=>{a?d.onItemLeave(M):(d.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:C(e.onPointerLeave,q(M=>d.onItemLeave(M))),onFocus:C(e.onFocus,()=>l(!0)),onBlur:C(e.onBlur,()=>l(!1))})})})},"MenuItemImpl2"),"MenuItemImpl")),mn=i.forwardRef(v(s(function(e,r){const{checked:n=!1,onCheckedChange:a,...c}=e;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:n,children:(0,o.jsx)(we,{role:"menuitemcheckbox","aria-checked":J(n)?"mixed":n,...c,ref:r,"data-state":ce(n),onSelect:C(c.onSelect,()=>a?.(J(n)?!0:!n),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem2"),"MenuCheckboxItem")),[gn,hn]=$("MenuRadioGroup",{value:void 0,onValueChange:v(()=>{},"onValueChange")}),xn=i.forwardRef(v(s(function(e,r){const{value:n,onValueChange:a,...c}=e,u=ge(a);return(0,o.jsx)(gn,{scope:e.__scopeMenu,value:n,onValueChange:u,children:(0,o.jsx)(fn,{...c,ref:r})})},"MenuRadioGroup2"),"MenuRadioGroup")),vn="MenuRadioItem",bn=i.forwardRef(v(s(function(e,r){const{value:n,...a}=e,c=hn(vn,e.__scopeMenu),u=n===c.value;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:u,children:(0,o.jsx)(we,{role:"menuitemradio","aria-checked":u,...a,ref:r,"data-state":ce(u),onSelect:C(a.onSelect,()=>c.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},"MenuRadioItem2"),"MenuRadioItem")),Be="MenuItemIndicator",[Ve,Cn]=$(Be,{checked:!1}),Mn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,forceMount:a,...c}=e,u=Cn(Be,n);return(0,o.jsx)(Z,{present:a||J(u.checked)||u.checked===!0,children:(0,o.jsx)(N.span,{...c,ref:r,"data-state":ce(u.checked)})})},"MenuItemIndicator2"),"MenuItemIndicator")),wn=i.forwardRef(v(s(function(e,r){const{__scopeMenu:n,...a}=e;return(0,o.jsx)(N.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})},"MenuSeparator2"),"MenuSeparator")),Xe="MenuSub",[_n,Ye]=$(Xe),In=v(t=>{const{__scopeMenu:e,children:r,open:n=!1,onOpenChange:a}=t,c=L(Xe,e),u=se(e),[d,f]=i.useState(null),[p,x]=i.useState(null),g=ge(a);return i.useEffect(()=>(c.open===!1&&g(!1),()=>g(!1)),[c.open,g]),(0,o.jsx)(ye,{...u,children:(0,o.jsx)(ze,{scope:e,open:n,onOpenChange:g,content:p,onContentChange:x,children:(0,o.jsx)(_n,{scope:e,contentId:re(),triggerId:re(),trigger:d,onTriggerChange:f,children:r})})})},"MenuSub"),oe="MenuSubTrigger",Dn=i.forwardRef(v(s(function(e,r){const n=L(oe,e.__scopeMenu),a=ee(oe,e.__scopeMenu),c=Ye(oe,e.__scopeMenu),u=Ce(oe,e.__scopeMenu),d=i.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=u,x={__scopeMenu:e.__scopeMenu},g=i.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);i.useEffect(()=>g,[g]),i.useEffect(()=>{const m=f.current;return()=>{window.clearTimeout(m),p(null)}},[f,p]);const l=A(r,c.onTriggerChange);return(0,o.jsx)(Ge,{asChild:!0,...x,children:(0,o.jsx)(Ue,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?c.contentId:void 0,"data-state":_e(n.open),...e,ref:l,onClick:s(m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},"onClick"),onPointerMove:C(e.onPointerMove,q(m=>{u.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:C(e.onPointerLeave,q(m=>{g();const b=n.content?.getBoundingClientRect();if(b){const M=n.content?.dataset.side,k=M==="right",y=k?-5:5,S=b[k?"left":"right"],w=b[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:S,y:b.top},{x:w,y:b.top},{x:w,y:b.bottom},{x:S,y:b.bottom}],side:M}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(m),m.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:C(e.onKeyDown,m=>{e.disabled||m.target!==m.currentTarget||u.searchRef.current!==""&&m.key===" "||Jt[a.dir].includes(m.key)&&(n.onOpenChange(!0),n.content?.focus(),m.preventDefault())})})})},"MenuSubTrigger2"),"MenuSubTrigger")),kn="MenuSubContent",Sn=i.forwardRef(v(s(function(e,r){const n=Ke(j,e.__scopeMenu),{forceMount:a=n.forceMount,align:c="start",...u}=e,d=L(j,e.__scopeMenu),f=ee(j,e.__scopeMenu),p=Ye(kn,e.__scopeMenu),x=i.useRef(null),g=A(r,x);return(0,o.jsx)(Q.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Z,{present:a||d.open,children:(0,o.jsx)(Q.Slot,{scope:e.__scopeMenu,children:(0,o.jsx)(Me,{id:p.contentId,"aria-labelledby":p.triggerId,...u,ref:g,align:c,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:s(l=>{f.isUsingKeyboardRef.current&&x.current?.focus(),l.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:s(l=>l.preventDefault(),"onCloseAutoFocus"),onFocusOutside:C(e.onFocusOutside,l=>{l.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:C(e.onEscapeKeyDown,l=>{f.onClose(),l.preventDefault()}),onKeyDown:C(e.onKeyDown,l=>{const m=l.currentTarget.contains(l.target),b=Zt[f.dir].includes(l.key);m&&b&&(d.onOpenChange(!1),p.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent2"),"MenuSubContent"));function _e(t){return t?"open":"closed"}s(_e,"getOpenState");v(_e,"getOpenState");function J(t){return t==="indeterminate"}s(J,"isIndeterminate");v(J,"isIndeterminate");function ce(t){return J(t)?"indeterminate":t?"checked":"unchecked"}s(ce,"getCheckedState");v(ce,"getCheckedState");function qe(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}s(qe,"focusFirst");v(qe,"focusFirst");function He(t,e){return t.map((r,n)=>t[(e+n)%t.length])}s(He,"wrapArray");v(He,"wrapArray");function We(t,e,r){const n=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,a=r?t.indexOf(r):-1;let c=He(t,Math.max(a,0));n.length===1&&(c=c.filter(d=>d!==r));const u=c.find(d=>d.toLowerCase().startsWith(n.toLowerCase()));return u!==r?u:void 0}s(We,"getNextMatch");v(We,"getNextMatch");function Qe(t,e){const{x:r,y:n}=t;let a=!1;for(let c=0,u=e.length-1;c<e.length;u=c++){const d=e[c],f=e[u],p=d.x,x=d.y,g=f.x,l=f.y;x>n!=l>n&&r<(g-p)*(n-x)/(l-x)+p&&(a=!a)}return a}s(Qe,"isPointInPolygon");v(Qe,"isPointInPolygon");function Je(t,e){return e?Qe({x:t.clientX,y:t.clientY},e):!1}s(Je,"isPointerInGraceArea");v(Je,"isPointerInGraceArea");function q(t){return e=>e.pointerType==="mouse"?t(e):void 0}s(q,"whenMouse");v(q,"whenMouse");var Rn=on,Pn=Ge,jn=an,yn=cn,En=pn,Tn=we,On=mn,Nn=xn,An=bn,Ln=Mn,Fn=wn,zn=In,Gn=Dn,$n=Sn,Kn=Object.defineProperty,I=s((t,e)=>Kn(t,"name",{value:e,configurable:!0}),"__name"),Ie="DropdownMenu",[Un,Ao]=me(Ie,[Le]),D=Le(),[Bn,Ze]=Un(Ie),Vn=I(t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:a,defaultOpen:c,onOpenChange:u,modal:d=!0}=t,f=D(e),p=i.useRef(null),[x,g]=pe({prop:a,defaultProp:c??!1,onChange:u,caller:Ie});return(0,o.jsx)(Bn,{scope:e,triggerId:re(),triggerRef:p,contentId:re(),open:x,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(l=>!l),[g]),modal:d,children:(0,o.jsx)(Rn,{...f,open:x,onOpenChange:g,dir:n,modal:d,children:r})})},"DropdownMenu"),Xn="DropdownMenuTrigger",Yn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,disabled:a=!1,...c}=e,u=Ze(Xn,n),d=D(n),f=A(r,u.triggerRef);return(0,o.jsx)(Pn,{asChild:!0,...d,children:(0,o.jsx)(N.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...c,ref:f,onPointerDown:C(e.onPointerDown,p=>{!a&&p.button===0&&p.ctrlKey===!1&&(u.onOpenToggle(),u.open||p.preventDefault())}),onKeyDown:C(e.onKeyDown,p=>{a||(["Enter"," "].includes(p.key)&&u.onOpenToggle(),p.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})},"DropdownMenuTrigger2"),"DropdownMenuTrigger")),qn=I(t=>{const{__scopeDropdownMenu:e,...r}=t,n=D(e);return(0,o.jsx)(jn,{...n,...r})},"DropdownMenuPortal"),Hn="DropdownMenuContent",Wn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=Ze(Hn,n),u=D(n),d=i.useRef(!1);return(0,o.jsx)(yn,{id:c.contentId,"aria-labelledby":c.triggerId,...u,...a,ref:r,onCloseAutoFocus:C(e.onCloseAutoFocus,f=>{d.current||c.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:C(e.onInteractOutside,f=>{const p=f.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,g=p.button===2||x;(!c.modal||g)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent2"),"DropdownMenuContent")),Qn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(En,{...c,...a,ref:r})},"DropdownMenuLabel2"),"DropdownMenuLabel")),Jn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Tn,{...c,...a,ref:r})},"DropdownMenuItem2"),"DropdownMenuItem")),Zn=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(On,{...c,...a,ref:r})},"DropdownMenuCheckboxItem2"),"DropdownMenuCheckboxItem")),eo=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Nn,{...c,...a,ref:r})},"DropdownMenuRadioGroup2"),"DropdownMenuRadioGroup")),to=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(An,{...c,...a,ref:r})},"DropdownMenuRadioItem2"),"DropdownMenuRadioItem")),no=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Ln,{...c,...a,ref:r})},"DropdownMenuItemIndicator2"),"DropdownMenuItemIndicator")),oo=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Fn,{...c,...a,ref:r})},"DropdownMenuSeparator2"),"DropdownMenuSeparator")),ro=I(t=>{const{__scopeDropdownMenu:e,children:r,open:n,onOpenChange:a,defaultOpen:c}=t,u=D(e),[d,f]=pe({prop:n,defaultProp:c??!1,onChange:a,caller:"DropdownMenuSub"});return(0,o.jsx)(zn,{...u,open:d,onOpenChange:f,children:r})},"DropdownMenuSub"),ao=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)(Gn,{...c,...a,ref:r})},"DropdownMenuSubTrigger2"),"DropdownMenuSubTrigger")),so=i.forwardRef(I(s(function(e,r){const{__scopeDropdownMenu:n,...a}=e,c=D(n);return(0,o.jsx)($n,{...c,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent2"),"DropdownMenuSubContent")),co=Vn,io=Yn,uo=qn,lo=Wn,fo=Qn,po=Jn,mo=Zn,go=eo,ho=to,et=no,xo=oo,vo=ro,bo=ao,Co=so,Mo=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Lo=Pe("ellipsis",Mo),wo=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fo=Pe("trash-2",wo);function zo({...t}){return(0,o.jsx)(co,{"data-slot":"dropdown-menu",...t})}s(zo,"DropdownMenu");function Go({...t}){return(0,o.jsx)(io,{"data-slot":"dropdown-menu-trigger",...t})}s(Go,"DropdownMenuTrigger");function $o({className:t,sideOffset:e=4,...r}){return(0,o.jsx)(uo,{children:(0,o.jsx)(lo,{"data-slot":"dropdown-menu-content",sideOffset:e,className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...r})})}s($o,"DropdownMenuContent");function Ko({className:t,inset:e,variant:r="default",...n}){return(0,o.jsx)(po,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":r,className:_("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}s(Ko,"DropdownMenuItem");function Uo({className:t,children:e,checked:r,...n}){return(0,o.jsxs)(mo,{"data-slot":"dropdown-menu-checkbox-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r,...n,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(et,{children:(0,o.jsx)(Te,{className:"size-4"})})}),e]})}s(Uo,"DropdownMenuCheckboxItem");function Bo({...t}){return(0,o.jsx)(go,{"data-slot":"dropdown-menu-radio-group",...t})}s(Bo,"DropdownMenuRadioGroup");function Vo({className:t,children:e,...r}){return(0,o.jsxs)(ho,{"data-slot":"dropdown-menu-radio-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(et,{children:(0,o.jsx)(Lt,{className:"size-2 fill-current"})})}),e]})}s(Vo,"DropdownMenuRadioItem");function Xo({className:t,inset:e,...r}){return(0,o.jsx)(fo,{"data-slot":"dropdown-menu-label","data-inset":e,className:_("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}s(Xo,"DropdownMenuLabel");function Yo({className:t,...e}){return(0,o.jsx)(xo,{"data-slot":"dropdown-menu-separator",className:_("bg-border -mx-1 my-1 h-px",t),...e})}s(Yo,"DropdownMenuSeparator");function qo({className:t,...e}){return(0,o.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:_("text-muted-foreground ml-auto text-xs tracking-widest",t),...e})}s(qo,"DropdownMenuShortcut");function Ho({...t}){return(0,o.jsx)(vo,{"data-slot":"dropdown-menu-sub",...t})}s(Ho,"DropdownMenuSub");function Wo({className:t,inset:e,children:r,...n}){return(0,o.jsxs)(bo,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:_("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n,children:[r,(0,o.jsx)(At,{className:"ml-auto size-4"})]})}s(Wo,"DropdownMenuSubTrigger");function Qo({className:t,...e}){return(0,o.jsx)(Co,{"data-slot":"dropdown-menu-sub-content",className:_("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),...e})}s(Qo,"DropdownMenuSubContent");function Jo({delayDuration:t=0,...e}){return(0,o.jsx)(yt,{"data-slot":"tooltip-provider",delayDuration:t,...e})}s(Jo,"TooltipProvider");function Zo({...t}){return(0,o.jsx)(jt,{"data-slot":"tooltip",...t})}s(Zo,"Tooltip");function er({...t}){return(0,o.jsx)(Pt,{"data-slot":"tooltip-trigger",...t})}s(er,"TooltipTrigger");function tr({className:t,sideOffset:e=0,children:r,...n}){return(0,o.jsx)(Et,{children:(0,o.jsxs)(Rt,{"data-slot":"tooltip-content",sideOffset:e,className:_("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...n,children:[r,(0,o.jsx)(St,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}s(tr,"TooltipContent");function nr({...t}){return(0,o.jsx)(Tt,{"data-slot":"dialog",...t})}s(nr,"Dialog");function or({...t}){return(0,o.jsx)(Dt,{"data-slot":"dialog-trigger",...t})}s(or,"DialogTrigger");function _o({...t}){return(0,o.jsx)(_t,{"data-slot":"dialog-portal",...t})}s(_o,"DialogPortal");function rr({...t}){return(0,o.jsx)(he,{"data-slot":"dialog-close",...t})}s(rr,"DialogClose");function Io({className:t,...e}){return(0,o.jsx)(It,{"data-slot":"dialog-overlay",className:_("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100 motion-reduce:animate-none motion-reduce:transition-none",t),...e})}s(Io,"DialogOverlay");function ar({className:t,children:e,showCloseButton:r=!0,...n}){return(0,o.jsxs)(_o,{"data-slot":"dialog-portal",children:[(0,o.jsx)(Io,{}),(0,o.jsxs)(kt,{"data-slot":"dialog-content",className:_("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] data-[state=closed]:slide-out-to-top-[1%] data-[state=open]:slide-in-from-top-[1%] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0 motion-reduce:animate-none motion-reduce:transition-none",t),...n,children:[e,r&&(0,o.jsxs)(he,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,o.jsx)(ut,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}s(ar,"DialogContent");function sr({className:t,...e}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:_("flex flex-col gap-2 text-center sm:text-left",t),...e})}s(sr,"DialogHeader");function cr({className:t,showCloseButton:e=!1,children:r,...n}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:_("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n,children:[r,e&&(0,o.jsx)(he,{asChild:!0,children:(0,o.jsx)(Ft,{variant:"outline",children:"Close"})})]})}s(cr,"DialogFooter");function ir({className:t,...e}){return(0,o.jsx)(Ot,{"data-slot":"dialog-title",className:_("text-lg leading-none font-semibold",t),...e})}s(ir,"DialogTitle");function ur({className:t,...e}){return(0,o.jsx)(Nt,{"data-slot":"dialog-description",className:_("text-muted-foreground text-sm",t),...e})}s(ur,"DialogDescription");function dr({className:t,...e}){return(0,o.jsx)("textarea",{"data-slot":"textarea",className:_("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 min-w-0 w-full max-w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}s(dr,"Textarea");function lr({className:t,...e}){return(0,o.jsx)(Bt,{"data-slot":"checkbox",className:_("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-(--rad-4) border shadow-xs transition-shadow outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:(0,o.jsx)(Xt,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,o.jsx)(Te,{className:"size-3.5"})})})}s(lr,"Checkbox");export{Lo as A,Yo as C,Wo as D,Qo as E,Go as O,Vo as S,Ho as T,Uo as _,ar as a,Xo as b,sr as c,or as d,Zo as f,zo as g,er as h,rr as i,Fo as k,_o as l,Jo as m,dr as n,ur as o,tr as p,nr as r,cr as s,lr as t,ir as u,$o as v,qo as w,Bo as x,Ko as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o}from"./createLucideIcon-
|
|
1
|
+
import{t as o}from"./createLucideIcon-CZEG6UJ7.js";var r=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],n=o("chevron-down",r);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r}from"./createLucideIcon-
|
|
1
|
+
import{t as r}from"./createLucideIcon-CZEG6UJ7.js";var t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o=r("chevron-right",t);export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=Object.defineProperty;var r=(t,e)=>n(t,"name",{value:e,configurable:!0});import{t as a}from"./createLucideIcon-
|
|
1
|
+
var n=Object.defineProperty;var r=(t,e)=>n(t,"name",{value:e,configurable:!0});import{t as a}from"./createLucideIcon-CZEG6UJ7.js";var c=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],y=a("copy",c),i=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],p=a("folder-open",i),d=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],f=a("key-round",d);async function s(t){if((typeof window>"u"||window.isSecureContext!==!1)&&typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(typeof document>"u")throw new Error("Clipboard unavailable");const e=document.createElement("textarea");e.value=t,e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.style.position="fixed",e.style.top="0",e.style.left="-9999px",document.body.appendChild(e);const o=document.activeElement;try{if(e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length),!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{document.body.removeChild(e),o!==document.activeElement&&typeof o?.focus=="function"&&o.focus({preventScroll:!0})}}r(s,"copyTextToClipboard");export{y as i,f as n,p as r,s as t};
|