@lacneu/atrium 0.102.1 → 0.103.1

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 (146) hide show
  1. package/dist/assets/AccessTab-DIDDsgPT.js +1 -0
  2. package/dist/assets/{AdminSettings-B8n1yLsD.js → AdminSettings-RN5-vhFB.js} +1 -1
  3. package/dist/assets/{AdvancedFilter-Bb66m5kb.js → AdvancedFilter-D14bDnZM.js} +1 -1
  4. package/dist/assets/AgentFilesTab-CzlG0CZI.js +3 -0
  5. package/dist/assets/AnomaliesTab-DI6_13hV.js +1 -0
  6. package/dist/assets/AuditTab-CtudlEKL.js +1 -0
  7. package/dist/assets/BridgeTab-D7vwrcIC.js +1 -0
  8. package/dist/assets/ChatDefaultsTab-C29wKwC9.js +1 -0
  9. package/dist/assets/{ConfirmDialog-BXcki0Ee.js → ConfirmDialog-DUn2vS3y.js} +1 -1
  10. package/dist/assets/{DataTableShell-DRFFBx_j.js → DataTableShell-DlkJe0in.js} +1 -1
  11. package/dist/assets/DeletedChatsTab-fwnKocED.js +1 -0
  12. package/dist/assets/{DetailChips-Cv1sxdhU.js → DetailChips-CYx7WQ4_.js} +1 -1
  13. package/dist/assets/{EntitySheet-B2B48bss.js → EntitySheet-BHlTwSgy.js} +1 -1
  14. package/dist/assets/FeedbacksTab-B6yZLeCu.js +1 -0
  15. package/dist/assets/{FieldLabel-Tea3wyVe.js → FieldLabel-rU6Ua6ki.js} +1 -1
  16. package/dist/assets/FilesTab-CX2DlSAl.js +1 -0
  17. package/dist/assets/{FilterBar-DTVwlDpF.js → FilterBar-1CED41DE.js} +1 -1
  18. package/dist/assets/GroupsTab-XqYgSNbn.js +1 -0
  19. package/dist/assets/InstancesTab-k_xDuLN5.js +1 -0
  20. package/dist/assets/IntegrationsTab-wQIr0NRQ.js +1 -0
  21. package/dist/assets/KnobRow-GQ-yjRd-.js +1 -0
  22. package/dist/assets/KpiTab-Bqw-Ktyf.js +1 -0
  23. package/dist/assets/PreferencesTab-B3IgHTIx.js +1 -0
  24. package/dist/assets/ProjectPage-3f1bBxNm.js +1 -0
  25. package/dist/assets/PromptInjectionsTab-C_NJLRVi.js +4 -0
  26. package/dist/assets/RolesTab-BH7cwUSl.js +1 -0
  27. package/dist/assets/ScheduledTab-DEPYdnlj.js +1 -0
  28. package/dist/assets/ServiceAccountsTab-BW_IZtpv.js +1 -0
  29. package/dist/assets/SubAgentReportsTab-tnmtmSGh.js +1 -0
  30. package/dist/assets/ThemeShowroom-CXAiw6jt.js +1 -0
  31. package/dist/assets/{TimeRangePicker-D3PJq1H8.js → TimeRangePicker-DGRmfXqe.js} +1 -1
  32. package/dist/assets/{TimezoneCombobox-CPTpWNQm.js → TimezoneCombobox-DAhFeIgd.js} +1 -1
  33. package/dist/assets/TracesTab-peFnZ-Tw.js +1 -0
  34. package/dist/assets/TrashTab-Hd_LRcrR.js +1 -0
  35. package/dist/assets/UsersTab-CYiw3R0P.js +1 -0
  36. package/dist/assets/VoiceTab-BIJNy57E.js +1 -0
  37. package/dist/assets/{alert-dialog-BoEv1f8g.js → alert-dialog-BdTFPzVf.js} +1 -1
  38. package/dist/assets/{api-DSJJn0d7.js → api-DNOgniXv.js} +5 -5
  39. package/dist/assets/{badge-C4po8DQ1.js → badge-D7TV9F5d.js} +1 -1
  40. package/dist/assets/{button-Dio0PVrp.js → button-2XjWVeWK.js} +1 -1
  41. package/dist/assets/capabilities-CASxhKEd.js +1 -0
  42. package/dist/assets/{card-CerX9wDn.js → card-CB4fBpkx.js} +1 -1
  43. package/dist/assets/check-ByAmVIRT.js +1 -0
  44. package/dist/assets/{checkbox-CsI4ggnp.js → checkbox-kFoJxcMJ.js} +1 -1
  45. package/dist/assets/chevron-left-SzhbAbEJ.js +1 -0
  46. package/dist/assets/chevron-right-9DjIYDNR.js +1 -0
  47. package/dist/assets/chevron-up-uykFYjFv.js +1 -0
  48. package/dist/assets/chevrons-up-down-C45M3ZYP.js +1 -0
  49. package/dist/assets/{compatView--1YlftIc.js → compatView-BsJMEfMH.js} +1 -1
  50. package/dist/assets/confTabs-BzReq467.css +1 -0
  51. package/dist/assets/convexApi-4XI9Ua6G.js +1 -0
  52. package/dist/assets/{copy-BaUCUMp2.js → copy-uA2kyeTq.js} +1 -1
  53. package/dist/assets/{cronDescribe-CAuRX7uW.js → cronDescribe-CWrWu4NY.js} +1 -1
  54. package/dist/assets/{deliveryRecorder-C7NQZrrH.js → deliveryRecorder-D2L37goZ.js} +1 -1
  55. package/dist/assets/{dialog-BfrsWZiD.js → dialog-Cw-buQuR.js} +1 -1
  56. package/dist/assets/dispatchErrorInfo-rA4PAW2w.js +1 -0
  57. package/dist/assets/{dist-ChrIV8UV.js → dist-BuPfsZqj.js} +1 -1
  58. package/dist/assets/{dist-CkbybbG7.js → dist-CjNu_N10.js} +1 -1
  59. package/dist/assets/{dist-D-RIDSJc.js → dist-s7OhF_Fl.js} +1 -1
  60. package/dist/assets/{dist-ClkJChBn.js → dist-vqdeesMI.js} +1 -1
  61. package/dist/assets/{dist-D7doQlva.js → dist-whjwthuB.js} +1 -1
  62. package/dist/assets/{dist-Cw3aN_jM.js → dist-yuq8NbqZ.js} +1 -1
  63. package/dist/assets/{download-DWgC7zCa.js → download-7V52FIS0.js} +1 -1
  64. package/dist/assets/{dropdown-menu-DHMOOlaP.js → dropdown-menu-BaUA_yBi.js} +1 -1
  65. package/dist/assets/{eye-B-ipuYEd.js → eye-Dj_nvUMH.js} +1 -1
  66. package/dist/assets/{format-DGKgJf2p.js → format-Dmvblmga.js} +1 -1
  67. package/dist/assets/{groupManageView-BMBqgRhV.js → groupManageView-B0Fd_T1s.js} +1 -1
  68. package/dist/assets/index-C5sCqQtj.js +158 -0
  69. package/dist/assets/index-D8Eob_Mc.css +1 -0
  70. package/dist/assets/{input-BSpTsBA6.js → input-BOl1ZpD6.js} +1 -1
  71. package/dist/assets/{list-eSch39T9.js → list-CgDCvRps.js} +1 -1
  72. package/dist/assets/loader-circle-D-oC88g9.js +1 -0
  73. package/dist/assets/{lock-0lxfSnTE.js → lock-BlAOODxr.js} +1 -1
  74. package/dist/assets/{pencil-aUWxuLhy.js → pencil-C9Bd090l.js} +1 -1
  75. package/dist/assets/plus-1T1-a2EN.js +1 -0
  76. package/dist/assets/{popover-DBaIbsBr.js → popover-BHbAt2S-.js} +1 -1
  77. package/dist/assets/roleDescriptions-DIDUvLuU.js +1 -0
  78. package/dist/assets/rotate-ccw-WHZ3xMbc.js +1 -0
  79. package/dist/assets/{search-BK6bzZNi.js → search-CU2PGfXc.js} +1 -1
  80. package/dist/assets/{select-qM3ZfTHx.js → select-CYo6IZR2.js} +1 -1
  81. package/dist/assets/{server-DLnWqkX-.js → server-BJJ3cVit.js} +1 -1
  82. package/dist/assets/speech-DCWd2QRW.js +1 -0
  83. package/dist/assets/{star-CM6J2w_J.js → star-DBwak3-9.js} +1 -1
  84. package/dist/assets/switch-B0io8PF7.js +1 -0
  85. package/dist/assets/{table-D2SJC960.js → table-C6NnEhxy.js} +1 -1
  86. package/dist/assets/{tabs-mZfLmn2f.js → tabs-DiirWTCN.js} +1 -1
  87. package/dist/assets/{toast-xNFwDnUy.js → toast-DN6P_at0.js} +1 -1
  88. package/dist/assets/{tooltip-v_AyOWn6.js → tooltip-6h3mm-V5.js} +1 -1
  89. package/dist/assets/{trash-2-B4WSfc7G.js → trash-2-BmifkPwA.js} +1 -1
  90. package/dist/assets/trashPage-DsBekB4q.js +1 -0
  91. package/dist/assets/trashView-Cd0pvgnM.js +1 -0
  92. package/dist/assets/{triangle-alert-BkDa-x8g.js → triangle-alert-DjNOW8SM.js} +1 -1
  93. package/dist/assets/{usageView-C9Y6E0Zu.js → usageView-DsAOFF89.js} +1 -1
  94. package/dist/assets/{useChart-CKFEN42T.js → useChart-CvUnULHg.js} +1 -1
  95. package/dist/assets/{useFontScale-ByBFat3y.js → useFontScale-T-slFQPF.js} +1 -1
  96. package/dist/assets/{useStartNewChat-BszDHUjD.js → useStartNewChat-Bg4hLp3d.js} +2 -2
  97. package/dist/assets/{use_paginated_query-CQj09xXv.js → use_paginated_query-CrHKVq5I.js} +1 -1
  98. package/dist/assets/{users-BJqaWlH1.js → users-4cOOjyOf.js} +1 -1
  99. package/dist/assets/x-xmpoCnTJ.js +1 -0
  100. package/dist/index.html +56 -56
  101. package/package.json +1 -1
  102. package/dist/assets/AccessTab-JmFp20Kp.js +0 -1
  103. package/dist/assets/AgentFilesTab-C3CUT4Ep.js +0 -3
  104. package/dist/assets/AnomaliesTab-CpiY8ZTC.js +0 -1
  105. package/dist/assets/AuditTab-D5YrLbTy.js +0 -1
  106. package/dist/assets/BridgeTab-D4RFq-Rb.js +0 -1
  107. package/dist/assets/ChatDefaultsTab-D0d9yEow.js +0 -1
  108. package/dist/assets/DeletedChatsTab-COYSFkNf.js +0 -1
  109. package/dist/assets/FeedbacksTab-6URuFdfg.js +0 -1
  110. package/dist/assets/FilesTab-esMtHJXt.js +0 -1
  111. package/dist/assets/GroupsTab-Io16XZHz.js +0 -1
  112. package/dist/assets/InstancesTab-BevtM68H.js +0 -1
  113. package/dist/assets/IntegrationsTab-DMY6VTUC.js +0 -1
  114. package/dist/assets/KnobRow-BsOT2O6U.js +0 -1
  115. package/dist/assets/KpiTab-DCfAwBfJ.js +0 -1
  116. package/dist/assets/PreferencesTab-DJ9p401L.js +0 -1
  117. package/dist/assets/ProjectPage-BxEF71jN.js +0 -1
  118. package/dist/assets/PromptInjectionsTab-Vdb1lF36.js +0 -4
  119. package/dist/assets/RolesTab-DU0g4d-R.js +0 -1
  120. package/dist/assets/ScheduledTab-B6gWc0HN.js +0 -1
  121. package/dist/assets/ServiceAccountsTab-Dmb_LH0V.js +0 -1
  122. package/dist/assets/SubAgentReportsTab-D9rclslo.js +0 -1
  123. package/dist/assets/ThemeShowroom-N4qzUtlq.js +0 -1
  124. package/dist/assets/TracesTab-DMdT_psj.js +0 -1
  125. package/dist/assets/TrashTab-BMSJ7ANC.js +0 -1
  126. package/dist/assets/UsersTab-BQaLsUCK.js +0 -1
  127. package/dist/assets/VoiceTab-BSh-05Ze.js +0 -1
  128. package/dist/assets/capabilities-BTqhMVxR.js +0 -1
  129. package/dist/assets/check-DmQzfrws.js +0 -1
  130. package/dist/assets/chevron-left-DQ9FCoo_.js +0 -1
  131. package/dist/assets/chevron-right-C_b_y922.js +0 -1
  132. package/dist/assets/chevron-up-Dsqj2Oaj.js +0 -1
  133. package/dist/assets/chevrons-up-down-Pva00Np5.js +0 -1
  134. package/dist/assets/confTabs-CCBW5ofF.css +0 -1
  135. package/dist/assets/convexApi-CyScjgcq.js +0 -1
  136. package/dist/assets/dispatchErrorInfo-Bb7JyJFO.js +0 -1
  137. package/dist/assets/index-CQk5TM8W.js +0 -158
  138. package/dist/assets/index-D6RuTaB7.css +0 -1
  139. package/dist/assets/loader-circle-BNhIFGdg.js +0 -1
  140. package/dist/assets/plus-Djbdyc2E.js +0 -1
  141. package/dist/assets/roleDescriptions-x3mUxTcX.js +0 -1
  142. package/dist/assets/rotate-ccw-BD-9XzMC.js +0 -1
  143. package/dist/assets/speech-CrNma2Ue.js +0 -1
  144. package/dist/assets/trashPage-WtAhGCt7.js +0 -1
  145. package/dist/assets/trashView-Ct0Xw-a9.js +0 -1
  146. package/dist/assets/x-CK8d5DC1.js +0 -1
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$G as r,$K as i,AK as a,BK as o,CK as s,DK as c,EK as l,FK as u,GG as d,GK as f,HK as p,IK as m,IX as h,JG as g,JK as ee,KG as _,KK as v,LK as te,LX as ne,MK as re,NK as ie,OK as ae,PK as oe,QG as y,QK as se,RK as ce,RX as le,SK as ue,TK as de,UK as fe,VK as pe,WG as me,WK as he,XG as ge,XK as _e,XX as b,YG as ve,YK as ye,YX as x,ZG as be,ZK as xe,_K as Se,_m as Ce,aK as we,aq as Te,bK as Ee,bm as S,cK as De,cq as Oe,dK as ke,dq as Ae,eK as je,eq as Me,fK as Ne,fq as Pe,gK as Fe,hK as Ie,iK as Le,iq as Re,jK as ze,kK as C,lK as Be,lq as Ve,mK as He,nK as Ue,nq as w,oK as We,oq as Ge,pK as Ke,qG as qe,qK as Je,qX as Ye,r as Xe,rK as Ze,rq as Qe,sK as $e,sq as et,t as T,tK as tt,tq as nt,uK as E,uq as rt,vK as it,vm as at,wK as ot,xK as st,yK as ct,ym as D,zK as lt}from"./api-DSJJn0d7.js";import{t as O}from"./check-DmQzfrws.js";import{c as ut,g as k,i as dt,n as ft,r as A,s as j,t as pt}from"./dropdown-menu-DHMOOlaP.js";import{t as mt}from"./download-DWgC7zCa.js";import{t as M}from"./checkbox-CsI4ggnp.js";import{i as N,n as ht,r as gt}from"./useChart-CKFEN42T.js";import{t as P}from"./x-CK8d5DC1.js";import{a as F,i as I,n as L,r as R,t as z}from"./select-qM3ZfTHx.js";import{t as B}from"./button-Dio0PVrp.js";import{t as V}from"./input-BSpTsBA6.js";import"./convexApi-CyScjgcq.js";import{t as H}from"./badge-C4po8DQ1.js";import{t as U}from"./appHost-CH3EGcJw.js";import{t as _t}from"./localePickerView-C2RmOS86.js";import{a as vt,i as yt,n as bt,o as xt,r as St,t as Ct}from"./card-CerX9wDn.js";import{a as wt,i as W,n as Tt,o as G,r as K,t as Et}from"./table-D2SJC960.js";import{t as Dt}from"./TimeRangePicker-D3PJq1H8.js";import{t as Ot}from"./FilterBar-DTVwlDpF.js";import{t as kt}from"./AdvancedFilter-Bb66m5kb.js";var q=t(e(),1),At=.1,jt=[248,248,248],Mt=[24,24,24];function Nt(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 Pt(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 J(e,t,n){return Pt(e,t,n)>=At}function Ft(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 It(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 Lt=12*1024*1024,Rt=480,zt=160,Bt=.92;async function Vt(e,t={}){if(!e.type.startsWith(`image/`))throw Error(Ke());if(e.size>Lt)throw Error(Ne());let{source:n,width:r,height:i,cleanup:a}=await Ht(e);try{let a=e.type===`image/svg+xml`,o=Math.min(Rt/r,zt/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(E());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=Nt(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(E());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);J(e.data,d.width,d.height)?Ft(e.data,t.variantFor===`dark`?jt:Mt):It(e.data),p.putImageData(e,0,0)}let m=J(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await Y(f,`image/webp`,Bt)??await Y(f,`image/png`);if(!h)throw Error(Be());return{blob:h,hasAlpha:m}}finally{a()}}async function Ht(e){if(e.type===`image/svg+xml`)return Ut(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 Ut(e)}async function Ut(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(ke())),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 Wt(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__`,Gt={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 Q({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`?le():e===`dark`?ne():h()}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:Xe(`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)(B,{type:`button`,variant:`ghost`,size:`icon`,className:`oc-chart-card__export`,onClick:o,"aria-label":S(),title:S(),children:(0,X.jsx)(mt,{className:`size-4`})}):null]})}function Zt({selectedKey:e,resolvedMode:t}){let n=b(T.charts.listMyCharts),r=x(T.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:Re()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Qe()})]}),(0,X.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,X.jsx)(Xt,{selected:e===null,title:w(),subtitle:nt(),tokens:null,mode:t,onSelect:()=>void a(null)}),(n??[]).map(n=>{let r=n.via===`common`?Me():n.via===`owner`?i():se({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:()=>Wt(n.name,n.tokens)},n.key)})]}),n!==void 0&&n.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:xe()}):null]})}function Qt(){let e=x(T.charts.importChart),[t,n]=(0,q.useState)(``),[r,i]=(0,q.useState)(``),[o,s]=(0,q.useState)(null),[l,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(!1);async function h(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),d(!1);try{let e=await t.text();i(e)}catch{s(C())}}}async function g(){if(s(null),d(!1),t.trim()===``){s(c());return}let a;try{a=JSON.parse(r)}catch{s(C());return}p(!0);try{await e({name:t.trim(),tokens:a}),d(!0),n(``),i(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{p(!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:te()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:m()})]}),(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:u()}),(0,X.jsx)(V,{value:t,onChange:e=>n(e.target.value),placeholder:oe(),maxLength:60})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:ie()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:re(),rows:8,spellCheck:!1})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(B,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(N,{className:`size-4`}),ze(),(0,X.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void h(e)})]})}),(0,X.jsx)(B,{size:`sm`,disabled:f,onClick:()=>void g(),children:a()})]}),o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,l?(0,X.jsx)(`p`,{className:`oc-chart-import__ok`,children:ae()}):null]})]})}function $t({chart:e}){let t=Ye(T.charts.setChartLogo),n=x(T.charts.removeChartLogo),[r,i]=(0,q.useState)(!1),[a,o]=(0,q.useState)(null),s=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function c(n,r,a){if(e.chartId!==void 0){o(null),i(!0);try{let{blob:i,hasAlpha:o}=await Vt(r,a?{variantFor:a}:{}),s=await i.arrayBuffer();await t({chartId:e.chartId,bytes:s,mode:n,hasAlpha:o})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function l(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await c(e,n)}async function u(t){if(e.chartId!==void 0){o(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function d(e){let t=s(e===`light`?`dark`:`light`);if(t){o(null),i(!0);try{await c(e,await(await fetch(t)).blob(),e)}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function f({mode:e}){let t=s(e),n=s(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`?Ee():ct()}),(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)(B,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(N,{className:`size-4`}),t?Se():it(),(0,X.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,X.jsx)(B,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:Ie()}):null,t?(0,X.jsx)(B,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:Fe()}):null]})}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:st()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,X.jsx)(f,{mode:`light`}),(0,X.jsx)(f,{mode:`dark`})]}),r?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:He()}):null,a?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function en({chart:e}){let t=b(T.me.getMe,{host:U}),n=x(T.charts.addChartDomain),r=x(T.charts.removeChartDomain),[i,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)(!1);if(t?.role!==`admin`)return null;let u=e.domains??[];async function d(){let t=i.trim();if(t!==``){s(null),l(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}async function f(t){s(null);try{await r({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:De()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,X.jsx)(`div`,{className:`oc-chart-avail__groups`,children:u.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:Le()}):u.map(e=>(0,X.jsxs)(H,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Ze({domain:e}),onClick:()=>void f(e),children:(0,X.jsx)(P,{className:`size-3`})})]},e))}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(V,{value:i,onChange:e=>a(e.target.value),placeholder:We(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&d()}}),(0,X.jsx)(B,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void d(),children:we()})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:$e()}),o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function $(e){let t={...e};return delete t.bpm,JSON.stringify(t,null,2)}function tn({chart:e}){let t=x(T.charts.updateChart),n=x(T.charts.deleteChart),[i,a]=(0,q.useState)(!1),[o,c]=(0,q.useState)(e.name),[l,u]=(0,q.useState)(()=>$(e.tokens)),[d,f]=(0,q.useState)(e.tokens.bpm??0),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(!1);function ee(){c(e.name),u($(e.tokens)),f(e.tokens.bpm??0),m(null),a(!0)}async function _(){if(e.chartId===void 0)return;m(null);let n;try{n=JSON.parse(l)}catch{m(C());return}if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;d>0?e.bpm=d:delete e.bpm}g(!0);try{await t({chartId:e.chartId,name:o.trim(),tokens:n}),a(!1)}catch(e){m(e instanceof Error?e.message:String(e))}finally{g(!1)}}async function v(){if(e.chartId!==void 0&&window.confirm(y()))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:i?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(B,{variant:`outline`,size:`sm`,onClick:ee,children:s()}),(0,X.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>void v(),children:ue()})]})})]}),i?(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:je()}),(0,X.jsx)(V,{value:o,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:D()}),(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":D()}),(0,X.jsx)(`span`,{className:`oc-chart-bpm__value`,children:d===0?at():`${d} BPM`})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:Ce()})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:r()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:l,onChange:e=>u(e.target.value),rows:10,spellCheck:!1})]}),p?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:p}):null,(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(B,{size:`sm`,disabled:h,onClick:()=>void _(),children:Ue()}),(0,X.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>a(!1),children:tt()})]})]}):null,(0,X.jsx)($t,{chart:e}),(0,X.jsx)(en,{chart:e})]})}function nn(){let e=b(T.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:l()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:de()})]}),e!==void 0&&t.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ot()}):(0,X.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,X.jsx)(tn,{chart:e},e.key))})]})}function rn({chart:e,groups:t}){let n=x(T.charts.addChartToGroupPool),r=x(T.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,s=new Set((a??[]).map(e=>e.groupId)),c=t.filter(e=>!s.has(e._id));async function l(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function u(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)(H,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?fe():e.kind===`custom`&&e.scope===`personal`?g():he()}),e.isGlobalDefault?(0,X.jsx)(H,{variant:`default`,children:p()}):null]}),(0,X.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:o()}),(a??[]).map(e=>(0,X.jsxs)(H,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":ce({group:e.name}),onClick:()=>void u(e.groupId),children:(0,X.jsx)(P,{className:`size-3`})})]},e.groupId)),c.length>0?(0,X.jsxs)(z,{value:``,onValueChange:e=>void l(e),children:[(0,X.jsx)(I,{size:`sm`,className:`w-56`,children:(0,X.jsx)(F,{placeholder:lt()})}),(0,X.jsx)(L,{children:c.map(e=>(0,X.jsx)(R,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:pe()}):null]})]})}function an({chart:e}){let t=x(T.charts.promoteChartToCommon),n=x(T.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function i(){if(e.chartId!==void 0&&window.confirm(y()))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)(H,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?qe():g()}),e.ownerLabel?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:ve({owner:e.ownerLabel})}):null]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,X.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:_()}):null,(0,X.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:d()})]})]})}function on({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=x(T.admin.setDefaultThemeMode),i=x(T.admin.setDefaultLocale),a=x(T.charts.setDefaultChart),o=b(T.charts.listChartsAdmin),s=b(T.groups.listGroups,{}),c=e??`system`,l=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:Ge()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Te()})]}),(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:ye()})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(B,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void a({name:null}),children:w()}),gt.map(e=>(0,X.jsx)(B,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({name:e.key}),children:e.name},e.key)),(o??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,X.jsx)(B,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({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:ee()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Je()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,X.jsx)(rn,{chart:e,groups:s??[]},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:v()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:f()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).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:be()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ge()})]}),(()=>{let e=(o??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:me()}):(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,X.jsx)(an,{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:Pe()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ae()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,X.jsx)(B,{variant:c===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:rt()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ve()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:_t().map(e=>(0,X.jsx)(B,{variant:l===e.value?`default`:`outline`,size:`sm`,onClick:()=>void i({locale:e.value}),children:e.label},e.value))}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Oe()})]})]})}function sn(){let e=b(T.me.getMe,{host:U}),t=ht(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)(nn,{}),e?.role===`admin`?(0,X.jsx)(on,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function cn(){let[e,t]=(0,q.useState)(!0),[n,r]=(0,q.useState)(`per-user`),[i,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(Z),[c,l]=(0,q.useState)(Z),[u,d]=(0,q.useState)(Gt),f=i!==``||o!==Z||c!==Z;function p(){a(``),s(Z),l(Z),d(Gt)}return(0,X.jsxs)(`div`,{className:`oc-show`,children:[(0,X.jsx)(sn,{}),(0,X.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,X.jsx)(`summary`,{className:`oc-show__title`,children:et()}),(0,X.jsxs)(Q,{title:`Buttons`,description:`Variants`,children:[(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(B,{children:`Default`}),(0,X.jsx)(B,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(B,{variant:`outline`,children:`Outline`}),(0,X.jsx)(B,{variant:`ghost`,children:`Ghost`}),(0,X.jsx)(B,{variant:`destructive`,children:`Destructive`}),(0,X.jsx)(B,{variant:`link`,children:`Link`})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(B,{size:`sm`,children:`Small`}),(0,X.jsx)(B,{children:`Default`}),(0,X.jsx)(B,{size:`lg`,children:`Large`}),(0,X.jsx)(B,{size:`icon`,"aria-label":`more`,children:(0,X.jsx)(k,{})}),(0,X.jsx)(B,{disabled:!0,children:`Disabled`})]})]}),(0,X.jsx)(Q,{title:`Badges`,children:(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(H,{children:`Default`}),(0,X.jsx)(H,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(H,{variant:`outline`,children:`Outline`}),(0,X.jsx)(H,{variant:`destructive`,children:`Destructive`})]})}),(0,X.jsx)(Q,{title:`Inputs & selection`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsx)(V,{placeholder:`Text input…`}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsxs)(z,{value:n,onValueChange:r,children:[(0,X.jsx)(I,{className:`w-56`,children:(0,X.jsx)(F,{placeholder:`Select…`})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(R,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,X.jsx)(R,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,X.jsxs)(`label`,{className:`oc-show__check`,children:[(0,X.jsx)(M,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,X.jsx)(Q,{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)(Ot,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,X.jsxs)(z,{value:o,onValueChange:s,children:[(0,X.jsx)(I,{size:`sm`,children:(0,X.jsx)(F,{})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(R,{value:Z,children:`Toutes directions`}),(0,X.jsx)(R,{value:`inbound`,children:`inbound`}),(0,X.jsx)(R,{value:`outbound`,children:`outbound`}),(0,X.jsx)(R,{value:`internal`,children:`internal`})]})]}),(0,X.jsxs)(z,{value:c,onValueChange:l,children:[(0,X.jsx)(I,{size:`sm`,children:(0,X.jsx)(F,{})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(R,{value:Z,children:`Toutes sévérités`}),(0,X.jsx)(R,{value:`info`,children:`info`}),(0,X.jsx)(R,{value:`warn`,children:`warn`}),(0,X.jsx)(R,{value:`critical`,children:`critical`})]})]})]}),(0,X.jsx)(kt,{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)(Dt,{value:u,onChange:d})]})]})}),(0,X.jsx)(Q,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,X.jsxs)(pt,{children:[(0,X.jsx)(ut,{asChild:!0,children:(0,X.jsx)(B,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,X.jsx)(k,{})})}),(0,X.jsxs)(ft,{align:`start`,children:[(0,X.jsx)(dt,{children:`Actions`}),(0,X.jsx)(j,{}),(0,X.jsx)(A,{children:`Edit`}),(0,X.jsx)(A,{children:`Duplicate`}),(0,X.jsx)(j,{}),(0,X.jsx)(A,{variant:`destructive`,children:`Delete`})]})]})}),(0,X.jsx)(Q,{title:`Card`,children:(0,X.jsxs)(Ct,{className:`w-80`,children:[(0,X.jsxs)(vt,{children:[(0,X.jsx)(xt,{children:`Instance`}),(0,X.jsx)(St,{children:`Non-secret metadata only.`})]}),(0,X.jsx)(bt,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,X.jsxs)(yt,{className:`gap-2`,children:[(0,X.jsx)(B,{size:`sm`,children:`Save`}),(0,X.jsx)(B,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,X.jsx)(Q,{title:`Table`,children:(0,X.jsxs)(Et,{children:[(0,X.jsx)(wt,{children:(0,X.jsxs)(G,{children:[(0,X.jsx)(W,{className:`w-8`,children:(0,X.jsx)(M,{"aria-label":`select all`})}),(0,X.jsx)(W,{children:`Name`}),(0,X.jsx)(W,{children:`Mode`}),(0,X.jsx)(W,{className:`text-right`,children:`Status`}),(0,X.jsx)(W,{className:`w-8`})]})}),(0,X.jsx)(Tt,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,X.jsxs)(G,{children:[(0,X.jsx)(K,{children:(0,X.jsx)(M,{"aria-label":`select ${e.n}`})}),(0,X.jsx)(K,{className:`font-medium`,children:e.n}),(0,X.jsx)(K,{children:(0,X.jsx)(H,{variant:`secondary`,children:e.m})}),(0,X.jsx)(K,{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)(K,{children:(0,X.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,X.jsx)(k,{})})})]},e.n))})]})}),(0,X.jsx)(Q,{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{cn as ThemeShowroom};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$j as r,Aj as i,Az as a,Bj as o,Bz as s,Cj as c,Dj as l,Dz as u,E as d,Ej as f,Ez as p,Fj as m,Fz as h,Gj as g,Gu as _,Gz as v,Hj as y,Hz as b,Ij as x,Iz as S,Jj as ee,Jz as C,Kj as te,Ku as w,Kz as T,Lj as ne,Lz as E,Mj as re,Mz as ie,Nj as ae,Nz as oe,Oj as se,Oz as D,Pj as ce,Pz as O,Qj as le,Rj as ue,Rz as de,Sj as fe,Tj as pe,Tz as k,Uj as me,Uz as A,Vj as he,Vz as j,Wj as ge,Wz as M,XX as N,Xj as _e,YX as P,Yj as ve,Yz as ye,Zj as be,_z as xe,aM as Se,bz as Ce,cz as we,dz as Te,eM as Ee,fz as De,gz as Oe,hz as F,iM as ke,jj as Ae,jz as je,kj as Me,kz as Ne,lz as Pe,mz as Fe,nM as Ie,oz as Le,pz as Re,qj as ze,qu as Be,qz as Ve,rM as He,sz as Ue,t as I,tM as We,uz as Ge,vz as Ke,wj as qe,yz as Je,zj as Ye,zz as Xe}from"./api-DSJJn0d7.js";import{n as Ze,t as Qe}from"./useNavigate-D3GIoxyW.js";import{t as $e}from"./check-DmQzfrws.js";import{t as et}from"./copy-BaUCUMp2.js";import{n as tt,t as nt}from"./eye-B-ipuYEd.js";import{o as rt,r as it}from"./deliveryRecorder-C7NQZrrH.js";import{t as at}from"./x-CK8d5DC1.js";import{a as L,i as R,n as z,r as B,t as V}from"./select-qM3ZfTHx.js";import{i as H,n as U,r as ot,t as st}from"./tabs-mZfLmn2f.js";import{t as W}from"./button-Dio0PVrp.js";import"./convexApi-CyScjgcq.js";import{t as G}from"./badge-C4po8DQ1.js";import{a as ct,n as K}from"./format-DGKgJf2p.js";import{a as lt,n as ut,o as dt,r as ft,t as pt}from"./dialog-BfrsWZiD.js";import{c as mt,o as ht,s as gt,u as _t}from"./searchSchemas-Dm-Qg010.js";import{t as vt}from"./appHost-CH3EGcJw.js";import{n as yt}from"./TimeRangePicker-D3PJq1H8.js";import{t as bt}from"./FilterBar-DTVwlDpF.js";import{t as xt}from"./AdvancedFilter-Bb66m5kb.js";import{t as St}from"./DataTableShell-DRFFBx_j.js";var Ct=d(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),q=t(e(),1),J=n(),Y={kind:`relative`,from:`now-520w`,to:`now`},X=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`?a():n===`agent`?`${Ne()} - ${r}`:e}function Tt(){let e=N(I.me.getMe,{host:vt})?.role===`admin`,t=N(I.deliveryTiming.getDeliveryStatus,{}),n=P(I.deliveryTiming.startDeliveryRecord),r=P(I.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:ye()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:C()})]}),e?(0,J.jsx)(W,{variant:c?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void l(),children:c?T():Ve()}):null]}),c?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(G,{variant:`secondary`,children:v()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:M({time:ct(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?j():b()})}),i?(0,J.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=N(I.deliveryTiming.listDeliverySessions,{}),n=P(I.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(`all`),[c,l]=(0,q.useState)(Y),[d,f]=(0,q.useState)(null),{from:m,to:g}=yt(c),_=c.to===`now`?1/0:g,v=r.trim()!==``||a!==`all`||c!==Y,y=()=>{i(``),o(`all`),l(Y)},b=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=m&&t.startedAt<=_).map(e=>({...e,_id:e.sessionId}))},[t,r,a,m,_]),x=e=>{let t=new Set((b??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),d!==null&&r.includes(d)&&f(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(bt,{q:r,onQChange:i,searchPlaceholder:Xe(),timeRange:c,onTimeRangeChange:l,onReset:y,canReset:v,children:(0,J.jsxs)(V,{value:a,onValueChange:e=>o(e),children:[(0,J.jsx)(R,{size:`sm`,className:`w-36`,children:(0,J.jsx)(L,{})}),(0,J.jsxs)(z,{children:[(0,J.jsx)(B,{value:`all`,children:de()}),(0,J.jsx)(B,{value:`active`,children:E()}),(0,J.jsx)(B,{value:`stopped`,children:S()})]})]})}),(0,J.jsx)(St,{title:s(),rows:b,emptyHint:Ue(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(W,{variant:`ghost`,size:`icon`,"aria-label":d===e.sessionId?u():D(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:d===e.sessionId?(0,J.jsx)(tt,{size:15,"aria-hidden":!0}):(0,J.jsx)(nt,{size:15,"aria-hidden":!0})})},{header:h(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:K(e.startedAt)})},{header:O(),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:K(e.stoppedAt)})},{header:oe(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:ie(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:je(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(G,{variant:`secondary`,children:E()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:S()})}],rowActions:e?e=>[{label:p(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:p(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===d,renderExpanded:e=>(0,J.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=N(I.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:k()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:A()});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,` `,Le()]}),(0,J.jsxs)(W,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)($e,{size:13,"aria-hidden":!0}):(0,J.jsx)(et,{size:13,"aria-hidden":!0}),t?we():Pe()]})]}),(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:Ke()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:xe()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Oe()})]})}),(0,J.jsxs)(`tbody`,{children:[i(F(),r.bridge),i(Fe(),r.A),i(Re(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:De()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ge()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Te()})]})}var kt=[50,100,200,500],Z=`all`,Q=`__all__`,At=[`2xx`,`4xx`,`5xx`],jt=[`user`,`service`,`system`],Mt=[`inbound`,`outbound`,`internal`],Nt={kind:`relative`,from:`now-30d`,to:`now`},Pt=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:Be()},{value:`principalType`,label:w()},{value:`direction`,label:`direction`},{value:`roleKey`,label:_()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function Ft(){let e=Ze({from:`/settings/traces`}),t=Qe({from:`/settings/traces`}),n=e.limit,a=e.kind,s=e.statusClass??Q,c=e.principalType??Q,u=e.direction??Q,d=e.roleKey??Q,p=e.q??``,h=e.correlationId,_=ht(e.from,e.to),v=(0,q.useMemo)(()=>_t(e.adv),[e.adv]),{from:b,to:S}=yt(_),[C,w]=(0,q.useState)(null),[T,E]=(0,q.useState)(null),ie=e=>void t({search:t=>({...t,limit:e})}),oe=e=>void t({search:t=>({...t,kind:e})}),D=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),O=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),de=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),fe=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),A=e=>void t({search:t=>({...t,...mt(e)})}),j=e=>void t({search:t=>({...t,adv:gt(e)}),replace:!0}),M=N(I.observability.listEvents,{limit:n}),P=N(I.observability.listEvents,{limit:n,kind:a===Z?void 0:a,...h?{correlationId:h}:{},filter:{q:p||void 0,from:b,to:S,statusClass:s===Q?void 0:s,principalType:c===Q?void 0:c,direction:u===Q?void 0:u,roleKey:d===Q?void 0:d,advanced:v.length>0?v:void 0}}),ye=(0,q.useMemo)(()=>{let e=new Set;for(let t of M??[])e.add(t.kind);return[...e].sort()},[M]),xe=(0,q.useMemo)(()=>{let e=new Set;for(let t of M??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[M]),we=p!==``||s!==Q||c!==Q||u!==Q||d!==Q||v.length>0||_.kind!==`relative`||_.from!==Nt.from;function Te(){t({search:{limit:100,kind:`all`},replace:!0})}let De=C?M?.filter(e=>e.correlationId===C):P,Oe=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(st,{value:Oe,onValueChange:e=>F(e),children:[(0,J.jsxs)(ot,{className:`w-full`,children:[(0,J.jsxs)(H,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(rt,{size:13,"aria-hidden":!0}),Ce()]}),(0,J.jsxs)(H,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(Ct,{size:13,"aria-hidden":!0}),Je()]})]}),(0,J.jsx)(U,{value:`latency`,children:(0,J.jsx)(Tt,{})}),(0,J.jsxs)(U,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[Se(),(0,J.jsx)(`strong`,{children:ke()}),He(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:Ie()})]}),(0,J.jsxs)(bt,{q:p,onQChange:D,searchPlaceholder:We(),timeRange:_,onTimeRangeChange:A,onReset:Te,canReset:we,children:[(0,J.jsxs)(V,{value:s,onValueChange:O,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(L,{placeholder:Ee()})}),(0,J.jsxs)(z,{children:[(0,J.jsx)(B,{value:Q,children:r()}),At.map(e=>(0,J.jsx)(B,{value:e,children:e},e))]})]}),(0,J.jsxs)(V,{value:c,onValueChange:de,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(L,{placeholder:le()})}),(0,J.jsxs)(z,{children:[(0,J.jsx)(B,{value:Q,children:be()}),jt.map(e=>(0,J.jsx)(B,{value:e,children:e},e))]})]}),(0,J.jsxs)(V,{value:u,onValueChange:fe,children:[(0,J.jsx)(R,{size:`sm`,className:`w-32`,children:(0,J.jsx)(L,{placeholder:_e()})}),(0,J.jsxs)(z,{children:[(0,J.jsx)(B,{value:Q,children:ve()}),Mt.map(e=>(0,J.jsx)(B,{value:e,children:e},e))]})]}),(0,J.jsxs)(V,{value:d,onValueChange:k,children:[(0,J.jsx)(R,{size:`sm`,className:`w-36`,children:(0,J.jsx)(L,{placeholder:ee()})}),(0,J.jsxs)(z,{children:[(0,J.jsx)(B,{value:Q,children:ze()}),xe.map(e=>(0,J.jsx)(B,{value:e,children:e},e))]})]}),(0,J.jsx)(`input`,{list:`oc-trace-kinds`,className:`oc-input oc-input--sm w-44`,value:a===Z?``:a,placeholder:te(),"aria-label":te(),onChange:e=>{let t=e.target.value.trim();oe(t===``?Z:t)}}),(0,J.jsx)(`datalist`,{id:`oc-trace-kinds`,children:ye.map(e=>(0,J.jsx)(`option`,{value:e},e))}),(0,J.jsxs)(V,{value:String(n),onValueChange:e=>ie(Number(e)),children:[(0,J.jsx)(R,{size:`sm`,className:`w-28`,children:(0,J.jsx)(L,{})}),(0,J.jsx)(z,{children:kt.map(e=>(0,J.jsx)(B,{value:String(e),children:g({count:e})},e))})]})]}),(0,J.jsx)(xt,{fields:Pt,seed:v,onChange:j}),C?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>w(null),title:ge(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[me(),(0,J.jsx)(`code`,{children:$(C)})]}),(0,J.jsx)(at,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:y()})]})}):null,(0,J.jsx)(St,{title:he(),rows:De,emptyHint:C?o():Ye(),columns:[{header:ue(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:K(e.at)})},{header:ne(),sort:e=>e.kind,cell:e=>(0,J.jsx)(G,{variant:`secondary`,children:e.kind})},{header:x(),sort:e=>Lt(e)??null,cell:e=>{let t=Lt(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":m(),children:`✓`})}},{header:ce(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(G,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ae(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(G,{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)(G,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ae(),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:i(),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 ${It(e.status)}`,children:e.status})},{header:Me(),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:se(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:l(),onClick:()=>w(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:f(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>E(e),children:pe()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(Rt,{row:T,onClose:()=>E(null)})]})]})}function It(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 Lt(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 Rt({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)(pt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(ut,{className:`max-w-lg`,children:[(0,J.jsxs)(lt,{children:[(0,J.jsxs)(dt,{className:`oc-traces__meta-title`,children:[qe(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(G,{variant:`outline`,children:c()})]}),(0,J.jsx)(ft,{children:fe()})]}),(0,J.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{Ft as TracesTab};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{AE as r,CE as i,DE as a,E as o,EE as s,HX as c,IE as l,LE as u,ME as d,NE as f,OE as p,SE as m,TE as h,XX as g,YX as _,_E as v,bE as y,jE as b,kE as x,t as S,vE as C,wE as w,xE as T,xj as E,yE as D}from"./api-DSJJn0d7.js";import{t as O}from"./use_paginated_query-CQj09xXv.js";import{t as k}from"./trash-2-B4WSfc7G.js";import{t as A}from"./button-Dio0PVrp.js";import"./convexApi-CyScjgcq.js";import{r as j}from"./toast-xNFwDnUy.js";import{n as M}from"./format-DGKgJf2p.js";import{n as N}from"./ConfirmDialog-BXcki0Ee.js";import{r as P}from"./fileMetaView-Ci5C4w9Q.js";import{r as F}from"./trashView-Ct0Xw-a9.js";import{n as I,t as L}from"./trashPage-WtAhGCt7.js";var R=o(`scan-search`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]),z=t(e(),1);function B(e,t){let n=e.find(e=>e.status===`running`&&!e.stale)??null,r=e.find(e=>e.mode===`dryRun`&&e.status===`done`)??null,i=e.find(e=>e.mode===`apply`&&(e.status===`done`||e.status===`refused`)&&(r===null||e.startedAt>r.startedAt))??null,a=null;return n===null?r===null||i!==null?a=`no_report`:r.applicableUntil===null||r.applicableUntil<=t?a=`expired`:r.mirrorMissing>0?a=`mirror`:r.orphans.count===0&&(a=`nothing`):a=`running`,{running:n,report:r,lastApply:i,applyBlock:a}}var V=n();function H(){let e=g(S.blobSweep.listBlobSweeps,{}),t=g(S.blobQuarantine.quarantineSettings,{}),n=_(S.blobSweep.startBlobSweep),o=N(),{toast:l}=j(),[u,O]=(0,z.useState)(!1),F=c(),I=e=>P(e,F),L=B(e??[],Date.now()),H=L.report,U=async e=>{O(!0);try{await e()}catch(e){l({title:v(),description:e.message,variant:`error`})}finally{O(!1)}},W=()=>U(()=>n({mode:`dryRun`})),G=async()=>{H!==null&&await o({title:T({count:H.orphans.count}),description:y({size:I(H.orphans.bytes)}),confirmLabel:m(),destructive:!0})&&await U(()=>n({mode:`apply`,confirms:H._id}))};return(0,V.jsxs)(`section`,{className:`oc-trash__body`,"aria-labelledby":`oc-blobsweep-title`,children:[(0,V.jsxs)(`div`,{className:`oc-trash__head`,children:[(0,V.jsx)(`h3`,{id:`oc-blobsweep-title`,className:`oc-trash__heading`,children:f()}),(0,V.jsxs)(`div`,{className:`oc-trash__actions`,children:[(0,V.jsxs)(A,{variant:`outline`,size:`sm`,disabled:u||L.running!==null,onClick:()=>void W(),children:[(0,V.jsx)(R,{}),` `,b()]}),(0,V.jsxs)(A,{variant:`ghost`,size:`sm`,className:`text-destructive`,disabled:u||L.applyBlock!==null,onClick:()=>void G(),children:[(0,V.jsx)(k,{}),` `,m()]})]})]}),(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:d({days:H?.minAgeDays??7,quarantine:t?.days??7})}),e===void 0?(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:E()}):null,L.running===null?null:(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:r({scanned:L.running.blobsScanned})}),e!==void 0&&H===null&&L.running===null?(0,V.jsx)(`p`,{className:`oc-trash__empty`,children:x()}):null,H===null?null:(0,V.jsxs)(`div`,{className:`oc-trash__hint`,children:[(0,V.jsx)(`p`,{children:p({date:M(H.finishedAt??H.startedAt),count:H.orphans.count,size:I(H.orphans.bytes),scanned:H.blobsScanned})}),(0,V.jsxs)(`ul`,{children:[(0,V.jsx)(`li`,{children:a({count:H.byOrigin.upload?.count??0,size:I(H.byOrigin.upload?.bytes??0)})}),(0,V.jsx)(`li`,{children:s({count:H.byOrigin.unregistered?.count??0,size:I(H.byOrigin.unregistered?.bytes??0)})})]}),H.importing>0?(0,V.jsx)(`p`,{children:h({count:H.importing})}):null,H.mirrorMissing>0?(0,V.jsx)(`p`,{className:`text-destructive`,children:w({count:H.mirrorMissing})}):null,L.applyBlock===`expired`?(0,V.jsx)(`p`,{children:i()}):null]}),L.lastApply===null?null:(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:L.lastApply.status===`refused`?C({date:M(L.lastApply.finishedAt??L.lastApply.startedAt)}):D({date:M(L.lastApply.finishedAt??L.lastApply.startedAt),count:L.lastApply.deleted.count,size:I(L.lastApply.deleted.bytes)})})]})}function U(){let{results:e,status:t,loadMore:n}=O(S.trash.adminListTrash,{},{initialNumItems:50}),r=F(),i=_(S.trash.adminRestoreChat),a=_(S.trash.adminPurgeChat);return(0,V.jsxs)(`div`,{className:`oc-trash__body`,children:[(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:u({days:r})}),t===`LoadingFirstPage`?(0,V.jsx)(`p`,{className:`oc-trash__hint`,children:E()}):e.length===0?(0,V.jsx)(`p`,{className:`oc-trash__empty`,children:l()}):(0,V.jsx)(L,{items:e,onRestore:e=>i({chatId:e}),onPurge:e=>a({chatId:e})}),(0,V.jsx)(I,{status:t,loadMore:n}),(0,V.jsx)(H,{})]})}export{U as TrashTab};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$I as r,AI as i,BA as a,BI as o,FA as s,FI as c,GI as l,HA as u,HI as d,IA as f,II as p,JI as m,KI as ee,LA as h,LI as te,MA as g,MI as ne,NA as _,NI as re,PA as v,PI as ie,QI as ae,Qb as y,RA as b,RI as oe,UA as x,UI as se,VA as S,VI as ce,WI as le,XI as ue,XX as C,Xb as w,YI as de,YX as T,ZI as fe,Zb as E,eL as pe,jA as D,jI as me,kI as he,nL as O,qI as ge,rL as k,t as A,tL as j,uI as _e,zA as M,zI as ve}from"./api-DSJJn0d7.js";import{n as ye,t as be}from"./useNavigate-D3GIoxyW.js";import{c as N,i as P,n as F,r as xe,t as Se}from"./dropdown-menu-DHMOOlaP.js";import{t as I}from"./checkbox-CsI4ggnp.js";import{t as L}from"./server-DLnWqkX-.js";import{t as R}from"./star-CM6J2w_J.js";import{a as z,i as B,n as V,r as H,t as U}from"./select-qM3ZfTHx.js";import{t as W}from"./button-Dio0PVrp.js";import"./convexApi-CyScjgcq.js";import{r as G}from"./toast-xNFwDnUy.js";import{t as K}from"./badge-C4po8DQ1.js";import{a as Ce,n as we,o as Te,r as Ee,t as De}from"./dialog-BfrsWZiD.js";import{t as Oe}from"./appHost-CH3EGcJw.js";import{n as ke,r as Ae}from"./ConfirmDialog-BXcki0Ee.js";import{a as q}from"./groupManageView-BMBqgRhV.js";import{a as je,o as J,t as Y}from"./AdminSettings-B8n1yLsD.js";import{t as Me}from"./FilterBar-DTVwlDpF.js";import{t as Ne}from"./DataTableShell-DRFFBx_j.js";import{t as Pe}from"./DetailChips-Cv1sxdhU.js";var X=t(e(),1),Z=n();function Fe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=C(A.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=C(A.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,d=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),p=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).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}))],m=new Map;for(let e of p){let t=m.get(e.instanceName)??[];t.push(e),m.set(e.instanceName,t)}return(0,Z.jsx)(De,{open:n,onOpenChange:r,children:(0,Z.jsxs)(we,{className:`oc-access`,children:[(0,Z.jsxs)(Ce,{children:[(0,Z.jsx)(Te,{children:x({user:t})}),(0,Z.jsx)(Ee,{children:u()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?S():a()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:M()}):p.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:f()}):[...m.entries()].map(([t,n])=>(0,Z.jsx)(Ie,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function Ie({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=T(A.agents.assignAgent),c=T(A.agents.removeAgent),l=T(A.agents.setDefaultAgent),u=G();if(!e)return null;async function d(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(b(),q(e))}}async function f(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(h(),q(e))}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(L,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,c=e.state===`deleted`,l=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${l?` is-disabled`:``}`,children:[(0,Z.jsx)(I,{checked:r,disabled:(c||l)&&!r,onCheckedChange:()=>void d(e.agentId,r),"aria-label":s({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,c?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:v()}):null,e.outOfPool?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:_()}):null,r?o?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":g(),title:g(),children:(0,Z.jsx)(R,{size:14,fill:`currentColor`})}):(0,Z.jsx)(W,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":D(),title:D(),disabled:l,onClick:()=>void f(e.agentId),children:(0,Z.jsx)(R,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return w();case`user`:return E();case`admin`:return y();default:return e}}function Le({granted:e,onToggle:t}){let n=new Set(e),r=Y.filter(e=>n.has(J[e])).length;return(0,Z.jsxs)(Se,{children:[(0,Z.jsx)(N,{asChild:!0,children:(0,Z.jsx)(W,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?k():O({count:r})})}),(0,Z.jsxs)(F,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(P,{children:j()}),Y.map(e=>{let r=J[e];return(0,Z.jsxs)(xe,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(I,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:je[e]()})]},e)})]})]})}function Re(){let e=ye({from:`/settings/users`}),t=be({from:`/settings/users`}),n=e.q??``,a=e.role??Q,s=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),u=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),f=C(A.admin.listUsers,{filter:{q:n||void 0,role:a===Q?void 0:a},withAgents:!0}),h=C(A.me.getMe,{host:Oe}),g=T(A.admin.setRole),_=T(A.admin.setUserPermissions),v=T(A.admin.startImpersonation),y=T(A.admin.deleteUser),b=T(A.admin.setUserName),x=ke(),S=Ae(),w=G(),[E,D]=(0,X.useState)(null),O=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of f??[])e.add(t.role);return[...e]},[f]),k=n!==``||a!==Q;function j(){t({search:{},replace:!0})}async function M(e){try{await g(e)}catch(e){w.error(pe(),e)}}async function N(e){try{await _(e)}catch(e){w.error(r(),e)}}async function P(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await x({title:ee(),description:l({user:t}),confirmWord:le(),confirmLabel:se(),destructive:!0}))try{await y({profileId:e._id}),w.success(ce({user:t}))}catch(e){w.error(d(),e)}}async function F(e){let t=e.email||e.name||e.userId.slice(0,8),n=await S({title:ve(),label:oe({user:t}),placeholder:te(),defaultValue:e.name??``,confirmLabel:_e()});if(n!==null)try{await b({profileId:e._id,name:n}),w.success(p())}catch(e){w.error(c(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Me,{q:n,onQChange:s,searchPlaceholder:ae(),onReset:j,canReset:k,children:(0,Z.jsxs)(U,{value:a,onValueChange:u,children:[(0,Z.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(z,{})}),(0,Z.jsxs)(V,{children:[(0,Z.jsx)(H,{value:Q,children:fe()}),O.map(e=>(0,Z.jsx)(H,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Ne,{title:ue(),rows:f,emptyHint:de(),rowActions:e=>{let t=[{label:he(),onSelect:()=>D({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:o(),onSelect:()=>void F(e)}];return e.userId!==h?.userId&&t.push({label:m(),onSelect:()=>void v({profileId:e._id})},{label:ge(),variant:`destructive`,onSelect:()=>void P(e)}),t},columns:[{header:ie(),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:re(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(U,{value:e.role,onValueChange:t=>void M({profileId:e._id,role:t}),children:[(0,Z.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(z,{})}),(0,Z.jsxs)(V,{children:[(0,Z.jsx)(H,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(H,{value:`user`,children:$(`user`)}),(0,Z.jsx)(H,{value:`admin`,children:$(`admin`)})]})]})},{header:ne(),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:me()}):(0,Z.jsx)(Le,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),N({profileId:e._id,permissions:[...n]})}})},{header:i(),cell:e=>(0,Z.jsx)(Pe,{icon:(0,Z.jsx)(L,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Fe,{profileId:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||D(null)}})]})}export{Re as UsersTab};
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$l as r,Ac as i,BX as a,Fc as o,Gc as s,Gl as c,HX as ee,Hc as l,Hl as u,Ic as d,Jl as f,Kl as p,Lc as m,M_ as h,Mc as te,Nc as g,P_ as ne,Qc as _,Ql as v,Rc as y,Uc as re,Ul as ie,Vc as ae,Vl as oe,Wc as se,Wl as b,XX as x,Xl as ce,YX as S,Yl as le,Zl as ue,au as C,cu as de,du as w,eu as T,iu as fe,jc as pe,lu as me,nu as he,ou as E,qX as ge,ql as D,ru as O,ry as k,sR as A,su as j,t as M,tu as N,uu as P,vc as F}from"./api-DSJJn0d7.js";import{n as I,t as L}from"./useNavigate-D3GIoxyW.js";import{d as _e,f as ve,i as ye,l as R,n as be,o as z,r as xe,s as B,t as Se,u as Ce}from"./speech-CrNma2Ue.js";import{t as V}from"./checkbox-CsI4ggnp.js";import{a as H,i as U,n as W,r as G,t as K}from"./select-qM3ZfTHx.js";import{i as q,n as J,r as we,t as Te}from"./tabs-mZfLmn2f.js";import{t as Y}from"./button-Dio0PVrp.js";import"./convexApi-CyScjgcq.js";import{t as X}from"./badge-C4po8DQ1.js";import{t as Ee}from"./appHost-CH3EGcJw.js";/* empty css */var Z=t(e(),1),Q=n(),De=[[`auto`,()=>fe()],[`fr-FR`,()=>s()],[`en-US`,()=>se()],[`en-GB`,()=>re()],[`de-DE`,()=>l()],[`es-ES`,()=>ae()]],Oe=[[`0.75`,()=>he()],[`1`,()=>N()],[`1.25`,()=>T()],[`1.5`,()=>r()]],$=0;function ke({instance:e}){let t=S(M.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[a,o]=(0,Z.useState)(r),[s,c]=(0,Z.useState)(`idle`),[l,u]=(0,Z.useState)(!1),[d,p]=(0,Z.useState)(!1),m=ge(M.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{o({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),c(`idle`)},[e._id]);let _=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function y(){c(`saving`);try{let n={...e.config??{}};n.voiceEnabled=a.enabled,a.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,a.lang===`auto`?delete n.voiceLang:n.voiceLang=a.lang;let r=Number.parseFloat(a.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,a.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),c(`idle`)}catch{c(`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)(X,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(V,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":E()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:E()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:g()}),(0,Q.jsxs)(K,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(U,{size:`sm`,"aria-label":g(),children:(0,Q.jsx)(H,{})}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(G,{value:`browser`,children:te()}),e.kind===`hermes`?null:(0,Q.jsx)(G,{value:`gateway`,children:pe()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:i()}):null,a.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:C()}),(0,Q.jsxs)(K,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(U,{size:`sm`,"aria-label":C(),children:(0,Q.jsx)(H,{})}),(0,Q.jsx)(W,{children:De.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:O()}),(0,Q.jsxs)(K,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(U,{size:`sm`,"aria-label":O(),children:(0,Q.jsx)(H,{})}),(0,Q.jsx)(W,{children:Oe.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),a.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(V,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":v()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:v()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ue()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(Y,{size:`sm`,disabled:!_||s===`saving`,onClick:()=>void y(),children:s===`saving`?k():ne()}),(0,Q.jsx)(Y,{variant:`outline`,size:`sm`,disabled:!a.enabled||l,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(p(!1),B(),z(),a.engine!==`gateway`){ye(f(),{lang:xe(a.lang,ee()),rate:t});return}u(!0),m({instanceName:e.name,text:f()}).then(({mime:e,audioBase64:r})=>{n===$&&be(r,e,{rate:t})}).catch(()=>{n===$&&p(!0)}).finally(()=>u(!1))},children:l?k():ce()}),(0,Q.jsx)(Y,{variant:`ghost`,size:`sm`,onClick:()=>{$++,u(!1),B(),z()},children:le()})]}),s===`error`||d?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:d?F():h()}):null]})}function Ae({stt:e}){let t=x(M.me.getMe,{host:Ee}),n=S(M.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:p()}),(0,Q.jsx)(X,{variant:e?`secondary`:`outline`,children:e?u():oe()}),(0,Q.jsx)(X,{variant:r?`secondary`:`destructive`,children:r?m():d()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(V,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":y()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:y()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:c()})]})}function je(){let e=x(M.admin.listInstances,{}),t=(0,Z.useMemo)(()=>R(),[]),n=(0,Z.useMemo)(()=>Se(),[]),{section:r}=I({from:`/settings/voice`}),i=L({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:w()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(X,{variant:t?`secondary`:`destructive`,children:t?P():me()}),(0,Q.jsx)(X,{variant:n?`secondary`:`destructive`,children:n?de():j()})]}),(0,Q.jsxs)(Te,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(we,{className:`w-full`,children:[(0,Q.jsxs)(q,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ce,{size:13,"aria-hidden":!0}),o()]}),(0,Q.jsxs)(q,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(_e,{size:13,"aria-hidden":!0}),p()]}),(0,Q.jsxs)(q,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(ve,{size:13,"aria-hidden":!0}),b()]})]}),(0,Q.jsx)(J,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:a()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:D()}):e.map(e=>(0,Q.jsx)(ke,{instance:e},e._id))}),(0,Q.jsx)(J,{value:`dictation`,children:(0,Q.jsx)(Ae,{stt:n})}),(0,Q.jsxs)(J,{value:`talk`,children:[(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsx)(`header`,{className:`oc-voice__cardhead`,children:(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:b()})}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ie()})]}),e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:a()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:D()}):e.map(e=>(0,Q.jsx)(Me,{instance:e},e._id))]})]})]})}function Me({instance:e}){let t=S(M.admin.upsertInstanceConfig),n=e.config??{},r=n.talkEnabled===!0,i=e.kind===`hermes`;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)(X,{variant:`secondary`,children:i?`Hermes`:`OpenClaw`})]}),i?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:_()}):(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(V,{checked:r,onCheckedChange:r=>{let i={...n};r===!0?i.talkEnabled=!0:delete i.talkEnabled,t({instanceId:e._id,config:i})},"aria-label":A()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:A()})]})]})}export{je as VoiceTab};
@@ -1 +0,0 @@
1
- var e=new Set([`knobThinkingLevel`,`knobModel`,`knobFastMode`,`knobUnset`,`agentFiles`,`sessionCompact`,`configDefaults`,`subagents`,`inboundAttachments`,`talk`,`cronList`,`cronManage`,`permissionModes`,`knowledgePolicy`,`inlineWidgets`,`followUpModes`,`discardPendingInput`]),t=new Set([`knobThinkingLevel`,`knobModel`]);function n(n,r){return e.has(r)?n==null?t.has(r):n[r]===!0:!1}function r(e,t){return{model:e(`knobModel`)&&t.hasModels,thinking:e(`knobThinkingLevel`)&&t.hasLevels,speed:e(`knobFastMode`),reset:e(`knobUnset`)}}function i(e,t){return e===void 0?`loading`:e===null?{blocked:!n(null,t),gatewayVersion:null,provider:null}:{blocked:!n(e.capabilities,t),gatewayVersion:e.gatewayVersion,provider:e.provider}}export{i as n,r,n as t};
@@ -1 +0,0 @@
1
- import{E as e}from"./api-DSJJn0d7.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
@@ -1 +0,0 @@
1
- import{E as e}from"./api-DSJJn0d7.js";var t=e(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]);export{t};
@@ -1 +0,0 @@
1
- import{E as e}from"./api-DSJJn0d7.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
@@ -1 +0,0 @@
1
- import{E as e}from"./api-DSJJn0d7.js";var t=e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);export{t};
@@ -1 +0,0 @@
1
- import{E as e}from"./api-DSJJn0d7.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
- .oc-afiles{flex-direction:column;gap:.75rem;display:flex}.oc-afiles__picker{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.oc-afiles__list{border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;display:flex;overflow:hidden}.oc-afiles__row{border-bottom:1px solid var(--border);align-items:center;gap:.75rem;padding:.5rem .75rem;font-size:.85rem;display:flex}.oc-afiles__row:last-child{border-bottom:none}.oc-afiles__name{text-overflow:ellipsis;white-space:nowrap;flex:0 0 10rem;font-weight:500;overflow:hidden}.oc-afiles__size{text-align:right;color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex:0 0 4.5rem}.oc-afiles__gauge{background:var(--muted);border-radius:999px;flex:6rem;height:.375rem;overflow:hidden}.oc-afiles__gauge-fill{border-radius:inherit;background:var(--primary);height:100%;display:block}.oc-afiles__gauge.is-warn .oc-afiles__gauge-fill{background:var(--destructive)}.oc-afiles__pct{text-align:right;color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex:0 0 3rem}.oc-afiles__warn{color:var(--destructive);flex:none}.oc-afiles__warn-slot{flex:none;width:14px}.oc-afiles__open{margin-left:auto}.oc-afiles__budget{color:var(--muted-foreground);font-size:.8rem}.oc-afiles__error,.oc-cdefaults__error{color:var(--destructive);align-items:center;gap:.5rem;font-size:.85rem;display:flex}[data-slot=dialog-content].oc-afiles__editor{flex-direction:column;width:calc(100vw - 2rem);max-width:72rem;height:calc(100vh - 2rem);max-height:none;display:flex}.oc-afiles__source{resize:none;min-height:0;font-family:var(--font-mono,ui-monospace, monospace);border:1px solid var(--border);border-radius:var(--radius);background:var(--background);color:var(--foreground);flex:auto;padding:.75rem;font-size:.8rem;line-height:1.5}.oc-afiles__source:focus-visible{outline:2px solid var(--ring);outline-offset:-1px}.oc-afiles__hint{color:var(--muted-foreground);font-size:.75rem}.oc-afiles__editor-foot{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.oc-afiles__count{color:var(--muted-foreground);font-variant-numeric:tabular-nums;font-size:.8rem}.oc-afiles__count.is-over{color:var(--destructive);font-weight:600}.oc-afiles__diff{flex-direction:column;gap:.5rem;max-height:14rem;display:flex;overflow-y:auto}.oc-afiles__diff-counts{font-size:.85rem;font-weight:500}.oc-afiles__diff-block{flex-direction:column;gap:.125rem;display:flex}.oc-afiles__diff-label{color:var(--muted-foreground);font-size:.75rem}.oc-afiles__diff-line{border-radius:calc(var(--radius) / 2);white-space:pre-wrap;word-break:break-word;padding:.125rem .375rem;font-size:.75rem}.oc-afiles__diff-line.is-add{background:color-mix(in oklab, var(--primary) 12%, transparent)}.oc-afiles__diff-line.is-del{background:color-mix(in oklab, var(--destructive) 12%, transparent);text-decoration:line-through}.oc-cdefaults{flex-direction:column;gap:.75rem;max-width:36rem;display:flex}.oc-cdefaults__row{border-bottom:1px solid var(--border);flex-direction:column;gap:.375rem;padding:.625rem 0;display:flex}.oc-cdefaults__label{font-size:.85rem;font-weight:500}.oc-cdefaults__help,.oc-cdefaults__note{color:var(--muted-foreground);margin:0;font-size:.75rem}.oc-cdefaults__actions{justify-content:flex-end;display:flex}.oc-voice__support{flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;display:flex}.oc-voice__card{border:1px solid var(--border);border-radius:var(--radius);background:var(--card);flex-direction:column;gap:.6rem;margin-bottom:.9rem;padding:.9rem 1rem;display:flex}.oc-voice__cardhead{align-items:center;gap:.6rem;display:flex}.oc-voice__instance{font-weight:600}.oc-voice__row{align-items:center;gap:.75rem;display:flex}.oc-voice__row .oc-cdefaults__label{min-width:10rem}.oc-cronactions{gap:2px;display:inline-flex}.oc-cronactions button{color:var(--muted-foreground);transition:background .14s,color .14s}.oc-cronactions button:hover:not(:disabled){background:color-mix(in srgb, var(--voice) 16%, transparent);color:color-mix(in srgb, var(--voice) 55%, var(--foreground))}.oc-cronactions button:last-child:hover:not(:disabled){background:color-mix(in srgb, var(--destructive) 14%, transparent);color:var(--destructive)}@media (prefers-reduced-motion:reduce){.oc-cronactions button{transition:none}}.oc-cronedit .oc-cronedit__textarea,.oc-cronedit input,.oc-cronedit [data-slot=select-trigger],.oc-tzcombo__trigger,.oc-dtp__trigger{border-color:color-mix(in srgb, var(--voice) 22%, var(--border))}.oc-cronedit input:focus-visible,.oc-cronedit .oc-cronedit__textarea:focus-visible,.oc-tzcombo__search:focus-visible{border-color:color-mix(in srgb, var(--voice) 55%, var(--border));box-shadow:0 0 0 3px color-mix(in srgb, var(--voice) 22%, transparent);outline:none}.oc-tzcombo__trigger{border:1px solid var(--border);background:var(--background);min-width:140px;height:2.25rem;color:var(--foreground);cursor:pointer;border-radius:.6rem;flex:0 200px;justify-content:space-between;align-items:center;gap:.4rem;padding:0 .6rem;font-size:.85rem;display:inline-flex}.oc-tzcombo__value{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.oc-tzcombo__chev{color:var(--muted-foreground);flex:none}.oc-tzcombo__pop{width:min(300px, var(--radix-popover-content-available-width,300px));max-height:min(340px, var(--radix-popover-content-available-height,340px));flex-direction:column;display:flex}.oc-tzcombo__search{flex:none;width:calc(100% - .8rem);margin:.4rem}.oc-tzcombo__list{flex:auto;min-height:0;padding:0 .25rem .35rem;overflow-y:auto}.oc-tzcombo__opt{width:100%;color:var(--foreground);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:.45rem;align-items:center;gap:.4rem;padding:.35rem .45rem;font-size:.82rem;display:flex}.oc-tzcombo__opt:hover,.oc-tzcombo__opt[aria-selected=true]{background:color-mix(in srgb, var(--voice) 14%, transparent)}.oc-tzcombo__check{color:var(--voice);flex:none}.oc-tzcombo__empty{color:var(--muted-foreground);padding:.5rem;font-size:.82rem}.oc-dtp__trigger{border:1px solid var(--border);background:var(--background);width:100%;height:2.25rem;color:var(--foreground);cursor:pointer;border-radius:.6rem;align-items:center;gap:.45rem;padding:0 .7rem;font-size:.85rem;display:inline-flex}.oc-dtp__icon,.oc-dtp__placeholder{color:var(--muted-foreground)}.oc-dtp__pop{width:300px}.oc-dtp__head{justify-content:space-between;align-items:center;margin-bottom:.5rem;display:flex}.oc-dtp__month{text-transform:capitalize;font-size:.85rem;font-weight:600}.oc-dtp__nav{width:26px;height:26px;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:.45rem;justify-content:center;align-items:center;display:inline-flex}.oc-dtp__nav:hover{background:color-mix(in srgb, var(--voice) 14%, transparent);color:var(--foreground)}.oc-dtp__grid{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.oc-dtp__wd{text-align:center;color:var(--muted-foreground);padding-bottom:.2rem;font-size:.68rem;font-weight:600}.oc-dtp__day{height:2rem;color:var(--foreground);cursor:pointer;background:0 0;border:none;border-radius:.45rem;font-size:.8rem}.oc-dtp__day:hover{background:color-mix(in srgb, var(--voice) 14%, transparent)}.oc-dtp__day--out{color:var(--muted-foreground);opacity:.5}.oc-dtp__day--today{box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--voice) 45%, var(--border))}.oc-dtp__day--sel{background:var(--voice);color:var(--voice-foreground,white);font-weight:600}.oc-dtp__day--sel:hover{background:color-mix(in srgb, var(--voice) 85%, black)}.oc-dtp__time{border-top:1px solid var(--border);align-items:center;gap:.35rem;margin-top:.6rem;padding-top:.6rem;display:flex}.oc-dtp__time [data-slot=select-trigger]{width:4.5rem}.oc-dtp__colon{color:var(--muted-foreground);font-weight:700}.oc-dtp__timeopts{max-height:220px}.oc-sched__viewtoggle{border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);flex:none;gap:2px;padding:2px;display:inline-flex}.oc-cal{flex-direction:column;gap:10px;display:flex}.oc-cal__head{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.oc-cal__nav{align-items:center;gap:2px;display:inline-flex}.oc-cal__title{text-align:center;text-transform:capitalize;flex:1;min-width:0;font-size:.95rem;font-weight:600}.oc-cal__modes{border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);gap:2px;padding:2px;display:inline-flex}.oc-cal__footnote{color:var(--muted-foreground);margin:0;font-size:.75rem}.oc-cal__month{border:1px solid var(--border);border-radius:var(--radius);background:var(--border);grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.oc-cal__wd{background:var(--card);text-transform:uppercase;color:var(--muted-foreground);text-align:center;padding:4px 6px;font-size:.68rem;font-weight:600}.oc-cal__day{background:var(--background);flex-direction:column;gap:2px;min-width:0;min-height:84px;padding:4px;display:flex}.oc-cal__day--out{opacity:.45}.oc-cal__day--today .oc-cal__daynum{background:color-mix(in srgb, var(--voice) 80%, var(--foreground));color:var(--background)}.oc-cal__daynum{color:var(--muted-foreground);border-radius:999px;justify-content:center;align-self:flex-start;align-items:center;min-width:18px;height:18px;padding:0 4px;font-size:.72rem;font-weight:600;display:inline-flex}.oc-cal__event{background:color-mix(in srgb, var(--cal-ev,var(--voice)) 12%, transparent);width:100%;min-width:0;color:var(--foreground);cursor:pointer;text-align:left;border:none;border-radius:5px;align-items:center;gap:4px;padding:1px 4px;font-size:.7rem;display:flex}.oc-cal__event:hover{background:color-mix(in srgb, var(--cal-ev,var(--voice)) 22%, transparent)}.oc-cal__event--muted{opacity:.55}.oc-cal__evdot{border:1.5px solid color-mix(in srgb, var(--cal-ev,var(--voice)) 80%, var(--foreground));background:0 0;border-radius:999px;flex:none;width:6px;height:6px}.oc-cal__event--exact .oc-cal__evdot{background:color-mix(in srgb, var(--cal-ev,var(--voice)) 80%, var(--foreground))}.oc-cal__evtime{font-variant-numeric:tabular-nums;color:var(--muted-foreground);flex:none}.oc-cal__evtitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.oc-cal__more{color:var(--muted-foreground);padding-left:4px;font-size:.68rem}.oc-cal__year{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;display:grid}.oc-cal__mini{border:1px solid var(--border);border-radius:var(--radius);background:var(--card);cursor:pointer;text-align:left;flex-direction:column;gap:6px;padding:8px;transition:border-color .14s,background .14s;display:flex}.oc-cal__mini:hover{border-color:color-mix(in srgb, var(--voice) 35%, var(--border));background:color-mix(in srgb, var(--voice) 6%, var(--card))}@media (prefers-reduced-motion:reduce){.oc-cal__mini{transition:none}}.oc-cal__mininame{text-transform:capitalize;color:var(--foreground);font-size:.78rem;font-weight:600}.oc-cal__minigrid{grid-template-columns:repeat(7,1fr);gap:3px;display:grid}.oc-cal__minidot{background:color-mix(in srgb, var(--muted-foreground) 18%, transparent);border-radius:999px;justify-self:center;width:7px;height:7px}.oc-cal__minidot.is-out{background:0 0}.oc-cal__minidot.has-one{background:color-mix(in srgb, var(--voice) 55%, transparent)}.oc-cal__minidot.has-many{background:color-mix(in srgb, var(--voice) 90%, var(--foreground))}.oc-cal__minidot.is-today{outline:1.5px solid color-mix(in srgb, var(--voice) 80%, var(--foreground));outline-offset:1px}
@@ -1 +0,0 @@
1
- import"./api-DSJJn0d7.js";
@@ -1 +0,0 @@
1
- import{$S as e,BS as t,GS as n,HS as ee,IS as r,JS as i,KS as a,LS as o,Ms as s,QS as c,Qa as l,RS as u,SC as d,US as f,VS as p,WS as m,XS as h,YS as g,ZS as _,Za as v,_C as y,aC as b,bC as x,cC as S,co as C,dC as w,do as T,eC as E,eo as te,fC as D,fo as O,gC as k,hC as A,iC as j,io as M,js as N,lC as P,lo as F,mC as I,mo as L,nC as R,oC as z,pC as B,po as V,qS as H,rC as U,ro as W,sC as G,so as K,tC as q,to as J,uC as Y,uo as X,vC as Z,xC as Q,yC as ne,zS as re}from"./api-DSJJn0d7.js";var $={AGENT_NOT_FOUND:()=>({label:d(),hint:Q()}),AUTH_TOKEN_MISMATCH:()=>({label:x(),hint:ne()}),DEVICE_SIGNING_FAILED:()=>({label:Z(),hint:y()}),SESSION_SCOPE_DENIED:()=>({label:k(),hint:A()}),GATEWAY_TIMEOUT:()=>({label:I(),hint:B()}),GATEWAY_DISCONNECTED:()=>({label:D(),hint:w()}),GATEWAY_RESTARTING:()=>({label:Y(),hint:P()}),CONNECTION_SATURATED:()=>({label:S(),hint:G()}),DISPATCH_STALLED:()=>({label:s(),hint:N()}),ATTACHMENT_TOO_LARGE:()=>({label:j(),hint:U()}),ATTACHMENT_REJECTED:()=>({label:R(),hint:q()}),BRIDGE_UNREACHABLE:()=>({label:z(),hint:b()}),INVALID_REQUEST:()=>({label:E(),hint:e()}),chat_request_conflict:()=>({label:c(),hint:_()}),NOT_CONFIGURED:()=>({label:h(),hint:g()}),UNROUTED:()=>({label:i(),hint:H()}),message_too_large:()=>({label:l(),hint:v()}),gateway_media_unavailable:()=>({label:X(),hint:F()}),subagent_reply_pending:()=>({label:J(),hint:te()}),attachment_name_too_long:()=>({label:M(),hint:W()}),attachment_path_refused:()=>({label:L(),hint:V()}),attachment_staging_failed:()=>({label:O(),hint:T()}),attachment_cleanup_unconfirmed:()=>({label:C(),hint:K()}),provider_auth_revoked:e=>({label:m(),hint:f({agentId:e.agentId??`<agentId>`,provider:e.provider??`<provider>`})}),provider_permission_denied:e=>({label:ee(),hint:p({agentId:e.agentId??`<agentId>`,provider:e.provider??`<provider>`})}),provider_auth_failed:e=>({label:t(),hint:re({agentId:e.agentId??`<agentId>`,provider:e.provider??`<provider>`})}),UPSTREAM_ERROR:()=>({label:a(),hint:n()}),UNKNOWN:()=>({label:u(),hint:o()})};function ie(e,t={}){return e?$[e]?.(t)??{label:e,hint:r()}:$.UNKNOWN(t)}export{ie as t};