@lacneu/atrium 0.17.0 → 0.18.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.
- package/dist/assets/AccessTab-TkrgrzLa.js +1 -0
- package/dist/assets/{AdvancedFilter-DCf2LyZV.js → AdvancedFilter-CxFcwq_P.js} +1 -1
- package/dist/assets/AgentFilesTab-CatKzUVP.js +3 -0
- package/dist/assets/AnomaliesTab-DSRyvaxR.js +1 -0
- package/dist/assets/{AuditTab-rkbk0LN7.js → AuditTab-C5iOM0e2.js} +1 -1
- package/dist/assets/BridgeTab-B7qr2P6q.js +1 -0
- package/dist/assets/ChatDefaultsTab-iOv_x32i.js +1 -0
- package/dist/assets/{DataTableShell-DZ-SHPgB.js → DataTableShell-DQ-E7MMz.js} +1 -1
- package/dist/assets/{DetailChips-DsV2pOpk.js → DetailChips-DLGo-JpY.js} +1 -1
- package/dist/assets/FeedbacksTab-CvsErlG2.js +1 -0
- package/dist/assets/{FieldLabel-CViQ_orB.js → FieldLabel-D8ek_B4M.js} +1 -1
- package/dist/assets/FilesTab-B33o68UO.js +1 -0
- package/dist/assets/{FilterBar-BHeRG2h_.js → FilterBar-C2YZIUUe.js} +1 -1
- package/dist/assets/GroupsTab-CdvzID07.js +1 -0
- package/dist/assets/InstancesTab-CGkYjfNo.js +1 -0
- package/dist/assets/IntegrationsTab-CQpiJULa.js +1 -0
- package/dist/assets/{KpiTab-J64rks81.js → KpiTab-BSPnCroi.js} +1 -1
- package/dist/assets/PreferencesTab-C7qcojIg.js +1 -0
- package/dist/assets/PromptInjectionsTab-CogXAvHV.js +2 -0
- package/dist/assets/RolesTab--gHOFpff.js +1 -0
- package/dist/assets/ServiceAccountsTab-Cp2DaUB7.js +1 -0
- package/dist/assets/SubAgentReportsTab-UtnXHw5b.js +1 -0
- package/dist/assets/ThemeShowroom-cqNDsPWJ.js +1 -0
- package/dist/assets/{TimeRangePicker-CE9ZtSJB.js → TimeRangePicker-BrRrLGuZ.js} +1 -1
- package/dist/assets/TracesTab-nnYTuzmk.js +1 -0
- package/dist/assets/UsersTab-C0cFq4Am.js +1 -0
- package/dist/assets/button-C-Nb2Vgm.js +1 -0
- package/dist/assets/{card-9-MMSY9k.js → card-DfgoJ62e.js} +1 -1
- package/dist/assets/chevrons-up-down-BX1oFIbx.js +1 -0
- package/dist/assets/{compatView-B6JFLIFa.js → compatView-DkKdPV6Y.js} +1 -1
- package/dist/assets/dispatchErrorInfo-B5yYJpqG.js +1 -0
- package/dist/assets/dist-BUmwZkrg.js +5 -0
- package/dist/assets/dist-dqCqhBJa.js +44 -0
- package/dist/assets/{dist-CS7nJlvC.js → dist-nuTFLy00.js} +1 -1
- package/dist/assets/dist-uaKglBXL.js +1 -0
- package/dist/assets/{highlighted-body-OFNGDK62-DB9WgLl6.js → highlighted-body-OFNGDK62-CFixeKPt.js} +1 -1
- package/dist/assets/index-Chpx7q4s.js +227 -0
- package/dist/assets/mermaid-GHXKKRXX-l2fnQUrB.js +1 -0
- package/dist/assets/roleDescriptions-BAcwraVL.js +1 -0
- package/dist/assets/{table-B34f3Klh.js → table-DwL2Ye60.js} +1 -1
- package/dist/assets/{tabs-BliLi2ac.js → tabs-B6uAHd27.js} +1 -1
- package/dist/assets/x-BK7YTQm6.js +1 -0
- package/dist/index.html +7 -7
- package/package.json +1 -1
- package/dist/assets/AccessTab-Cu7T4bOw.js +0 -1
- package/dist/assets/AgentFilesTab-inRb2Jsz.js +0 -3
- package/dist/assets/AnomaliesTab-SnbLGhTC.js +0 -1
- package/dist/assets/BridgeTab-hatWqupL.js +0 -1
- package/dist/assets/ChatDefaultsTab-C0k3Gv6Q.js +0 -1
- package/dist/assets/FeedbacksTab-GrdACZMD.js +0 -1
- package/dist/assets/FilesTab-C69xSAc-.js +0 -1
- package/dist/assets/GroupsTab-DmGfQ46W.js +0 -1
- package/dist/assets/InstancesTab-CuuqllLK.js +0 -1
- package/dist/assets/IntegrationsTab-xeD-lE9t.js +0 -1
- package/dist/assets/PreferencesTab-Cyot60gb.js +0 -1
- package/dist/assets/PromptInjectionsTab-D4mdSgd0.js +0 -2
- package/dist/assets/RolesTab-95KPXgZ6.js +0 -1
- package/dist/assets/ServiceAccountsTab-KeF2bwOL.js +0 -1
- package/dist/assets/SubAgentReportsTab-DcOJ_YAY.js +0 -1
- package/dist/assets/ThemeShowroom-BN8Ba_qV.js +0 -1
- package/dist/assets/TracesTab-BBJSnCzn.js +0 -1
- package/dist/assets/UsersTab-WHMYTXGC.js +0 -1
- package/dist/assets/button-BEV3ua5Q.js +0 -1
- package/dist/assets/chevrons-up-down-fiDUJkHc.js +0 -1
- package/dist/assets/dispatchErrorInfo-DewOwv3Y.js +0 -1
- package/dist/assets/dist-CpYevWu9.js +0 -5
- package/dist/assets/dist-DaCTW3Ac.js +0 -44
- package/dist/assets/dist-jSH66_ji.js +0 -1
- package/dist/assets/index-D4GXPU2x.js +0 -227
- package/dist/assets/mermaid-GHXKKRXX-DlOslc7G.js +0 -1
- package/dist/assets/roleDescriptions-DWfpUHJS.js +0 -1
- package/dist/assets/x-CE-91um7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$d as r,$y as i,Ay as a,Cf as o,Cy as s,Df as c,Dy as l,Ef as u,Ey as d,Fy as f,Gd as p,Gy as m,Hy as h,Iy as g,Jd as _,Jy as v,Kd as y,Ky as b,My as x,Ny as ee,Of as te,Oy as S,Py as C,Qd as ne,Qy as w,Sf as re,Sy as T,Tf as ie,Ty as E,Uy as ae,Vy as oe,Wy as D,Xd as se,Xy as O,Yd as ce,Yy as k,Zd as le,Zy as A,_D as j,_f as ue,ab as M,af as de,bf as fe,cb as pe,cf as me,dD as N,db as he,df as ge,eb as _e,ef as ve,fD as P,ff as ye,gf as be,hf as xe,ib as Se,if as Ce,jy as F,kf as we,ky as Te,lb as Ee,lf as De,mf as Oe,nb as ke,nf as Ae,ob as je,of as Me,pf as Ne,qd as Pe,qy as Fe,rb as Ie,rf as Le,sb as Re,sf as ze,tb as Be,tf as Ve,ub as He,uf as Ue,vD as I,vf as We,wf as Ge,wy as Ke,xf as qe,yf as Je}from"./dist-dqCqhBJa.js";import{n as Ye}from"./dist-nuTFLy00.js";import{t as Xe}from"./x-BK7YTQm6.js";import{i as L,n as R,r as Ze,t as Qe}from"./tabs-B6uAHd27.js";import{t as z}from"./button-C-Nb2Vgm.js";import{$ as $e,C as B,Ct as et,Dt as tt,Mt as nt,Q as rt,S as V,X as H,a as it,b as U,et as at,i as ot,jt as st,k as ct,nt as lt,o as ut,ot as dt,r as ft,rt as pt,wt as mt,x as W,y as G}from"./index-Chpx7q4s.js";import{n as K}from"./TimeRangePicker-BrRrLGuZ.js";import{t as q}from"./FilterBar-C2YZIUUe.js";import{t as ht}from"./AdvancedFilter-CxFcwq_P.js";import{t as gt}from"./DataTableShell-DQ-E7MMz.js";var _t=P(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),vt=P(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function yt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?b():n===`agent`?`${m()} - ${r}`:e}function bt(){let e=I(N.me.getMe,{host:dt})?.role===`admin`,t=I(N.deliveryTiming.getDeliveryStatus,{}),n=j(N.deliveryTiming.startDeliveryRecord),r=j(N.deliveryTiming.stopDeliveryRecord),[i,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(!1),c=t?.recording??!1,l=async()=>{s(!0);try{c?await r({}):await n({})}finally{s(!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:he()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:He()})]}),e?(0,Y.jsx)(z,{variant:c?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void l(),children:c?pe():Ee()}):null]}),c?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(H,{variant:`secondary`,children:Re()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:je({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?Ie():Se()})}),i?(0,Y.jsx)(xt,{isAdmin:e}):null]})}function xt({isAdmin:e}){let t=I(N.deliveryTiming.listDeliverySessions,{}),n=j(N.deliveryTiming.deleteDeliverySessions),[r,a]=(0,J.useState)(``),[o,c]=(0,J.useState)(`all`),[l,u]=(0,J.useState)(X),[d,f]=(0,J.useState)(null),{from:p,to:m}=K(l),g=l.to===`now`?1/0:m,_=r.trim()!==``||o!==`all`||l!==X,y=()=>{a(``),c(`all`),u(X)},b=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(o===`all`||(o===`active`?t.active:!t.active))&&t.startedAt>=p&&t.startedAt<=g).map(e=>({...e,_id:e.sessionId}))},[t,r,o,p,g]),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,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(q,{q:r,onQChange:a,searchPlaceholder:Be(),timeRange:l,onTimeRangeChange:u,onReset:y,canReset:_,children:(0,Y.jsxs)(G,{value:o,onValueChange:e=>c(e),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(B,{})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:`all`,children:_e()}),(0,Y.jsx)(W,{value:`active`,children:i()}),(0,Y.jsx)(W,{value:`stopped`,children:w()})]})]})}),(0,Y.jsx)(gt,{title:ke(),rows:b,emptyHint:s(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":d===e.sessionId?ae():D(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:d===e.sessionId?(0,Y.jsx)(_t,{size:15,"aria-hidden":!0}):(0,Y.jsx)(mt,{size:15,"aria-hidden":!0})})},{header:A(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.startedAt).toLocaleString()})},{header:O(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.stoppedAt).toLocaleString()})},{header:k(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:v(),sort:e=>e.startedBy,cell:e=>yt(e.startedBy)},{header:Fe(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(H,{variant:`secondary`,children:i()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:w()})}],rowActions:e?e=>[{label:h(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:h(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===d,renderExpanded:e=>(0,Y.jsx)(St,{sessionId:e.sessionId})})]})}function St({sessionId:e}){let t=I(N.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ct,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(ct(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ct({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:oe()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:M()});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,` `,T()]}),(0,Y.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ye,{size:13,"aria-hidden":!0}):(0,Y.jsx)(tt,{size:13,"aria-hidden":!0}),t?Ke():E()]})]}),(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:C()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:ee()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:x()})]})}),(0,Y.jsxs)(`tbody`,{children:[i(F(),r.bridge),i(a(),r.A),i(Te(),r.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:d()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:l()})]})}var wt=[50,100,200,500],Tt=`all`,Q=`__all__`,Et=[`2xx`,`4xx`,`5xx`],Dt=[`user`,`service`,`system`],Ot=[`inbound`,`outbound`,`internal`],kt={kind:`relative`,from:`now-30d`,to:`now`},At=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function jt(){let e=nt({from:`/settings/traces`}),t=st({from:`/settings/traces`}),n=e.limit,i=e.kind,a=e.statusClass??Q,s=e.principalType??Q,l=e.direction??Q,d=e.roleKey??Q,p=e.q??``,m=ft(e.from,e.to),h=(0,J.useMemo)(()=>ut(e.adv),[e.adv]),{from:v,to:y}=K(m),[b,x]=(0,J.useState)(null),[ee,S]=(0,J.useState)(null),C=e=>void t({search:t=>({...t,limit:e})}),w=e=>void t({search:t=>({...t,kind:e})}),T=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),E=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),ae=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),oe=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),D=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,...it(e)})}),k=e=>void t({search:t=>({...t,adv:ot(e)}),replace:!0}),A=I(N.observability.listEvents,{limit:n}),j=I(N.observability.listEvents,{limit:n,kind:i===Tt?void 0:i,filter:{q:p||void 0,from:v,to:y,statusClass:a===Q?void 0:a,principalType:s===Q?void 0:s,direction:l===Q?void 0:l,roleKey:d===Q?void 0:d,advanced:h.length>0?h:void 0}}),M=(0,J.useMemo)(()=>{let e=new Set;for(let t of A??[])e.add(t.kind);return[...e].sort()},[A]),pe=(0,J.useMemo)(()=>{let e=new Set;for(let t of A??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[A]),he=p!==``||a!==Q||s!==Q||l!==Q||d!==Q||h.length>0||m.kind!==`relative`||m.from!==kt.from;function _e(){t({search:{limit:100,kind:`all`},replace:!0})}let P=b?A?.filter(e=>e.correlationId===b):j,[Se,F]=(0,J.useState)(`events`);return(0,Y.jsxs)(Qe,{value:Se,onValueChange:e=>F(e),children:[(0,Y.jsxs)(Ze,{className:`w-full`,children:[(0,Y.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(et,{size:13,"aria-hidden":!0}),g()]}),(0,Y.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(vt,{size:13,"aria-hidden":!0}),f()]})]}),(0,Y.jsx)(R,{value:`latency`,children:(0,Y.jsx)(bt,{})}),(0,Y.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[we(),(0,Y.jsx)(`strong`,{children:te()}),c(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:u()})]}),(0,Y.jsxs)(q,{q:p,onQChange:T,searchPlaceholder:ie(),timeRange:m,onTimeRangeChange:O,onReset:_e,canReset:he,children:[(0,Y.jsxs)(G,{value:a,onValueChange:E,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(B,{placeholder:Ge()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:Q,children:o()}),Et.map(e=>(0,Y.jsx)(W,{value:e,children:e},e))]})]}),(0,Y.jsxs)(G,{value:s,onValueChange:ae,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(B,{placeholder:re()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:Q,children:qe()}),Dt.map(e=>(0,Y.jsx)(W,{value:e,children:e},e))]})]}),(0,Y.jsxs)(G,{value:l,onValueChange:oe,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(B,{placeholder:fe()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:Q,children:Je()}),Ot.map(e=>(0,Y.jsx)(W,{value:e,children:e},e))]})]}),(0,Y.jsxs)(G,{value:d,onValueChange:D,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(B,{placeholder:We()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:Q,children:ue()}),pe.map(e=>(0,Y.jsx)(W,{value:e,children:e},e))]})]}),(0,Y.jsxs)(G,{value:i,onValueChange:w,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(B,{placeholder:be()})}),(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{value:Tt,children:xe()}),M.map(e=>(0,Y.jsx)(W,{value:e,children:e},e))]})]}),(0,Y.jsxs)(G,{value:String(n),onValueChange:e=>C(Number(e)),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(B,{})}),(0,Y.jsx)(U,{children:wt.map(e=>(0,Y.jsx)(W,{value:String(e),children:Oe({count:e})},e))})]})]}),(0,Y.jsx)(ht,{fields:At,seed:h,onChange:k}),b?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>x(null),title:Ne(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ye(),(0,Y.jsx)(`code`,{children:$(b)})]}),(0,Y.jsx)(Xe,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ge()})]})}):null,(0,Y.jsx)(gt,{title:Ue(),rows:P,emptyHint:b?De():me(),columns:[{header:ze(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:Me(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(H,{variant:`secondary`,children:e.kind})},{header:de(),sort:e=>Nt(e)??null,cell:e=>{let t=Nt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":Ce(),children:`✓`})}},{header:Le(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(H,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ae(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(H,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:Ve(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(H,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ve(),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:r(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Mt(e.status)}`,children:e.status})},{header:ne(),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:le(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:se(),onClick:()=>x(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ce(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:_()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(Pt,{row:ee,onClose:()=>S(null)})]})]})}function Mt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Nt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function Pt({row:e,onClose:t}){let n=(0,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)(rt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)($e,{className:`max-w-lg`,children:[(0,Y.jsxs)(lt,{children:[(0,Y.jsxs)(pt,{className:`oc-traces__meta-title`,children:[Pe(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(H,{variant:`outline`,children:y()})]}),(0,Y.jsx)(at,{children:p()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{jt as TracesTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$g as r,Bg as i,Gg as a,Hg as o,Ig as s,Jg as c,Kg as l,Lg as u,Qg as d,Rg as ee,Ug as te,Vg as ne,Wg as re,Xg as ie,Yg as ae,Zg as oe,_D as f,_d as p,_g as se,a_ as ce,c_ as m,cd as h,dD as g,dd as _,e_ as le,fd as v,gd as y,hd as b,i_ as ue,l_ as x,ld as S,md as C,n_ as de,o_ as fe,od as w,pd as T,qg as pe,r_ as E,s_ as me,sd as D,t_ as he,u_ as O,ud as k,vD as A,vd as j,zg as ge}from"./dist-dqCqhBJa.js";import{t as M}from"./button-C-Nb2Vgm.js";import{$ as N,A as P,C as F,G as I,K as L,M as R,Mt as _e,Q as z,S as B,W as V,X as H,Y as ve,_ as U,_t as W,b as G,d as K,et as ye,f as be,gt as q,j as xe,jt as Se,nt as Ce,ot as we,p as J,q as Te,rt as Ee,x as Y,y as X}from"./index-Chpx7q4s.js";import{t as De}from"./FilterBar-C2YZIUUe.js";import{t as Oe}from"./DataTableShell-DQ-E7MMz.js";import{t as ke}from"./DetailChips-DLGo-JpY.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=A(g.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=A(g.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,c=s?`${s.instanceName}/${s.agentId}`:null,l=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),u=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!l.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],d=new Map;for(let e of u){let t=d.get(e.instanceName)??[];t.push(e),d.set(e.instanceName,t)}return(0,Q.jsx)(z,{open:n,onOpenChange:r,children:(0,Q.jsxs)(N,{className:`oc-access`,children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:j({user:t})}),(0,Q.jsx)(ye,{children:p()})]}),i?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?y():b()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:C()}):u.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:_()}):[...d.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:c},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=f(g.agents.assignAgent),s=f(g.agents.removeAgent),c=f(g.agents.setDefaultAgent),l=P();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(T(),e)}}async function d(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(v(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(W,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(U,{checked:r,disabled:s&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":k({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:S()}):null,e.outOfPool?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:h()}):null,r?o?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":D(),title:D(),children:(0,Q.jsx)(q,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":w(),title:w(),onClick:()=>void d(e.agentId),children:(0,Q.jsx)(q,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=K.filter(e=>n.has(J[e])).length;return(0,Q.jsxs)(V,{children:[(0,Q.jsx)(ve,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?O():x({count:r})})}),(0,Q.jsxs)(I,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:m()}),K.map(e=>{let r=J[e];return(0,Q.jsxs)(L,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(U,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:be[e]??e})]},e)})]})]})}function Ne(){let e=_e({from:`/settings/users`}),t=Se({from:`/settings/users`}),n=e.q??``,p=e.role??$,m=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),h=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),_=A(g.admin.listUsers,{filter:{q:n||void 0,role:p===$?void 0:p},withAgents:!0}),v=A(g.me.getMe,{host:we}),y=f(g.admin.setRole),b=f(g.admin.setUserPermissions),x=f(g.admin.startImpersonation),S=f(g.admin.deleteUser),C=f(g.admin.setUserName),w=xe(),T=R(),D=P(),[O,k]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of _??[])e.add(t.role);return[...e]},[_]),M=n!==``||p!==$;function N(){t({search:{},replace:!0})}async function I(e){try{await y(e)}catch(e){D.error(me(),e)}}async function L(e){try{await b(e)}catch(e){D.error(fe(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:r(),description:d({user:t}),confirmWord:oe(),confirmLabel:ie(),destructive:!0}))try{await S({profileId:e._id}),D.success(c({user:t}))}catch(e){D.error(ae(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:l(),label:a({user:t}),placeholder:re(),defaultValue:e.name??``,confirmLabel:se()});if(n!==null)try{await C({profileId:e._id,name:n}),D.success(te())}catch(e){D.error(o(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:m,searchPlaceholder:ce(),onReset:N,canReset:M,children:(0,Q.jsxs)(X,{value:p,onValueChange:h,children:[(0,Q.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:$,children:ue()}),j.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:E(),rows:_,emptyHint:de(),rowActions:e=>{let t=[{label:s(),onSelect:()=>k({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:pe(),onSelect:()=>void V(e)}];return e.userId!==v?.userId&&t.push({label:he(),onSelect:()=>void x({profileId:e._id})},{label:le(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:ne(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:i(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void I({profileId:e._id,role:t}),children:[(0,Q.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:`pending`,children:`pending`}),(0,Q.jsx)(Y,{value:`user`,children:`user`}),(0,Q.jsx)(Y,{value:`admin`,children:`admin`})]})]})},{header:ge(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:ee()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),L({profileId:e._id,permissions:[...n]})}})},{header:u(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(W,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:O?.profileId??null,userLabel:O?.label??``,open:O!==null,onOpenChange:e=>{e||k(null)}})]})}export{Ne as UsersTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,oD as r,t as i}from"./dist-dqCqhBJa.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?r:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:n(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-dqCqhBJa.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fD as e}from"./dist-dqCqhBJa.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fn as e,Jn as t,Ln as n,Pn as r,Rn as i,zn as a}from"./dist-dqCqhBJa.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?a():e===`beyond`?i():n()}function p(e){return e??t()}function m(t){return t===null?r():e({version:t})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$o as e,Jo as t,Ko as n,Qo as r,Xo as i,Yo as a,Zo as o,_s as s,as as c,bs as l,cs as u,ds as d,es as f,fs as p,gs as m,hs as h,is as g,ls as _,ms as v,ns as y,os as b,ps as x,qo as S,rs as C,ss as w,ts as T,us as E,vs as D,ys as O}from"./dist-dqCqhBJa.js";var k={AGENT_NOT_FOUND:()=>({label:l(),hint:O()}),AUTH_TOKEN_MISMATCH:()=>({label:D(),hint:s()}),DEVICE_SIGNING_FAILED:()=>({label:m(),hint:h()}),SESSION_SCOPE_DENIED:()=>({label:v(),hint:x()}),GATEWAY_TIMEOUT:()=>({label:p(),hint:d()}),GATEWAY_DISCONNECTED:()=>({label:E(),hint:_()}),ATTACHMENT_TOO_LARGE:()=>({label:b(),hint:c()}),ATTACHMENT_REJECTED:()=>({label:g(),hint:C()}),BRIDGE_UNREACHABLE:()=>({label:u(),hint:w()}),INVALID_REQUEST:()=>({label:y(),hint:T()}),NOT_CONFIGURED:()=>({label:f(),hint:e()}),UNROUTED:()=>({label:r(),hint:o()}),UPSTREAM_ERROR:()=>({label:i(),hint:a()}),UNKNOWN:()=>({label:t(),hint:S()})};function A(e){return e?k[e]?.()??{label:e,hint:n()}:k.UNKNOWN()}export{A as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$E as r,GE as i,JE as a,KE as o,UE as s,WE as c,XE as l,YE as u,ZE as d,eD as f,iD as p,qE as m,rD as h,sD as g,uD as _}from"./dist-dqCqhBJa.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=f(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,f]=d({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:u(),titleId:u(),descriptionId:u(),open:l,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(E,n),a=_(t,i.triggerRef);return(0,y.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":q(i.open),...r,ref:a,onClick:h(e.onClick,i.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(l,{present:n||a.open,children:(0,y.jsx)(o,{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)(l,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=g(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(c,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(p.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)(l,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),i=_(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return s(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:h(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:h(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:o,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),d=_(t,u);return i(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,y.jsx)(a,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:d,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)(p.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.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)(p.button,{type:`button`,...r,ref:t,onClick:h(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=r(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};
|