@lacneu/atrium 0.19.2 → 0.19.3

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-IcphauIj.js → AccessTab-DlXLRwUN.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-DJjN0ZKH.js → AdvancedFilter-GcKYGafW.js} +1 -1
  3. package/dist/assets/AgentFilesTab-ClqrQ6FL.js +3 -0
  4. package/dist/assets/AnomaliesTab-B817-fvy.js +1 -0
  5. package/dist/assets/{AuditTab-CoWGV21G.js → AuditTab-BuIOG3Jy.js} +1 -1
  6. package/dist/assets/BridgeTab-BrpHY1vH.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-BiJe_6Kb.js +1 -0
  8. package/dist/assets/{DataTableShell-CyKGlXVg.js → DataTableShell-CXnilHFx.js} +1 -1
  9. package/dist/assets/{DetailChips-Ct8LcwC-.js → DetailChips-DwhF4wyT.js} +1 -1
  10. package/dist/assets/FeedbacksTab-Xo97w2yq.js +1 -0
  11. package/dist/assets/{FieldLabel-CgUTCK6q.js → FieldLabel-DszF6BCc.js} +1 -1
  12. package/dist/assets/FilesTab-fin_A9Kl.js +1 -0
  13. package/dist/assets/{FilterBar-Dc-vzhP8.js → FilterBar-DZweUsOp.js} +1 -1
  14. package/dist/assets/GroupsTab-wn-dxXIg.js +1 -0
  15. package/dist/assets/InstancesTab-BfgriPCp.js +1 -0
  16. package/dist/assets/IntegrationsTab-CknAQ8o3.js +1 -0
  17. package/dist/assets/{KpiTab-nVTkmGQL.js → KpiTab-_sVoFsUQ.js} +1 -1
  18. package/dist/assets/PreferencesTab-CrFE2Xny.js +1 -0
  19. package/dist/assets/{PromptInjectionsTab-Di6T_ef2.js → PromptInjectionsTab-BOdO-Zqo.js} +2 -2
  20. package/dist/assets/RolesTab-D4pjVazK.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-DAXUZYQJ.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-BwoSqlZ2.js +1 -0
  23. package/dist/assets/ThemeShowroom-BIP8Pxk3.js +1 -0
  24. package/dist/assets/{TimeRangePicker-BAldDUhc.js → TimeRangePicker-DatsuATN.js} +1 -1
  25. package/dist/assets/TracesTab-BhjH9l6x.js +1 -0
  26. package/dist/assets/UsersTab-B0_VG_cI.js +1 -0
  27. package/dist/assets/button-Do9b0Kl0.js +1 -0
  28. package/dist/assets/{card-DXTJ7L6C.js → card-DtbnXpuR.js} +1 -1
  29. package/dist/assets/chevrons-up-down-BNHrpyID.js +1 -0
  30. package/dist/assets/{compatView-MdW0ASNn.js → compatView-Be0h8KSS.js} +1 -1
  31. package/dist/assets/dispatchErrorInfo-CNHPv3Dl.js +1 -0
  32. package/dist/assets/{dist-BtzdT2wL.js → dist-C4sB9wBS.js} +1 -1
  33. package/dist/assets/{dist-BPcfIXgJ.js → dist-CSHwMvoK.js} +1 -1
  34. package/dist/assets/dist-DbJm5w2u.js +5 -0
  35. package/dist/assets/dist-DyqGXOsj.js +1 -0
  36. package/dist/assets/{highlighted-body-OFNGDK62-BrgfLBa3.js → highlighted-body-OFNGDK62-CJvkRtvs.js} +1 -1
  37. package/dist/assets/{index-DnIjl_W2.css → index-B9tfYPkk.css} +1 -1
  38. package/dist/assets/index-Djd_7VwF.js +227 -0
  39. package/dist/assets/mermaid-GHXKKRXX-DmtRrsIr.js +1 -0
  40. package/dist/assets/roleDescriptions-Me-Y5Y5f.js +1 -0
  41. package/dist/assets/{table-CjpKnop2.js → table-Cr9ARpxr.js} +1 -1
  42. package/dist/assets/{tabs-C1F_imzX.js → tabs-CSXMDWZx.js} +1 -1
  43. package/dist/assets/x-DxTaDbZb.js +1 -0
  44. package/dist/index.html +8 -8
  45. package/package.json +1 -1
  46. package/dist/assets/AgentFilesTab-BI5XcES3.js +0 -3
  47. package/dist/assets/AnomaliesTab-Q2U1eiwk.js +0 -1
  48. package/dist/assets/BridgeTab-B5Mc-mW3.js +0 -1
  49. package/dist/assets/ChatDefaultsTab-Dk0xhrjV.js +0 -1
  50. package/dist/assets/FeedbacksTab-DBmQnYcU.js +0 -1
  51. package/dist/assets/FilesTab-Cce1_C32.js +0 -1
  52. package/dist/assets/GroupsTab-BZKmekSM.js +0 -1
  53. package/dist/assets/InstancesTab-BhMe2xiQ.js +0 -1
  54. package/dist/assets/IntegrationsTab-BMkQEaMo.js +0 -1
  55. package/dist/assets/PreferencesTab-D3bpsq0u.js +0 -1
  56. package/dist/assets/RolesTab-B9-Z0CrC.js +0 -1
  57. package/dist/assets/ServiceAccountsTab-B1jaHHEp.js +0 -1
  58. package/dist/assets/SubAgentReportsTab-BuVbJkcE.js +0 -1
  59. package/dist/assets/ThemeShowroom-DvjqYChJ.js +0 -1
  60. package/dist/assets/TracesTab-tLa9PtsX.js +0 -1
  61. package/dist/assets/UsersTab-BtWlWFwx.js +0 -1
  62. package/dist/assets/button-C3LWIgGJ.js +0 -1
  63. package/dist/assets/chevrons-up-down-B6ce3M7f.js +0 -1
  64. package/dist/assets/dispatchErrorInfo-COvKpdTE.js +0 -1
  65. package/dist/assets/dist-B8y7NGFk.js +0 -5
  66. package/dist/assets/dist-D9C9G3zQ.js +0 -1
  67. package/dist/assets/index-B--TQi5b.js +0 -227
  68. package/dist/assets/mermaid-GHXKKRXX-DIkajMJk.js +0 -1
  69. package/dist/assets/roleDescriptions-DmHFjDvY.js +0 -1
  70. package/dist/assets/x-BY_tjn83.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Al as r,Dl as i,El as a,Fl as o,Il as s,Ll as c,Ml as l,Nl as u,Ol as d,Pl as f,Tl as p,jl as m,kl as h}from"./dist-BPcfIXgJ.js";import{t as g}from"./button-C3LWIgGJ.js";import{Ot as _,Z as v,ct as y,lt as b,st as x,ut as S,vt as C}from"./index-B--TQi5b.js";var w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(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=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:c(),from:`now-5m`},{label:s(),from:`now-15m`},{label:o(),from:`now-30m`},{label:f(),from:`now-1h`},{label:u(),from:`now-3h`},{label:l(),from:`now-6h`},{label:m(),from:`now-12h`},{label:r(),from:`now-24h`},{label:h(),from:`now-2d`},{label:d(),from:`now-7d`},{label:i(),from:`now-30d`},{label:a(),from:`now-90d`},{label:p(),from:`now-520w`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(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 M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(b,{open:n,onOpenChange:d,children:[(0,P.jsx)(S,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(_,{}),A(e)]})}),(0,P.jsx)(y,{children:(0,P.jsx)(x,{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,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(v,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(v,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(C,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(v,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}export{F as n,N as r,L as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Al as r,Dl as i,Fl as a,Il as o,Ll as s,Ml as c,Nl as l,Ol as u,Pl as d,Rl as f,jl as p,kl as m,zl as h}from"./dist-CSHwMvoK.js";import{t as g}from"./button-Do9b0Kl0.js";import{Ot as _,Z as v,ct as y,lt as b,st as x,ut as S,vt as C}from"./index-Djd_7VwF.js";var w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(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=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:h(),from:`now-5m`},{label:f(),from:`now-15m`},{label:s(),from:`now-30m`},{label:o(),from:`now-1h`},{label:a(),from:`now-3h`},{label:d(),from:`now-6h`},{label:l(),from:`now-12h`},{label:c(),from:`now-24h`},{label:p(),from:`now-2d`},{label:r(),from:`now-7d`},{label:m(),from:`now-30d`},{label:u(),from:`now-90d`},{label:i(),from:`now-520w`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(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 M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(b,{open:n,onOpenChange:d,children:[(0,P.jsx)(S,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(_,{}),A(e)]})}),(0,P.jsx)(y,{children:(0,P.jsx)(x,{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,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(v,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(v,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(C,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(v,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}export{F as n,N as r,L as t};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$d as r,$y as i,Af as a,Ay as o,By as s,Cf as c,Df as l,Ef as u,Ff as d,Fy as f,Hy as p,Iy as m,Jy as h,Ly as g,Mf as _,My as v,Nf as y,Ny as ee,Of as te,Oy as b,Pf as ne,Py as x,Qd as re,Qy as S,Ry as C,Sf as ie,TD as w,Tf as ae,Vy as oe,Xy as T,Yy as E,Zd as D,Zy as O,_b as k,_f as se,ab as A,af as ce,bf as le,cb as ue,cf as de,db as fe,df as pe,eb as j,ef as me,fb as he,ff as ge,gb as _e,gf as ve,hb as ye,hf as be,ib as M,if as xe,jf as Se,jy as Ce,kf as we,ky as Te,lb as N,lf as Ee,mb as P,mf as De,nb as Oe,nf as ke,ob as Ae,of as je,pb as Me,pf as Ne,qy as Pe,rb as Fe,rf as Ie,sb as Le,sf as Re,tb as ze,tf as Be,ub as Ve,uf as He,vD as F,vf as Ue,wD as I,wf as We,xf as Ge,yD as L,yf as Ke,zy as qe}from"./dist-CSHwMvoK.js";import{n as Je}from"./dist-C4sB9wBS.js";import{t as Ye}from"./x-DxTaDbZb.js";import{i as R,n as z,r as Xe,t as Ze}from"./tabs-CSXMDWZx.js";import{t as B}from"./button-Do9b0Kl0.js";import{$ as Qe,C as V,Ct as $e,Dt as et,Mt as tt,Q as nt,S as H,X as U,a as rt,b as W,et as it,i as at,jt as ot,k as st,nt as ct,o as lt,ot as ut,r as dt,rt as ft,wt as pt,x as G,y as K}from"./index-Djd_7VwF.js";import{n as mt}from"./TimeRangePicker-DatsuATN.js";import{t as ht}from"./FilterBar-DZweUsOp.js";import{t as gt}from"./AdvancedFilter-GcKYGafW.js";import{t as _t}from"./DataTableShell-CXnilHFx.js";var vt=L(`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`}]]),yt=L(`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 bt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?S():n===`agent`?`${O()} - ${r}`:e}function xt(){let e=w(F.me.getMe,{host:ut})?.role===`admin`,t=w(F.deliveryTiming.getDeliveryStatus,{}),n=I(F.deliveryTiming.startDeliveryRecord),r=I(F.deliveryTiming.stopDeliveryRecord),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),c=t?.recording??!1,l=async()=>{s(!0);try{c?await r({}):await n({})}finally{s(!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:k()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:_e()})]}),e?(0,J.jsx)(B,{variant:c?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void l(),children:c?P():ye()}):null]}),c?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:Me()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:he({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?N():Ve()})}),i?(0,J.jsx)(St,{isAdmin:e}):null]})}function St({isAdmin:e}){let t=w(F.deliveryTiming.listDeliverySessions,{}),n=I(F.deliveryTiming.deleteDeliverySessions),[r,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(`all`),[c,l]=(0,q.useState)(Y),[u,d]=(0,q.useState)(null),{from:f,to:p}=mt(c),m=c.to===`now`?1/0:p,g=r.trim()!==``||o!==`all`||c!==Y,_=()=>{a(``),s(`all`),l(Y)},v=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(o===`all`||(o===`active`?t.active:!t.active))&&t.startedAt>=f&&t.startedAt<=m).map(e=>({...e,_id:e.sessionId}))},[t,r,o,f,m]),y=e=>{let t=new Set((v??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&d(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(ht,{q:r,onQChange:a,searchPlaceholder:Le(),timeRange:c,onTimeRangeChange:l,onReset:_,canReset:g,children:(0,J.jsxs)(K,{value:o,onValueChange:e=>s(e),children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:`all`,children:Ae()}),(0,J.jsx)(G,{value:`active`,children:A()}),(0,J.jsx)(G,{value:`stopped`,children:M()})]})]})}),(0,J.jsx)(_t,{title:ue(),rows:v,emptyHint:Te(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?E():T(),onClick:()=>d(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,J.jsx)(vt,{size:15,"aria-hidden":!0}):(0,J.jsx)(pt,{size:15,"aria-hidden":!0})})},{header:Fe(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.startedAt).toLocaleString()})},{header:Oe(),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:new Date(e.stoppedAt).toLocaleString()})},{header:ze(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:j(),sort:e=>e.startedBy,cell:e=>bt(e.startedBy)},{header:i(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(U,{variant:`secondary`,children:A()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:M()})}],rowActions:e?e=>[{label:h(),variant:`destructive`,onSelect:()=>y([e.sessionId])}]:void 0,bulkActions:e?[{label:h(),variant:`destructive`,onSelect:e=>y(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,J.jsx)(Ct,{sessionId:e.sessionId})})]})}function Ct({sessionId:e}){let t=w(F.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(wt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(st(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function wt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Pe()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:fe()});let r=e.segments,i=(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,` `,b()]}),(0,J.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Je,{size:13,"aria-hidden":!0}):(0,J.jsx)(et,{size:13,"aria-hidden":!0}),t?o():Ce()]})]}),(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:s()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:qe()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:C()})]})}),(0,J.jsxs)(`tbody`,{children:[i(g(),r.bridge),i(m(),r.A),i(f(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:x()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:v()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:ee()})]})}var Tt=[50,100,200,500],Z=`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=tt({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,r=e.kind,i=e.statusClass??Q,o=e.principalType??Q,s=e.direction??Q,f=e.roleKey??Q,m=e.q??``,h=dt(e.from,e.to),g=(0,q.useMemo)(()=>lt(e.adv),[e.adv]),{from:v,to:ee}=mt(h),[b,x]=(0,q.useState)(null),[re,S]=(0,q.useState)(null),C=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})}),O=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),A=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),ue=e=>void t({search:t=>({...t,...rt(e)})}),fe=e=>void t({search:t=>({...t,adv:at(e)}),replace:!0}),j=w(F.observability.listEvents,{limit:n}),he=w(F.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:m||void 0,from:v,to:ee,statusClass:i===Q?void 0:i,principalType:o===Q?void 0:o,direction:s===Q?void 0:s,roleKey:f===Q?void 0:f,advanced:g.length>0?g:void 0}}),_e=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),ye=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),M=m!==``||i!==Q||o!==Q||s!==Q||f!==Q||g.length>0||h.kind!==`relative`||h.from!==kt.from;function Ce(){t({search:{limit:100,kind:`all`},replace:!0})}let Te=b?j?.filter(e=>e.correlationId===b):he,[N,P]=(0,q.useState)(`events`);return(0,J.jsxs)(Ze,{value:N,onValueChange:e=>P(e),children:[(0,J.jsxs)(Xe,{className:`w-full`,children:[(0,J.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)($e,{size:13,"aria-hidden":!0}),p()]}),(0,J.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(yt,{size:13,"aria-hidden":!0}),oe()]})]}),(0,J.jsx)(z,{value:`latency`,children:(0,J.jsx)(xt,{})}),(0,J.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[d(),(0,J.jsx)(`strong`,{children:ne()}),y(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:_()})]}),(0,J.jsxs)(ht,{q:m,onQChange:E,searchPlaceholder:Se(),timeRange:h,onTimeRangeChange:ue,onReset:Ce,canReset:M,children:[(0,J.jsxs)(K,{value:i,onValueChange:D,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:a()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:we()}),Et.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:o,onValueChange:O,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:te()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:l()}),Dt.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:s,onValueChange:k,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:u()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:ae()}),Ot.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:f,onValueChange:A,children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{placeholder:We()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:c()}),ye.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:r,onValueChange:T,children:[(0,J.jsx)(H,{size:`sm`,className:`w-44`,children:(0,J.jsx)(V,{placeholder:ie()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Z,children:Ge()}),_e.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:String(n),onValueChange:e=>C(Number(e)),children:[(0,J.jsx)(H,{size:`sm`,className:`w-28`,children:(0,J.jsx)(V,{})}),(0,J.jsx)(W,{children:Tt.map(e=>(0,J.jsx)(G,{value:String(e),children:le({count:e})},e))})]})]}),(0,J.jsx)(gt,{fields:At,seed:g,onChange:fe}),b?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>x(null),title:Ke(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Ue(),(0,J.jsx)(`code`,{children:$(b)})]}),(0,J.jsx)(Ye,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:se()})]})}):null,(0,J.jsx)(_t,{title:ve(),rows:Te,emptyHint:b?be():De(),columns:[{header:Ne(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:ge(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:pe(),sort:e=>Nt(e)??null,cell:e=>{let t=Nt(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":He(),children:`✓`})}},{header:Ee(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(U,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:de(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(U,{variant:`outline`,children:e.principalType}),e.principalId?(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:Re(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,J.jsx)(U,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:je(),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:ce(),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 ${Mt(e.status)}`,children:e.status})},{header:xe(),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:Ie(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:ke(),onClick:()=>x(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Be(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:me()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(Pt,{row:re,onClose:()=>S(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,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)(nt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(Qe,{className:`max-w-lg`,children:[(0,J.jsxs)(ct,{children:[(0,J.jsxs)(ft,{className:`oc-traces__meta-title`,children:[r(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:re()})]}),(0,J.jsx)(it,{children:D()})]}),(0,J.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{$g as r,Cd as i,Cg as a,Gg as o,Hg as s,Jg as c,Kg as l,Qg as u,Sd as d,TD as f,Ug as p,Wg as m,Xg as ee,Yg as te,Zg as ne,_d as h,a_ as re,bd as g,c_ as ie,d_ as _,dd as v,e_ as ae,f_ as oe,fd as y,g_ as b,gd as x,h_ as S,hd as C,i_ as se,l_ as ce,m_ as w,md as T,n_ as le,o_ as ue,p_ as de,pd as E,qg as D,r_ as fe,s_ as pe,t_ as me,u_ as he,vD as O,vd as k,wD as A,xd as j,yd as M}from"./dist-CSHwMvoK.js";import{t as N}from"./button-Do9b0Kl0.js";import{$ as P,A as F,C as I,G as L,K as R,M as ge,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-Djd_7VwF.js";import{t as De}from"./FilterBar-DZweUsOp.js";import{t as Oe}from"./DataTableShell-CXnilHFx.js";import{t as ke}from"./DetailChips-DwhF4wyT.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let a=f(O.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=f(O.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(o??[]).find(e=>e.isDefault)??null,l=c?`${c.instanceName}/${c.agentId}`:null,u=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),p=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!u.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 p){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)(P,{className:`oc-access`,children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:i({user:t})}),(0,Q.jsx)(ye,{children:d()})]}),a?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?j():g()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:M()}):p.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:x()}):[...m.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=A(O.agents.assignAgent),s=A(O.agents.removeAgent),c=A(O.agents.setDefaultAgent),l=F();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(k(),e)}}async function d(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(h(),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})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(U,{checked:r,disabled:s&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":C({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,s?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:T()}):null,e.outOfPool?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:E()}):null,r?o?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":y(),title:y(),children:(0,Q.jsx)(q,{size:14,fill:`currentColor`})}):(0,Q.jsx)(N,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":v(),title:v(),onClick:()=>void d(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)(N,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?b():S({count:r})})}),(0,Q.jsxs)(L,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:w()}),K.map(e=>{let r=J[e];return(0,Q.jsxs)(R,{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??``,i=e.role??$,d=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),h=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),g=f(O.admin.listUsers,{filter:{q:n||void 0,role:i===$?void 0:i},withAgents:!0}),v=f(O.me.getMe,{host:we}),y=A(O.admin.setRole),b=A(O.admin.setUserPermissions),x=A(O.admin.startImpersonation),S=A(O.admin.deleteUser),C=A(O.admin.setUserName),w=xe(),T=ge(),E=F(),[k,j]=(0,Z.useState)(null),M=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of g??[])e.add(t.role);return[...e]},[g]),N=n!==``||i!==$;function P(){t({search:{},replace:!0})}async function L(e){try{await y(e)}catch(e){E.error(de(),e)}}async function R(e){try{await b(e)}catch(e){E.error(oe(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:re(),description:se({user:t}),confirmWord:fe(),confirmLabel:le(),destructive:!0}))try{await S({profileId:e._id}),E.success(ae({user:t}))}catch(e){E.error(me(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:u(),label:ne({user:t}),placeholder:ee(),defaultValue:e.name??``,confirmLabel:a()});if(n!==null)try{await C({profileId:e._id,name:n}),E.success(te())}catch(e){E.error(c(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:d,searchPlaceholder:_(),onReset:P,canReset:N,children:(0,Q.jsxs)(X,{value:i,onValueChange:h,children:[(0,Q.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(I,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:$,children:he()}),M.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:ce(),rows:g,emptyHint:ie(),rowActions:e=>{let t=[{label:s(),onSelect:()=>j({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:r(),onSelect:()=>void V(e)}];return e.userId!==v?.userId&&t.push({label:pe(),onSelect:()=>void x({profileId:e._id})},{label:ue(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:D(),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:l(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void L({profileId:e._id,role:t}),children:[(0,Q.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(I,{})}),(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:m()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),R({profileId:e._id,permissions:[...n]})}})},{header:p(),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:k?.profileId??null,userLabel:k?.label??``,open:k!==null,onOpenChange:e=>{e||j(null)}})]})}export{Ne as UsersTab};
@@ -0,0 +1 @@
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,pD as r,t as i}from"./dist-CSHwMvoK.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?r:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:n(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-BPcfIXgJ.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-CSHwMvoK.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{yD as e}from"./dist-CSHwMvoK.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{Fn as e,Jn as t,Ln as n,Pn as r,Rn as i,zn as a}from"./dist-BPcfIXgJ.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{Fn as e,Jn as t,Ln as n,Pn as r,Rn as i,zn as a}from"./dist-CSHwMvoK.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};
@@ -0,0 +1 @@
1
+ import{$o as e,Cs as t,Qo as n,Ss as r,Xo as i,Zo as a,_s as o,as as s,bs as c,cs as l,ds as u,es as d,fs as f,gs as p,hs as m,is as h,ls as g,ms as _,ns as v,os as y,ps as b,rs as x,ss as S,ts as C,us as w,vs as T,ws as E,xs as D,ys as O}from"./dist-CSHwMvoK.js";var k={AGENT_NOT_FOUND:()=>({label:E(),hint:t()}),AUTH_TOKEN_MISMATCH:()=>({label:r(),hint:D()}),DEVICE_SIGNING_FAILED:()=>({label:c(),hint:O()}),SESSION_SCOPE_DENIED:()=>({label:T(),hint:o()}),GATEWAY_TIMEOUT:()=>({label:p(),hint:m()}),GATEWAY_DISCONNECTED:()=>({label:_(),hint:b()}),ATTACHMENT_TOO_LARGE:()=>({label:w(),hint:g()}),ATTACHMENT_REJECTED:()=>({label:l(),hint:S()}),BRIDGE_UNREACHABLE:()=>({label:f(),hint:u()}),INVALID_REQUEST:()=>({label:y(),hint:s()}),NOT_CONFIGURED:()=>({label:h(),hint:x()}),UNROUTED:()=>({label:v(),hint:C()}),UPSTREAM_ERROR:()=>({label:d(),hint:e()}),UNKNOWN:()=>({label:n(),hint:a()})};function A(e){return e?k[e]?.()??{label:e,hint:i()}: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-BPcfIXgJ.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{yD as n}from"./dist-CSHwMvoK.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};