@lacneu/atrium 0.44.1 → 0.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/assets/{AccessTab-D0JX5_mH.js → AccessTab-BddH78dE.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-C2V1UpGN.js → AdvancedFilter-BtBFrOvl.js} +1 -1
  3. package/dist/assets/AgentFilesTab-BjHjDtke.js +3 -0
  4. package/dist/assets/AnomaliesTab-DAN7LLc6.js +1 -0
  5. package/dist/assets/AuditTab-DU5zjRhf.js +1 -0
  6. package/dist/assets/BridgeTab-DcrewE6Z.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-DSKzve06.js +1 -0
  8. package/dist/assets/{DataTableShell-BYoFVC-r.js → DataTableShell-CKQRa8xi.js} +1 -1
  9. package/dist/assets/{DetailChips-CTEdEWG0.js → DetailChips-d1Fs61TW.js} +1 -1
  10. package/dist/assets/FeedbacksTab-DwGLKFXT.js +1 -0
  11. package/dist/assets/{FieldLabel-DGjTbsLi.js → FieldLabel-BPj-rFdV.js} +2 -2
  12. package/dist/assets/FilesTab-DxfG8nYK.js +1 -0
  13. package/dist/assets/{FilterBar-CVU7c-v_.js → FilterBar-Bub5nUxA.js} +1 -1
  14. package/dist/assets/GroupsTab-Dsx_XQEy.js +1 -0
  15. package/dist/assets/InstancesTab-BXqrC-D1.js +1 -0
  16. package/dist/assets/IntegrationsTab-BIAS3k_T.js +1 -0
  17. package/dist/assets/KpiTab-CdCLnM_D.js +1 -0
  18. package/dist/assets/PreferencesTab-DWr9Jyo2.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-CF4hweHp.js +4 -0
  20. package/dist/assets/RolesTab-Bxgrordg.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-i2yfZcVV.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-D7F5pCxg.js +1 -0
  23. package/dist/assets/ThemeShowroom-BKUg_qk5.js +1 -0
  24. package/dist/assets/{TimeRangePicker-BlUshfcd.js → TimeRangePicker-CbbfR2tN.js} +1 -1
  25. package/dist/assets/TracesTab-DUUin7PU.js +1 -0
  26. package/dist/assets/UsersTab-BTlChquo.js +1 -0
  27. package/dist/assets/VoiceTab-Dh3iSyb5.js +1 -0
  28. package/dist/assets/{button-B39xibrh.js → button-CtB6NRj2.js} +1 -1
  29. package/dist/assets/{card-BV_9rQvt.js → card-CsumpaGg.js} +1 -1
  30. package/dist/assets/chevrons-up-down-B1FpM2AK.js +1 -0
  31. package/dist/assets/{compatView-CzBpE4XD.js → compatView-BA0_AW-d.js} +1 -1
  32. package/dist/assets/{dispatchErrorInfo-C7BQ_n4r.js → dispatchErrorInfo-BuUObQq-.js} +1 -1
  33. package/dist/assets/{dist-BB8NhuRg.js → dist-9jdLReLO.js} +1 -1
  34. package/dist/assets/{dist-uBTiN353.js → dist-DEMXTO86.js} +1 -1
  35. package/dist/assets/{dist-D1sIakMz.js → dist-qHCi9114.js} +1 -1
  36. package/dist/assets/{dist-C2CRpdq8.js → dist-tr7LmvAR.js} +5 -5
  37. package/dist/assets/{highlighted-body-OFNGDK62-CS3Oy50y.js → highlighted-body-OFNGDK62-DwZl6YUf.js} +1 -1
  38. package/dist/assets/index-D3n1_9Fa.js +233 -0
  39. package/dist/assets/mermaid-GHXKKRXX-TX3_lP0K.js +1 -0
  40. package/dist/assets/roleDescriptions-BzNYOzCY.js +1 -0
  41. package/dist/assets/{table-BNCY2kTQ.js → table-CFZX8hqf.js} +1 -1
  42. package/dist/assets/{tabs-DYLGMjrm.js → tabs-CtMWQedT.js} +1 -1
  43. package/dist/assets/x-BsTPtFiQ.js +1 -0
  44. package/dist/index.html +7 -7
  45. package/package.json +1 -1
  46. package/dist/assets/AgentFilesTab-C3K357SP.js +0 -3
  47. package/dist/assets/AnomaliesTab-DrZDQWE-.js +0 -1
  48. package/dist/assets/AuditTab-Dya-8fsa.js +0 -1
  49. package/dist/assets/BridgeTab-hb74bUWf.js +0 -1
  50. package/dist/assets/ChatDefaultsTab-Dew3JIDA.js +0 -1
  51. package/dist/assets/FeedbacksTab-Cev0HZud.js +0 -1
  52. package/dist/assets/FilesTab-kPVOWWll.js +0 -1
  53. package/dist/assets/GroupsTab-BitxCqvs.js +0 -1
  54. package/dist/assets/InstancesTab-C2LweWWX.js +0 -1
  55. package/dist/assets/IntegrationsTab-C9agAKR0.js +0 -1
  56. package/dist/assets/KpiTab-EJ3olSOM.js +0 -1
  57. package/dist/assets/PreferencesTab-CQXSbXS3.js +0 -1
  58. package/dist/assets/PromptInjectionsTab-Gwd3CkwY.js +0 -4
  59. package/dist/assets/RolesTab-DnckeL9t.js +0 -1
  60. package/dist/assets/ServiceAccountsTab-CoF3np7F.js +0 -1
  61. package/dist/assets/SubAgentReportsTab-DXymt-IL.js +0 -1
  62. package/dist/assets/ThemeShowroom-B0VjVJkx.js +0 -1
  63. package/dist/assets/TracesTab-CfJUlNIH.js +0 -1
  64. package/dist/assets/UsersTab-DGaxkYl7.js +0 -1
  65. package/dist/assets/VoiceTab-Bt3Lxg8m.js +0 -1
  66. package/dist/assets/chevrons-up-down-BL8pPwMe.js +0 -1
  67. package/dist/assets/index-Cw1UFCV-.js +0 -233
  68. package/dist/assets/mermaid-GHXKKRXX-DhO1q99Q.js +0 -1
  69. package/dist/assets/roleDescriptions-BU3_Xc_1.js +0 -1
  70. package/dist/assets/x-BbitkL6D.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Bn as r,Cm as i,Em as a,Hn as o,Ln as s,Rn as c,Sm as l,Tm as u,Un as d,Vn as f,_m as p,bm as m,gm as h,hm as g,mm as _,vm as v,wm as y,xm as b,ym as x,zn as S}from"./dist-C2CRpdq8.js";import{t as C}from"./button-B39xibrh.js";import{A as w,Ct as T,Nt as E,St as D,Wt as O,ct as k,wt as A,xt as j}from"./index-Cw1UFCV-.js";var M=t(e(),1),N={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function P(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=N[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function F(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:P(e.from,t)??t-N.h,to:P(e.to,t)??t}}var I=[{label:a(),from:`now-5m`},{label:u(),from:`now-15m`},{label:y(),from:`now-30m`},{label:i(),from:`now-1h`},{label:l(),from:`now-3h`},{label:b(),from:`now-6h`},{label:m(),from:`now-12h`},{label:x(),from:`now-24h`},{label:v(),from:`now-2d`},{label:p(),from:`now-7d`},{label:h(),from:`now-30d`},{label:g(),from:`now-90d`},{label:_(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,i]=(0,M.useState)(!1),[a,l]=(0,M.useState)(``),u=F(e),[p,m]=(0,M.useState)(()=>z(u.from)),[h,g]=(0,M.useState)(()=>z(u.to));function _(t){if(t){let t=F(e);m(z(t.from)),g(z(t.to)),l(``)}i(t)}function v(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function y(){let e=B(p),n=B(h);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!1))}let b=(0,M.useMemo)(()=>{let e=a.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[a]),x=B(p)!==null&&B(h)!==null;return(0,H.jsxs)(T,{open:n,onOpenChange:_,children:[(0,H.jsx)(A,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(O,{}),R(e)]})}),(0,H.jsx)(D,{children:(0,H.jsx)(j,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,H.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,H.jsx)(`div`,{className:`oc-timerange__section-title`,children:d()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:o()}),(0,H.jsx)(k,{type:`datetime-local`,value:p,onChange:e=>m(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:f()}),(0,H.jsx)(k,{type:`datetime-local`,value:h,onChange:e=>g(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!x,onClick:y,children:r()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(E,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(k,{value:a,onChange:e=>l(e.target.value),placeholder:S(),"aria-label":c()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:b.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:s()}):b.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>v(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Bn as r,Cm as i,Dm as a,Em as o,Hn as s,Ln as c,Rn as l,Sm as u,Tm as d,Un as f,Vn as p,_m as m,bm as h,gm as g,hm as _,vm as v,wm as y,xm as b,ym as x,zn as S}from"./dist-tr7LmvAR.js";import{t as C}from"./button-CtB6NRj2.js";import{A as w,Ct as T,Nt as E,St as D,Wt as O,ct as k,wt as A,xt as j}from"./index-D3n1_9Fa.js";var M=t(e(),1),N={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function P(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=N[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function F(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:P(e.from,t)??t-N.h,to:P(e.to,t)??t}}var I=[{label:a(),from:`now-5m`},{label:o(),from:`now-15m`},{label:d(),from:`now-30m`},{label:y(),from:`now-1h`},{label:i(),from:`now-3h`},{label:u(),from:`now-6h`},{label:b(),from:`now-12h`},{label:h(),from:`now-24h`},{label:x(),from:`now-2d`},{label:v(),from:`now-7d`},{label:m(),from:`now-30d`},{label:g(),from:`now-90d`},{label:_(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,i]=(0,M.useState)(!1),[a,o]=(0,M.useState)(``),u=F(e),[d,m]=(0,M.useState)(()=>z(u.from)),[h,g]=(0,M.useState)(()=>z(u.to));function _(t){if(t){let t=F(e);m(z(t.from)),g(z(t.to)),o(``)}i(t)}function v(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function y(){let e=B(d),n=B(h);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!1))}let b=(0,M.useMemo)(()=>{let e=a.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[a]),x=B(d)!==null&&B(h)!==null;return(0,H.jsxs)(T,{open:n,onOpenChange:_,children:[(0,H.jsx)(A,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(O,{}),R(e)]})}),(0,H.jsx)(D,{children:(0,H.jsx)(j,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,H.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,H.jsx)(`div`,{className:`oc-timerange__section-title`,children:f()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:s()}),(0,H.jsx)(k,{type:`datetime-local`,value:d,onChange:e=>m(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:p()}),(0,H.jsx)(k,{type:`datetime-local`,value:h,onChange:e=>g(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!x,onClick:y,children:r()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(E,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(k,{value:a,onChange:e=>o(e.target.value),placeholder:S(),"aria-label":l()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:b.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:c()}):b.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>v(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,$g as i,A_ as a,Aw as o,C_ as s,Cj as c,Cw as l,D as u,D_ as d,Dw as f,E as p,E_ as m,Ew as h,Fw as g,JC as _,Jg as v,KC as y,Kg as b,Mw as x,Nw as S,O_ as ee,Ow as C,Pw as w,QC as T,Qg as te,S_ as ne,Sj as E,Sw as D,T_ as re,Tw as ie,XC as ae,Xg as oe,YC as se,Yg as ce,ZC as le,Zg as ue,__ as de,_w as O,a_ as fe,aw as pe,b_ as me,bw as k,c_ as he,d_ as ge,dw as A,e_ as _e,ew as j,f_ as ve,fw as M,g_ as ye,gn as N,gw as P,h_ as be,hn as F,hw as xe,i_ as Se,iw as Ce,jw as we,k_ as Te,kw as Ee,l_ as De,m_ as Oe,mn as ke,mw as Ae,n_ as je,nw as Me,o_ as Ne,ow as Pe,p_ as Fe,pw as Ie,qC as Le,qg as Re,r_ as ze,rw as Be,s_ as Ve,t_ as He,tw as Ue,u_ as We,v_ as Ge,vw as Ke,w_ as qe,ww as Je,x_ as Ye,xw as Xe,y_ as Ze,yw as Qe}from"./dist-tr7LmvAR.js";import{n as $e}from"./dist-9jdLReLO.js";import{t as et}from"./x-BsTPtFiQ.js";import{i as tt,n as nt,r as rt,t as it}from"./tabs-CtMWQedT.js";import{t as I}from"./button-CtB6NRj2.js";import{A as L,Bt as at,C as R,Jt as ot,N as st,S as z,Ut as ct,a as lt,b as B,bt as ut,dt,i as ft,j as pt,lt as mt,mt as ht,o as gt,pt as _t,qt as vt,r as yt,st as V,ut as bt,w as H,x as U,zt as xt}from"./index-D3n1_9Fa.js";import{n as W}from"./TimeRangePicker-CbbfR2tN.js";import{t as G}from"./FilterBar-Bub5nUxA.js";import{t as St}from"./AdvancedFilter-BtBFrOvl.js";import{t as K}from"./DataTableShell-CKQRa8xi.js";var Ct=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`}]]),wt=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`}]]),q=t(e(),1),J=n(),Y={kind:`relative`,from:`now-520w`,to:`now`},X=e=>e===null?`-`:String(Math.round(e));function Tt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?P():n===`agent`?`${xe()} - ${r}`:e}function Et(){let e=c(p.me.getMe,{host:ut})?.role===`admin`,t=c(p.deliveryTiming.getDeliveryStatus,{}),n=E(p.deliveryTiming.startDeliveryRecord),r=E(p.deliveryTiming.stopDeliveryRecord),[i,a]=(0,q.useState)(!1),[s,l]=(0,q.useState)(!1),u=t?.recording??!1,d=async()=>{l(!0);try{u?await r({}):await n({})}finally{l(!1)}};return(0,J.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h3`,{className:`text-sm font-semibold`,children:g()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:w()})]}),e?(0,J.jsx)(I,{variant:u?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void d(),children:u?x():S()}):null]}),u?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(V,{variant:`secondary`,children:we()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:o({time:pt(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(I,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?f():C()})}),i?(0,J.jsx)(Dt,{isAdmin:e}):null]})}function Dt({isAdmin:e}){let t=c(p.deliveryTiming.listDeliverySessions,{}),n=E(p.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(`all`),[s,u]=(0,q.useState)(Y),[d,f]=(0,q.useState)(null),{from:m,to:g}=W(s),_=s.to===`now`?1/0:g,v=r.trim()!==``||a!==`all`||s!==Y,y=()=>{i(``),o(`all`),u(Y)},b=(0,q.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>=m&&t.startedAt<=_).map(e=>({...e,_id:e.sessionId}))},[t,r,a,m,_]),x=e=>{let t=new Set((b??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),d!==null&&r.includes(d)&&f(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(G,{q:r,onQChange:i,searchPlaceholder:ie(),timeRange:s,onTimeRangeChange:u,onReset:y,canReset:v,children:(0,J.jsxs)(B,{value:a,onValueChange:e=>o(e),children:[(0,J.jsx)(R,{size:`sm`,className:`w-36`,children:(0,J.jsx)(H,{})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:`all`,children:Je()}),(0,J.jsx)(z,{value:`active`,children:l()}),(0,J.jsx)(z,{value:`stopped`,children:D()})]})]})}),(0,J.jsx)(K,{title:h(),rows:b,emptyHint:Le(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(I,{variant:`ghost`,size:`icon`,"aria-label":d===e.sessionId?Ie():Ae(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:d===e.sessionId?(0,J.jsx)(Ct,{size:15,"aria-hidden":!0}):(0,J.jsx)(at,{size:15,"aria-hidden":!0})})},{header:Xe(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:L(e.startedAt)})},{header:k(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,J.jsx)(`span`,{className:`tabular-nums`,children:L(e.stoppedAt)})},{header:Qe(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:Ke(),sort:e=>e.startedBy,cell:e=>Tt(e.startedBy)},{header:O(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(V,{variant:`secondary`,children:l()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:D()})}],rowActions:e?e=>[{label:M(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:M(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===d,renderExpanded:e=>(0,J.jsx)(Ot,{sessionId:e.sessionId})})]})}function Ot({sessionId:e}){let t=c(p.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(kt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(st(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function kt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:A()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ee()});let i=e.segments,a=(e,t)=>(0,J.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,J.jsx)(`td`,{className:`py-1`,children:e}),(0,J.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,J.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,y()]}),(0,J.jsxs)(I,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)($e,{size:13,"aria-hidden":!0}):(0,J.jsx)(ct,{size:13,"aria-hidden":!0}),t?_():se()]})]}),(0,J.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,J.jsx)(`th`,{className:`py-1 font-medium`,children:Ce()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Be()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Me()})]})}),(0,J.jsxs)(`tbody`,{children:[a(Ue(),i.bridge),a(j(),i.A),a(r(),i.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:T()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:ae()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:le()})]})}var At=[50,100,200,500],Z=`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:N()},{value:`principalType`,label:F()},{value:`direction`,label:`direction`},{value:`roleKey`,label:ke()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=ot({from:`/settings/traces`}),t=vt({from:`/settings/traces`}),n=e.limit,r=e.kind,o=e.statusClass??Q,l=e.principalType??Q,u=e.direction??Q,f=e.roleKey??Q,h=e.q??``,g=yt(e.from,e.to),_=(0,q.useMemo)(()=>gt(e.adv),[e.adv]),{from:v,to:y}=W(g),[b,x]=(0,q.useState)(null),[S,C]=(0,q.useState)(null),w=e=>void t({search:t=>({...t,limit:e})}),T=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})}),ie=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),ae=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),se=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),le=e=>void t({search:t=>({...t,...lt(e)})}),O=e=>void t({search:t=>({...t,adv:ft(e)}),replace:!0}),k=c(p.observability.listEvents,{limit:n}),A=c(p.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:h||void 0,from:v,to:y,statusClass:o===Q?void 0:o,principalType:l===Q?void 0:l,direction:u===Q?void 0:u,roleKey:f===Q?void 0:f,advanced:_.length>0?_:void 0}}),j=(0,q.useMemo)(()=>{let e=new Set;for(let t of k??[])e.add(t.kind);return[...e].sort()},[k]),M=(0,q.useMemo)(()=>{let e=new Set;for(let t of k??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[k]),N=h!==``||o!==Q||l!==Q||u!==Q||f!==Q||_.length>0||g.kind!==`relative`||g.from!==Pt.from;function P(){t({search:{limit:100,kind:`all`},replace:!0})}let F=b?k?.filter(e=>e.correlationId===b):A,xe=e.section,Ce=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(it,{value:xe,onValueChange:e=>Ce(e),children:[(0,J.jsxs)(rt,{className:`w-full`,children:[(0,J.jsxs)(tt,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(xt,{size:13,"aria-hidden":!0}),Pe()]}),(0,J.jsxs)(tt,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(wt,{size:13,"aria-hidden":!0}),pe()]})]}),(0,J.jsx)(nt,{value:`latency`,children:(0,J.jsx)(Et,{})}),(0,J.jsxs)(nt,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[a(),(0,J.jsx)(`strong`,{children:Te()}),ee(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:d()})]}),(0,J.jsxs)(G,{q:h,onQChange:E,searchPlaceholder:m(),timeRange:g,onTimeRangeChange:le,onReset:P,canReset:N,children:[(0,J.jsxs)(B,{value:o,onValueChange:D,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(H,{placeholder:re()})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:Q,children:qe()}),jt.map(e=>(0,J.jsx)(z,{value:e,children:e},e))]})]}),(0,J.jsxs)(B,{value:l,onValueChange:ie,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(H,{placeholder:s()})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:Q,children:ne()}),Mt.map(e=>(0,J.jsx)(z,{value:e,children:e},e))]})]}),(0,J.jsxs)(B,{value:u,onValueChange:ae,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(H,{placeholder:Ye()})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:Q,children:me()}),Nt.map(e=>(0,J.jsx)(z,{value:e,children:e},e))]})]}),(0,J.jsxs)(B,{value:f,onValueChange:se,children:[(0,J.jsx)(R,{size:`sm`,className:`w-36`,children:(0,J.jsx)(H,{placeholder:Ze()})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:Q,children:Ge()}),M.map(e=>(0,J.jsx)(z,{value:e,children:e},e))]})]}),(0,J.jsxs)(B,{value:r,onValueChange:T,children:[(0,J.jsx)(R,{size:`sm`,className:`w-44`,children:(0,J.jsx)(H,{placeholder:de()})}),(0,J.jsxs)(U,{children:[(0,J.jsx)(z,{value:Z,children:ye()}),j.map(e=>(0,J.jsx)(z,{value:e,children:e},e))]})]}),(0,J.jsxs)(B,{value:String(n),onValueChange:e=>w(Number(e)),children:[(0,J.jsx)(R,{size:`sm`,className:`w-28`,children:(0,J.jsx)(H,{})}),(0,J.jsx)(U,{children:At.map(e=>(0,J.jsx)(z,{value:String(e),children:be({count:e})},e))})]})]}),(0,J.jsx)(St,{fields:Ft,seed:_,onChange:O}),b?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>x(null),title:Oe(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Fe(),(0,J.jsx)(`code`,{children:$(b)})]}),(0,J.jsx)(et,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:ve()})]})}):null,(0,J.jsx)(K,{title:ge(),rows:F,emptyHint:b?We():De(),columns:[{header:he(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:L(e.at)})},{header:Ve(),sort:e=>e.kind,cell:e=>(0,J.jsx)(V,{variant:`secondary`,children:e.kind})},{header:Ne(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,J.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,J.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":fe(),children:`✓`})}},{header:Se(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(V,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ze(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(V,{variant:`outline`,children:e.principalType}),e.principalId?(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:je(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,J.jsx)(V,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:He(),sort:e=>e.route,cell:e=>e.route?(0,J.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,J.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:_e(),sort:e=>e.status,cell:e=>e.status===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:i(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:te(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:ue(),onClick:()=>x(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:oe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(I,{variant:`outline`,size:`sm`,onClick:()=>C(e),children:ce()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(zt,{row:S,onClose:()=>C(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,q.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,J.jsx)(mt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(bt,{className:`max-w-lg`,children:[(0,J.jsxs)(_t,{children:[(0,J.jsxs)(ht,{className:`oc-traces__meta-title`,children:[v(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(V,{variant:`outline`,children:Re()})]}),(0,J.jsx)(dt,{children:b()})]}),(0,J.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{$x as r,Bx as i,Cj as a,E as o,Gx as s,Hl as c,Hx as l,Jx as u,Kx as d,Lx as f,Qx as p,Rx as ee,Sj as m,Ul as h,Ux as te,Vl as g,Vx as ne,Wx as re,Xx as ie,Yx as ae,Zx as oe,_g as _,aS as se,cS as ce,cg as v,dS as y,dg as b,eS as le,fg as x,gg as S,hg as C,iS as ue,lS as w,lg as T,mg as E,nS as de,oS as fe,og as D,pg as O,qx as pe,rS as me,sS as he,sg as k,tS as ge,uS as A,ug as j,vg as M,vx as _e,zx as ve}from"./dist-tr7LmvAR.js";import{t as N}from"./button-CtB6NRj2.js";import{C as P,H as F,Jt as ye,Mt as I,S as L,U as be,V as R,b as z,bt as xe,c as B,dt as V,it as Se,jt as H,l as U,lt as Ce,mt as we,nt as Te,ot as Ee,p as W,pt as De,qt as Oe,rt as ke,s as G,st as K,tt as Ae,ut as je,w as q,x as J}from"./index-D3n1_9Fa.js";import{t as Y}from"./FilterBar-Bub5nUxA.js";import{t as Me}from"./DataTableShell-CKQRa8xi.js";import{t as Ne}from"./DetailChips-d1Fs61TW.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=a(o.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),s=a(o.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,enabled:e.enabled,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,Z.jsx)(Ce,{open:n,onOpenChange:r,children:(0,Z.jsxs)(je,{className:`oc-access`,children:[(0,Z.jsxs)(De,{children:[(0,Z.jsx)(we,{children:M({user:t})}),(0,Z.jsx)(V,{children:_()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?S():C()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:E()}):f.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:b()}):[...p.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:c,defaultKey:u},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let s=m(o.agents.assignAgent),c=m(o.agents.removeAgent),l=m(o.agents.setDefaultAgent),u=R();if(!e)return null;async function d(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(O(),e)}}async function f(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(x(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(I,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`,c=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${c?` is-disabled`:``}`,children:[(0,Z.jsx)(W,{checked:r,disabled:(s||c)&&!r,onCheckedChange:()=>void d(e.agentId,r),"aria-label":j({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:T()}):null,e.outOfPool?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:v()}):null,r?o?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":k(),title:k(),children:(0,Z.jsx)(H,{size:14,fill:`currentColor`})}):(0,Z.jsx)(N,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":D(),title:D(),disabled:c,onClick:()=>void f(e.agentId),children:(0,Z.jsx)(H,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return g();case`user`:return c();case`admin`:return h();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=G.filter(e=>n.has(U[e])).length;return(0,Z.jsxs)(Ae,{children:[(0,Z.jsx)(Ee,{asChild:!0,children:(0,Z.jsx)(N,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?y():A({count:r})})}),(0,Z.jsxs)(Te,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(Se,{children:w()}),G.map(e=>{let r=U[e];return(0,Z.jsxs)(ke,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(W,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:B[e]()})]},e)})]})]})}function Le(){let e=ye({from:`/settings/users`}),t=Oe({from:`/settings/users`}),n=e.q??``,c=e.role??Q,h=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),g=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),_=a(o.admin.listUsers,{filter:{q:n||void 0,role:c===Q?void 0:c},withAgents:!0}),v=a(o.me.getMe,{host:xe}),y=m(o.admin.setRole),b=m(o.admin.setUserPermissions),x=m(o.admin.startImpersonation),S=m(o.admin.deleteUser),C=m(o.admin.setUserName),w=F(),T=be(),E=R(),[D,O]=(0,X.useState)(null),k=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of _??[])e.add(t.role);return[...e]},[_]),A=n!==``||c!==Q;function j(){t({search:{},replace:!0})}async function M(e){try{await y(e)}catch(e){E.error(ce(),e)}}async function N(e){try{await b(e)}catch(e){E.error(he(),e)}}async function B(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:le(),description:r({user:t}),confirmWord:p(),confirmLabel:oe(),destructive:!0}))try{await S({profileId:e._id}),E.success(ae({user:t}))}catch(e){E.error(ie(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:pe(),label:d({user:t}),placeholder:s(),defaultValue:e.name??``,confirmLabel:_e()});if(n!==null)try{await C({profileId:e._id,name:n}),E.success(re())}catch(e){E.error(te(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{q:n,onQChange:h,searchPlaceholder:fe(),onReset:j,canReset:A,children:(0,Z.jsxs)(z,{value:c,onValueChange:g,children:[(0,Z.jsx)(P,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:Q,children:se()}),k.map(e=>(0,Z.jsx)(L,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:ue(),rows:_,emptyHint:me(),rowActions:e=>{let t=[{label:f(),onSelect:()=>O({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:u(),onSelect:()=>void V(e)}];return e.userId!==v?.userId&&t.push({label:de(),onSelect:()=>void x({profileId:e._id})},{label:ge(),variant:`destructive`,onSelect:()=>void B(e)}),t},columns:[{header:l(),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,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{children:t}),n?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:ne(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(z,{value:e.role,onValueChange:t=>void M({profileId:e._id,role:t}),children:[(0,Z.jsx)(P,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(L,{value:`user`,children:$(`user`)}),(0,Z.jsx)(L,{value:`admin`,children:$(`admin`)})]})]})},{header:i(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:ve()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),N({profileId:e._id,permissions:[...n]})}})},{header:ee(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(I,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Pe,{profileId:D?.profileId??null,userLabel:D?.label??``,open:D!==null,onOpenChange:e=>{e||O(null)}})]})}export{Le as UsersTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$ as r,At as i,Cj as a,Ct as o,D as s,Dt as c,E as l,Et as u,Fs as ee,Ft as d,H as te,J as f,K as p,Mt as m,Ns as h,Nt as g,Ot as _,Pt as v,Q as y,Sj as b,St as x,Tt as ne,U as S,V as C,W as w,Y as T,_t as re,bj as ie,bt as ae,dt as oe,et as se,ft as ce,gj as le,gt as E,ht as ue,jt as de,k as fe,kt as D,mj as pe,mt as O,nt as me,pt as k,q as A,tl as j,tt as M,ut as N,vt as P,wt as F,xt as I,yt as L}from"./dist-tr7LmvAR.js";import{i as R,n as z,r as he,t as ge}from"./tabs-CtMWQedT.js";import{t as B}from"./button-CtB6NRj2.js";import{B as _e,C as V,F as ve,I as ye,It as be,Jt as xe,L as Se,Ot as Ce,P as we,R as H,S as U,b as W,bt as Te,p as G,qt as Ee,st as K,w as q,x as J,z as Y}from"./index-D3n1_9Fa.js";/* empty css */var X=s(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Z=t(e(),1),Q=n(),De=[[`auto`,()=>_()],[`fr-FR`,()=>me()],[`en-US`,()=>M()],[`en-GB`,()=>se()],[`de-DE`,()=>r()],[`es-ES`,()=>y()]],Oe=[[`0.75`,()=>u()],[`1`,()=>ne()],[`1.25`,()=>F()],[`1.5`,()=>o()]],$=0;function ke({instance:e}){let t=b(l.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[a,o]=(0,Z.useState)(r),[s,u]=(0,Z.useState)(`idle`),[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(!1),g=ie(l.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{o({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),u(`idle`)},[e._id]);let _=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function v(){u(`saving`);try{let n={...e.config??{}};n.voiceEnabled=a.enabled,a.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,a.lang===`auto`?delete n.voiceLang:n.voiceLang=a.lang;let r=Number.parseFloat(a.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,a.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),u(`idle`)}catch{u(`error`)}}return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Q.jsx)(K,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":i()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:i()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:w()}),(0,Q.jsxs)(W,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":w(),children:(0,Q.jsx)(q,{})}),(0,Q.jsxs)(J,{children:[(0,Q.jsx)(U,{value:`browser`,children:S()}),e.kind===`hermes`?null:(0,Q.jsx)(U,{value:`gateway`,children:te()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:C()}):null,a.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:D()}),(0,Q.jsxs)(W,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":D(),children:(0,Q.jsx)(q,{})}),(0,Q.jsx)(J,{children:De.map(([e,t])=>(0,Q.jsx)(U,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:c()}),(0,Q.jsxs)(W,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":c(),children:(0,Q.jsx)(q,{})}),(0,Q.jsx)(J,{children:Oe.map(([e,t])=>(0,Q.jsx)(U,{value:e,children:t()},e))})]})]}),a.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":x()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:I()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(B,{size:`sm`,disabled:!_||s===`saving`,onClick:()=>void v(),children:s===`saving`?j():ee()}),(0,Q.jsx)(B,{variant:`outline`,size:`sm`,disabled:!a.enabled||d,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(m(!1),Y(),H(),a.engine!==`gateway`){Se(P(),{lang:ye(a.lang,le()),rate:t});return}f(!0),g({instanceName:e.name,text:P()}).then(({mime:e,audioBase64:r})=>{n===$&&ve(r,e,{rate:t})}).catch(()=>{n===$&&m(!0)}).finally(()=>f(!1))},children:d?j():ae()}),(0,Q.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,f(!1),Y(),H()},children:L()})]}),s===`error`||p?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:p?fe():h()}):null]})}function Ae({stt:e}){let t=a(l.me.getMe,{host:Te}),n=b(l.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:E()}),(0,Q.jsx)(K,{variant:e?`secondary`:`outline`,children:e?oe():N()}),(0,Q.jsx)(K,{variant:r?`secondary`:`destructive`,children:r?f():A()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":T()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:T()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ue()})]})}function je(){let e=a(l.admin.listInstances,{}),t=(0,Z.useMemo)(()=>_e(),[]),n=(0,Z.useMemo)(()=>we(),[]),{section:r}=xe({from:`/settings/voice`}),i=Ee({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:d()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(K,{variant:t?`secondary`:`destructive`,children:t?v():g()}),(0,Q.jsx)(K,{variant:n?`secondary`:`destructive`,children:n?m():de()})]}),(0,Q.jsxs)(ge,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(he,{className:`w-full`,children:[(0,Q.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ce,{size:13,"aria-hidden":!0}),p()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(be,{size:13,"aria-hidden":!0}),E()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(X,{size:13,"aria-hidden":!0}),O()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:pe()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:re()}):e.map(e=>(0,Q.jsx)(ke,{instance:e},e._id))}),(0,Q.jsx)(z,{value:`dictation`,children:(0,Q.jsx)(Ae,{stt:n})}),(0,Q.jsx)(z,{value:`talk`,children:(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:O()}),(0,Q.jsx)(K,{variant:`outline`,children:k()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ce()})]})})]})]})}export{je as VoiceTab};
