@lacneu/atrium 0.10.16 → 0.10.18
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-C2TDcMit.js → AccessTab-wgwrrOkq.js} +1 -1
- package/dist/assets/{AdvancedFilter-DrUoj1oY.js → AdvancedFilter-CQA9SSeX.js} +1 -1
- package/dist/assets/AgentFilesTab-DpvNcKxY.js +3 -0
- package/dist/assets/{AnomaliesTab-_Jt6y2Sy.js → AnomaliesTab-CsVaUK9r.js} +1 -1
- package/dist/assets/AuditTab-BCGc5fh-.js +1 -0
- package/dist/assets/{BridgeTab-BhxIgO6W.js → BridgeTab-CI5Pr3zt.js} +1 -1
- package/dist/assets/ChatDefaultsTab-C4KGYhV-.js +1 -0
- package/dist/assets/{DataTableShell-BY48g0WO.js → DataTableShell-B62Qv-tB.js} +1 -1
- package/dist/assets/{DetailChips-B_6c_-iY.js → DetailChips-fND9q0WY.js} +1 -1
- package/dist/assets/FeedbacksTab-xd7LisqB.js +1 -0
- package/dist/assets/{FieldLabel-BrnlMFJq.js → FieldLabel-DkIcKewT.js} +1 -1
- package/dist/assets/FilesTab-BzZTNirP.js +1 -0
- package/dist/assets/{FilterBar-Cn4lFaY4.js → FilterBar-CWlA8nZ0.js} +1 -1
- package/dist/assets/GroupsTab-DDGHlCam.js +1 -0
- package/dist/assets/InstancesTab-CENcOK8c.js +1 -0
- package/dist/assets/{IntegrationsTab-CwPWnqkr.js → IntegrationsTab-DSfAaftT.js} +1 -1
- package/dist/assets/{KpiTab-ChPoG2S2.js → KpiTab-Cn6U4E5D.js} +1 -1
- package/dist/assets/PreferencesTab-SI6PHYsQ.js +1 -0
- package/dist/assets/{PromptInjectionsTab-XzEme_aG.js → PromptInjectionsTab-ZwimzgiF.js} +2 -2
- package/dist/assets/RolesTab-Dm9rHjli.js +1 -0
- package/dist/assets/ServiceAccountsTab-Oxuo-aSo.js +1 -0
- package/dist/assets/ThemeShowroom-O_cVLe2-.js +1 -0
- package/dist/assets/{TimeRangePicker-BCumk2bf.js → TimeRangePicker-CXb27Tev.js} +1 -1
- package/dist/assets/TracesTab-CWvJFPjX.js +1 -0
- package/dist/assets/{UsersTab-1qfp9sce.js → UsersTab-Co8sYpJL.js} +1 -1
- package/dist/assets/button-G-_IqZDp.js +1 -0
- package/dist/assets/{card-B4hdn0Qh.js → card-B3VbgixI.js} +1 -1
- package/dist/assets/chevrons-up-down-BlHpdE9v.js +1 -0
- package/dist/assets/{compatView-BLkCb0a4.js → compatView-hfeNAe7g.js} +1 -1
- package/dist/assets/{dispatchErrorInfo-eTOwTxQJ.js → dispatchErrorInfo-DpmUia7q.js} +1 -1
- package/dist/assets/{dist-D2UVxg3M.js → dist--S7AYRAA.js} +1 -1
- package/dist/assets/dist-0Nx0BXy1.js +5 -0
- package/dist/assets/{dist-CEGGJ9VY.js → dist-BDPwn3r0.js} +1 -1
- package/dist/assets/{dist-CfgJ5RDI.js → dist-CgXYe09h.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-CwnBPq8J.js → highlighted-body-OFNGDK62-5MhDiezJ.js} +1 -1
- package/dist/assets/{index-BsbX_-dh.js → index-BmXiVWTf.js} +16 -16
- package/dist/assets/mermaid-GHXKKRXX-CNK1PBuN.js +1 -0
- package/dist/assets/roleDescriptions-I2Mil-DA.js +1 -0
- package/dist/assets/{table-BYj7Kdzy.js → table-xKqB5hyP.js} +1 -1
- package/dist/assets/x-CpLBfKr9.js +1 -0
- package/dist/index.html +7 -7
- package/package.json +1 -1
- package/dist/assets/AgentFilesTab-BrBVC0WC.js +0 -3
- package/dist/assets/AuditTab-C-6Oxrdo.js +0 -1
- package/dist/assets/ChatDefaultsTab-C9JLQe-F.js +0 -1
- package/dist/assets/FeedbacksTab-28fA354v.js +0 -1
- package/dist/assets/FilesTab-Bt_1sxvl.js +0 -1
- package/dist/assets/GroupsTab-DNcRR1QL.js +0 -1
- package/dist/assets/InstancesTab-CJtDMRcA.js +0 -1
- package/dist/assets/PreferencesTab-DD8qntSU.js +0 -1
- package/dist/assets/RolesTab-D1aBj2un.js +0 -1
- package/dist/assets/ServiceAccountsTab-D30Lhilu.js +0 -1
- package/dist/assets/ThemeShowroom-BrXPZ7CL.js +0 -1
- package/dist/assets/TracesTab-DW9c-271.js +0 -1
- package/dist/assets/button-ClzO6iiY.js +0 -1
- package/dist/assets/chevrons-up-down-B3gRA_gV.js +0 -1
- package/dist/assets/dist-Ygn7c4YX.js +0 -5
- package/dist/assets/mermaid-GHXKKRXX-BtlnP6HU.js +0 -1
- package/dist/assets/roleDescriptions-Bjw3U0di.js +0 -1
- package/dist/assets/x-TUhW74Oi.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$x as r,AS as i,Ax as a,Bx as o,CS as s,Cx as c,DS as l,Dx as u,ES as d,Ex as f,Fx as p,Gx as m,Hx as h,Ix as g,Jx as _,Kx as ee,Lx as te,MC as ne,Mx as re,NC as ie,Nx as ae,OS as oe,Ox as se,PC as ce,Px as le,Qx as ue,Rx as de,SS as fe,Sx as pe,TS as me,Tx as he,Ux as ge,Vx as _e,Wx as ve,Xx as ye,Yx as be,Zx as xe,_C as Se,_S as Ce,_x as v,aS as we,bS as Te,bx as Ee,cS as De,dS as Oe,dx as ke,eS as Ae,fS as je,fx as Me,gC as Ne,gS as Pe,gw as y,gx as Fe,hS as Ie,hw as b,hx as Le,iS as Re,jS as ze,jx as Be,kS as Ve,kx as x,lS as He,lw as S,lx as Ue,mS as We,mx as Ge,n as Ke,nS as qe,oS as Je,pS as Ye,pw as Xe,px as C,qx as Ze,rS as Qe,sS as $e,tS as et,uS as tt,uw as nt,ux as rt,vS as it,vx as at,wS as ot,wx as st,xS as w,xx as ct,yS as lt,yx as ut,zx as dt}from"./dist-CgXYe09h.js";import{n as T}from"./dist--S7AYRAA.js";import{t as ft}from"./TimeRangePicker-CXb27Tev.js";import{t as E}from"./x-CpLBfKr9.js";import{t as D}from"./button-G-_IqZDp.js";import{$ as pt,C as O,Ct as k,J as A,O as j,Q as mt,S as M,at as ht,b as N,et as P,it as gt,m as F,nt as I,ot as L,rt as _t,tt as vt,x as R,y as z}from"./index-BmXiVWTf.js";import{a as yt,i as bt,n as xt,o as St,r as Ct,t as wt}from"./card-B3VbgixI.js";import{a as Tt,i as B,n as Et,o as V,r as H,t as Dt}from"./table-xKqB5hyP.js";import{t as Ot}from"./FilterBar-CWlA8nZ0.js";import{t as kt}from"./AdvancedFilter-CQA9SSeX.js";var U=nt(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),W=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 G(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(re());if(e.size>Lt)throw Error(Be());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(x());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(x());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);G(e.data,d.width,d.height)?Ft(e.data,t.variantFor===`dark`?jt:Mt):It(e.data),p.putImageData(e,0,0)}let m=G(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await q(f,`image/webp`,Bt)??await q(f,`image/png`);if(!h)throw Error(se());return{blob:h,hasAlpha:m}}finally{a()}}async function Ht(e){if(e.type===`image/svg+xml`)return K(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 K(e)}async function K(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(a())),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 q(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var J=n(),Y=`__all__`,X={kind:`relative`,from:`now-24h`,to:`now`},Ut=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function Z({title:e,description:t,children:n}){return(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,J.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,J.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function Wt(e){return e===`light`?ce():e===`dark`?ie():ne()}var Gt=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Kt({tokens:e,mode:t}){let n=e.colors[t];return(0,J.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Gt.map(e=>{let t=n[e];return(0,J.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function Q({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a}){return(0,J.jsxs)(`button`,{type:`button`,className:Ke(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,J.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,J.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,J.jsx)(T,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,J.jsx)(Kt,{tokens:r,mode:i}):(0,J.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,J.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,J.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]})}function qt({selectedKey:e,resolvedMode:t}){let n=y(S.charts.listMyCharts),r=b(S.charts.setMyChart);async function i(e){try{await r({name:e})}catch{}}return(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h2`,{className:`oc-show__title`,children:s()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:fe()})]}),(0,J.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,J.jsx)(Q,{selected:e===null,title:w(),subtitle:Te(),tokens:null,mode:t,onSelect:()=>void i(null)}),(n??[]).map(n=>{let r=n.via===`common`?lt():n.via===`owner`?it():Ce({group:n.via.group});return(0,J.jsx)(Q,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void i(n.key)},n.key)})]}),n!==void 0&&n.length===0?(0,J.jsx)(`p`,{className:`oc-show__desc`,children:Pe()}):null]})}function Jt(){let e=b(S.charts.importChart),[t,n]=(0,W.useState)(``),[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(!1);async function f(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),l(!1);try{a(await t.text())}catch{s(_())}}}async function p(){if(s(null),l(!1),t.trim()===``){s(ee());return}let r;try{r=JSON.parse(i)}catch{s(_());return}d(!0);try{await e({name:t.trim(),tokens:r}),l(!0),n(``),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}}return(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h2`,{className:`oc-show__title`,children:qe()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:et()})]}),(0,J.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,J.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,J.jsx)(`span`,{className:`oc-chart-import__label`,children:Ae()}),(0,J.jsx)(A,{value:t,onChange:e=>n(e.target.value),placeholder:r(),maxLength:60})]}),(0,J.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,J.jsx)(`span`,{className:`oc-chart-import__label`,children:ue()}),(0,J.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:i,onChange:e=>a(e.target.value),placeholder:xe(),rows:8,spellCheck:!1})]}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(D,{variant:`outline`,size:`sm`,asChild:!0,children:(0,J.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,J.jsx)(U,{className:`size-4`}),ye(),(0,J.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void f(e)})]})}),(0,J.jsx)(D,{size:`sm`,disabled:u,onClick:()=>void p(),children:be()})]}),o?(0,J.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,c?(0,J.jsx)(`p`,{className:`oc-chart-import__ok`,children:Ze()}):null]})]})}function Yt({chart:e}){let t=Xe(S.charts.setChartLogo),n=b(S.charts.removeChartLogo),[r,i]=(0,W.useState)(!1),[a,s]=(0,W.useState)(null),c=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function l(n,r,a){if(e.chartId!==void 0){s(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){s(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function u(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await l(e,n)}async function d(t){if(e.chartId!==void 0){s(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){s(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function f(e){let t=c(e===`light`?`dark`:`light`);if(t){s(null),i(!0);try{await l(e,await(await fetch(t)).blob(),e)}catch(e){s(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function m({mode:e}){let t=c(e),n=c(e===`light`?`dark`:`light`);return(0,J.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,J.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?dt():de()}),(0,J.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,J.jsx)(`img`,{src:t,alt:``}):null}),(0,J.jsx)(D,{variant:`outline`,size:`sm`,asChild:!0,children:(0,J.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,J.jsx)(U,{className:`size-4`}),t?g():te(),(0,J.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void u(e,t)})]})}),!t&&n?(0,J.jsx)(D,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void f(e),children:le()}):null,t?(0,J.jsx)(D,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:p()}):null]})}return(0,J.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,J.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:o()}),(0,J.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,J.jsx)(m,{mode:`light`}),(0,J.jsx)(m,{mode:`dark`})]}),r?(0,J.jsx)(`span`,{className:`oc-show__desc`,children:ae()}):null,a?(0,J.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function $({chart:e}){let t=y(S.me.getMe,{host:L}),n=b(S.charts.addChartDomain),r=b(S.charts.removeChartDomain),[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(null),[l,d]=(0,W.useState)(!1);if(t?.role!==`admin`)return null;let p=e.domains??[];async function m(){let t=i.trim();if(t!==``){s(null),d(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}}}async function h(t){s(null);try{await r({chartKey:e.key,domain:t})}catch{}}return(0,J.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,J.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:u()}),(0,J.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,J.jsx)(`div`,{className:`oc-chart-avail__groups`,children:p.length===0?(0,J.jsx)(`span`,{className:`oc-show__desc`,children:c()}):p.map(e=>(0,J.jsxs)(F,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,J.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":pe({domain:e}),onClick:()=>void h(e),children:(0,J.jsx)(E,{className:`size-3`})})]},e))}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(A,{value:i,onChange:e=>a(e.target.value),placeholder:he(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&m()}}),(0,J.jsx)(D,{variant:`outline`,size:`sm`,disabled:l,onClick:()=>void m(),children:st()})]}),(0,J.jsx)(`span`,{className:`oc-show__desc`,children:f()}),o?(0,J.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function Xt({chart:e}){let t=b(S.charts.updateChart),n=b(S.charts.deleteChart),[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(e.name),[s,c]=(0,W.useState)(()=>JSON.stringify(e.tokens,null,2)),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(!1);function p(){o(e.name),c(JSON.stringify(e.tokens,null,2)),u(null),i(!0)}async function m(){if(e.chartId===void 0)return;u(null);let n;try{n=JSON.parse(s)}catch{u(_());return}f(!0);try{await t({chartId:e.chartId,name:a.trim(),tokens:n}),i(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(!1)}}async function g(){if(e.chartId!==void 0&&window.confirm(v()))try{await n({chartId:e.chartId})}catch{}}return(0,J.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,J.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,J.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,J.jsx)(`div`,{className:`oc-show__row`,children:r?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(D,{variant:`outline`,size:`sm`,onClick:p,children:h()}),(0,J.jsx)(D,{variant:`ghost`,size:`sm`,onClick:()=>void g(),children:_e()})]})})]}),r?(0,J.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,J.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,J.jsx)(`span`,{className:`oc-chart-import__label`,children:ut()}),(0,J.jsx)(A,{value:a,onChange:e=>o(e.target.value),maxLength:60})]}),(0,J.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,J.jsx)(`span`,{className:`oc-chart-import__label`,children:at()}),(0,J.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:s,onChange:e=>c(e.target.value),rows:10,spellCheck:!1})]}),l?(0,J.jsx)(`p`,{className:`oc-chart-import__error`,children:l}):null,(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(D,{size:`sm`,disabled:d,onClick:()=>void m(),children:ct()}),(0,J.jsx)(D,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),children:Ee()})]})]}):null,(0,J.jsx)(Yt,{chart:e}),(0,J.jsx)($,{chart:e})]})}function Zt(){let e=y(S.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h2`,{className:`oc-show__title`,children:m()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:ve()})]}),e!==void 0&&t.length===0?(0,J.jsx)(`p`,{className:`oc-show__desc`,children:ge()}):(0,J.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,J.jsx)(Xt,{chart:e},e.key))})]})}function Qt({chart:e,groups:t}){let n=b(S.charts.addChartToGroupPool),r=b(S.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,o=new Set((a??[]).map(e=>e.groupId)),s=t.filter(e=>!o.has(e._id));async function c(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function l(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,J.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,J.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,J.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,J.jsx)(F,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?De():e.kind===`custom`&&e.scope===`personal`?C():He()}),e.isGlobalDefault?(0,J.jsx)(F,{variant:`default`,children:$e()}):null]}),(0,J.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,J.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:we()}),(a??[]).map(e=>(0,J.jsxs)(F,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,J.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Qe({group:e.name}),onClick:()=>void l(e.groupId),children:(0,J.jsx)(E,{className:`size-3`})})]},e.groupId)),s.length>0?(0,J.jsxs)(z,{value:``,onValueChange:e=>void c(e),children:[(0,J.jsx)(M,{size:`sm`,className:`w-56`,children:(0,J.jsx)(O,{placeholder:Re()})}),(0,J.jsx)(N,{children:s.map(e=>(0,J.jsx)(R,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,J.jsx)(`span`,{className:`oc-show__desc`,children:Je()}):null]})]})}function $t({chart:e}){let t=b(S.charts.promoteChartToCommon),n=b(S.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(v()))try{await n({chartId:e.chartId})}catch{}}return(0,J.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,J.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,J.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,J.jsx)(F,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?Me():C()}),e.ownerLabel?(0,J.jsx)(`span`,{className:`oc-show__desc`,children:Ge({owner:e.ownerLabel})}):null]}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,J.jsx)(D,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:ke()}):null,(0,J.jsx)(D,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:rt()})]})]})}function en({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=b(S.admin.setDefaultThemeMode),a=b(S.admin.setDefaultLocale),o=b(S.charts.setDefaultChart),s=y(S.charts.listChartsAdmin),c=y(S.groups.listGroups,{}),u=e??`system`,d=t??`fr`;return(0,J.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h2`,{className:`oc-show__title`,children:me()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:ot()})]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:Ie()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:We()})]}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(D,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void o({name:null}),children:w()}),ht.map(e=>(0,J.jsx)(D,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key)),(s??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,J.jsx)(D,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key))]})]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:Ye()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:je()})]}),(0,J.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,J.jsx)(Qt,{chart:e,groups:c??[]},e.key))})]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:Oe()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:tt()})]}),(0,J.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,J.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,J.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,J.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,J.jsx)($,{chart:e})]},e.key))})]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:Fe()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:Le()})]}),(()=>{let e=(s??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,J.jsx)(`p`,{className:`oc-show__desc`,children:Ue()}):(0,J.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,J.jsx)($t,{chart:e},e.key))})})()]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:ze()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:i()})]}),(0,J.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,J.jsx)(D,{variant:u===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:Wt(e)},e))})]}),(0,J.jsxs)(`section`,{className:`oc-show__section`,children:[(0,J.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,J.jsx)(`h3`,{className:`oc-show__title`,children:Ve()}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:oe()})]}),(0,J.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`].map(e=>(0,J.jsx)(D,{variant:d===e?`default`:`outline`,size:`sm`,onClick:()=>void a({locale:e}),children:e===`fr`?Se():Ne()},e))}),(0,J.jsx)(`p`,{className:`oc-show__desc`,children:l()})]})]})}function tn(){let e=y(S.me.getMe,{host:L}),t=gt(e?.resolvedThemeMode);return(0,J.jsxs)(`div`,{className:`oc-appearance`,children:[(0,J.jsx)(qt,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,J.jsx)(Jt,{}),(0,J.jsx)(Zt,{}),e?.role===`admin`?(0,J.jsx)(en,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function nn(){let[e,t]=(0,W.useState)(!0),[n,r]=(0,W.useState)(`per-user`),[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(Y),[c,l]=(0,W.useState)(Y),[u,f]=(0,W.useState)(X),p=i!==``||o!==Y||c!==Y;function m(){a(``),s(Y),l(Y),f(X)}return(0,J.jsxs)(`div`,{className:`oc-show`,children:[(0,J.jsx)(tn,{}),(0,J.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,J.jsx)(`summary`,{className:`oc-show__title`,children:d()}),(0,J.jsxs)(Z,{title:`Buttons`,description:`Variants`,children:[(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(D,{children:`Default`}),(0,J.jsx)(D,{variant:`secondary`,children:`Secondary`}),(0,J.jsx)(D,{variant:`outline`,children:`Outline`}),(0,J.jsx)(D,{variant:`ghost`,children:`Ghost`}),(0,J.jsx)(D,{variant:`destructive`,children:`Destructive`}),(0,J.jsx)(D,{variant:`link`,children:`Link`})]}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(D,{size:`sm`,children:`Small`}),(0,J.jsx)(D,{children:`Default`}),(0,J.jsx)(D,{size:`lg`,children:`Large`}),(0,J.jsx)(D,{size:`icon`,"aria-label":`more`,children:(0,J.jsx)(k,{})}),(0,J.jsx)(D,{disabled:!0,children:`Disabled`})]})]}),(0,J.jsx)(Z,{title:`Badges`,children:(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(F,{children:`Default`}),(0,J.jsx)(F,{variant:`secondary`,children:`Secondary`}),(0,J.jsx)(F,{variant:`outline`,children:`Outline`}),(0,J.jsx)(F,{variant:`destructive`,children:`Destructive`})]})}),(0,J.jsx)(Z,{title:`Inputs & selection`,children:(0,J.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,J.jsx)(A,{placeholder:`Text input…`}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsxs)(z,{value:n,onValueChange:r,children:[(0,J.jsx)(M,{className:`w-56`,children:(0,J.jsx)(O,{placeholder:`Select…`})}),(0,J.jsxs)(N,{children:[(0,J.jsx)(R,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,J.jsx)(R,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,J.jsxs)(`label`,{className:`oc-show__check`,children:[(0,J.jsx)(j,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,J.jsx)(Z,{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,J.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,J.jsxs)(Ot,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:f,onReset:m,canReset:p,children:[(0,J.jsxs)(z,{value:o,onValueChange:s,children:[(0,J.jsx)(M,{size:`sm`,children:(0,J.jsx)(O,{})}),(0,J.jsxs)(N,{children:[(0,J.jsx)(R,{value:Y,children:`Toutes directions`}),(0,J.jsx)(R,{value:`inbound`,children:`inbound`}),(0,J.jsx)(R,{value:`outbound`,children:`outbound`}),(0,J.jsx)(R,{value:`internal`,children:`internal`})]})]}),(0,J.jsxs)(z,{value:c,onValueChange:l,children:[(0,J.jsx)(M,{size:`sm`,children:(0,J.jsx)(O,{})}),(0,J.jsxs)(N,{children:[(0,J.jsx)(R,{value:Y,children:`Toutes sévérités`}),(0,J.jsx)(R,{value:`info`,children:`info`}),(0,J.jsx)(R,{value:`warn`,children:`warn`}),(0,J.jsx)(R,{value:`critical`,children:`critical`})]})]})]}),(0,J.jsx)(kt,{fields:Ut,onChange:()=>{}}),(0,J.jsxs)(`div`,{className:`oc-show__row`,children:[(0,J.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,J.jsx)(ft,{value:u,onChange:f})]})]})}),(0,J.jsx)(Z,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,J.jsxs)(mt,{children:[(0,J.jsx)(_t,{asChild:!0,children:(0,J.jsx)(D,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,J.jsx)(k,{})})}),(0,J.jsxs)(pt,{align:`start`,children:[(0,J.jsx)(vt,{children:`Actions`}),(0,J.jsx)(I,{}),(0,J.jsx)(P,{children:`Edit`}),(0,J.jsx)(P,{children:`Duplicate`}),(0,J.jsx)(I,{}),(0,J.jsx)(P,{variant:`destructive`,children:`Delete`})]})]})}),(0,J.jsx)(Z,{title:`Card`,children:(0,J.jsxs)(wt,{className:`w-80`,children:[(0,J.jsxs)(yt,{children:[(0,J.jsx)(St,{children:`Instance`}),(0,J.jsx)(Ct,{children:`Non-secret metadata only.`})]}),(0,J.jsx)(xt,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,J.jsxs)(bt,{className:`gap-2`,children:[(0,J.jsx)(D,{size:`sm`,children:`Save`}),(0,J.jsx)(D,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,J.jsx)(Z,{title:`Table`,children:(0,J.jsxs)(Dt,{children:[(0,J.jsx)(Tt,{children:(0,J.jsxs)(V,{children:[(0,J.jsx)(B,{className:`w-8`,children:(0,J.jsx)(j,{"aria-label":`select all`})}),(0,J.jsx)(B,{children:`Name`}),(0,J.jsx)(B,{children:`Mode`}),(0,J.jsx)(B,{className:`text-right`,children:`Status`}),(0,J.jsx)(B,{className:`w-8`})]})}),(0,J.jsx)(Et,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,J.jsxs)(V,{children:[(0,J.jsx)(H,{children:(0,J.jsx)(j,{"aria-label":`select ${e.n}`})}),(0,J.jsx)(H,{className:`font-medium`,children:e.n}),(0,J.jsx)(H,{children:(0,J.jsx)(F,{variant:`secondary`,children:e.m})}),(0,J.jsx)(H,{className:`text-right`,children:(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,J.jsx)(T,{className:`size-3.5`}),` `,e.s]})}),(0,J.jsx)(H,{children:(0,J.jsx)(D,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,J.jsx)(k,{})})})]},e.n))})]})}),(0,J.jsx)(Z,{title:`App fragments`,description:`Chat-specific components`,children:(0,J.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,J.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,J.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,J.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,J.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,J.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,J.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,J.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,J.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,J.jsx)(`span`,{className:`oc-run-status__dot`}),(0,J.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}export{nn as ThemeShowroom};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,Qo as s,Xo as c,Yo as l,Zo as u,es as d,
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,Qo as s,Xo as c,Yo as l,Zo as u,es as d,ns as f,qo as p,ts as m,uw as h}from"./dist-CgXYe09h.js";import{t as g}from"./button-G-_IqZDp.js";import{J as _,ct as v,lt as y,st as b,ut as x,vt as S}from"./index-BmXiVWTf.js";var C=h(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:f(),from:`now-5m`},{label:m(),from:`now-15m`},{label:d(),from:`now-30m`},{label:r(),from:`now-1h`},{label:s(),from:`now-3h`},{label:u(),from:`now-6h`},{label:c(),from:`now-12h`},{label:l(),from:`now-24h`},{label:a(),from:`now-2d`},{label:p(),from:`now-7d`},{label:o(),from:`now-30d`},{label:i(),from:`now-90d`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(y,{open:n,onOpenChange:d,children:[(0,P.jsx)(x,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(C,{}),A(e)]})}),(0,P.jsx)(v,{children:(0,P.jsx)(b,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(_,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(_,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(S,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(_,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}export{F as n,N as r,L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$g as r,Al as i,Bg as a,Bl as o,Cl as s,Dl as c,El as l,Fl as u,Gg as d,Gl as f,Hg as p,Hl as m,Il as h,Jg as g,Jl as _,Kg as v,Kl as ee,Ll as te,Ml as ne,Nl as y,Ol as re,Pl as ie,Qg as b,Rl as ae,Sl as oe,Tl as se,Ug as x,Ul as ce,Vg as le,Vl as ue,Wg as de,Wl as fe,Xg as S,Xl as pe,Yg as C,Yl as me,Zg as he,_l as ge,a_ as w,bl as _e,c_ as T,d_ as E,e_ as D,fl as O,gl as ve,gw as k,hl as ye,hw as A,i_ as j,jl as be,kl as xe,l_ as M,lw as N,ml as P,n_ as F,o_ as I,pl as L,qg as R,ql as Se,r_ as z,s_ as B,t_ as Ce,u_ as we,vl as Te,wl as Ee,xl as De,yl as Oe,zl as ke}from"./dist-CgXYe09h.js";import{n as Ae}from"./dist--S7AYRAA.js";import{n as je}from"./TimeRangePicker-CXb27Tev.js";import{t as Me}from"./x-CpLBfKr9.js";import{t as V}from"./button-G-_IqZDp.js";import{A as Ne,C as H,F as Pe,I as Fe,Ot as Ie,P as Le,R as Re,S as U,Tt as ze,a as Be,b as W,i as Ve,kt as He,m as G,o as Ue,ot as We,r as Ge,x as K,y as q,z as Ke}from"./index-BmXiVWTf.js";import{t as qe}from"./FilterBar-CWlA8nZ0.js";import{t as Je}from"./AdvancedFilter-CQA9SSeX.js";import{t as Ye}from"./DataTableShell-B62Qv-tB.js";var J=t(e(),1),Y=n(),X=e=>e===null?`—`:String(Math.round(e));function Xe(){let e=k(N.me.getMe,{host:We})?.role===`admin`,t=k(N.deliveryTiming.getDeliveryStatus,{}),n=A(N.deliveryTiming.startDeliveryRecord),r=A(N.deliveryTiming.stopDeliveryRecord),i=A(N.deliveryTiming.deleteDeliverySessions),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(null),[l,u]=(0,J.useState)(new Set),[f,p]=(0,J.useState)(!1),[m,h]=(0,J.useState)(!1),g=k(N.deliveryTiming.listDeliverySessions,a?{}:`skip`),_=k(N.deliveryTiming.getDeliveryReport,a?{sessionId:s??void 0}:`skip`),v=t?.recording??!1,ee=async()=>{p(!0);try{v?await r({}):await n({})}finally{p(!1)}},te=()=>{_&&navigator.clipboard?.writeText(Ne(_)).then(()=>{h(!0),window.setTimeout(()=>h(!1),1200)}).catch(()=>{})},ne=e=>u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),y=async()=>{let e=[...l];if(e.length!==0){p(!0);try{await i({sessionIds:e}),s!==null&&l.has(s)&&c(null),u(new Set)}finally{p(!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:E()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:we()})]}),e?(0,Y.jsx)(V,{variant:v?`destructive`:`default`,size:`sm`,disabled:f||t===void 0,onClick:()=>void ee(),children:v?T():M()}):null]}),v?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(G,{variant:`secondary`,children:B()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:I({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?j():w()})}),a?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ze,{sessions:g,selected:s,checked:l,isAdmin:e,onSelect:c,onToggleCheck:ne}),e&&l.size>0?(0,Y.jsx)(`div`,{children:(0,Y.jsx)(V,{variant:`destructive`,size:`sm`,disabled:f,onClick:()=>void y(),children:d({n:l.size})})}):null,(0,Y.jsx)(Qe,{report:_,copied:m,onCopy:te})]}):null]})}function Ze({sessions:e,selected:t,checked:n,isAdmin:r,onSelect:i,onToggleCheck:a}){return e?e.length===0?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:de()}):(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:x()}),(0,Y.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>{let o=t===e.sessionId,s=new Date(e.startedAt).toLocaleString();return(0,Y.jsxs)(`li`,{className:`flex items-center gap-2 border-t border-border py-1 text-sm first:border-t-0`,children:[r?(0,Y.jsx)(`input`,{type:`checkbox`,"aria-label":`${p()} — ${s}`,checked:n.has(e.sessionId),onChange:()=>a(e.sessionId)}):null,(0,Y.jsx)(`button`,{type:`button`,"aria-pressed":o,className:`flex-1 truncate text-left ${o?`font-medium`:`text-muted-foreground`}`,onClick:()=>i(o?null:e.sessionId),children:s}),e.active?(0,Y.jsx)(G,{variant:`secondary`,children:le()}):null]},e.sessionId)})})]}):null}function Qe({report:e,copied:t,onCopy:n}){if(!e)return null;if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:z()});let i=e.segments,o=(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:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,Y.jsxs)(Y.Fragment,{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,` `,a()]}),(0,Y.jsxs)(V,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ae,{size:13,"aria-hidden":!0}):(0,Y.jsx)(ze,{size:13,"aria-hidden":!0}),t?v():R()]})]}),(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:F()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Ce()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:D()})]})}),(0,Y.jsxs)(`tbody`,{children:[o(r(),i.bridge),o(b(),i.A),o(he(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:g()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:C()})]})}var $e=[50,100,200,500],Z=`all`,Q=`__all__`,et=[`2xx`,`4xx`,`5xx`],tt=[`user`,`service`,`system`],nt=[`inbound`,`outbound`,`internal`],rt={kind:`relative`,from:`now-30d`,to:`now`},it=[{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 at(){let e=He({from:`/settings/traces`}),t=Ie({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,d=e.principalType??Q,p=e.direction??Q,g=e.roleKey??Q,v=e.q??``,b=Ge(e.from,e.to),x=(0,J.useMemo)(()=>Ue(e.adv),[e.adv]),{from:le,to:de}=je(b),[S,C]=(0,J.useState)(null),[he,w]=(0,J.useState)(null),T=e=>void t({search:t=>({...t,limit:e})}),E=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})}),A=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),j=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),M=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),P=e=>void t({search:t=>({...t,...Be(e)})}),F=e=>void t({search:t=>({...t,adv:Ve(e)}),replace:!0}),I=k(N.observability.listEvents,{limit:n}),L=k(N.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:v||void 0,from:le,to:de,statusClass:a===Q?void 0:a,principalType:d===Q?void 0:d,direction:p===Q?void 0:p,roleKey:g===Q?void 0:g,advanced:x.length>0?x:void 0}}),R=(0,J.useMemo)(()=>{let e=new Set;for(let t of I??[])e.add(t.kind);return[...e].sort()},[I]),z=(0,J.useMemo)(()=>{let e=new Set;for(let t of I??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[I]),B=v!==``||a!==Q||d!==Q||p!==Q||g!==Q||x.length>0||b.kind!==`relative`||b.from!==rt.from;function Ce(){t({search:{limit:100,kind:`all`},replace:!0})}let we=S?I?.filter(e=>e.correlationId===S):L;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Xe,{}),(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[pe(),(0,Y.jsx)(`strong`,{children:me()}),_(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:Se()})]}),(0,Y.jsxs)(qe,{q:v,onQChange:D,searchPlaceholder:ee(),timeRange:b,onTimeRangeChange:P,onReset:Ce,canReset:B,children:[(0,Y.jsxs)(q,{value:a,onValueChange:O,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:f()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:fe()}),et.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:d,onValueChange:A,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:ce()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:m()}),tt.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:p,onValueChange:j,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:ue()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:o()}),nt.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:g,onValueChange:M,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(H,{placeholder:ke()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:ae()}),z.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:r,onValueChange:E,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(H,{placeholder:te()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Z,children:h()}),R.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:String(n),onValueChange:e=>T(Number(e)),children:[(0,Y.jsx)(U,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(H,{})}),(0,Y.jsx)(W,{children:$e.map(e=>(0,Y.jsx)(K,{value:String(e),children:u({count:e})},e))})]})]}),(0,Y.jsx)(Je,{fields:it,seed:x,onChange:F}),S?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>C(null),title:ie(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[y(),(0,Y.jsx)(`code`,{children:$(S)})]}),(0,Y.jsx)(Me,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ne()})]})}):null,(0,Y.jsx)(Ye,{title:be(),rows:we,emptyHint:S?i():xe(),columns:[{header:re(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:c(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(G,{variant:`secondary`,children:e.kind})},{header:l(),sort:e=>st(e)??null,cell:e=>{let t=st(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":se(),children:`✓`})}},{header:Ee(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(G,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:s(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(G,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:oe(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(G,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:De(),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:_e(),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 ${ot(e.status)}`,children:e.status})},{header:Oe(),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:Te(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:ge(),onClick:()=>C(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ve(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>w(e),children:ye()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(ct,{row:he,onClose:()=>w(null)})]})}function ot(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 st(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 ct({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)(Le,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(Pe,{className:`max-w-lg`,children:[(0,Y.jsxs)(Re,{children:[(0,Y.jsxs)(Ke,{className:`oc-traces__meta-title`,children:[P(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(G,{variant:`outline`,children:L()})]}),(0,Y.jsx)(Fe,{children:O()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{at as TracesTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Ac as r,Am as i,Cm as a,Dc as o,Dm as s,Em as c,Fc as l,Ic as u,Lc as d,Mc as f,Nc as p,Oc as m,Om as h,Pc as g,Rc as _,Rp as v,Sm as y,Tm as b,_m as ee,am as x,bm as S,cm as te,
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Ac as r,Am as i,Cm as a,Dc as o,Dm as s,Em as c,Fc as l,Ic as u,Lc as d,Mc as f,Nc as p,Oc as m,Om as h,Pc as g,Rc as _,Rp as v,Sm as y,Tm as b,_m as ee,am as x,bm as S,cm as te,dm as ne,fm as re,gm as ie,gw as C,hm as ae,hw as w,im as T,jc as E,jm as D,kc as O,km as k,lm as oe,lw as A,mm as se,om as ce,pm as le,rm as ue,sm as de,um as fe,vm as pe,wm as me,xm as he,ym as ge,zc as j}from"./dist-CgXYe09h.js";import{t as M}from"./button-G-_IqZDp.js";import{$ as N,C as P,F,I,M as L,N as _e,O as R,Ot as z,P as B,Q as ve,R as ye,S as V,_t as H,b as U,d as W,et as be,f as xe,gt as G,j as K,kt as Se,m as q,ot as Ce,p as J,rt as we,tt as Te,x as Y,y as X,z as Ee}from"./index-BmXiVWTf.js";import{t as De}from"./FilterBar-CWlA8nZ0.js";import{t as Oe}from"./DataTableShell-B62Qv-tB.js";import{t as ke}from"./DetailChips-fND9q0WY.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=C(A.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=C(A.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,p=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),m=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!p.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}))],h=new Map;for(let e of m){let t=h.get(e.instanceName)??[];t.push(e),h.set(e.instanceName,t)}return(0,Q.jsx)(B,{open:n,onOpenChange:r,children:(0,Q.jsxs)(F,{className:`oc-access`,children:[(0,Q.jsxs)(ye,{children:[(0,Q.jsx)(Ee,{children:j({user:t})}),(0,Q.jsx)(I,{children:_()})]}),i?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?d():u()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:l()}):m.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:f()}):[...h.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:i,assigned:a,defaultKey:s}){let c=w(A.agents.assignAgent),l=w(A.agents.removeAgent),u=w(A.agents.setDefaultAgent),d=K();if(!e)return null;async function f(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await c({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(g(),e)}}async function h(n){try{await u({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(p(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(H,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(q,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=a.has(n),c=s===n,l=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(R,{checked:i,disabled:l&&!i,onCheckedChange:()=>void f(e.agentId,i),"aria-label":E({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,l?(0,Q.jsx)(q,{variant:`outline`,className:`oc-access__gone`,children:r()}):null,e.outOfPool?(0,Q.jsx)(q,{variant:`outline`,className:`oc-access__gone`,children:O()}):null,i?c?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":m(),title:m(),children:(0,Q.jsx)(G,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":o(),title:o(),onClick:()=>void h(e.agentId),children:(0,Q.jsx)(G,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=W.filter(e=>n.has(J[e])).length;return(0,Q.jsxs)(ve,{children:[(0,Q.jsx)(we,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?D():i({count:r})})}),(0,Q.jsxs)(N,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:k()}),W.map(e=>{let r=J[e];return(0,Q.jsxs)(be,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(R,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:xe[e]??e})]},e)})]})]})}function Ne(){let e=Se({from:`/settings/users`}),t=z({from:`/settings/users`}),n=e.q??``,r=e.role??$,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),o=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),l=C(A.admin.listUsers,{filter:{q:n||void 0,role:r===$?void 0:r},withAgents:!0}),u=C(A.me.getMe,{host:Ce}),d=w(A.admin.setRole),f=w(A.admin.setUserPermissions),p=w(A.admin.startImpersonation),m=w(A.admin.deleteUser),g=w(A.admin.setUserName),_=L(),E=_e(),D=K(),[O,k]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of l??[])e.add(t.role);return[...e]},[l]),M=n!==``||r!==$;function N(){t({search:{},replace:!0})}async function F(e){try{await d(e)}catch(e){D.error(h(),e)}}async function I(e){try{await f(e)}catch(e){D.error(s(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await _({title:S(),description:ge({user:t}),confirmWord:pe(),confirmLabel:ee(),destructive:!0}))try{await m({profileId:e._id}),D.success(ae({user:t}))}catch(e){D.error(ie(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await E({title:le(),label:re({user:t}),placeholder:ne(),defaultValue:e.name??``,confirmLabel:v()});if(n!==null)try{await g({profileId:e._id,name:n}),D.success(fe())}catch(e){D.error(oe(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:i,searchPlaceholder:c(),onReset:N,canReset:M,children:(0,Q.jsxs)(X,{value:r,onValueChange:o,children:[(0,Q.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(P,{})}),(0,Q.jsxs)(U,{children:[(0,Q.jsx)(Y,{value:$,children:b()}),j.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:me(),rows:l,emptyHint:a(),rowActions:e=>{let t=[{label:ue(),onSelect:()=>k({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:se(),onSelect:()=>void B(e)}];return e.userId!==u?.userId&&t.push({label:y(),onSelect:()=>void p({profileId:e._id})},{label:he(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:te(),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:de(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void F({profileId:e._id,role:t}),children:[(0,Q.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(P,{})}),(0,Q.jsxs)(U,{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:ce(),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:x()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),I({profileId:e._id,permissions:[...n]})}})},{header:T(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(H,{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{iw as n,n as r,t as i}from"./dist-CgXYe09h.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?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(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-CgXYe09h.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{uw as e}from"./dist-CgXYe09h.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{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-
|
|
1
|
+
import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-CgXYe09h.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`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-
|
|
1
|
+
import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-CgXYe09h.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:t()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:c(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:a(),hint:f()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:C(),hint:d()}),ATTACHMENT_REJECTED:()=>({label:r(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:S(),hint:e()}),INVALID_REQUEST:()=>({label:h(),hint:T()}),NOT_CONFIGURED:()=>({label:n(),hint:m()}),UNROUTED:()=>({label:E(),hint:y()}),UPSTREAM_ERROR:()=>({label:D(),hint:w()}),UNKNOWN:()=>({label:v(),hint:b()})};function A(e){return e?k[e]?.()??{label:e,hint:x()}:k.UNKNOWN()}export{A as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{
|
|
1
|
+
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{uw as n}from"./dist-CgXYe09h.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{GC as r,HC as i,JC as a,KC as o,QC as s,UC as c,VC as l,WC as u,YC as d,ZC as f,aw as p,cw as m,nw as h,qC as g,tw as _}from"./dist-CgXYe09h.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=s(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,u]=d({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:g(),titleId:g(),descriptionId:g(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),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=m(t,i.triggerRef);return(0,y.jsx)(h.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:_(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,o=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(a,{present:n||o.open,children:(0,y.jsx)(u,{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,o=w(M,e.__scopeDialog);return o.modal?(0,y.jsx)(a,{present:r||o.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=p(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(M,n);return(0,y.jsx)(i,{as:P,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(h.div,{"data-state":q(a.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,o=w(I,e.__scopeDialog);return(0,y.jsx)(a,{present:r||o.open,children:o.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=m(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return l(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:_(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:i,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,u=w(I,n),d=v.useRef(null),f=m(t,d);return c(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(o,{role:`dialog`,id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":q(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:u.titleId}),(0,y.jsx)($,{contentRef:d,descriptionId:u.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(h.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)(h.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)(h.button,{type:`button`,...r,ref:t,onClick:_(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Q=`DialogDescriptionWarning`,$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X(Q).contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ee=T,te=D,ne=j,re=N,ie=L,ae=H,oe=W,se=K;export{ne as a,te as c,re as i,Y as l,ie as n,ee as o,oe as r,ae as s,se as t,S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{QC as r,aw as i,cw as a,uw as o}from"./dist-CgXYe09h.js";var s=o(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=o(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,o]=r(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,o]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
|