@lacneu/atrium 0.30.0 → 0.31.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-BsdUHkzK.js +1 -0
  2. package/dist/assets/{AdvancedFilter-BM-NsfWQ.js → AdvancedFilter-D7DLZYme.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DIarAi1f.js +3 -0
  4. package/dist/assets/AnomaliesTab-DuiB7-Hb.js +1 -0
  5. package/dist/assets/{AuditTab-7UfsE_38.js → AuditTab-JztKqFCo.js} +1 -1
  6. package/dist/assets/BridgeTab-Cq5iNQOa.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-uzoXYwFc.js +1 -0
  8. package/dist/assets/{DataTableShell-DBDIF654.js → DataTableShell-5lSbOyB_.js} +1 -1
  9. package/dist/assets/{DetailChips-eDCHm7fV.js → DetailChips-DxHzS0pZ.js} +1 -1
  10. package/dist/assets/FeedbacksTab-fwt5C5Db.js +1 -0
  11. package/dist/assets/{FieldLabel-BxCSPKLD.js → FieldLabel-C4ocliYM.js} +1 -1
  12. package/dist/assets/FilesTab-DJ28a030.js +1 -0
  13. package/dist/assets/{FilterBar-egrudkw6.js → FilterBar-2yRvM8KI.js} +1 -1
  14. package/dist/assets/GroupsTab-B9MxdzYT.js +1 -0
  15. package/dist/assets/InstancesTab-CLRtI5-3.js +1 -0
  16. package/dist/assets/IntegrationsTab-Dex6qIRe.js +1 -0
  17. package/dist/assets/{KpiTab-BW9nVj-Y.js → KpiTab-Bho9N3hr.js} +1 -1
  18. package/dist/assets/PreferencesTab-DXQYcjrW.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-DeikEkRG.js +3 -0
  20. package/dist/assets/RolesTab-_zD3lV_5.js +1 -0
  21. package/dist/assets/ServiceAccountsTab--einclAf.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-CRtVt4vg.js +1 -0
  23. package/dist/assets/ThemeShowroom-CfDj2cuT.js +1 -0
  24. package/dist/assets/{TimeRangePicker-CjeAiSdk.js → TimeRangePicker-DIRVKRqd.js} +1 -1
  25. package/dist/assets/TracesTab-DNq9Qj5A.js +1 -0
  26. package/dist/assets/UsersTab-uocEkZlF.js +1 -0
  27. package/dist/assets/{button-CcNQBW08.js → button-BK4ZG4Jz.js} +1 -1
  28. package/dist/assets/{card-B9JuMxhP.js → card-BVpALAaI.js} +1 -1
  29. package/dist/assets/chevrons-up-down-CgCxGbNZ.js +1 -0
  30. package/dist/assets/{compatView-aBtPNegs.js → compatView-CjP1FDes.js} +1 -1
  31. package/dist/assets/dispatchErrorInfo-oHT_3ckv.js +1 -0
  32. package/dist/assets/{dist-BhnVOFIn.js → dist-73SeNc8s.js} +1 -1
  33. package/dist/assets/{dist-GFH_mzhb.js → dist-BuHHfQDg.js} +1 -1
  34. package/dist/assets/{dist-CNxV6qRL.js → dist-CsRbXSKk.js} +1 -1
  35. package/dist/assets/{dist-BOukL7gG.js → dist-DDPZzNhc.js} +1 -1
  36. package/dist/assets/{highlighted-body-OFNGDK62-CcH-KtiT.js → highlighted-body-OFNGDK62-xoPNl7hV.js} +1 -1
  37. package/dist/assets/index-Ca5_rTHj.js +229 -0
  38. package/dist/assets/mermaid-GHXKKRXX-B7eIuXQl.js +1 -0
  39. package/dist/assets/roleDescriptions-UrTqz_co.js +1 -0
  40. package/dist/assets/{table-DAtXjw2C.js → table-WXK9Ux9R.js} +1 -1
  41. package/dist/assets/{tabs-BHYINAjr.js → tabs-BWd0h4Tg.js} +1 -1
  42. package/dist/assets/x-Bw9Ep8PY.js +1 -0
  43. package/dist/index.html +7 -7
  44. package/package.json +1 -1
  45. package/dist/assets/AccessTab-CUrhYOD-.js +0 -1
  46. package/dist/assets/AgentFilesTab-Dq4y_9nj.js +0 -3
  47. package/dist/assets/AnomaliesTab-C40acUCU.js +0 -1
  48. package/dist/assets/BridgeTab-CjidRXGN.js +0 -1
  49. package/dist/assets/ChatDefaultsTab-Bl4jU1yW.js +0 -1
  50. package/dist/assets/FeedbacksTab-B40TFMxk.js +0 -1
  51. package/dist/assets/FilesTab-go4v_nAG.js +0 -1
  52. package/dist/assets/GroupsTab-DPMLiMCc.js +0 -1
  53. package/dist/assets/InstancesTab-KzujA3gD.js +0 -1
  54. package/dist/assets/IntegrationsTab-y61Q2VDy.js +0 -1
  55. package/dist/assets/PreferencesTab-CNpy4JQu.js +0 -1
  56. package/dist/assets/PromptInjectionsTab-CWC7LSmE.js +0 -3
  57. package/dist/assets/RolesTab-DyDQiA_c.js +0 -1
  58. package/dist/assets/ServiceAccountsTab-B6F-47Gm.js +0 -1
  59. package/dist/assets/SubAgentReportsTab-NTWhdI69.js +0 -1
  60. package/dist/assets/ThemeShowroom-B7Z2ffNQ.js +0 -1
  61. package/dist/assets/TracesTab-CFkotfAj.js +0 -1
  62. package/dist/assets/UsersTab-BUX8VYmD.js +0 -1
  63. package/dist/assets/chevrons-up-down-ar6Ygzeq.js +0 -1
  64. package/dist/assets/dispatchErrorInfo-MZJyPS1B.js +0 -1
  65. package/dist/assets/index-HZd91gw7.js +0 -229
  66. package/dist/assets/mermaid-GHXKKRXX-D7Hy3m87.js +0 -1
  67. package/dist/assets/roleDescriptions-CxEPrkAY.js +0 -1
  68. package/dist/assets/x-C81gK-RB.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$b as r,$p as i,Ap as a,Ax as o,BO as s,Bp as c,Cp as l,Cx as u,Dp as d,Dx as f,Ep as p,Ex as m,Fp as h,Fx as g,Gp as ee,Hp as _,Ip as te,Ix as v,Jp as y,KO as b,Kp as x,Lp as ne,Lx as S,Mp as re,Mx as C,Np as ie,Nx as w,Op as ae,Ox as T,Pp as oe,Px as se,Qb as E,Qp as ce,Rp as le,Rx as ue,Sp as de,Sx as fe,Tp as pe,Tx as me,Up as he,VO as D,Vp as ge,Wp as _e,Xb as O,Xp as ve,Yp as ye,Zb as be,Zp as xe,_p as k,_x as A,ax as j,bp as Se,bx as M,cx as Ce,ex as we,gp as Te,gx as N,hp as P,hx as F,ix as I,jp as Ee,jx as L,kp as De,kx as Oe,lx as ke,nx as Ae,ox as je,qO as R,qp as Me,rx as Ne,sx as Pe,tx as Fe,ux as Ie,vp as Le,vx as Re,wp as ze,wx as Be,xp as Ve,xx as He,yp as Ue,yx as We,zp as Ge,zx as Ke}from"./dist-DDPZzNhc.js";import{n as qe}from"./dist-73SeNc8s.js";import{t as Je}from"./x-Bw9Ep8PY.js";import{i as z,n as B,r as Ye,t as Xe}from"./tabs-BWd0h4Tg.js";import{t as V}from"./button-BK4ZG4Jz.js";import{$ as Ze,C as H,Ct as Qe,Dt as $e,Mt as et,Q as tt,S as U,X as W,a as nt,b as G,et as rt,i as it,jt as at,k as ot,nt as st,o as ct,ot as lt,r as ut,rt as dt,wt as ft,x as K,y as q}from"./index-Ca5_rTHj.js";import{n as pt}from"./TimeRangePicker-DIRVKRqd.js";import{t as mt}from"./FilterBar-2yRvM8KI.js";import{t as ht}from"./AdvancedFilter-D7DLZYme.js";import{t as gt}from"./DataTableShell-5lSbOyB_.js";var _t=D(`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`}]]),vt=D(`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 yt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?M():n===`agent`?`${We()} - ${r}`:e}function bt(){let e=R(s.me.getMe,{host:lt})?.role===`admin`,t=R(s.deliveryTiming.getDeliveryStatus,{}),n=b(s.deliveryTiming.startDeliveryRecord),r=b(s.deliveryTiming.stopDeliveryRecord),[i,a]=(0,J.useState)(!1),[o,c]=(0,J.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await r({}):await n({})}finally{c(!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:Ke()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:ue()})]}),e?(0,Y.jsx)(V,{variant:l?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void u(),children:l?v():S()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(W,{variant:`secondary`,children:g()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:se({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?L():C()})}),i?(0,Y.jsx)(xt,{isAdmin:e}):null]})}function xt({isAdmin:e}){let t=R(s.deliveryTiming.listDeliverySessions,{}),n=b(s.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,c]=(0,J.useState)(`all`),[l,d]=(0,J.useState)(X),[p,h]=(0,J.useState)(null),{from:g,to:ee}=pt(l),_=l.to===`now`?1/0:ee,te=r.trim()!==``||a!==`all`||l!==X,v=()=>{i(``),c(`all`),d(X)},y=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=g&&t.startedAt<=_).map(e=>({...e,_id:e.sessionId}))},[t,r,a,g,_]),x=e=>{let t=new Set((y??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),p!==null&&r.includes(p)&&h(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(mt,{q:r,onQChange:i,searchPlaceholder:Oe(),timeRange:l,onTimeRangeChange:d,onReset:v,canReset:te,children:(0,Y.jsxs)(q,{value:a,onValueChange:e=>c(e),children:[(0,Y.jsx)(U,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(H,{})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:`all`,children:T()}),(0,Y.jsx)(K,{value:`active`,children:f()}),(0,Y.jsx)(K,{value:`stopped`,children:m()})]})]})}),(0,Y.jsx)(gt,{title:o(),rows:y,emptyHint:be(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(V,{variant:`ghost`,size:`icon`,"aria-label":p===e.sessionId?A():Re(),onClick:()=>h(t=>t===e.sessionId?null:e.sessionId),children:p===e.sessionId?(0,Y.jsx)(_t,{size:15,"aria-hidden":!0}):(0,Y.jsx)(ft,{size:15,"aria-hidden":!0})})},{header:me(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.startedAt).toLocaleString()})},{header:Be(),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:new Date(e.stoppedAt).toLocaleString()})},{header:u(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:fe(),sort:e=>e.startedBy,cell:e=>yt(e.startedBy)},{header:He(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(W,{variant:`secondary`,children:f()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:m()})}],rowActions:e?e=>[{label:N(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:N(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===p,renderExpanded:e=>(0,Y.jsx)(St,{sessionId:e.sessionId})})]})}function St({sessionId:e}){let t=R(s.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ct,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(ot(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ct({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:F()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:w()});let i=e.segments,a=(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,` `,O()]}),(0,Y.jsxs)(V,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(qe,{size:13,"aria-hidden":!0}):(0,Y.jsx)($e,{size:13,"aria-hidden":!0}),t?E():r()]})]}),(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:Ce()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Pe()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:je()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(j(),i.bridge),a(I(),i.A),a(Ne(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Ae()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:we()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Fe()})]})}var wt=[50,100,200,500],Tt=`all`,Q=`__all__`,Et=[`2xx`,`4xx`,`5xx`],Dt=[`user`,`service`,`system`],Ot=[`inbound`,`outbound`,`internal`],kt={kind:`relative`,from:`now-30d`,to:`now`},At=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function jt(){let e=et({from:`/settings/traces`}),t=at({from:`/settings/traces`}),n=e.limit,r=e.kind,o=e.statusClass??Q,u=e.principalType??Q,f=e.direction??Q,m=e.roleKey??Q,g=e.q??``,v=ut(e.from,e.to),b=(0,J.useMemo)(()=>ct(e.adv),[e.adv]),{from:S,to:C}=pt(v),[w,T]=(0,J.useState)(null),[se,E]=(0,J.useState)(null),ue=e=>void t({search:t=>({...t,limit:e})}),fe=e=>void t({search:t=>({...t,kind:e})}),me=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})}),O=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),be=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),A=e=>void t({search:t=>({...t,...nt(e)})}),j=e=>void t({search:t=>({...t,adv:it(e)}),replace:!0}),M=R(s.observability.listEvents,{limit:n}),Ce=R(s.observability.listEvents,{limit:n,kind:r===Tt?void 0:r,filter:{q:g||void 0,from:S,to:C,statusClass:o===Q?void 0:o,principalType:u===Q?void 0:u,direction:f===Q?void 0:f,roleKey:m===Q?void 0:m,advanced:b.length>0?b:void 0}}),we=(0,J.useMemo)(()=>{let e=new Set;for(let t of M??[])e.add(t.kind);return[...e].sort()},[M]),Te=(0,J.useMemo)(()=>{let e=new Set;for(let t of M??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[M]),N=g!==``||o!==Q||u!==Q||f!==Q||m!==Q||b.length>0||v.kind!==`relative`||v.from!==kt.from;function P(){t({search:{limit:100,kind:`all`},replace:!0})}let F=w?M?.filter(e=>e.correlationId===w):Ce,[I,L]=(0,J.useState)(`events`);return(0,Y.jsxs)(Xe,{value:I,onValueChange:e=>L(e),children:[(0,Y.jsxs)(Ye,{className:`w-full`,children:[(0,Y.jsxs)(z,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Qe,{size:13,"aria-hidden":!0}),Ie()]}),(0,Y.jsxs)(z,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(vt,{size:13,"aria-hidden":!0}),ke()]})]}),(0,Y.jsx)(B,{value:`latency`,children:(0,Y.jsx)(bt,{})}),(0,Y.jsxs)(B,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[i(),(0,Y.jsx)(`strong`,{children:ce()}),xe(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:ve()})]}),(0,Y.jsxs)(mt,{q:g,onQChange:me,searchPlaceholder:ye(),timeRange:v,onTimeRangeChange:A,onReset:P,canReset:N,children:[(0,Y.jsxs)(q,{value:o,onValueChange:D,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:y()})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:Q,children:Me()}),Et.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:u,onValueChange:O,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:x()})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:Q,children:ee()}),Dt.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:f,onValueChange:be,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:_e()})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:Q,children:he()}),Ot.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:m,onValueChange:k,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(H,{placeholder:_()})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:Q,children:ge()}),Te.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:r,onValueChange:fe,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(H,{placeholder:c()})}),(0,Y.jsxs)(G,{children:[(0,Y.jsx)(K,{value:Tt,children:Ge()}),we.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:String(n),onValueChange:e=>ue(Number(e)),children:[(0,Y.jsx)(U,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(H,{})}),(0,Y.jsx)(G,{children:wt.map(e=>(0,Y.jsx)(K,{value:String(e),children:le({count:e})},e))})]})]}),(0,Y.jsx)(ht,{fields:At,seed:b,onChange:j}),w?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>T(null),title:ne(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[te(),(0,Y.jsx)(`code`,{children:$(w)})]}),(0,Y.jsx)(Je,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:h()})]})}):null,(0,Y.jsx)(gt,{title:oe(),rows:F,emptyHint:w?ie():re(),columns:[{header:Ee(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:a(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(W,{variant:`secondary`,children:e.kind})},{header:De(),sort:e=>Nt(e)??null,cell:e=>{let t=Nt(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":ae(),children:`✓`})}},{header:d(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(W,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:p(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(W,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:pe(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(W,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ze(),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:l(),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 ${Mt(e.status)}`,children:e.status})},{header:de(),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:Ve(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Se(),onClick:()=>T(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ue(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>E(e),children:Le()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(Pt,{row:se,onClose:()=>E(null)})]})]})}function Mt(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 Nt(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 Pt({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)(tt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(Ze,{className:`max-w-lg`,children:[(0,Y.jsxs)(st,{children:[(0,Y.jsxs)(dt,{className:`oc-traces__meta-title`,children:[k(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(W,{variant:`outline`,children:Te()})]}),(0,Y.jsx)(rt,{children:P()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{jt as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Af as r,Av as i,BO as a,Bf as o,Cv as s,Dv as c,Ev as l,Ff as u,If as d,KO as f,Lf as p,Mf as m,Mv as h,Nf as g,Nv as _,Ov as v,Pf as y,Pv as b,Rf as x,Sv as ee,Tv as te,V_ as ne,Vf as S,_v as re,bv as ie,cv as ae,dv as oe,fv as C,gv as se,hv as ce,jf as w,jv as T,kf as E,kv as D,lv as O,mv as k,ov as le,pv as ue,qO as A,sv as de,uv as fe,vv as pe,wv as me,xv as he,yv as ge,zf as j}from"./dist-DDPZzNhc.js";import{t as M}from"./button-BK4ZG4Jz.js";import{$ as N,A as P,C as F,G as I,K as L,M as R,Mt as _e,Q as z,S as B,W as V,X as H,Y as ve,_ as U,_t as W,b as G,d as K,et as ye,f as be,gt as q,j as xe,jt as Se,nt as Ce,ot as we,p as J,q as Te,rt as Ee,x as Y,y as X}from"./index-Ca5_rTHj.js";import{t as De}from"./FilterBar-2yRvM8KI.js";import{t as Oe}from"./DataTableShell-5lSbOyB_.js";import{t as ke}from"./DetailChips-DxHzS0pZ.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=A(a.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),s=A(a.agents.listUserAgents,n&&e?{profileId:e}:`skip`),c=new Set((s??[]).map(e=>`${e.instanceName}/${e.agentId}`)),l=(s??[]).find(e=>e.isDefault)??null,u=l?`${l.instanceName}/${l.agentId}`:null,d=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),f=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(s??[]).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}))],m=new Map;for(let e of f){let t=m.get(e.instanceName)??[];t.push(e),m.set(e.instanceName,t)}return(0,Q.jsx)(z,{open:n,onOpenChange:r,children:(0,Q.jsxs)(N,{className:`oc-access`,children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:S({user:t})}),(0,Q.jsx)(ye,{children:o()})]}),i?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?j():x()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:p()}):f.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:y()}):[...m.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:c,defaultKey:u},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:i,assigned:o,defaultKey:s}){let c=f(a.agents.assignAgent),l=f(a.agents.removeAgent),p=f(a.agents.setDefaultAgent),h=P();if(!e)return null;async function _(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await c({profileId:e,instanceName:t,agentId:n})}catch(e){h.error(d(),e)}}async function v(n){try{await p({profileId:e,instanceName:t,agentId:n})}catch(e){h.error(u(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(W,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=o.has(n),a=s===n,c=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(U,{checked:i,disabled:c&&!i,onCheckedChange:()=>void _(e.agentId,i),"aria-label":g({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,c?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:m()}):null,e.outOfPool?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:w()}):null,i?a?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":r(),title:r(),children:(0,Q.jsx)(q,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":E(),title:E(),onClick:()=>void v(e.agentId),children:(0,Q.jsx)(q,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=K.filter(e=>n.has(J[e])).length;return(0,Q.jsxs)(V,{children:[(0,Q.jsx)(ve,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?b():_({count:r})})}),(0,Q.jsxs)(I,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:h()}),K.map(e=>{let r=J[e];return(0,Q.jsxs)(L,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(U,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:be[e]??e})]},e)})]})]})}function Ne(){let e=_e({from:`/settings/users`}),t=Se({from:`/settings/users`}),n=e.q??``,r=e.role??$,o=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),u=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),d=A(a.admin.listUsers,{filter:{q:n||void 0,role:r===$?void 0:r},withAgents:!0}),p=A(a.me.getMe,{host:we}),m=f(a.admin.setRole),h=f(a.admin.setUserPermissions),g=f(a.admin.startImpersonation),_=f(a.admin.deleteUser),y=f(a.admin.setUserName),b=xe(),x=R(),S=P(),[w,E]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of d??[])e.add(t.role);return[...e]},[d]),M=n!==``||r!==$;function N(){t({search:{},replace:!0})}async function I(e){try{await m(e)}catch(e){S.error(T(),e)}}async function L(e){try{await h(e)}catch(e){S.error(i(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await b({title:s(),description:ee({user:t}),confirmWord:he(),confirmLabel:ie(),destructive:!0}))try{await _({profileId:e._id}),S.success(pe({user:t}))}catch(e){S.error(ge(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await x({title:se(),label:ce({user:t}),placeholder:k(),defaultValue:e.name??``,confirmLabel:ne()});if(n!==null)try{await y({profileId:e._id,name:n}),S.success(ue())}catch(e){S.error(C(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:o,searchPlaceholder:D(),onReset:N,canReset:M,children:(0,Q.jsxs)(X,{value:r,onValueChange:u,children:[(0,Q.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:$,children:v()}),j.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:c(),rows:d,emptyHint:l(),rowActions:e=>{let t=[{label:le(),onSelect:()=>E({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:re(),onSelect:()=>void V(e)}];return e.userId!==p?.userId&&t.push({label:te(),onSelect:()=>void g({profileId:e._id})},{label:me(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:oe(),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,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:fe(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void I({profileId:e._id,role:t}),children:[(0,Q.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:`pending`,children:`pending`}),(0,Q.jsx)(Y,{value:`user`,children:`user`}),(0,Q.jsx)(Y,{value:`admin`,children:`admin`})]})]})},{header:O(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:ae()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),L({profileId:e._id,permissions:[...n]})}})},{header:de(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(W,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:w?.profileId??null,userLabel:w?.label??``,open:w!==null,onOpenChange:e=>{e||E(null)}})]})}export{Ne as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{OO as n,n as r,t as i}from"./dist-BOukL7gG.js";e();var a=t(),o=i(`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:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{FO as n,n as r,t as i}from"./dist-DDPZzNhc.js";e();var a=t(),o=i(`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:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,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-BOukL7gG.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-DDPZzNhc.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{VO as e}from"./dist-DDPZzNhc.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{Fr as e,Jr as t,Lr as n,Pr as r,Rr as i,zr as a}from"./dist-BOukL7gG.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`?a():e===`beyond`?i():n()}function p(e){return e??t()}function m(t){return t===null?r():e({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{Gr as e,Hr as t,Kr as n,Vr as r,Wr as i,ti as a}from"./dist-DDPZzNhc.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(t){return t===`supported`?n():t===`beyond`?e():i()}function p(e){return e??a()}function m(e){return e===null?r():t({version:e})}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};
@@ -0,0 +1 @@
1
+ import{Ac as e,Cc as t,Dc as n,Ec as r,Oc as i,Sc as a,Tc as o,_c as s,ac as c,bc as l,cc as u,dc as d,fc as f,gc as p,hc as m,ic as h,jc as g,kc as _,lc as v,mc as y,oc as b,pc as x,rc as S,sc as C,uc as w,vc as T,wc as E,xc as D,yc as O}from"./dist-DDPZzNhc.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:e()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:i()}),DEVICE_SIGNING_FAILED:()=>({label:n(),hint:r()}),SESSION_SCOPE_DENIED:()=>({label:o(),hint:E()}),GATEWAY_TIMEOUT:()=>({label:t(),hint:a()}),GATEWAY_DISCONNECTED:()=>({label:D(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:s(),hint:p()}),ATTACHMENT_REJECTED:()=>({label:m(),hint:y()}),BRIDGE_UNREACHABLE:()=>({label:O(),hint:T()}),INVALID_REQUEST:()=>({label:x(),hint:f()}),NOT_CONFIGURED:()=>({label:d(),hint:w()}),UNROUTED:()=>({label:v(),hint:u()}),UPSTREAM_ERROR:()=>({label:C(),hint:b()}),UNKNOWN:()=>({label:c(),hint:h()})};function A(e){return e?k[e]?.()??{label:e,hint:S()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{PO as n}from"./dist-BOukL7gG.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{VO as n}from"./dist-DDPZzNhc.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{MO as r,PO as i,SO as a,kO as o}from"./dist-BOukL7gG.js";var s=i(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=i(`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,i]=a(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=o(f),m=l.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,u.jsx)(p,{ref:r(t,c(f,n).collectionRef),children:i})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=o(h),v=l.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,o=l.useRef(null),s=r(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...a}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:i})});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,i]}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{IO as r,VO as i,kO as a,zO as o}from"./dist-DDPZzNhc.js";var s=i(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=i(`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,i]=a(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=r(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:o(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=r(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=l.useRef(null),s=o(t,a),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(a,{ref:a,...i}),()=>void d.itemMap.delete(a))),(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,i]}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{EO as r,MO as i,SO as a,TO as o,_O as s,dO as c,fO as l,gO as u,hO as d,kO as f,mO as p,pO as m,vO as h,xO as g,yO as _}from"./dist-BOukL7gG.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=a(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,c=v.useRef(null),l=v.useRef(null),[u,d]=_({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:c,contentRef:l,contentId:s(),titleId:s(),descriptionId:s(),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,...a}=e,s=w(E,n),c=i(t,s.triggerRef);return(0,y.jsx)(r.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":q(s.open),...a,ref:c,onClick:o(e.onClick,s.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)(h,{present:n||a.open,children:(0,y.jsx)(p,{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)(h,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=f(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(M,n);return(0,y.jsx)(l,{as:P,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(r.div,{"data-state":q(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.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)(h,{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 c(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:o(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:o(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:o(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:o,...s}=e,c=w(I,n),l=v.useRef(null),f=i(t,l);return m(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(u,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(V,n);return(0,y.jsx)(r.h2,{id:a.titleId,...i,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(U,n);return(0,y.jsx)(r.p,{id:a.descriptionId,...i,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(G,n);return(0,y.jsx)(r.button,{type:`button`,...i,ref:t,onClick:o(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=g(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{CO as r,EO as i,IO as a,MO as o,NO as s,OO as c,SO as l,TO as u,bO as d,kO as f,vO as p,wO as m,xO as h,yO as g,zO as _}from"./dist-DDPZzNhc.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=f(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=v.useRef(null),l=v.useRef(null),[u,d]=i({prop:r,defaultProp:a??!1,onChange:o,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:c,contentRef:l,contentId:m(),titleId:m(),descriptionId:m(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(E,n),a=_(t,i.triggerRef);return(0,y.jsx)(s.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":q(i.open),...r,ref:a,onClick:o(e.onClick,i.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)(u,{present:n||a.open,children:(0,y.jsx)(h,{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)(u,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=a(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(g,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(s.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)(u,{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),i=_(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return p(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:o(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:o(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:o(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:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=w(I,n),u=v.useRef(null),f=_(t,u);return d(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(r,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(s.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)(s.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)(s.button,{type:`button`,...r,ref:t,onClick:o(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=c(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