@lacneu/atrium 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/assets/{AccessTab-7ikPRDrZ.js → AccessTab-CnkNBHPE.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-gsdcm_1A.js → AdvancedFilter-DJqYfM0R.js} +1 -1
  3. package/dist/assets/AgentFilesTab-CjDkTO5u.js +3 -0
  4. package/dist/assets/AnomaliesTab-Btl5l0cp.js +1 -0
  5. package/dist/assets/AuditTab-dPXojOCy.js +1 -0
  6. package/dist/assets/BridgeTab-D_OFclma.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-mu8WEgdH.js +1 -0
  8. package/dist/assets/{DataTableShell-DzK-qEdq.js → DataTableShell-DtT6IWK0.js} +1 -1
  9. package/dist/assets/{DetailChips-BIvUUZKQ.js → DetailChips-CN6cfq9J.js} +1 -1
  10. package/dist/assets/FeedbacksTab-TimbsRl3.js +1 -0
  11. package/dist/assets/{FieldLabel-Cz-9BS36.js → FieldLabel-DHRmFB5F.js} +1 -1
  12. package/dist/assets/FilesTab-n8OF2Enb.js +1 -0
  13. package/dist/assets/{FilterBar-CZN4zOuy.js → FilterBar-B58FmRXC.js} +1 -1
  14. package/dist/assets/GroupsTab-Cwo-lxzA.js +1 -0
  15. package/dist/assets/InstancesTab-BrrGQYPt.js +1 -0
  16. package/dist/assets/IntegrationsTab-CnNDTpE1.js +1 -0
  17. package/dist/assets/KpiTab-DjCx7clJ.js +1 -0
  18. package/dist/assets/PreferencesTab-nTPJ_YRA.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-VOGZ2T-K.js +4 -0
  20. package/dist/assets/RolesTab-BR5Wqpbu.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-DjfJ3oP0.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-BQfnnV0J.js +1 -0
  23. package/dist/assets/ThemeShowroom-D-NkvAhX.js +1 -0
  24. package/dist/assets/{TimeRangePicker-DVDywKqe.js → TimeRangePicker-fEd70Mzj.js} +1 -1
  25. package/dist/assets/TracesTab-Dyb2I2EJ.js +1 -0
  26. package/dist/assets/UsersTab-lOVKdpIc.js +1 -0
  27. package/dist/assets/{button-C3T_nXdg.js → button-BIQxgso_.js} +1 -1
  28. package/dist/assets/{card-DESvIpRK.js → card-CLaLoMG5.js} +1 -1
  29. package/dist/assets/chevrons-up-down-CJIw8ui2.js +1 -0
  30. package/dist/assets/{compatView-A0wf8Ngm.js → compatView-DZS9WLeu.js} +1 -1
  31. package/dist/assets/{dispatchErrorInfo-CG5-z2lD.js → dispatchErrorInfo-Crx9497I.js} +1 -1
  32. package/dist/assets/{dist-CpS8aq8T.js → dist-BvWD6-xy.js} +1 -1
  33. package/dist/assets/{dist-C5xpMIpa.js → dist-BwdC4Hrz.js} +1 -1
  34. package/dist/assets/{dist-BJuS9RKK.js → dist-DBtFWMbn.js} +5 -5
  35. package/dist/assets/{dist-B1tb-c2t.js → dist-DQNUMYl3.js} +1 -1
  36. package/dist/assets/{highlighted-body-OFNGDK62-CLCx-LYW.js → highlighted-body-OFNGDK62-B4qPEZuN.js} +1 -1
  37. package/dist/assets/index-DIWGZqm3.js +229 -0
  38. package/dist/assets/mermaid-GHXKKRXX-QiEqdfOE.js +1 -0
  39. package/dist/assets/roleDescriptions-CrpgjGTq.js +1 -0
  40. package/dist/assets/{table-Dgu2YiDE.js → table-UO-VP67W.js} +1 -1
  41. package/dist/assets/{tabs-bHkQWa8h.js → tabs-C35PjHwb.js} +1 -1
  42. package/dist/assets/x-CvI3xVho.js +1 -0
  43. package/dist/index.html +7 -7
  44. package/package.json +1 -1
  45. package/dist/assets/AgentFilesTab-DLXgboNK.js +0 -3
  46. package/dist/assets/AnomaliesTab-CcTaJJF7.js +0 -1
  47. package/dist/assets/AuditTab-B51XdrS-.js +0 -1
  48. package/dist/assets/BridgeTab-B0fJjtmW.js +0 -1
  49. package/dist/assets/ChatDefaultsTab-IJWE_sxZ.js +0 -1
  50. package/dist/assets/FeedbacksTab-CRF5np-W.js +0 -1
  51. package/dist/assets/FilesTab-CUEzcwu7.js +0 -1
  52. package/dist/assets/GroupsTab-q8FOBA9S.js +0 -1
  53. package/dist/assets/InstancesTab-Dl2EJUgc.js +0 -1
  54. package/dist/assets/IntegrationsTab-hTzia7mx.js +0 -1
  55. package/dist/assets/KpiTab-DI8vQ1LD.js +0 -1
  56. package/dist/assets/PreferencesTab-7nFPybn0.js +0 -1
  57. package/dist/assets/PromptInjectionsTab-R-YFEPfz.js +0 -4
  58. package/dist/assets/RolesTab-DTUfolk3.js +0 -1
  59. package/dist/assets/ServiceAccountsTab-WYurhM36.js +0 -1
  60. package/dist/assets/SubAgentReportsTab-DAd0x6y2.js +0 -1
  61. package/dist/assets/ThemeShowroom-BclE06WS.js +0 -1
  62. package/dist/assets/TracesTab-sUddGVLv.js +0 -1
  63. package/dist/assets/UsersTab-DY-84glO.js +0 -1
  64. package/dist/assets/chevrons-up-down-RW5J1Q7S.js +0 -1
  65. package/dist/assets/index-DgeJfwWI.js +0 -229
  66. package/dist/assets/mermaid-GHXKKRXX-BKfbghLf.js +0 -1
  67. package/dist/assets/roleDescriptions-D-TCtebQ.js +0 -1
  68. package/dist/assets/x-DzHSe3Kh.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$h as r,AC as i,Ah as a,BC as o,Bh as s,CC as c,Ch as l,D as u,DA as d,DC as f,Dh as p,E as m,EA as h,EC as g,Eh as _,FC as v,Fh as y,G as b,GC as x,Gh as S,HC as C,Hh as ee,IC as w,Ih as te,Jh as ne,K as T,KC as re,Kh as ie,LC as ae,Lh as oe,MC as E,Mh as se,NC as D,Nh as ce,OC as le,Oh as ue,PC as O,Ph as de,Qh as fe,RC as pe,Rh as me,SC as k,Sh as A,TC as j,Th as he,UC as M,Uh as ge,VC as N,Vh as _e,WC as P,Wh as ve,Xh as ye,Yh as be,Zh as xe,_C as Se,aC as F,ag as Ce,cC as we,dC as Te,eg as Ee,fC as De,gC as Oe,hC as I,iC as ke,ig as Ae,jC as je,jh as Me,kC as Ne,kh as Pe,lC as Fe,mC as Ie,ng as Le,oC as Re,og as ze,pC as Be,q as Ve,qh as He,rC as Ue,rg as We,sC as Ge,tg as Ke,uC as qe,wC as Je,wh as Ye,zC as Xe,zh as Ze}from"./dist-DBtFWMbn.js";import{n as Qe}from"./dist-DQNUMYl3.js";import{t as $e}from"./x-CvI3xVho.js";import{i as L,n as R,r as et,t as tt}from"./tabs-C35PjHwb.js";import{t as z}from"./button-BIQxgso_.js";import{$ as B,A as nt,At as rt,C as V,Dt as it,Et as at,Ft as ot,M as st,Pt as ct,S as H,a as lt,at as ut,b as U,i as dt,k as W,lt as ft,nt as pt,o as mt,ot as ht,r as gt,rt as _t,tt as vt,x as G,y as K}from"./index-DIWGZqm3.js";import{n as q}from"./TimeRangePicker-fEd70Mzj.js";import{t as yt}from"./FilterBar-B58FmRXC.js";import{t as bt}from"./AdvancedFilter-DJqYfM0R.js";import{t as xt}from"./DataTableShell-DtT6IWK0.js";var St=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=u(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?f():n===`agent`?`${g()} - ${r}`:e}function Tt(){let e=d(m.me.getMe,{host:ft})?.role===`admin`,t=d(m.deliveryTiming.getDeliveryStatus,{}),n=h(m.deliveryTiming.startDeliveryRecord),r=h(m.deliveryTiming.stopDeliveryRecord),[i,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(!1),c=t?.recording??!1,l=async()=>{s(!0);try{c?await r({}):await n({})}finally{s(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:re()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:x()})]}),e?(0,Y.jsx)(z,{variant:c?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void l(),children:c?M():P()}):null]}),c?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(B,{variant:`secondary`,children:C()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:N({time:nt(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?pe():Xe()})}),i?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=d(m.deliveryTiming.listDeliverySessions,{}),n=h(m.deliveryTiming.deleteDeliverySessions),[r,a]=(0,J.useState)(``),[o,s]=(0,J.useState)(`all`),[l,u]=(0,J.useState)(X),[f,p]=(0,J.useState)(null),{from:g,to:_}=q(l),y=l.to===`now`?1/0:_,b=r.trim()!==``||o!==`all`||l!==X,x=()=>{a(``),s(`all`),u(X)},S=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(o===`all`||(o===`active`?t.active:!t.active))&&t.startedAt>=g&&t.startedAt<=y).map(e=>({...e,_id:e.sessionId}))},[t,r,o,g,y]),C=e=>{let t=new Set((S??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),f!==null&&r.includes(f)&&p(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:a,searchPlaceholder:w(),timeRange:l,onTimeRangeChange:u,onReset:x,canReset:b,children:(0,Y.jsxs)(K,{value:o,onValueChange:e=>s(e),children:[(0,Y.jsx)(H,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(V,{})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:`all`,children:v()}),(0,Y.jsx)(G,{value:`active`,children:O()}),(0,Y.jsx)(G,{value:`stopped`,children:D()})]})]})}),(0,Y.jsx)(xt,{title:ae(),rows:S,emptyHint:ke(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":f===e.sessionId?Je():j(),onClick:()=>p(t=>t===e.sessionId?null:e.sessionId),children:f===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(it,{size:15,"aria-hidden":!0})})},{header:E(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:W(e.startedAt)})},{header:je(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:W(e.stoppedAt)})},{header:i(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:Ne(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:le(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(B,{variant:`secondary`,children:O()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:D()})}],rowActions:e?e=>[{label:c(),variant:`destructive`,onSelect:()=>C([e.sessionId])}]:void 0,bulkActions:e?[{label:c(),variant:`destructive`,onSelect:e=>C(e)}]:void 0,isExpanded:e=>e.sessionId===f,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=d(m.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(st(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:k()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:o()});let r=e.segments,i=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[Z(t.p50),` / `,Z(t.p95),` / `,Z(t.max)]})]});return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,Ue()]}),(0,Y.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,Y.jsx)(rt,{size:13,"aria-hidden":!0}),t?F():Re()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:I()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Ie()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Be()})]})}),(0,Y.jsxs)(`tbody`,{children:[i(De(),r.bridge),i(Te(),r.A),i(qe(),r.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Fe()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Ge()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:we()})]})}var kt=[50,100,200,500],At=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:Ve()},{value:`principalType`,label:T()},{value:`direction`,label:`direction`},{value:`roleKey`,label:b()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=ot({from:`/settings/traces`}),t=ct({from:`/settings/traces`}),n=e.limit,i=e.kind,o=e.statusClass??Q,c=e.principalType??Q,l=e.direction??Q,u=e.roleKey??Q,f=e.q??``,h=gt(e.from,e.to),g=(0,J.useMemo)(()=>mt(e.adv),[e.adv]),{from:v,to:b}=q(h),[x,C]=(0,J.useState)(null),[w,T]=(0,J.useState)(null),re=e=>void t({search:t=>({...t,limit:e})}),ae=e=>void t({search:t=>({...t,kind:e})}),E=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),D=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),le=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),pe=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,...lt(e)})}),A=e=>void t({search:t=>({...t,adv:dt(e)}),replace:!0}),j=d(m.observability.listEvents,{limit:n}),M=d(m.observability.listEvents,{limit:n,kind:i===At?void 0:i,filter:{q:f||void 0,from:v,to:b,statusClass:o===Q?void 0:o,principalType:c===Q?void 0:c,direction:l===Q?void 0:l,roleKey:u===Q?void 0:u,advanced:g.length>0?g:void 0}}),N=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),P=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),F=f!==``||o!==Q||c!==Q||l!==Q||u!==Q||g.length>0||h.kind!==`relative`||h.from!==Pt.from;function we(){t({search:{limit:100,kind:`all`},replace:!0})}let Te=x?j?.filter(e=>e.correlationId===x):M,[De,I]=(0,J.useState)(`events`);return(0,Y.jsxs)(tt,{value:De,onValueChange:e=>I(e),children:[(0,Y.jsxs)(et,{className:`w-full`,children:[(0,Y.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(at,{size:13,"aria-hidden":!0}),Se()]}),(0,Y.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),Oe()]})]}),(0,Y.jsx)(R,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[ze(),(0,Y.jsx)(`strong`,{children:Ce()}),Ae(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:We()})]}),(0,Y.jsxs)(yt,{q:f,onQChange:E,searchPlaceholder:Le(),timeRange:h,onTimeRangeChange:k,onReset:we,canReset:F,children:[(0,Y.jsxs)(K,{value:o,onValueChange:D,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(V,{placeholder:Ke()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:Q,children:Ee()}),jt.map(e=>(0,Y.jsx)(G,{value:e,children:e},e))]})]}),(0,Y.jsxs)(K,{value:c,onValueChange:le,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(V,{placeholder:r()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:Q,children:fe()}),Mt.map(e=>(0,Y.jsx)(G,{value:e,children:e},e))]})]}),(0,Y.jsxs)(K,{value:l,onValueChange:O,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(V,{placeholder:xe()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:Q,children:ye()}),Nt.map(e=>(0,Y.jsx)(G,{value:e,children:e},e))]})]}),(0,Y.jsxs)(K,{value:u,onValueChange:pe,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(V,{placeholder:be()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:Q,children:ne()}),P.map(e=>(0,Y.jsx)(G,{value:e,children:e},e))]})]}),(0,Y.jsxs)(K,{value:i,onValueChange:ae,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(V,{placeholder:He()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(G,{value:At,children:ie()}),N.map(e=>(0,Y.jsx)(G,{value:e,children:e},e))]})]}),(0,Y.jsxs)(K,{value:String(n),onValueChange:e=>re(Number(e)),children:[(0,Y.jsx)(H,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(V,{})}),(0,Y.jsx)(U,{children:kt.map(e=>(0,Y.jsx)(G,{value:String(e),children:S({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:g,onChange:A}),x?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>C(null),title:ve(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ge(),(0,Y.jsx)(`code`,{children:$(x)})]}),(0,Y.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ee()})]})}):null,(0,Y.jsx)(xt,{title:_e(),rows:Te,emptyHint:x?s():Ze(),columns:[{header:me(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:W(e.at)})},{header:oe(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(B,{variant:`secondary`,children:e.kind})},{header:te(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":y(),children:`✓`})}},{header:de(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(B,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ce(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(B,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:se(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(B,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Me(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:a(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:Pe(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:ue(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:p(),onClick:()=>C(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:_(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>T(e),children:he()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:w,onClose:()=>T(null)})]})]})}function Lt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Rt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(vt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(pt,{className:`max-w-lg`,children:[(0,Y.jsxs)(ut,{children:[(0,Y.jsxs)(ht,{className:`oc-traces__meta-title`,children:[Ye(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(B,{variant:`outline`,children:l()})]}),(0,Y.jsx)(_t,{children:A()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Ab as r,Bb as i,Bm as a,Cb as o,Cc as s,DA as c,Db as l,E as u,EA as d,Eb as f,Fb as p,Gm as m,Hm as h,Ib as g,Im as _,Jm as v,Jy as y,Km as b,Lb as x,Lm as S,Mb as ee,Nb as te,Ob as ne,Pb as re,Rb as ie,Rm as C,Sb as ae,Tb as oe,Tc as w,Um as T,Vb as E,Vm as D,Wm as O,_b as k,bb as A,gb as se,hb as ce,jb as le,kb as ue,mb as de,pb as fe,qm as j,vb as pe,wb as me,wc as M,xb as he,yb as ge,zb as N,zm as P}from"./dist-DBtFWMbn.js";import{t as F}from"./button-BIQxgso_.js";import{$ as I,C as L,F as _e,Ft as ve,J as R,N as z,P as ye,Pt as be,Q as xe,S as B,X as Se,Y as Ce,_ as V,at as we,b as H,bt as U,d as W,f as Te,lt as Ee,nt as De,ot as Oe,p as G,q as ke,rt as Ae,tt as je,x as K,y as q,yt as J}from"./index-DIWGZqm3.js";import{t as Me}from"./FilterBar-B58FmRXC.js";import{t as Ne}from"./DataTableShell-DtT6IWK0.js";import{t as Pe}from"./DetailChips-CN6cfq9J.js";var Y=t(e(),1),X=n();function Fe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=c(u.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=c(u.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,l=s?`${s.instanceName}/${s.agentId}`:null,d=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),f=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!d.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],p=new Map;for(let e of f){let t=p.get(e.instanceName)??[];t.push(e),p.set(e.instanceName,t)}return(0,X.jsx)(je,{open:n,onOpenChange:r,children:(0,X.jsxs)(De,{className:`oc-access`,children:[(0,X.jsxs)(we,{children:[(0,X.jsx)(Oe,{children:v({user:t})}),(0,X.jsx)(Ae,{children:j()})]}),i?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?b():m()}):null,(0,X.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:O()}):f.length===0?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:D()}):[...p.entries()].map(([t,n])=>(0,X.jsx)(Z,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:l},t))})]})})}function Z({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:o}){let s=d(u.agents.assignAgent),c=d(u.agents.removeAgent),l=d(u.agents.setDefaultAgent),f=z();if(!e)return null;async function p(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(T(),e)}}async function m(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(h(),e)}}return(0,X.jsxs)(`div`,{className:`oc-access__group`,children:[(0,X.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,X.jsx)(U,{size:13,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:t}),(0,X.jsx)(I,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),s=o===n,c=e.state===`deleted`;return(0,X.jsxs)(`div`,{className:`oc-access__row`,children:[(0,X.jsx)(V,{checked:r,disabled:c&&!r,onCheckedChange:()=>void p(e.agentId,r),"aria-label":a({name:e.displayName??e.agentId})}),(0,X.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,X.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,c?(0,X.jsx)(I,{variant:`outline`,className:`oc-access__gone`,children:P()}):null,e.outOfPool?(0,X.jsx)(I,{variant:`outline`,className:`oc-access__gone`,children:C()}):null,r?s?(0,X.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":S(),title:S(),children:(0,X.jsx)(J,{size:14,fill:`currentColor`})}):(0,X.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":_(),title:_(),onClick:()=>void m(e.agentId),children:(0,X.jsx)(J,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return s();case`user`:return M();case`admin`:return w();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=W.filter(e=>n.has(G[e])).length;return(0,X.jsxs)(ke,{children:[(0,X.jsx)(xe,{asChild:!0,children:(0,X.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?E():i({count:r})})}),(0,X.jsxs)(R,{align:`start`,className:`w-52`,children:[(0,X.jsx)(Se,{children:N()}),W.map(e=>{let r=G[e];return(0,X.jsxs)(Ce,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,X.jsx)(V,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,X.jsx)(`span`,{children:Te[e]()})]},e)})]})]})}function Le(){let e=ve({from:`/settings/users`}),t=be({from:`/settings/users`}),n=e.q??``,i=e.role??Q,a=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),m=c(u.admin.listUsers,{filter:{q:n||void 0,role:i===Q?void 0:i},withAgents:!0}),h=c(u.me.getMe,{host:Ee}),_=d(u.admin.setRole),v=d(u.admin.setUserPermissions),b=d(u.admin.startImpersonation),S=d(u.admin.deleteUser),C=d(u.admin.setUserName),w=ye(),T=_e(),E=z(),[D,O]=(0,Y.useState)(null),j=(0,Y.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of m??[])e.add(t.role);return[...e]},[m]),M=n!==``||i!==Q;function N(){t({search:{},replace:!0})}async function P(e){try{await _(e)}catch(e){E.error(ie(),e)}}async function F(e){try{await v(e)}catch(e){E.error(x(),e)}}async function I(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:r(),description:ue({user:t}),confirmWord:ne(),confirmLabel:l(),destructive:!0}))try{await S({profileId:e._id}),E.success(oe({user:t}))}catch(e){E.error(f(),e)}}async function R(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:o(),label:ae({user:t}),placeholder:he(),defaultValue:e.name??``,confirmLabel:y()});if(n!==null)try{await C({profileId:e._id,name:n}),E.success(A())}catch(e){E.error(ge(),e)}}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Me,{q:n,onQChange:a,searchPlaceholder:g(),onReset:N,canReset:M,children:(0,X.jsxs)(q,{value:i,onValueChange:s,children:[(0,X.jsx)(B,{size:`sm`,className:`w-36`,children:(0,X.jsx)(L,{})}),(0,X.jsxs)(H,{children:[(0,X.jsx)(K,{value:Q,children:p()}),j.map(e=>(0,X.jsx)(K,{value:e,children:$(e)},e))]})]})}),(0,X.jsx)(Ne,{title:re(),rows:m,emptyHint:te(),rowActions:e=>{let t=[{label:fe(),onSelect:()=>O({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:me(),onSelect:()=>void R(e)}];return e.userId!==h?.userId&&t.push({label:ee(),onSelect:()=>void b({profileId:e._id})},{label:le(),variant:`destructive`,onSelect:()=>void I(e)}),t},columns:[{header:pe(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(`span`,{children:t}),n?(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:k(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,X.jsxs)(q,{value:e.role,onValueChange:t=>void P({profileId:e._id,role:t}),children:[(0,X.jsx)(B,{size:`sm`,className:`w-28`,children:(0,X.jsx)(L,{})}),(0,X.jsxs)(H,{children:[(0,X.jsx)(K,{value:`pending`,children:$(`pending`)}),(0,X.jsx)(K,{value:`user`,children:$(`user`)}),(0,X.jsx)(K,{value:`admin`,children:$(`admin`)})]})]})},{header:se(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:ce()}):(0,X.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),F({profileId:e._id,permissions:[...n]})}})},{header:de(),cell:e=>(0,X.jsx)(Pe,{icon:(0,X.jsx)(U,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,X.jsx)(Fe,{profileId:D?.profileId??null,userLabel:D?.label??``,open:D!==null,onOpenChange:e=>{e||O(null)}})]})}export{Le as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-BJuS9RKK.js";e();var a=t(),o=r(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-DBtFWMbn.js";e();var a=t(),o=r(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,className:e})),...c})}export{o as n,s as t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-BJuS9RKK.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-DBtFWMbn.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
@@ -0,0 +1 @@
1
+ import{D as e}from"./dist-DBtFWMbn.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
@@ -1 +1 @@
1
- import{Ga as e,Ja as t,Ka as n,Xa as r,Ya as i,ao as a}from"./dist-BJuS9RKK.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?r():e===`beyond`?i():t()}function p(e){return e??a()}function m(t){return t===null?e():n({version:t})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
1
+ import{Ga as e,Ja as t,Ka as n,Xa as r,Ya as i,ao as a}from"./dist-DBtFWMbn.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?r():e===`beyond`?i():t()}function p(e){return e??a()}function m(t){return t===null?e():n({version:t})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
@@ -1 +1 @@
1
- import{Au as e,Cu as t,Du as n,Eu as r,Fu as i,Mu as a,Nu as o,Ou as s,Pu as c,Su as l,Tu as u,_u as d,bu as f,cu as p,du as m,fu as h,gu as g,hu as _,ju as v,ku as y,lu as b,mu as x,pu as S,su as C,uu as w,vu as T,wu as E,xu as D,yu as O}from"./dist-BJuS9RKK.js";var k={AGENT_NOT_FOUND:()=>({label:i(),hint:c()}),AUTH_TOKEN_MISMATCH:()=>({label:o(),hint:a()}),DEVICE_SIGNING_FAILED:()=>({label:v(),hint:e()}),SESSION_SCOPE_DENIED:()=>({label:y(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:n(),hint:r()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:E()}),ATTACHMENT_TOO_LARGE:()=>({label:D(),hint:f()}),ATTACHMENT_REJECTED:()=>({label:O(),hint:T()}),BRIDGE_UNREACHABLE:()=>({label:t(),hint:l()}),INVALID_REQUEST:()=>({label:d(),hint:g()}),NOT_CONFIGURED:()=>({label:_(),hint:x()}),UNROUTED:()=>({label:S(),hint:h()}),UPSTREAM_ERROR:()=>({label:m(),hint:w()}),UNKNOWN:()=>({label:b(),hint:p()})};function A(e){return e?k[e]?.()??{label:e,hint:C()}:k.UNKNOWN()}export{A as t};
1
+ import{Au as e,Cu as t,Du as n,Eu as r,Fu as i,Mu as a,Nu as o,Ou as s,Pu as c,Su as l,Tu as u,_u as d,bu as f,cu as p,du as m,fu as h,gu as g,hu as _,ju as v,ku as y,lu as b,mu as x,pu as S,su as C,uu as w,vu as T,wu as E,xu as D,yu as O}from"./dist-DBtFWMbn.js";var k={AGENT_NOT_FOUND:()=>({label:i(),hint:c()}),AUTH_TOKEN_MISMATCH:()=>({label:o(),hint:a()}),DEVICE_SIGNING_FAILED:()=>({label:v(),hint:e()}),SESSION_SCOPE_DENIED:()=>({label:y(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:n(),hint:r()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:E()}),ATTACHMENT_TOO_LARGE:()=>({label:D(),hint:f()}),ATTACHMENT_REJECTED:()=>({label:O(),hint:T()}),BRIDGE_UNREACHABLE:()=>({label:t(),hint:l()}),INVALID_REQUEST:()=>({label:d(),hint:g()}),NOT_CONFIGURED:()=>({label:_(),hint:x()}),UNROUTED:()=>({label:S(),hint:h()}),UPSTREAM_ERROR:()=>({label:m(),hint:w()}),UNKNOWN:()=>({label:b(),hint:p()})};function A(e){return e?k[e]?.()??{label:e,hint:C()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-BJuS9RKK.js";var s=r(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=r(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,r]=o(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,r]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-DBtFWMbn.js";var s=r(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=r(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,r]=o(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,r]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
@@ -1,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-BJuS9RKK.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=l(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),l=v.useRef(null),[u,d]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),o=i(t,a.triggerRef);return(0,y.jsx)(_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:o,onClick:g(e.onClick,a.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(s,{present:n||a.open,children:(0,y.jsx)(m,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(s,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(s,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),a=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:g(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:l.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:l.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(_.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(_.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-DBtFWMbn.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=l(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),l=v.useRef(null),[u,d]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),o=i(t,a.triggerRef);return(0,y.jsx)(_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:o,onClick:g(e.onClick,a.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(s,{present:n||a.open,children:(0,y.jsx)(m,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(s,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(s,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),a=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:g(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:l.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:l.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(_.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(_.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4