@@ -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-C2CRpdq8.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-tr7LmvAR.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-C2CRpdq8.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-tr7LmvAR.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-tr7LmvAR.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{Ds as e,_s as t,hs as n,ms as r,qt as i,vs as a,ys as o}from"./dist-C2CRpdq8.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(e){return e===`supported`?o():e===`beyond`?a():t()}function m(t){return t??e()}function h(e,t){return t&&t!==`openclaw`?i({provider:t}):e===null?r():n({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
1
+ import{Ds as e,_s as t,hs as n,ms as r,qt as i,vs as a,ys as o}from"./dist-tr7LmvAR.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(e){return e===`supported`?o():e===`beyond`?a():t()}function m(t){return t??e()}function h(e,t){return t&&t!==`openclaw`?i({provider:t}):e===null?r():n({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
@@ -1 +1 @@
1
- import{$d as e,Ad as t,Bd as n,Dd as r,Ed as i,Fd as a,Gd as o,Hd as s,Id as c,Jd as l,Kd as u,Ld as d,Md as f,Nd as p,Od as m,Pd as h,Qd as g,Rd as _,Td as v,Ud as y,Vd as b,Wd as x,Xd as S,Yd as C,Zd as w,jd as T,kd as E,qd as D,zd as O}from"./dist-C2CRpdq8.js";var k={AGENT_NOT_FOUND:()=>({label:e(),hint:g()}),AUTH_TOKEN_MISMATCH:()=>({label:w(),hint:S()}),DEVICE_SIGNING_FAILED:()=>({label:C(),hint:l()}),SESSION_SCOPE_DENIED:()=>({label:D(),hint:u()}),GATEWAY_TIMEOUT:()=>({label:o(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:y(),hint:s()}),ATTACHMENT_TOO_LARGE:()=>({label:O(),hint:_()}),ATTACHMENT_REJECTED:()=>({label:d(),hint:c()}),BRIDGE_UNREACHABLE:()=>({label:b(),hint:n()}),INVALID_REQUEST:()=>({label:a(),hint:h()}),NOT_CONFIGURED:()=>({label:p(),hint:f()}),UNROUTED:()=>({label:T(),hint:t()}),UPSTREAM_ERROR:()=>({label:E(),hint:m()}),UNKNOWN:()=>({label:r(),hint:i()})};function A(e){return e?k[e]?.()??{label:e,hint:v()}:k.UNKNOWN()}export{A as t};
1
+ import{$d as e,Ad as t,Bd as n,Dd as r,Ed as i,Fd as a,Gd as o,Hd as s,Id as c,Jd as l,Kd as u,Ld as d,Md as f,Nd as p,Od as m,Pd as h,Qd as g,Rd as _,Td as v,Ud as y,Vd as b,Wd as x,Xd as S,Yd as C,Zd as w,jd as T,kd as E,qd as D,zd as O}from"./dist-tr7LmvAR.js";var k={AGENT_NOT_FOUND:()=>({label:e(),hint:g()}),AUTH_TOKEN_MISMATCH:()=>({label:w(),hint:S()}),DEVICE_SIGNING_FAILED:()=>({label:C(),hint:l()}),SESSION_SCOPE_DENIED:()=>({label:D(),hint:u()}),GATEWAY_TIMEOUT:()=>({label:o(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:y(),hint:s()}),ATTACHMENT_TOO_LARGE:()=>({label:O(),hint:_()}),ATTACHMENT_REJECTED:()=>({label:d(),hint:c()}),BRIDGE_UNREACHABLE:()=>({label:b(),hint:n()}),INVALID_REQUEST:()=>({label:a(),hint:h()}),NOT_CONFIGURED:()=>({label:p(),hint:f()}),UNROUTED:()=>({label:T(),hint:t()}),UPSTREAM_ERROR:()=>({label:E(),hint:m()}),UNKNOWN:()=>({label:r(),hint:i()})};function A(e){return e?k[e]?.()??{label:e,hint:v()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-C2CRpdq8.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{D as n}from"./dist-tr7LmvAR.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{D as r,S as i,T as a,h as o}from"./dist-C2CRpdq8.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-tr7LmvAR.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-C2CRpdq8.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-tr7LmvAR.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