@lacneu/atrium 0.60.3 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/assets/AccessTab-DBXKZGgf.js +1 -0
  2. package/dist/assets/{AdvancedFilter-C5pnO4fi.js → AdvancedFilter-B6eiX7Zx.js} +1 -1
  3. package/dist/assets/AgentFilesTab-CUMkUFY0.js +3 -0
  4. package/dist/assets/AnomaliesTab-DU5uZOg-.js +1 -0
  5. package/dist/assets/AuditTab-nLpz-KoA.js +1 -0
  6. package/dist/assets/BridgeTab-Bno_F96W.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-CwRGLZ4Z.js +1 -0
  8. package/dist/assets/DataTableShell-D-RklOZj.js +1 -0
  9. package/dist/assets/{DetailChips-8ZpH5ZXE.js → DetailChips-DdVat1KM.js} +1 -1
  10. package/dist/assets/FeedbacksTab-ejc0BNCp.js +1 -0
  11. package/dist/assets/{FieldLabel-hLNtge_D.js → FieldLabel-HlyBnXo4.js} +1 -1
  12. package/dist/assets/FilesTab-xKmAhsXC.js +1 -0
  13. package/dist/assets/{FilterBar-CY1WfFDB.js → FilterBar-UyunwEZF.js} +1 -1
  14. package/dist/assets/GroupsTab-DkaxUE-L.js +1 -0
  15. package/dist/assets/InstancesTab-BnSYWxfp.js +1 -0
  16. package/dist/assets/IntegrationsTab-BOQYLTZE.js +1 -0
  17. package/dist/assets/{KpiTab-qUWozfhc.js → KpiTab-h0NlewDJ.js} +1 -1
  18. package/dist/assets/PreferencesTab-CcGguucO.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-y-Gf5MXQ.js +4 -0
  20. package/dist/assets/RolesTab-lwOfl6N5.js +1 -0
  21. package/dist/assets/ScheduledTab-BntpA-Zo.js +1 -0
  22. package/dist/assets/ServiceAccountsTab-CQDS8dvg.js +1 -0
  23. package/dist/assets/SubAgentReportsTab-BKX-g9sQ.js +1 -0
  24. package/dist/assets/ThemeShowroom-CdO9EEFA.js +1 -0
  25. package/dist/assets/TimeRangePicker-fvvxJ7HC.js +1 -0
  26. package/dist/assets/TracesTab-C2GNUs6y.js +1 -0
  27. package/dist/assets/UsersTab-BRdWHZOu.js +1 -0
  28. package/dist/assets/VoiceTab-RC5QjSW2.js +1 -0
  29. package/dist/assets/button-BCAsV4-2.js +1 -0
  30. package/dist/assets/card-BwAm8Ufs.js +1 -0
  31. package/dist/assets/chevrons-up-down-C82Hxi1c.js +1 -0
  32. package/dist/assets/{compatView-B2BXfBvC.js → compatView-CKSMKOA6.js} +1 -1
  33. package/dist/assets/dispatchErrorInfo-BMHBocZy.js +1 -0
  34. package/dist/assets/{dist-De2K23IB.js → dist-B1qnlN7I.js} +5 -5
  35. package/dist/assets/{dist-Du1hJWyV.js → dist-Bw4s22TB.js} +1 -1
  36. package/dist/assets/{dist-CXJY_tYD.js → dist-CRven8ef.js} +1 -1
  37. package/dist/assets/dist-CT4mrpPz.js +5 -0
  38. package/dist/assets/{highlighted-body-OFNGDK62-xjw7PDBM.js → highlighted-body-OFNGDK62-DlBa16Mr.js} +1 -1
  39. package/dist/assets/index-DPQr8euK.css +2 -0
  40. package/dist/assets/index-rCasMjHB.js +238 -0
  41. package/dist/assets/mermaid-GHXKKRXX-BQnxJzgK.js +1 -0
  42. package/dist/assets/{pdf-CLjbM27Z.js → pdf-ctspKy12.js} +1 -1
  43. package/dist/assets/roleDescriptions-Bb_m4cgS.js +1 -0
  44. package/dist/assets/table-DckOsZQY.js +1 -0
  45. package/dist/assets/{tabs-fDXC7itk.js → tabs-DKk4J439.js} +1 -1
  46. package/dist/assets/x-8-3cz0V6.js +1 -0
  47. package/dist/index.html +8 -8
  48. package/package.json +1 -1
  49. package/dist/assets/AccessTab-BlTwl2Uk.js +0 -1
  50. package/dist/assets/AgentFilesTab-tYeG81Bo.js +0 -3
  51. package/dist/assets/AnomaliesTab-C94n-0pQ.js +0 -1
  52. package/dist/assets/AuditTab-D_mhJO5w.js +0 -1
  53. package/dist/assets/BridgeTab-s6Ggg8Zu.js +0 -1
  54. package/dist/assets/ChatDefaultsTab-DYVQXktp.js +0 -1
  55. package/dist/assets/DataTableShell-COEwE2Hv.js +0 -1
  56. package/dist/assets/FeedbacksTab-CqJ8NDLb.js +0 -1
  57. package/dist/assets/FilesTab-lytzpFwp.js +0 -1
  58. package/dist/assets/GroupsTab-BjjiPSDY.js +0 -1
  59. package/dist/assets/InstancesTab-bbthnf8h.js +0 -1
  60. package/dist/assets/IntegrationsTab-DQt4Kllc.js +0 -1
  61. package/dist/assets/PreferencesTab-B1JSLFVE.js +0 -1
  62. package/dist/assets/PromptInjectionsTab-Df6PKtxv.js +0 -4
  63. package/dist/assets/RolesTab-DbSxOWRh.js +0 -1
  64. package/dist/assets/ScheduledTab-km3Zx4dq.js +0 -1
  65. package/dist/assets/ServiceAccountsTab-Bcd88LfG.js +0 -1
  66. package/dist/assets/SubAgentReportsTab-xgRtphLV.js +0 -1
  67. package/dist/assets/ThemeShowroom-DxcANzhZ.js +0 -1
  68. package/dist/assets/TimeRangePicker-BYCcnF0a.js +0 -1
  69. package/dist/assets/TracesTab-ColoY1Nx.js +0 -1
  70. package/dist/assets/UsersTab-B0IdN_hl.js +0 -1
  71. package/dist/assets/VoiceTab-qZ5tMxmC.js +0 -1
  72. package/dist/assets/button-Bd43O_sm.js +0 -1
  73. package/dist/assets/card-Bkvykfxh.js +0 -1
  74. package/dist/assets/chevrons-up-down-DIXCqs3W.js +0 -1
  75. package/dist/assets/dispatchErrorInfo-DKMvYSfG.js +0 -1
  76. package/dist/assets/dist-DfildYj4.js +0 -5
  77. package/dist/assets/index-BlYUA3DJ.css +0 -2
  78. package/dist/assets/index-CNwjY680.js +0 -238
  79. package/dist/assets/mermaid-GHXKKRXX-DxPFrHWq.js +0 -1
  80. package/dist/assets/roleDescriptions-zLFA4zEm.js +0 -1
  81. package/dist/assets/table-BRilRxUj.js +0 -1
  82. package/dist/assets/x-DXaZHGzl.js +0 -1
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$A as r,$P as i,$a as a,$j as o,Aj as s,BA as c,Bj as l,Cj as u,D as d,Dj as f,E as p,Ej as m,Fj as h,GA as g,Gj as _,HA as v,HP as y,Hj as b,IA as x,Ij as ee,JA as te,Jj as S,KA as ne,Kj as re,LA as ie,Lj as ae,Mj as oe,Nj as se,Oj as ce,Pj as le,QA as ue,Qa as de,Qj as fe,RA as pe,Rj as me,Sj as he,Tj as ge,UA as _e,UP as ve,Uj as ye,VA as be,VP as xe,Vj as Se,WA as C,Wj as Ce,XA as we,Xj as Te,YA as Ee,Yj as De,ZA as Oe,ZP as ke,Zj as Ae,_j as je,aj as Me,bj as Ne,cj as Pe,dj as Fe,eF as w,eM as Ie,ej as Le,eo as T,fj as Re,gj as ze,hj as Be,iM as Ve,ij as He,jj as Ue,kj as We,lj as Ge,mj as Ke,n as qe,nM as Je,nj as Ye,oj as Xe,pj as Ze,qA as Qe,qj as $e,rM as et,rj as tt,sj as nt,tM as rt,tj as it,to as E,uj as at,vj as ot,wj as st,xj as D,yj as ct,zA as lt,zj as ut}from"./dist-De2K23IB.js";import{n as O}from"./dist-Du1hJWyV.js";import{t as k}from"./x-DXaZHGzl.js";import{t as A}from"./button-Bd43O_sm.js";import{C as j,S as M,T as N,Xt as dt,Yt as P,at as ft,bt as pt,ct as mt,dt as F,ft as I,lt as ht,m as L,ot as gt,st as R,ut as _t,w as z,wt as B,x as V,yt as vt}from"./index-CNwjY680.js";import{t as yt}from"./localePickerView-C2RmOS86.js";import{a as bt,i as xt,n as St,o as Ct,r as wt,t as Tt}from"./card-Bkvykfxh.js";import{a as Et,i as H,n as Dt,o as U,r as W,t as Ot}from"./table-BRilRxUj.js";import{t as kt}from"./TimeRangePicker-BYCcnF0a.js";import{t as At}from"./FilterBar-CY1WfFDB.js";import{t as jt}from"./AdvancedFilter-C5pnO4fi.js";var G=d(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),K=t(e(),1),Mt=.1,Nt=[248,248,248],Pt=[24,24,24];function Ft(e,t,n){let r=t,i=n,a=-1,o=-1;for(let s=0;s<n;s++)for(let n=0;n<t;n++)e[(s*t+n)*4+3]>8&&(n<r&&(r=n),n>a&&(a=n),s<i&&(i=s),s>o&&(o=s));return a<0?null:{x:r,y:i,width:a-r+1,height:o-i+1}}function It(e,t,n){let r=t*n;if(r===0)return 0;let i=0;for(let t=3;t<e.length;t+=4)e[t]<=8&&i++;return i/r}function q(e,t,n){return It(e,t,n)>=Mt}function Lt(e,t){for(let n=0;n<e.length;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2]}function Rt(e){for(let t=0;t<e.length;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}var zt=12*1024*1024,Bt=480,Vt=160,Ht=.92;async function Ut(e,t={}){if(!e.type.startsWith(`image/`))throw Error(Me());if(e.size>zt)throw Error(He());let{source:n,width:r,height:i,cleanup:a}=await Wt(e);try{let a=e.type===`image/svg+xml`,o=Math.min(Bt/r,Vt/i,a?1/0:1),s=Math.max(1,Math.round(r*o)),c=Math.max(1,Math.round(i*o)),l=document.createElement(`canvas`);l.width=s,l.height=c;let u=l.getContext(`2d`);if(!u)throw Error(Ye());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=Ft(u.getImageData(0,0,s,c).data,s,c)??{x:0,y:0,width:s,height:c},f=document.createElement(`canvas`);f.width=d.width,f.height=d.height;let p=f.getContext(`2d`);if(!p)throw Error(Ye());if(p.drawImage(l,d.x,d.y,d.width,d.height,0,0,d.width,d.height),t.variantFor){let e=p.getImageData(0,0,d.width,d.height);q(e.data,d.width,d.height)?Lt(e.data,t.variantFor===`dark`?Nt:Pt):Rt(e.data),p.putImageData(e,0,0)}let m=q(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await Y(f,`image/webp`,Ht)??await Y(f,`image/png`);if(!h)throw Error(it());return{blob:h,hasAlpha:m}}finally{a()}}async function Wt(e){if(e.type===`image/svg+xml`)return J(e);if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,cleanup:()=>t.close()}}catch{}return J(e)}async function J(e){let t=URL.createObjectURL(e);try{let e=new Image;return e.decoding=`async`,await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=()=>r(Error(tt())),e.src=t}),{source:e,width:e.naturalWidth||300,height:e.naturalHeight||150,cleanup:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}}function Y(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var X=n();function Gt(e,t){let n=e.trim().replace(/[^A-Za-z0-9_.-]+/g,`-`).replace(/^-+|-+$/g,``)||`chart`,r=new Blob([JSON.stringify(t,null,2)],{type:`application/json`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${n}.chart.json`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}var Z=`__all__`,Q={kind:`relative`,from:`now-24h`,to:`now`},Kt=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function $({title:e,description:t,children:n}){return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,X.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function qt(e){return e===`light`?ve():e===`dark`?y():xe()}var Jt=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Yt({tokens:e,mode:t}){let n=e.colors[t];return(0,X.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Jt.map(e=>{let t=n[e];return(0,X.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function Xt({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a,onExport:o}){return(0,X.jsxs)(`div`,{className:`oc-chart-card-wrap`,children:[(0,X.jsxs)(`button`,{type:`button`,className:qe(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,X.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,X.jsx)(O,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,X.jsx)(Yt,{tokens:r,mode:i}):(0,X.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,X.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,X.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]}),o?(0,X.jsx)(A,{type:`button`,variant:`ghost`,size:`icon`,className:`oc-chart-card__export`,onClick:o,"aria-label":E(),title:E(),children:(0,X.jsx)(dt,{className:`size-4`})}):null]})}function Zt({selectedKey:e,resolvedMode:t}){let n=w(p.charts.listMyCharts),r=i(p.charts.setMyChart);async function a(e){try{await r({name:e})}catch{}}return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:Te()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:De()})]}),(0,X.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,X.jsx)(Xt,{selected:e===null,title:S(),subtitle:$e(),tokens:null,mode:t,onSelect:()=>void a(null)}),(n??[]).map(n=>{let r=n.via===`common`?re():n.via===`owner`?_():Ce({group:n.via.group});return(0,X.jsx)(Xt,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void a(n.key),onExport:()=>Gt(n.name,n.tokens)},n.key)})]}),n!==void 0&&n.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ye()}):null]})}function Qt(){let e=i(p.charts.importChart),[t,n]=(0,K.useState)(``),[r,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(!1),[d,h]=(0,K.useState)(!1);async function g(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),l(!1);try{a(await t.text())}catch{s(D())}}}async function _(){if(s(null),l(!1),t.trim()===``){s(ct());return}let i;try{i=JSON.parse(r)}catch{s(D());return}h(!0);try{await e({name:t.trim(),tokens:i}),l(!0),n(``),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{h(!1)}}return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:We()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ce()})]}),(0,X.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:f()}),(0,X.jsx)(I,{value:t,onChange:e=>n(e.target.value),placeholder:m(),maxLength:60})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:ge()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>a(e.target.value),placeholder:st(),rows:8,spellCheck:!1})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(A,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(G,{className:`size-4`}),u(),(0,X.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void g(e)})]})}),(0,X.jsx)(A,{size:`sm`,disabled:d,onClick:()=>void _(),children:he()})]}),o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,c?(0,X.jsx)(`p`,{className:`oc-chart-import__ok`,children:Ne()}):null]})]})}function $t({chart:e}){let t=ke(p.charts.setChartLogo),n=i(p.charts.removeChartLogo),[r,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(null),c=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function l(n,r,i){if(e.chartId!==void 0){s(null),a(!0);try{let{blob:a,hasAlpha:o}=await Ut(r,i?{variantFor:i}:{}),s=await a.arrayBuffer();await t({chartId:e.chartId,bytes:s,mode:n,hasAlpha:o})}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}}}async function u(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await l(e,n)}async function d(t){if(e.chartId!==void 0){s(null),a(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}}}async function f(e){let t=c(e===`light`?`dark`:`light`);if(t){s(null),a(!0);try{await l(e,await(await fetch(t)).blob(),e)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}}}function m({mode:e}){let t=c(e),n=c(e===`light`?`dark`:`light`);return(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?Re():Fe()}),(0,X.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,X.jsx)(`img`,{src:t,alt:``}):null}),(0,X.jsx)(A,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(G,{className:`size-4`}),t?Ge():at(),(0,X.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void u(e,t)})]})}),!t&&n?(0,X.jsx)(A,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void f(e),children:nt()}):null,t?(0,X.jsx)(A,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:Pe()}):null]})}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:Ze()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,X.jsx)(m,{mode:`light`}),(0,X.jsx)(m,{mode:`dark`})]}),r?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:Xe()}):null,o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})}function en({chart:e}){let t=w(p.me.getMe,{host:B}),n=i(p.charts.addChartDomain),a=i(p.charts.removeChartDomain),[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(!1);if(t?.role!==`admin`)return null;let f=e.domains??[];async function m(){let t=o.trim();if(t!==``){l(null),d(!0);try{await n({chartKey:e.key,domain:t}),s(``)}catch(e){l(e instanceof Error?e.message:String(e))}finally{d(!1)}}}async function h(t){l(null);try{await a({chartKey:e.key,domain:t})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:Le()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,X.jsx)(`div`,{className:`oc-chart-avail__groups`,children:f.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:we()}):f.map(e=>(0,X.jsxs)(F,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Ee({domain:e}),onClick:()=>void h(e),children:(0,X.jsx)(k,{className:`size-3`})})]},e))}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(I,{value:o,onChange:e=>s(e.target.value),placeholder:ue(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&m()}}),(0,X.jsx)(A,{variant:`outline`,size:`sm`,disabled:u,onClick:()=>void m(),children:Oe()})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:r()}),c?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:c}):null]})]})}function tn(e){let t={...e};return delete t.bpm,JSON.stringify(t,null,2)}function nn({chart:e}){let t=i(p.charts.updateChart),n=i(p.charts.deleteChart),[r,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(e.name),[l,u]=(0,K.useState)(()=>tn(e.tokens)),[d,f]=(0,K.useState)(e.tokens.bpm??0),[m,h]=(0,K.useState)(null),[_,v]=(0,K.useState)(!1);function y(){c(e.name),u(tn(e.tokens)),f(e.tokens.bpm??0),h(null),o(!0)}async function b(){if(e.chartId===void 0)return;h(null);let n;try{n=JSON.parse(l)}catch{h(D());return}if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;d>0?e.bpm=d:delete e.bpm}v(!0);try{await t({chartId:e.chartId,name:s.trim(),tokens:n}),o(!1)}catch(e){h(e instanceof Error?e.message:String(e))}finally{v(!1)}}async function x(){if(e.chartId!==void 0&&window.confirm(C()))try{await n({chartId:e.chartId})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:r?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(A,{variant:`outline`,size:`sm`,onClick:y,children:Be()}),(0,X.jsx)(A,{variant:`ghost`,size:`sm`,onClick:()=>void x(),children:Ke()})]})})]}),r?(0,X.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:ne()}),(0,X.jsx)(I,{value:s,onChange:e=>c(e.target.value),maxLength:60})]}),(0,X.jsxs)(`div`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:T()}),(0,X.jsxs)(`div`,{className:`oc-chart-bpm`,children:[(0,X.jsx)(`input`,{type:`range`,className:`oc-chart-bpm__slider`,min:0,max:90,step:5,value:d,onChange:e=>f(Number(e.target.value)),"aria-label":T()}),(0,X.jsx)(`span`,{className:`oc-chart-bpm__value`,children:d===0?a():`${d} BPM`})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:de()})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:g()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:l,onChange:e=>u(e.target.value),rows:10,spellCheck:!1})]}),m?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:m}):null,(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(A,{size:`sm`,disabled:_,onClick:()=>void b(),children:te()}),(0,X.jsx)(A,{variant:`ghost`,size:`sm`,onClick:()=>o(!1),children:Qe()})]})]}):null,(0,X.jsx)($t,{chart:e}),(0,X.jsx)(en,{chart:e})]})}function rn(){let e=w(p.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:ot()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:je()})]}),e!==void 0&&t.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ze()}):(0,X.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,X.jsx)(nn,{chart:e},e.key))})]})}function an({chart:e,groups:t}){let n=i(p.charts.addChartToGroupPool),r=i(p.charts.removeChartFromGroupPool),a=e.restrictedToGroups,o=e.poolGroups,l=new Set((o??[]).map(e=>e.groupId)),u=t.filter(e=>!l.has(e._id));async function d(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function f(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,X.jsx)(F,{variant:a?`secondary`:`outline`,className:`oc-chart-avail__state`,children:a?h():e.kind===`custom`&&e.scope===`personal`?c():ee()}),e.isGlobalDefault?(0,X.jsx)(F,{variant:`default`,children:le()}):null]}),(0,X.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:oe()}),(o??[]).map(e=>(0,X.jsxs)(F,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":s({group:e.name}),onClick:()=>void f(e.groupId),children:(0,X.jsx)(k,{className:`size-3`})})]},e.groupId)),u.length>0?(0,X.jsxs)(V,{value:``,onValueChange:e=>void d(e),children:[(0,X.jsx)(z,{size:`sm`,className:`w-56`,children:(0,X.jsx)(N,{placeholder:Ue()})}),(0,X.jsx)(M,{children:u.map(e=>(0,X.jsx)(j,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:se()}):null]})]})}function on({chart:e}){let t=i(p.charts.promoteChartToCommon),n=i(p.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function a(){if(e.chartId!==void 0&&window.confirm(C()))try{await n({chartId:e.chartId})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,X.jsx)(F,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?lt():c()}),e.ownerLabel?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:be({owner:e.ownerLabel})}):null]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,X.jsx)(A,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:pe()}):null,(0,X.jsx)(A,{variant:`ghost`,size:`sm`,onClick:()=>void a(),children:ie()})]})]})}function sn({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=i(p.admin.setDefaultThemeMode),a=i(p.admin.setDefaultLocale),o=i(p.charts.setDefaultChart),s=w(p.charts.listChartsAdmin),c=w(p.groups.listGroups,{}),u=e??`system`,d=t??`fr`;return(0,X.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:fe()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ae()})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:b()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Se()})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(A,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void o({name:null}),children:S()}),pt.map(e=>(0,X.jsx)(A,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key)),(s??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,X.jsx)(A,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key))]})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:l()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ut()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,X.jsx)(an,{chart:e,groups:c??[]},e.key))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:me()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ae()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,X.jsx)(en,{chart:e})]},e.key))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:_e()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:v()})]}),(()=>{let e=(s??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:x()}):(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,X.jsx)(on,{chart:e},e.key))})})()]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:Ve()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:et()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,X.jsx)(A,{variant:u===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:qt(e)},e))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:Je()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:rt()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:yt().map(e=>(0,X.jsx)(A,{variant:d===e.value?`default`:`outline`,size:`sm`,onClick:()=>void a({locale:e.value}),children:e.label},e.value))}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ie()})]})]})}function cn(){let e=w(p.me.getMe,{host:B}),t=vt(e?.resolvedThemeMode);return(0,X.jsxs)(`div`,{className:`oc-appearance`,children:[(0,X.jsx)(Zt,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,X.jsx)(Qt,{}),(0,X.jsx)(rn,{}),e?.role===`admin`?(0,X.jsx)(sn,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function ln(){let[e,t]=(0,K.useState)(!0),[n,r]=(0,K.useState)(`per-user`),[i,a]=(0,K.useState)(``),[s,c]=(0,K.useState)(Z),[l,u]=(0,K.useState)(Z),[d,f]=(0,K.useState)(Q),p=i!==``||s!==Z||l!==Z;function m(){a(``),c(Z),u(Z),f(Q)}return(0,X.jsxs)(`div`,{className:`oc-show`,children:[(0,X.jsx)(cn,{}),(0,X.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,X.jsx)(`summary`,{className:`oc-show__title`,children:o()}),(0,X.jsxs)($,{title:`Buttons`,description:`Variants`,children:[(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(A,{children:`Default`}),(0,X.jsx)(A,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(A,{variant:`outline`,children:`Outline`}),(0,X.jsx)(A,{variant:`ghost`,children:`Ghost`}),(0,X.jsx)(A,{variant:`destructive`,children:`Destructive`}),(0,X.jsx)(A,{variant:`link`,children:`Link`})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(A,{size:`sm`,children:`Small`}),(0,X.jsx)(A,{children:`Default`}),(0,X.jsx)(A,{size:`lg`,children:`Large`}),(0,X.jsx)(A,{size:`icon`,"aria-label":`more`,children:(0,X.jsx)(P,{})}),(0,X.jsx)(A,{disabled:!0,children:`Disabled`})]})]}),(0,X.jsx)($,{title:`Badges`,children:(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(F,{children:`Default`}),(0,X.jsx)(F,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(F,{variant:`outline`,children:`Outline`}),(0,X.jsx)(F,{variant:`destructive`,children:`Destructive`})]})}),(0,X.jsx)($,{title:`Inputs & selection`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsx)(I,{placeholder:`Text input…`}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsxs)(V,{value:n,onValueChange:r,children:[(0,X.jsx)(z,{className:`w-56`,children:(0,X.jsx)(N,{placeholder:`Select…`})}),(0,X.jsxs)(M,{children:[(0,X.jsx)(j,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,X.jsx)(j,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,X.jsxs)(`label`,{className:`oc-show__check`,children:[(0,X.jsx)(L,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,X.jsx)($,{title:`Filtres & plage temporelle`,description:`Barre réutilisable (recherche debouncée + selects rapides à largeur auto + plage façon Grafana) et constructeur de filtre avancé. Câblée dans Users, Groups, Comptes de service, Traces, Anomalies, Audit et KPI.`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsxs)(At,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:d,onTimeRangeChange:f,onReset:m,canReset:p,children:[(0,X.jsxs)(V,{value:s,onValueChange:c,children:[(0,X.jsx)(z,{size:`sm`,children:(0,X.jsx)(N,{})}),(0,X.jsxs)(M,{children:[(0,X.jsx)(j,{value:Z,children:`Toutes directions`}),(0,X.jsx)(j,{value:`inbound`,children:`inbound`}),(0,X.jsx)(j,{value:`outbound`,children:`outbound`}),(0,X.jsx)(j,{value:`internal`,children:`internal`})]})]}),(0,X.jsxs)(V,{value:l,onValueChange:u,children:[(0,X.jsx)(z,{size:`sm`,children:(0,X.jsx)(N,{})}),(0,X.jsxs)(M,{children:[(0,X.jsx)(j,{value:Z,children:`Toutes sévérités`}),(0,X.jsx)(j,{value:`info`,children:`info`}),(0,X.jsx)(j,{value:`warn`,children:`warn`}),(0,X.jsx)(j,{value:`critical`,children:`critical`})]})]})]}),(0,X.jsx)(jt,{fields:Kt,onChange:()=>{}}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,X.jsx)(kt,{value:d,onChange:f})]})]})}),(0,X.jsx)($,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,X.jsxs)(ft,{children:[(0,X.jsx)(_t,{asChild:!0,children:(0,X.jsx)(A,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,X.jsx)(P,{})})}),(0,X.jsxs)(gt,{align:`start`,children:[(0,X.jsx)(mt,{children:`Actions`}),(0,X.jsx)(ht,{}),(0,X.jsx)(R,{children:`Edit`}),(0,X.jsx)(R,{children:`Duplicate`}),(0,X.jsx)(ht,{}),(0,X.jsx)(R,{variant:`destructive`,children:`Delete`})]})]})}),(0,X.jsx)($,{title:`Card`,children:(0,X.jsxs)(Tt,{className:`w-80`,children:[(0,X.jsxs)(bt,{children:[(0,X.jsx)(Ct,{children:`Instance`}),(0,X.jsx)(wt,{children:`Non-secret metadata only.`})]}),(0,X.jsx)(St,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,X.jsxs)(xt,{className:`gap-2`,children:[(0,X.jsx)(A,{size:`sm`,children:`Save`}),(0,X.jsx)(A,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,X.jsx)($,{title:`Table`,children:(0,X.jsxs)(Ot,{children:[(0,X.jsx)(Et,{children:(0,X.jsxs)(U,{children:[(0,X.jsx)(H,{className:`w-8`,children:(0,X.jsx)(L,{"aria-label":`select all`})}),(0,X.jsx)(H,{children:`Name`}),(0,X.jsx)(H,{children:`Mode`}),(0,X.jsx)(H,{className:`text-right`,children:`Status`}),(0,X.jsx)(H,{className:`w-8`})]})}),(0,X.jsx)(Dt,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,X.jsxs)(U,{children:[(0,X.jsx)(W,{children:(0,X.jsx)(L,{"aria-label":`select ${e.n}`})}),(0,X.jsx)(W,{className:`font-medium`,children:e.n}),(0,X.jsx)(W,{children:(0,X.jsx)(F,{variant:`secondary`,children:e.m})}),(0,X.jsx)(W,{className:`text-right`,children:(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,X.jsx)(O,{className:`size-3.5`}),` `,e.s]})}),(0,X.jsx)(W,{children:(0,X.jsx)(A,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,X.jsx)(P,{})})})]},e.n))})]})}),(0,X.jsx)($,{title:`App fragments`,description:`Chat-specific components`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,X.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,X.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,X.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,X.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,X.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,X.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,X.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,X.jsx)(`span`,{className:`oc-run-status__dot`}),(0,X.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}export{ln as ThemeShowroom};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$r as r,Bh as i,Gh as a,Hh as o,Jh as s,Jr as c,Kh as l,Qr as u,Rh as d,Uh as f,Vh as p,Wh as m,Xh as h,Xr as g,Yh as _,Yr as v,Zr as y,ei as b,qh as x,zh as S}from"./dist-De2K23IB.js";import{t as C}from"./button-Bd43O_sm.js";import{Dt as w,Et as T,Ot as E,Qt as D,Rt as O,Tt as k,ft as A,rt as j}from"./index-CNwjY680.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:h(),from:`now-5m`},{label:_(),from:`now-15m`},{label:s(),from:`now-30m`},{label:x(),from:`now-1h`},{label:l(),from:`now-3h`},{label:a(),from:`now-6h`},{label:m(),from:`now-12h`},{label:f(),from:`now-24h`},{label:o(),from:`now-2d`},{label:p(),from:`now-7d`},{label:i(),from:`now-30d`},{label:S(),from:`now-90d`},{label:d(),from:`now-520w`}];function L(e){return j(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)(``),s=F(e),[l,d]=(0,M.useState)(()=>z(s.from)),[f,p]=(0,M.useState)(()=>z(s.to));function m(t){if(t){let t=F(e);d(z(t.from)),p(z(t.to)),o(``)}i(t)}function h(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function _(){let e=B(l),n=B(f);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!1))}let x=(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]),S=B(l)!==null&&B(f)!==null;return(0,H.jsxs)(w,{open:n,onOpenChange:m,children:[(0,H.jsx)(E,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(D,{}),R(e)]})}),(0,H.jsx)(T,{children:(0,H.jsx)(k,{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:b()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:r()}),(0,H.jsx)(A,{type:`datetime-local`,value:l,onChange:e=>d(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:u()}),(0,H.jsx)(A,{type:`datetime-local`,value:f,onChange:e=>p(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:_,children:y()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(O,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(A,{value:a,onChange:e=>o(e.target.value),placeholder:g(),"aria-label":v()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:x.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:c()}):x.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:()=>h(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$P as r,$T as i,$v as a,AT as o,Av as s,Bv as c,Cv as l,D as u,DT as d,Dv as f,E as p,ET as m,Ev as h,FT as g,Fv as _,GT as v,Gv as y,Hv as b,IT as x,Iv as S,JT as C,Jv as ee,KT as w,Kv as te,LT as T,Lv as ne,MT as re,Mv as ie,NT as E,Nv as ae,OT as oe,Ov as se,PT as ce,Pv as le,QT as ue,Qv as de,RT as fe,Rv as pe,Sv as me,TT as he,Tv as ge,Uv as _e,Vv as ve,WT as ye,Wv as be,XT as D,Xn as O,Xv as xe,YT as k,Yn as A,Yv as Se,ZT as j,Zn as Ce,Zv as we,_v as Te,aE as Ee,bv as De,cE as Oe,dE as ke,eE as M,eF as N,ey as Ae,fE as P,iE as F,jT as je,jv as Me,kT as Ne,kv as Pe,lE as Fe,mE as Ie,nE as I,oE as Le,pE as Re,qT as ze,qv as Be,rE as Ve,sE as He,tE as L,ty as Ue,uE as We,vv as Ge,wv as Ke,xv as qe,yv as Je,zT as Ye,zv as Xe}from"./dist-De2K23IB.js";import{n as Ze}from"./dist-Du1hJWyV.js";import{t as Qe}from"./x-DXaZHGzl.js";import{i as R,n as z,r as $e,t as et}from"./tabs-fDXC7itk.js";import{t as B}from"./button-Bd43O_sm.js";import{C as V,Jt as tt,M as nt,S as H,T as U,Zt as rt,_t as it,a as at,dt as W,ht as ot,i as st,it as ct,mt as lt,nn as ut,o as dt,pt as ft,qt as pt,rn as mt,rt as G,s as ht,vt as gt,w as K,wt as _t,x as q}from"./index-CNwjY680.js";import{n as vt}from"./TimeRangePicker-BYCcnF0a.js";import{t as yt}from"./FilterBar-CY1WfFDB.js";import{t as bt}from"./AdvancedFilter-C5pnO4fi.js";import{t as xt}from"./DataTableShell-COEwE2Hv.js";var St=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=u(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?k():n===`agent`?`${C()} - ${r}`:e}function Tt(){let e=N(p.me.getMe,{host:_t})?.role===`admin`,t=N(p.deliveryTiming.getDeliveryStatus,{}),n=r(p.deliveryTiming.startDeliveryRecord),i=r(p.deliveryTiming.stopDeliveryRecord),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await i({}):await n({})}finally{c(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:Ie()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Re()})]}),e?(0,Y.jsx)(B,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?ke():P()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(W,{variant:`secondary`,children:We()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:Fe({time:ct(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?Le():He()})}),a?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=N(p.deliveryTiming.listDeliverySessions,{}),n=r(p.deliveryTiming.deleteDeliverySessions),[a,o]=(0,J.useState)(``),[s,c]=(0,J.useState)(`all`),[l,u]=(0,J.useState)(X),[d,f]=(0,J.useState)(null),{from:h,to:g}=vt(l),_=l.to===`now`?1/0:g,y=a.trim()!==``||s!==`all`||l!==X,b=()=>{o(``),c(`all`),u(X)},x=(0,J.useMemo)(()=>{if(t===void 0)return;let e=a.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(s===`all`||(s===`active`?t.active:!t.active))&&t.startedAt>=h&&t.startedAt<=_).map(e=>({...e,_id:e.sessionId}))},[t,a,s,h,_]),S=e=>{let t=new Set((x??[]).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,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:a,onQChange:o,searchPlaceholder:F(),timeRange:l,onTimeRangeChange:u,onReset:b,canReset:y,children:(0,Y.jsxs)(q,{value:s,onValueChange:e=>c(e),children:[(0,Y.jsx)(K,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(U,{})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:`all`,children:Ve()}),(0,Y.jsx)(V,{value:`active`,children:I()}),(0,Y.jsx)(V,{value:`stopped`,children:L()})]})]})}),(0,Y.jsx)(xt,{title:Ee(),rows:x,emptyHint:m(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":d===e.sessionId?w():ze(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:d===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(tt,{size:15,"aria-hidden":!0})})},{header:M(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:G(e.startedAt)})},{header:i(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:G(e.stoppedAt)})},{header:ue(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:j(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:D(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(W,{variant:`secondary`,children:I()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:L()})}],rowActions:e?e=>[{label:v(),variant:`destructive`,onSelect:()=>S([e.sessionId])}]:void 0,bulkActions:e?[{label:v(),variant:`destructive`,onSelect:e=>S(e)}]:void 0,isExpanded:e=>e.sessionId===d,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=N(p.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(nt(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:ye()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Oe()});let r=e.segments,i=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[Z(t.p50),` / `,Z(t.p95),` / `,Z(t.max)]})]});return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,he()]}),(0,Y.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ze,{size:13,"aria-hidden":!0}):(0,Y.jsx)(rt,{size:13,"aria-hidden":!0}),t?d():oe()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:T()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:x()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:g()})]})}),(0,Y.jsxs)(`tbody`,{children:[i(ce(),r.bridge),i(E(),r.A),i(re(),r.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:je()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Ne()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:o()})]})}var kt=[50,100,200,500],At=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:Ce()},{value:`principalType`,label:O()},{value:`direction`,label:`direction`},{value:`roleKey`,label:A()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=mt({from:`/settings/traces`}),t=ut({from:`/settings/traces`}),n=e.limit,r=e.kind,i=e.statusClass??Q,o=e.principalType??Q,u=e.direction??Q,d=e.roleKey??Q,m=e.q??``,g=st(e.from,e.to),v=(0,J.useMemo)(()=>ht(e.adv),[e.adv]),{from:x,to:C}=vt(g),[w,T]=(0,J.useState)(null),[re,E]=(0,J.useState)(null),oe=e=>void t({search:t=>({...t,limit:e})}),ce=e=>void t({search:t=>({...t,kind:e})}),ue=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),he=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),ye=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),D=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,...dt(e)})}),A=e=>void t({search:t=>({...t,adv:at(e)}),replace:!0}),j=N(p.observability.listEvents,{limit:n}),Ce=N(p.observability.listEvents,{limit:n,kind:r===At?void 0:r,filter:{q:m||void 0,from:x,to:C,statusClass:i===Q?void 0:i,principalType:o===Q?void 0:o,direction:u===Q?void 0:u,roleKey:d===Q?void 0:d,advanced:v.length>0?v:void 0}}),Te=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),Ee=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),Oe=m!==``||i!==Q||o!==Q||u!==Q||d!==Q||v.length>0||g.kind!==`relative`||g.from!==Pt.from;function ke(){t({search:{limit:100,kind:`all`},replace:!0})}let M=w?j?.filter(e=>e.correlationId===w):Ce,P=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,Y.jsxs)(et,{value:P,onValueChange:e=>F(e),children:[(0,Y.jsxs)($e,{className:`w-full`,children:[(0,Y.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(pt,{size:13,"aria-hidden":!0}),Ye()]}),(0,Y.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),fe()]})]}),(0,Y.jsx)(z,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ue(),(0,Y.jsx)(`strong`,{children:Ae()}),a(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:de()})]}),(0,Y.jsxs)(yt,{q:m,onQChange:ue,searchPlaceholder:we(),timeRange:g,onTimeRangeChange:k,onReset:ke,canReset:Oe,children:[(0,Y.jsxs)(q,{value:i,onValueChange:he,children:[(0,Y.jsx)(K,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(U,{placeholder:xe()})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:Q,children:Se()}),jt.map(e=>(0,Y.jsx)(V,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:o,onValueChange:ye,children:[(0,Y.jsx)(K,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(U,{placeholder:ee()})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:Q,children:Be()}),Mt.map(e=>(0,Y.jsx)(V,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:u,onValueChange:D,children:[(0,Y.jsx)(K,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(U,{placeholder:te()})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:Q,children:y()}),Nt.map(e=>(0,Y.jsx)(V,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:d,onValueChange:O,children:[(0,Y.jsx)(K,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(U,{placeholder:be()})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:Q,children:_e()}),Ee.map(e=>(0,Y.jsx)(V,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:r,onValueChange:ce,children:[(0,Y.jsx)(K,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(U,{placeholder:b()})}),(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{value:At,children:ve()}),Te.map(e=>(0,Y.jsx)(V,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:String(n),onValueChange:e=>oe(Number(e)),children:[(0,Y.jsx)(K,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(U,{})}),(0,Y.jsx)(H,{children:kt.map(e=>(0,Y.jsx)(V,{value:String(e),children:c({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:v,onChange:A}),w?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>T(null),title:Xe(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[pe(),(0,Y.jsx)(`code`,{children:$(w)})]}),(0,Y.jsx)(Qe,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ne()})]})}):null,(0,Y.jsx)(xt,{title:S(),rows:M,emptyHint:w?_():le(),columns:[{header:ae(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:G(e.at)})},{header:ie(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(W,{variant:`secondary`,children:e.kind})},{header:Me(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":s(),children:`✓`})}},{header:Pe(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(W,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:se(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(W,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:f(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(W,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:h(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ge(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:Ke(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:l(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:me(),onClick:()=>T(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:qe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>E(e),children:De()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:re,onClose:()=>E(null)})]})]})}function Lt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Rt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(ft,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(lt,{className:`max-w-lg`,children:[(0,Y.jsxs)(it,{children:[(0,Y.jsxs)(gt,{className:`oc-traces__meta-title`,children:[Je(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(W,{variant:`outline`,children:Ge()})]}),(0,Y.jsx)(ot,{children:Te()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$P as r,AC as i,BC as a,B_ as o,CC as s,DC as c,E as l,EC as u,FC as d,F_ as f,HC as p,H_ as m,IC as ee,I_ as h,LC as g,L_ as _,MC as te,M_ as v,NC as ne,N_ as y,OC as b,PC as re,P_ as x,RC as ie,R_ as S,SC as ae,TC as oe,UC as C,U_ as w,VC as T,V_ as E,XS as se,_C as D,bC as O,eF as k,gC as ce,hC as le,id as A,jC as ue,j_ as j,kC as de,nd as M,rd as N,vC as fe,wC as pe,xC as me,yC as he,zC as ge,z_ as P}from"./dist-De2K23IB.js";import{t as F}from"./button-Bd43O_sm.js";import{C as I,H as L,It as R,Lt as z,S as B,T as V,U as _e,W as ve,_t as H,at as ye,c as U,ct as be,dt as W,ht as xe,l as Se,m as G,mt as K,nn as Ce,ot as we,pt as Te,rn as Ee,st as De,u as q,ut as Oe,vt as ke,w as J,wt as Ae,x as Y}from"./index-CNwjY680.js";import{t as je}from"./FilterBar-CY1WfFDB.js";import{t as Me}from"./DataTableShell-COEwE2Hv.js";import{t as Ne}from"./DetailChips-8ZpH5ZXE.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=k(l.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=k(l.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(a??[]).find(e=>e.isDefault)??null,u=c?`${c.instanceName}/${c.agentId}`:null,d=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),f=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!d.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,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)(Te,{open:n,onOpenChange:r,children:(0,Z.jsxs)(K,{className:`oc-access`,children:[(0,Z.jsxs)(H,{children:[(0,Z.jsx)(ke,{children:w({user:t})}),(0,Z.jsx)(xe,{children:m()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?E():o()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:P()}):f.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:h()}):[...p.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:u},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:i,assigned:a,defaultKey:o}){let s=r(l.agents.assignAgent),c=r(l.agents.removeAgent),u=r(l.agents.setDefaultAgent),d=L();if(!e)return null;async function p(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(S(),e)}}async function m(n){try{await u({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(_(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(z,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(W,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,r=a.has(n),i=o===n,s=e.state===`deleted`,c=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${c?` is-disabled`:``}`,children:[(0,Z.jsx)(G,{checked:r,disabled:(s||c)&&!r,onCheckedChange:()=>void p(e.agentId,r),"aria-label":f({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)(W,{variant:`outline`,className:`oc-access__gone`,children:x()}):null,e.outOfPool?(0,Z.jsx)(W,{variant:`outline`,className:`oc-access__gone`,children:y()}):null,r?i?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":v(),title:v(),children:(0,Z.jsx)(R,{size:14,fill:`currentColor`})}):(0,Z.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":j(),title:j(),disabled:c,onClick:()=>void m(e.agentId),children:(0,Z.jsx)(R,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return M();case`user`:return N();case`admin`:return A();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=U.filter(e=>n.has(q[e])).length;return(0,Z.jsxs)(ye,{children:[(0,Z.jsx)(Oe,{asChild:!0,children:(0,Z.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?C():p({count:r})})}),(0,Z.jsxs)(we,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(be,{children:T()}),U.map(e=>{let r=q[e];return(0,Z.jsxs)(De,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(G,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:Se[e]()})]},e)})]})]})}function Le(){let e=Ee({from:`/settings/users`}),t=Ce({from:`/settings/users`}),n=e.q??``,o=e.role??Q,f=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),p=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),m=k(l.admin.listUsers,{filter:{q:n||void 0,role:o===Q?void 0:o},withAgents:!0}),h=k(l.me.getMe,{host:Ae}),_=r(l.admin.setRole),v=r(l.admin.setUserPermissions),y=r(l.admin.startImpersonation),x=r(l.admin.deleteUser),S=r(l.admin.setUserName),C=_e(),w=ve(),T=L(),[E,A]=(0,X.useState)(null),j=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of m??[])e.add(t.role);return[...e]},[m]),M=n!==``||o!==Q;function N(){t({search:{},replace:!0})}async function P(e){try{await _(e)}catch(e){T.error(a(),e)}}async function F(e){try{await v(e)}catch(e){T.error(ge(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await C({title:te(),description:ue({user:t}),confirmWord:i(),confirmLabel:de(),destructive:!0}))try{await x({profileId:e._id}),T.success(c({user:t}))}catch(e){T.error(b(),e)}}async function H(e){let t=e.email||e.name||e.userId.slice(0,8),n=await w({title:oe(),label:pe({user:t}),placeholder:s(),defaultValue:e.name??``,confirmLabel:se()});if(n!==null)try{await S({profileId:e._id,name:n}),T.success(ae())}catch(e){T.error(me(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{q:n,onQChange:f,searchPlaceholder:ie(),onReset:N,canReset:M,children:(0,Z.jsxs)(Y,{value:o,onValueChange:p,children:[(0,Z.jsx)(J,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(V,{})}),(0,Z.jsxs)(B,{children:[(0,Z.jsx)(I,{value:Q,children:g()}),j.map(e=>(0,Z.jsx)(I,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:ee(),rows:m,emptyHint:d(),rowActions:e=>{let t=[{label:le(),onSelect:()=>A({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:u(),onSelect:()=>void H(e)}];return e.userId!==h?.userId&&t.push({label:re(),onSelect:()=>void y({profileId:e._id})},{label:ne(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:O(),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:he(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(Y,{value:e.role,onValueChange:t=>void P({profileId:e._id,role:t}),children:[(0,Z.jsx)(J,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(V,{})}),(0,Z.jsxs)(B,{children:[(0,Z.jsx)(I,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(I,{value:`user`,children:$(`user`)}),(0,Z.jsx)(I,{value:`admin`,children:$(`admin`)})]})]})},{header:fe(),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:D()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),F({profileId:e._id,permissions:[...n]})}})},{header:ce(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(z,{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:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||A(null)}})]})}export{Le as UsersTab};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$P as r,$t as i,At as a,Ct as o,D as s,Dt as c,E as l,Ft as u,GP as d,Gt as f,It as p,Jc as ee,Jt as m,Kt as h,Lt as g,Nt as _,Ot as v,Pt as y,Qt as b,St as te,Tt as x,Xc as ne,Xt as re,Yt as S,ZP as C,Zt as w,an as T,cn as E,dn as D,eF as O,en as ie,fn as ae,gn as oe,gu as k,hn as se,in as ce,kt as le,ln as ue,mn as de,nn as fe,on as pe,pn as me,qP as A,qt as j,rn as M,sn as N,tn as P,un as F,ut as I,wt as L}from"./dist-De2K23IB.js";import{i as R,n as z,r as he,t as ge}from"./tabs-fDXC7itk.js";import{t as B}from"./button-Bd43O_sm.js";import{C as V,F as _e,I as ve,L as H,N as ye,Nt as be,P as xe,R as U,S as W,T as G,Wt as Se,dt as K,m as q,nn as Ce,rn as we,w as J,wt as Te,x as Y,z as Ee}from"./index-CNwjY680.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`,()=>ue()],[`fr-FR`,()=>g()],[`en-US`,()=>p()],[`en-GB`,()=>u()],[`de-DE`,()=>y()],[`es-ES`,()=>_()]],Oe=[[`0.75`,()=>N()],[`1`,()=>pe()],[`1.25`,()=>T()],[`1.5`,()=>ce()]],$=0;function ke({instance:e}){let t=r(l.admin.upsertInstanceConfig),n=e.config??{},a={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},[s,c]=(0,Z.useState)(a),[u,d]=(0,Z.useState)(`idle`),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(!1),g=C(l.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{c({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}),d(`idle`)},[e._id]);let _=s.enabled!==a.enabled||s.engine!==a.engine||s.lang!==a.lang||s.rate!==a.rate||s.autoRead!==a.autoRead;async function v(){d(`saving`);try{let n={...e.config??{}};n.voiceEnabled=s.enabled,s.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,s.lang===`auto`?delete n.voiceLang:n.voiceLang=s.lang;let r=Number.parseFloat(s.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,s.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),d(`idle`)}catch{d(`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)(q,{checked:s.enabled,onCheckedChange:e=>c({...s,enabled:e===!0}),"aria-label":D()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:D()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()}),(0,Q.jsxs)(Y,{value:s.engine,onValueChange:e=>c({...s,engine:e}),disabled:!s.enabled,children:[(0,Q.jsx)(J,{size:`sm`,"aria-label":x(),children:(0,Q.jsx)(G,{})}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(V,{value:`browser`,children:L()}),e.kind===`hermes`?null:(0,Q.jsx)(V,{value:`gateway`,children:o()})]})]})]}),s.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:te()}):null,s.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:F()}),(0,Q.jsxs)(Y,{value:s.lang,onValueChange:e=>c({...s,lang:e}),disabled:!s.enabled,children:[(0,Q.jsx)(J,{size:`sm`,"aria-label":F(),children:(0,Q.jsx)(G,{})}),(0,Q.jsx)(W,{children:De.map(([e,t])=>(0,Q.jsx)(V,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:E()}),(0,Q.jsxs)(Y,{value:s.rate,onValueChange:e=>c({...s,rate:e}),disabled:!s.enabled,children:[(0,Q.jsx)(J,{size:`sm`,"aria-label":E(),children:(0,Q.jsx)(G,{})}),(0,Q.jsx)(W,{children:Oe.map(([e,t])=>(0,Q.jsx)(V,{value:e,children:t()},e))})]})]}),s.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(q,{checked:s.autoRead,onCheckedChange:e=>c({...s,autoRead:e===!0}),disabled:!s.enabled,"aria-label":M()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:M()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:fe()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(B,{size:`sm`,disabled:!_||u===`saving`,onClick:()=>void v(),children:u===`saving`?k():ne()}),(0,Q.jsx)(B,{variant:`outline`,size:`sm`,disabled:!s.enabled||f,onClick:()=>{let t=Number.parseFloat(s.rate)||1,n=++$;if(h(!1),U(),H(),s.engine!==`gateway`){ve(i(),{lang:_e(s.lang,A()),rate:t});return}p(!0),g({instanceName:e.name,text:i()}).then(({mime:e,audioBase64:r})=>{n===$&&xe(r,e,{rate:t})}).catch(()=>{n===$&&h(!0)}).finally(()=>p(!1))},children:f?k():P()}),(0,Q.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,p(!1),U(),H()},children:ie()})]}),u===`error`||m?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:m?I():ee()}):null]})}function Ae({stt:e}){let t=O(l.me.getMe,{host:Te}),n=r(l.admin.setFeatureEnabled),i=t?.ui?.featuresEnabled?.voiceInput===!0,o=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:w()}),(0,Q.jsx)(K,{variant:e?`secondary`:`outline`,children:e?h():f()}),(0,Q.jsx)(K,{variant:i?`secondary`:`destructive`,children:i?le():v()})]}),o?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(q,{checked:i,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":a()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:a()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:re()})]})}function je(){let e=O(l.admin.listInstances,{}),t=(0,Z.useMemo)(()=>Ee(),[]),n=(0,Z.useMemo)(()=>ye(),[]),{section:r}=we({from:`/settings/voice`}),i=Ce({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:oe()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(K,{variant:t?`secondary`:`destructive`,children:t?se():de()}),(0,Q.jsx)(K,{variant:n?`secondary`:`destructive`,children:n?me():ae()})]}),(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)(be,{size:13,"aria-hidden":!0}),c()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Se,{size:13,"aria-hidden":!0}),w()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(X,{size:13,"aria-hidden":!0}),S()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:d()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:b()}):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:S()}),(0,Q.jsx)(K,{variant:`outline`,children:m()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:j()})]})})]})]})}export{je as VoiceTab};
@@ -1 +0,0 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-De2K23IB.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 +0,0 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-De2K23IB.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 +0,0 @@
1
- import{D as e}from"./dist-De2K23IB.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 +0,0 @@
1
- import{$f as e,Gf as t,Hf as n,Jf as r,Kf as i,Qf as a,Uf as o,Wf as s,Xf as c,Yf as l,Zf as u,ap as d,cp as f,dp as p,ep as m,fp as h,gp as g,hp as _,ip as v,lp as y,mp as b,np as x,op as S,pp as C,qf as w,rp as T,sp as E,tp as D,up as O}from"./dist-De2K23IB.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:_()}),AUTH_TOKEN_MISMATCH:()=>({label:b(),hint:C()}),DEVICE_SIGNING_FAILED:()=>({label:h(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:O(),hint:y()}),GATEWAY_TIMEOUT:()=>({label:f(),hint:E()}),GATEWAY_DISCONNECTED:()=>({label:S(),hint:d()}),ATTACHMENT_TOO_LARGE:()=>({label:x(),hint:D()}),ATTACHMENT_REJECTED:()=>({label:m(),hint:e()}),BRIDGE_UNREACHABLE:()=>({label:v(),hint:T()}),INVALID_REQUEST:()=>({label:a(),hint:u()}),NOT_CONFIGURED:()=>({label:c(),hint:l()}),UNROUTED:()=>({label:r(),hint:w()}),UPSTREAM_ERROR:()=>({label:i(),hint:t()}),UNKNOWN:()=>({label:s(),hint:o()})};function A(e){return e?k[e]?.()??{label:e,hint:n()}:k.UNKNOWN()}export{A as t};
@@ -1,5 +0,0 @@
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-De2K23IB.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
-
3
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
-
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Q=`DialogDescriptionWarning`,$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X(Q).contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ee=T,te=D,ne=j,re=N,ie=L,ae=H,oe=W,se=K;export{ne as a,te as c,re as i,Y as l,ie as n,ee as o,oe as r,ae as s,se as t,S as u};