@alepha/devtools 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/assets/devtools/{asset.Bhpm0ujk.css → asset.DbJSgVPr.css} +1 -1
  2. package/assets/devtools/chunk.3mUAkkKN.js +1 -0
  3. package/assets/devtools/chunk.AVmV_XG3.js +1 -0
  4. package/assets/devtools/{chunk.BChtaeaz.js → chunk.B9Nj9arT.js} +1 -1
  5. package/assets/devtools/chunk.BA8URMP8.js +1 -0
  6. package/assets/devtools/{chunk.BVciOoK-.js → chunk.BXj_XO3l.js} +1 -1
  7. package/assets/devtools/{chunk.CioNo4ZJ.js → chunk.BZoA8zmc.js} +1 -1
  8. package/assets/devtools/{chunk.CaVuq3Op.js → chunk.B_-9nxHc.js} +1 -1
  9. package/assets/devtools/{chunk.aHk99chr.js → chunk.BkQQhCPw.js} +1 -1
  10. package/assets/devtools/chunk.Bk_AzNdP.js +7 -0
  11. package/assets/devtools/{chunk.BRzkf5AB.js → chunk.BlCuAV4r.js} +1 -1
  12. package/assets/devtools/chunk.BoKPUi4h.js +2 -0
  13. package/assets/devtools/{chunk.Duwrcaca.js → chunk.C2Epljet.js} +1 -1
  14. package/assets/devtools/chunk.C2XzHl1-.js +1 -0
  15. package/assets/devtools/{chunk.DPzX4t8Q.js → chunk.CD3lZA1D.js} +1 -1
  16. package/assets/devtools/{chunk.BiYuhEvJ.js → chunk.CMPoj2S1.js} +1 -1
  17. package/assets/devtools/{chunk.uTsm7un3.js → chunk.CMrSghiM.js} +1 -1
  18. package/assets/devtools/{chunk.BLm9NSIJ.js → chunk.CNyKXw81.js} +2 -2
  19. package/assets/devtools/chunk.CSlinMdh.js +1 -0
  20. package/assets/devtools/chunk.CUdeQBl0.js +6 -0
  21. package/assets/devtools/chunk.CcRPc1V0.js +1 -0
  22. package/assets/devtools/{chunk.0pKzkQ-k.js → chunk.CqWgHz10.js} +1 -1
  23. package/assets/devtools/{chunk.BkBlh2Dt.js → chunk.D6vpaxPE.js} +1 -1
  24. package/assets/devtools/{chunk.B9h7IAR1.js → chunk.DCS6fHH1.js} +1 -1
  25. package/assets/devtools/chunk.DIbRzrh1.js +1 -0
  26. package/assets/devtools/chunk.DJdym_tE.js +1 -0
  27. package/assets/devtools/{chunk.XGXwPH1e.js → chunk.DRx03mgu.js} +1 -1
  28. package/assets/devtools/{chunk.Djkuv-DD.js → chunk.DUP1E40B.js} +1 -1
  29. package/assets/devtools/{chunk.Ct5753mG.js → chunk.DhCpNWJE.js} +1 -1
  30. package/assets/devtools/chunk.DojDQgy5.js +1 -0
  31. package/assets/devtools/{chunk.e1Pq7Nwk.js → chunk.DqX1betX.js} +1 -1
  32. package/assets/devtools/chunk.Dwb-lFg8.js +1 -0
  33. package/assets/devtools/{chunk.bYKDU_ru.js → chunk.OgXBCMJY.js} +1 -1
  34. package/assets/devtools/chunk.QuY3UyEF.js +1 -0
  35. package/assets/devtools/chunk.VmKlHUok.js +1 -0
  36. package/assets/devtools/{chunk.C8MW3asi.js → chunk.VyCl7mMj.js} +1 -1
  37. package/assets/devtools/chunk.e9ZcH1yi.js +1 -0
  38. package/assets/devtools/entry.r_sixgJG.js +75 -0
  39. package/assets/devtools/index.html +2 -2
  40. package/dist/index.js.map +1 -1
  41. package/package.json +8 -8
  42. package/src/ui/AppRouter.tsx +1 -1
  43. package/src/ui/components/DevAtomsViewer.tsx +2 -1
  44. package/src/ui/components/DevLayout.tsx +4 -34
  45. package/src/ui/components/DevTopicsViewer.tsx +3 -7
  46. package/src/ui/main.ts +8 -2
  47. package/assets/devtools/chunk.B5eTVHku.js +0 -1
  48. package/assets/devtools/chunk.BmVQcEyT.js +0 -1
  49. package/assets/devtools/chunk.ByjndBdY.js +0 -6
  50. package/assets/devtools/chunk.CLYiSTOf.js +0 -1
  51. package/assets/devtools/chunk.CjoaeVq1.js +0 -7
  52. package/assets/devtools/chunk.D4sT5zWZ.js +0 -1
  53. package/assets/devtools/chunk.Ddpv5E_O.js +0 -1
  54. package/assets/devtools/chunk.DtstekP0.js +0 -1
  55. package/assets/devtools/chunk.R7-m7OZO.js +0 -1
  56. package/assets/devtools/chunk.VgeujX8m.js +0 -2
  57. package/assets/devtools/chunk.VjygskIP.js +0 -1
  58. package/assets/devtools/chunk.W1p_0xSo.js +0 -1
  59. package/assets/devtools/chunk.arBxf8N4.js +0 -1
  60. package/assets/devtools/chunk.cMS5bixD.js +0 -1
  61. package/assets/devtools/entry.Cjxjbqvs.js +0 -75
@@ -1 +1 @@
1
- import{Y as B,Z as L,r as c,j as e,F as t,T as r,B as x,H as a,ae as T,z as C,ac as S,P as v,ad as w,a5 as P,a9 as A}from"./entry.Cjxjbqvs.js";import{d as E}from"./chunk.XGXwPH1e.js";import{S as g,B as u}from"./chunk.uTsm7un3.js";import{I as M}from"./chunk.Ddpv5E_O.js";import{T as j}from"./chunk.Ct5753mG.js";import{T as n}from"./chunk.aHk99chr.js";import{a as O,I}from"./chunk.BkBlh2Dt.js";import{I as R}from"./chunk.CaVuq3Op.js";import"./chunk.BlqFPyLh.js";const z={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},$=s=>z[s]??z.default,D=s=>s?typeof s=="number"?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`:String(s):"No TTL",K=({caches:s,selectedCache:l,onSelectCache:p,search:f,onSearchChange:b})=>{const h=c.useMemo(()=>{const i={};for(const o of s){const d=o.provider||"default";i[d]||(i[d]=[]),i[d].push(o)}return i},[s]),y=Object.keys(h).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsx(T,{placeholder:"Search caches...",leftSection:e.jsx(C,{size:14}),size:"xs",value:f,onChange:i=>b(i.target.value)})}),e.jsx(S,{style:{flex:1},children:y.map(i=>e.jsxs(x,{children:[e.jsx(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:a.colors.background,borderBottom:`1px solid ${a.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:i}),h[i].map(o=>{const d=l?.name===o.name,m=$(o.provider);return e.jsxs(t,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>p(o),style:{cursor:"pointer",backgroundColor:d?`${m}15`:void 0,borderLeft:d?`2px solid ${m}`:"2px solid transparent",borderBottom:`1px solid ${a.colors.border}`,opacity:o.disabled?.5:1},children:[e.jsx(v,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,children:o.name}),o.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"off"})]},o.name)})]},i))})]})},N=({cache:s})=>e.jsx(S,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Configuration"}),e.jsx(n,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(n.Tbody,{children:[e.jsxs(n.Tr,{children:[e.jsx(n.Td,{w:150,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Name"})}),e.jsx(n.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.name})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Provider"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"TTL"})}),e.jsx(n.Td,{children:e.jsxs(t,{align:"center",gap:"xs",children:[e.jsx(O,{size:14,opacity:.5}),e.jsx(r,{size:"sm",ff:"monospace",children:D(s.ttl)})]})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Status"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.disabled?"gray":"green",children:s.disabled?"Disabled":"Enabled"})})]})]})})]}),e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Actions"}),e.jsx(t,{gap:"sm",children:e.jsx(w,{label:"Clear all cached entries (coming soon)",children:e.jsx(P,{size:"xs",variant:"light",color:"red",leftSection:e.jsx(I,{size:14}),disabled:!0,children:"Clear All"})})})]})]})}),F=({cache:s})=>{const[l,p]=c.useState("");return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsxs(t,{gap:"sm",align:"center",children:[e.jsx(T,{placeholder:"Filter by pattern...",leftSection:e.jsx(C,{size:14}),size:"xs",value:l,onChange:f=>p(f.target.value),style:{flex:1}}),e.jsx(w,{label:"Invalidate matching keys (coming soon)",children:e.jsx(A,{size:"sm",variant:"light",color:"orange",disabled:!0,children:e.jsx(I,{size:14})})})]})}),e.jsx(t,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(R,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Key browser coming soon"}),e.jsxs(r,{size:"xs",c:"dimmed",children:["Browse and manage cached keys for ",s.name]})]})})]})},H=({cache:s})=>{const l=$(s.provider);return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{px:"md",py:"sm",style:{borderBottom:`1px solid ${a.colors.border}`,backgroundColor:`${l}08`},children:e.jsxs(t,{align:"center",gap:"sm",children:[e.jsx(v,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:s.name}),e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider}),s.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsxs(j,{defaultValue:"config",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(j.List,{px:"md",children:[e.jsx(j.Tab,{value:"config",children:"Config"}),e.jsx(j.Tab,{value:"keys",children:"Keys"})]}),e.jsx(j.Panel,{value:"config",style:{flex:1,overflow:"hidden"},children:e.jsx(N,{cache:s})}),e.jsx(j.Panel,{value:"keys",style:{flex:1,overflow:"hidden"},children:e.jsx(F,{cache:s})})]})]})},V=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(v,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Select a cache to view its configuration"})]})}),Y=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(M,{size:48,opacity:.3}),e.jsx(r,{children:"No caches found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Add caches using $cache primitive to see them here"})]})}),ee=()=>{const s=B(L),[l,p]=c.useState([]),[f,b]=c.useState(!0),[h,y]=c.useState(null),[i,o]=c.useState("");c.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:E}}).then(m=>{p(m.data.caches),b(!1)})},[]);const d=c.useMemo(()=>{if(!i)return l;const m=i.toLowerCase();return l.filter(k=>k.name.toLowerCase().includes(m))},[l,i]);return f?e.jsx(t,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):l.length===0?e.jsx(Y,{}):e.jsxs(t,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(x,{w:240,style:{borderRight:`1px solid ${a.colors.border}`,backgroundColor:a.colors.surface},children:e.jsx(K,{caches:d,selectedCache:h,onSelectCache:y,search:i,onSearchChange:o})}),e.jsx(x,{style:{flex:1,overflow:"hidden"},children:h?e.jsx(H,{cache:h}):e.jsx(V,{})})]})};export{ee as DevCacheInspector,ee as default};
1
+ import{Y as B,Z as L,r as c,j as e,F as t,T as r,B as x,H as a,ae as T,z as C,ac as S,P as v,ad as w,a5 as P,a9 as A}from"./entry.r_sixgJG.js";import{d as E}from"./chunk.DRx03mgu.js";import{S as g,B as u}from"./chunk.CMrSghiM.js";import{I as M}from"./chunk.BA8URMP8.js";import{T as j}from"./chunk.DhCpNWJE.js";import{T as n}from"./chunk.BkQQhCPw.js";import{a as O,I}from"./chunk.D6vpaxPE.js";import{I as R}from"./chunk.B_-9nxHc.js";import"./chunk.BlqFPyLh.js";const z={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},$=s=>z[s]??z.default,D=s=>s?typeof s=="number"?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`:String(s):"No TTL",K=({caches:s,selectedCache:l,onSelectCache:p,search:f,onSearchChange:b})=>{const h=c.useMemo(()=>{const i={};for(const o of s){const d=o.provider||"default";i[d]||(i[d]=[]),i[d].push(o)}return i},[s]),y=Object.keys(h).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsx(T,{placeholder:"Search caches...",leftSection:e.jsx(C,{size:14}),size:"xs",value:f,onChange:i=>b(i.target.value)})}),e.jsx(S,{style:{flex:1},children:y.map(i=>e.jsxs(x,{children:[e.jsx(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:a.colors.background,borderBottom:`1px solid ${a.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:i}),h[i].map(o=>{const d=l?.name===o.name,m=$(o.provider);return e.jsxs(t,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>p(o),style:{cursor:"pointer",backgroundColor:d?`${m}15`:void 0,borderLeft:d?`2px solid ${m}`:"2px solid transparent",borderBottom:`1px solid ${a.colors.border}`,opacity:o.disabled?.5:1},children:[e.jsx(v,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,children:o.name}),o.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"off"})]},o.name)})]},i))})]})},N=({cache:s})=>e.jsx(S,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Configuration"}),e.jsx(n,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(n.Tbody,{children:[e.jsxs(n.Tr,{children:[e.jsx(n.Td,{w:150,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Name"})}),e.jsx(n.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.name})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Provider"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"TTL"})}),e.jsx(n.Td,{children:e.jsxs(t,{align:"center",gap:"xs",children:[e.jsx(O,{size:14,opacity:.5}),e.jsx(r,{size:"sm",ff:"monospace",children:D(s.ttl)})]})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Status"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.disabled?"gray":"green",children:s.disabled?"Disabled":"Enabled"})})]})]})})]}),e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Actions"}),e.jsx(t,{gap:"sm",children:e.jsx(w,{label:"Clear all cached entries (coming soon)",children:e.jsx(P,{size:"xs",variant:"light",color:"red",leftSection:e.jsx(I,{size:14}),disabled:!0,children:"Clear All"})})})]})]})}),F=({cache:s})=>{const[l,p]=c.useState("");return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsxs(t,{gap:"sm",align:"center",children:[e.jsx(T,{placeholder:"Filter by pattern...",leftSection:e.jsx(C,{size:14}),size:"xs",value:l,onChange:f=>p(f.target.value),style:{flex:1}}),e.jsx(w,{label:"Invalidate matching keys (coming soon)",children:e.jsx(A,{size:"sm",variant:"light",color:"orange",disabled:!0,children:e.jsx(I,{size:14})})})]})}),e.jsx(t,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(R,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Key browser coming soon"}),e.jsxs(r,{size:"xs",c:"dimmed",children:["Browse and manage cached keys for ",s.name]})]})})]})},H=({cache:s})=>{const l=$(s.provider);return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{px:"md",py:"sm",style:{borderBottom:`1px solid ${a.colors.border}`,backgroundColor:`${l}08`},children:e.jsxs(t,{align:"center",gap:"sm",children:[e.jsx(v,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:s.name}),e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider}),s.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsxs(j,{defaultValue:"config",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(j.List,{px:"md",children:[e.jsx(j.Tab,{value:"config",children:"Config"}),e.jsx(j.Tab,{value:"keys",children:"Keys"})]}),e.jsx(j.Panel,{value:"config",style:{flex:1,overflow:"hidden"},children:e.jsx(N,{cache:s})}),e.jsx(j.Panel,{value:"keys",style:{flex:1,overflow:"hidden"},children:e.jsx(F,{cache:s})})]})]})},V=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(v,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Select a cache to view its configuration"})]})}),Y=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(M,{size:48,opacity:.3}),e.jsx(r,{children:"No caches found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Add caches using $cache primitive to see them here"})]})}),ee=()=>{const s=B(L),[l,p]=c.useState([]),[f,b]=c.useState(!0),[h,y]=c.useState(null),[i,o]=c.useState("");c.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:E}}).then(m=>{p(m.data.caches),b(!1)})},[]);const d=c.useMemo(()=>{if(!i)return l;const m=i.toLowerCase();return l.filter(k=>k.name.toLowerCase().includes(m))},[l,i]);return f?e.jsx(t,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):l.length===0?e.jsx(Y,{}):e.jsxs(t,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(x,{w:240,style:{borderRight:`1px solid ${a.colors.border}`,backgroundColor:a.colors.surface},children:e.jsx(K,{caches:d,selectedCache:h,onSelectCache:y,search:i,onSearchChange:o})}),e.jsx(x,{style:{flex:1,overflow:"hidden"},children:h?e.jsx(H,{cache:h}):e.jsx(V,{})})]})};export{ee as DevCacheInspector,ee as default};
@@ -0,0 +1 @@
1
+ import{w as a}from"./entry.r_sixgJG.js";const o=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],e=a("outline","lock","Lock",o);export{e as I};
@@ -0,0 +1 @@
1
+ import{u as we,r as m,M as Ie,a as Ae,c as Ce,f as j,b as v,j as r,B as x,d as H,R as W,e as f,k as w,g as Ne,h as te,i as ze,l as ke,I as ye,p as Be,m as Pe,n as Re,o as Te,q as $,s as O,U as _e,t as re,v as Ve,w as A,x as R,F as p,y as Ee,z as Fe,T as q,A as T,C as z,D as ae,E as De,G as Le,H as F,N as le,J as He,K as We,L as $e,O as Oe,P as qe,Q as Ke,S as Xe,V as Qe,W as Ge,X as Ue}from"./entry.r_sixgJG.js";import{A as I,u as Ye}from"./chunk.DIbRzrh1.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.DqX1betX.js";import{D as Ze}from"./chunk.AVmV_XG3.js";import{g as ie,a as se}from"./chunk.CMPoj2S1.js";import{I as et}from"./chunk.CqWgHz10.js";import"./chunk.DUP1E40B.js";import"./chunk.BlqFPyLh.js";import"./chunk.C2Epljet.js";import"./chunk.uyVen0u2.js";import"./chunk.CcRPc1V0.js";function ce(e,t){return we("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}function oe(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(o=>o.remove())}function he({keepTransitions:e}={}){const t=m.useRef(Je),n=m.useRef(-1),o=m.useContext(Ie),h=Ae(),l=m.useRef(h?.());if(!o)throw new Error("[@mantine/core] MantineProvider was not found in tree");const a=b=>{o.setColorScheme(b),t.current=e?()=>{}:oe(l.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{o.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=ce("light",{getInitialValueInEffect:!1}),i=o.colorScheme==="auto"?s:o.colorScheme,u=m.useCallback(()=>a(i==="light"?"dark":"light"),[a,i]);return m.useEffect(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:o.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:u}}function tt(e,t={getInitialValueInEffect:!0}){const n=ce(e,t),{colorScheme:o}=he();return o==="auto"?n:o}const[st,C]=Ce("AppShell was not found in tree");var S={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const K=j((e,t)=>{const{classNames:n,className:o,style:h,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellAside",null,e),d=C();return d.disabled?null:r.jsx(x,{component:"aside",ref:t,mod:[{"with-border":s??d.withBorder},u],...d.getStyles("aside",{className:H({[W.classNames.zeroRight]:d.offsetScrollbars},o),classNames:n,styles:l,style:h}),...b,__vars:{"--app-shell-aside-z-index":`calc(${i??d.zIndex} + 1)`}})});K.classes=S;K.displayName="@mantine/core/AppShellAside";const X=j((e,t)=>{const{classNames:n,className:o,style:h,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellFooter",null,e),d=C();return d.disabled?null:r.jsx(x,{component:"footer",ref:t,mod:[{"with-border":s??d.withBorder},u],...d.getStyles("footer",{className:H({[W.classNames.zeroRight]:d.offsetScrollbars},o),classNames:n,styles:l,style:h}),...b,__vars:{"--app-shell-footer-z-index":(i??d.zIndex)?.toString()}})});X.classes=S;X.displayName="@mantine/core/AppShellFooter";const Q=j((e,t)=>{const{classNames:n,className:o,style:h,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellHeader",null,e),d=C();return d.disabled?null:r.jsx(x,{component:"header",ref:t,mod:[{"with-border":s??d.withBorder},u],...d.getStyles("header",{className:H({[W.classNames.zeroRight]:d.offsetScrollbars},o),classNames:n,styles:l,style:h}),...b,__vars:{"--app-shell-header-z-index":(i??d.zIndex)?.toString()}})});Q.classes=S;Q.displayName="@mantine/core/AppShellHeader";const G=j((e,t)=>{const{classNames:n,className:o,style:h,styles:l,vars:a,...c}=v("AppShellMain",null,e),s=C();return r.jsx(x,{component:"main",ref:t,...s.getStyles("main",{className:o,style:h,classNames:n,styles:l}),...c})});G.classes=S;G.displayName="@mantine/core/AppShellMain";function k(e){return typeof e=="object"?e.base:e}function y(e){const t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function B(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function ot({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:o,theme:h}){const l=o?.width,a="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(o?.breakpoint&&!o?.collapsed?.mobile&&(n[o?.breakpoint]=n[o?.breakpoint]||{},n[o?.breakpoint]["--app-shell-aside-width"]="100%",n[o?.breakpoint]["--app-shell-aside-offset"]="0px"),y(l)){const s=f(k(l));e["--app-shell-aside-width"]=s,e["--app-shell-aside-offset"]=s}if(B(l)&&(typeof l.base<"u"&&(e["--app-shell-aside-width"]=f(l.base),e["--app-shell-aside-offset"]=f(l.base)),w(l).forEach(s=>{s!=="base"&&(t[s]=t[s]||{},t[s]["--app-shell-aside-width"]=f(l[s]),t[s]["--app-shell-aside-offset"]=f(l[s]))})),o?.collapsed?.desktop){const s=o.breakpoint;t[s]=t[s]||{},t[s]["--app-shell-aside-transform"]=a,t[s]["--app-shell-aside-transform-rtl"]=c,t[s]["--app-shell-aside-offset"]="0px !important",t[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if(o?.collapsed?.mobile){const s=ie(o.breakpoint,h.breakpoints)-.1;n[s]=n[s]||{},n[s]["--app-shell-aside-width"]="100%",n[s]["--app-shell-aside-offset"]="0px",n[s]["--app-shell-aside-transform"]=a,n[s]["--app-shell-aside-transform-rtl"]=c,n[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function nt({baseStyles:e,minMediaStyles:t,footer:n}){const o=n?.height,h="translateY(var(--app-shell-footer-height))",l=n?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}B(o)&&(typeof o.base<"u"&&(e["--app-shell-footer-height"]=f(o.base),l&&(e["--app-shell-footer-offset"]=f(o.base))),w(o).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=f(o[a]),l&&(t[a]["--app-shell-footer-offset"]=f(o[a])))})),n?.collapsed&&(e["--app-shell-footer-transform"]=h,e["--app-shell-footer-offset"]="0px !important")}function rt({baseStyles:e,minMediaStyles:t,header:n}){const o=n?.height,h="translateY(calc(var(--app-shell-header-height) * -1))",l=n?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}B(o)&&(typeof o.base<"u"&&(e["--app-shell-header-height"]=f(o.base),l&&(e["--app-shell-header-offset"]=f(o.base))),w(o).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=f(o[a]),l&&(t[a]["--app-shell-header-offset"]=f(o[a])))})),n?.collapsed&&(e["--app-shell-header-transform"]=h,e["--app-shell-header-offset"]="0px !important")}function at({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:o,theme:h}){const l=o?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(o?.breakpoint&&!o?.collapsed?.mobile&&(n[o?.breakpoint]=n[o?.breakpoint]||{},n[o?.breakpoint]["--app-shell-navbar-width"]="100%",n[o?.breakpoint]["--app-shell-navbar-offset"]="0px"),y(l)){const s=f(k(l));e["--app-shell-navbar-width"]=s,e["--app-shell-navbar-offset"]=s}if(B(l)&&(typeof l.base<"u"&&(e["--app-shell-navbar-width"]=f(l.base),e["--app-shell-navbar-offset"]=f(l.base)),w(l).forEach(s=>{s!=="base"&&(t[s]=t[s]||{},t[s]["--app-shell-navbar-width"]=f(l[s]),t[s]["--app-shell-navbar-offset"]=f(l[s]))})),o?.collapsed?.desktop){const s=o.breakpoint;t[s]=t[s]||{},t[s]["--app-shell-navbar-transform"]=a,t[s]["--app-shell-navbar-transform-rtl"]=c,t[s]["--app-shell-navbar-offset"]="0px !important"}if(o?.collapsed?.mobile){const s=ie(o.breakpoint,h.breakpoints)-.1;n[s]=n[s]||{},n[s]["--app-shell-navbar-width"]="100%",n[s]["--app-shell-navbar-offset"]="0px",n[s]["--app-shell-navbar-transform"]=a,n[s]["--app-shell-navbar-transform-rtl"]=c}}function D(e){return Number(e)===0?"0px":Ne(e)}function lt({padding:e,baseStyles:t,minMediaStyles:n}){y(e)&&(t["--app-shell-padding"]=D(k(e))),B(e)&&(e.base&&(t["--app-shell-padding"]=D(e.base)),w(e).forEach(o=>{o!=="base"&&(n[o]=n[o]||{},n[o]["--app-shell-padding"]=D(e[o]))}))}function it({navbar:e,header:t,footer:n,aside:o,padding:h,theme:l}){const a={},c={},s={};at({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),ot({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,aside:o,theme:l}),rt({baseStyles:s,minMediaStyles:a,header:t}),nt({baseStyles:s,minMediaStyles:a,footer:n}),lt({baseStyles:s,minMediaStyles:a,padding:h});const i=se(w(a),l.breakpoints).map(d=>({query:`(min-width: ${te(d.px)})`,styles:a[d.value]})),u=se(w(c),l.breakpoints).map(d=>({query:`(max-width: ${te(d.px)})`,styles:c[d.value]})),b=[...i,...u];return{baseStyles:s,media:b}}function ct({navbar:e,header:t,aside:n,footer:o,padding:h}){const l=ze(),a=ke(),{media:c,baseStyles:s}=it({navbar:e,header:t,footer:o,aside:n,padding:h,theme:l});return r.jsx(ye,{media:c,styles:s,selector:a.cssVariablesSelector})}const U=j((e,t)=>{const{classNames:n,className:o,style:h,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellNavbar",null,e),d=C();return d.disabled?null:r.jsx(x,{component:"nav",ref:t,mod:[{"with-border":s??d.withBorder},u],...d.getStyles("navbar",{className:o,classNames:n,styles:l,style:h}),...b,__vars:{"--app-shell-navbar-z-index":`calc(${i??d.zIndex} + 1)`}})});U.classes=S;U.displayName="@mantine/core/AppShellNavbar";const Y=Be((e,t)=>{const{classNames:n,className:o,style:h,styles:l,vars:a,grow:c,mod:s,...i}=v("AppShellSection",null,e),u=C();return r.jsx(x,{ref:t,mod:[{grow:c},s],...u.getStyles("section",{className:o,style:h,classNames:n,styles:l}),...i})});Y.classes=S;Y.displayName="@mantine/core/AppShellSection";function ht({transitionDuration:e,disabled:t}){const[n,o]=m.useState(!0),h=m.useRef(-1),l=m.useRef(-1);return Pe("resize",()=>{o(!0),clearTimeout(h.current),h.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),200)}),Re(()=>{o(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),e||0)},[t,e]),n}const dt={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Te("app")},ut=O((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),g=j((e,t)=>{const n=v("AppShell",dt,e),{classNames:o,className:h,style:l,styles:a,unstyled:c,vars:s,navbar:i,withBorder:u,padding:b,transitionDuration:d,transitionTimingFunction:_,header:N,zIndex:V,layout:P,disabled:E,aside:me,footer:be,offsetScrollbars:ge=!0,mod:ve,attributes:xe,...je}=n,ee=$({name:"AppShell",classes:S,props:n,className:h,style:l,classNames:o,styles:a,unstyled:c,attributes:xe,vars:s,varsResolver:ut}),Se=ht({disabled:E,transitionDuration:d});return r.jsxs(st,{value:{getStyles:ee,withBorder:u,zIndex:V,disabled:E,offsetScrollbars:ge},children:[r.jsx(ct,{navbar:i,header:N,aside:me,footer:be,padding:b}),r.jsx(x,{ref:t,...ee("root"),mod:[{resizing:Se,layout:P,disabled:E},ve],...je})]})});g.classes=S;g.displayName="@mantine/core/AppShell";g.Navbar=U;g.Header=Q;g.Main=G;g.Aside=K;g.Footer=X;g.Section=Y;var de={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const pt=O((e,{color:t,size:n,lineSize:o,transitionDuration:h,transitionTimingFunction:l})=>({root:{"--burger-color":t?Ve(t,e):void 0,"--burger-size":re(n,"burger-size"),"--burger-line-size":o?f(o):void 0,"--burger-transition-duration":h===void 0?void 0:`${h}ms`,"--burger-transition-timing-function":l}})),J=j((e,t)=>{const n=v("Burger",null,e),{classNames:o,className:h,style:l,styles:a,unstyled:c,vars:s,opened:i,children:u,transitionDuration:b,transitionTimingFunction:d,lineSize:_,attributes:N,...V}=n,P=$({name:"Burger",classes:de,props:n,className:h,style:l,classNames:o,styles:a,unstyled:c,attributes:N,vars:s,varsResolver:pt});return r.jsxs(_e,{...P("root"),ref:t,...V,children:[r.jsx(x,{mod:["reduce-motion",{opened:i}],...P("burger")}),u]})});J.classes=de;J.displayName="@mantine/core/Burger";var ue={root:"m_dc6f14e2"};const ft=O((e,{size:t})=>({root:{"--kbd-fz":re(t,"kbd-fz")}})),M=j((e,t)=>{const n=v("Kbd",null,e),{classNames:o,className:h,style:l,styles:a,unstyled:c,vars:s,attributes:i,...u}=n,b=$({name:"Kbd",classes:ue,props:n,className:h,style:l,classNames:o,styles:a,unstyled:c,attributes:i,vars:s,varsResolver:ft});return r.jsx(x,{component:"kbd",ref:t,...b("root"),...u})});M.classes=ue;M.displayName="@mantine/core/Kbd";const mt=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],bt=A("outline","language","Language",mt);const gt=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],vt=A("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",gt);const xt=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M9 10l2 2l-2 2",key:"svg-2"}]],jt=A("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",xt);const St=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],ne=A("outline","moon","Moon",St);const wt=[["path",{d:"M12 3c7.2 0 9 1.8 9 9c0 7.2 -1.8 9 -9 9c-7.2 0 -9 -1.8 -9 -9c0 -7.2 1.8 -9 9 -9",key:"svg-0"}]],It=A("outline","square-rounded","SquareRounded",wt);const At=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],L=A("outline","sun","Sun",At),Ct=e=>{const[t,n]=R("alepha.ui.sidebar.opened");return r.jsx(J,{opened:t,onClick:()=>n(!t),hiddenFrom:"sm",size:"sm",...e})},pe=e=>{const{setColorScheme:t}=he(),n=tt("light"),[o,h]=m.useState("default"),l=e.mode??"minimal";m.useEffect(()=>{h(n)},[n]);const a=()=>{t(n==="dark"?"light":"dark")};return l==="segmented"?r.jsx(Me,{value:o,onChange:c=>t(c),data:[{value:"light",label:r.jsx(p,{h:20,align:"center",justify:"center",children:r.jsx(L,{size:16})})},{value:"dark",label:r.jsx(p,{h:20,align:"center",justify:"center",children:r.jsx(ne,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):r.jsx(I,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:o==="dark"?L:o==="light"?ne:L,...e.actionProps})},Nt=e=>{const t=Ye();return r.jsx(I,{variant:"default",icon:bt,menu:{items:t.languages.map(n=>({label:t.tr(n),onClick:()=>t.setLang(n),active:t.lang===n}))},...e.actionProps})},Z=e=>r.jsx(I,{variant:"default",onClick:Ee.open,justify:"space-between",rightSection:r.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:r.jsxs(p,{align:"center",gap:"xs",children:[r.jsx(Fe,{size:16,color:"gray"}),r.jsx(p,{visibleFrom:"sm",miw:192,children:r.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),zt=e=>{const{items:t=[]}=e,n=(a,c)=>{if("type"in a){if(a.type==="burger")return r.jsx(Ct,{},c);if(a.type==="dark")return r.jsx(pe,{...a.props},c);if(a.type==="search")return r.jsx(Z,{...a.props},c);if(a.type==="lang")return r.jsx(Nt,{...a.props},c);if(a.type==="spacer")return r.jsx(p,{w:16},c);if(a.type==="divider")return r.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},o=t.filter(a=>a.position==="left"),h=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return r.jsxs(p,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[r.jsx(p,{flex:1,children:o.map((a,c)=>r.jsx(p,{ml:c===0?0:"md",align:"center",children:n(a,c)},c))}),r.jsx(p,{children:h.map((a,c)=>r.jsx(p,{mx:"md",align:"center",children:n(a,c)},c))}),r.jsx(p,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>r.jsx(p,{ml:c===0?0:"md",align:"center",children:n(a,c)},c))})]})},kt=()=>{const[e,t]=R("alepha.ui.sidebar.collapsed");return r.jsx(p,{children:r.jsx(I,{icon:e?r.jsx(jt,{}):r.jsx(vt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},yt=e=>{const t=T(),{onItemClick:n}=e,o=(s,i)=>{if("type"in s){if(s.type==="spacer")return r.jsx(p,{h:16},i);if(s.type==="divider")return r.jsx(p,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},i);if(s.type==="search")return r.jsx(Z,{collapsed:e.collapsed},i);if(s.type==="toggle")return r.jsx(kt,{},i);if(s.type==="section")return e.collapsed?void 0:r.jsxs(p,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[z(s.icon),r.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:s.label},i)]},i)}return"element"in s?r.jsx(p,{children:s.element},i):s.can&&!s.can()?null:e.collapsed?r.jsx(Bt,{item:s,level:0,onItemClick:n,theme:e.theme??{}},i):r.jsx(fe,{item:s,level:0,onItemClick:n,theme:e.theme??{}},i)},h=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){const s=t.concretePages.map(i=>({label:i.label??i.name,icon:z(i.icon),href:t.path(i.name)}));if(typeof e.autoPopulateMenu=="object"&&e.autoPopulateMenu.startsWith){const i=e.autoPopulateMenu.startsWith;return s.filter(u=>u.href?.startsWith(i))}}return[]},l="md",a=e.items?e.gap:"xs",c=m.useMemo(()=>h(),[]);return r.jsxs(p,{flex:1,py:l,direction:"column",className:"overflow-auto",...e.flexProps,children:[r.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="top").map((s,i)=>o(s,i))}),r.jsx(p,{gap:a,px:l,direction:"column",flex:1,className:"overflow-auto",children:c.filter(s=>!s.position).map((s,i)=>o(s,i))}),r.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="bottom").map((s,i)=>o(s,i))})]})},fe=e=>{const{item:t,level:n}=e,o=2,h=T(),l=m.useCallback(i=>{if(!i.children)return!1;for(const u of i.children)if(u.href&&h.isActive(u.href)||l(u))return!0;return!1},[]),[a,c]=m.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),n>o)return null;const s=i=>{e.item.target||i.preventDefault(),t.children&&t.children.length>0?c(!a):(e.onItemClick?.(t),t.onClick?.())};return r.jsxs(p,{direction:"column",ps:n===0?0:32,pos:"relative",children:[r.jsx(I,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(n===0?"sm":"xs"),c:"var(--mantine-color-text)",color:"gray",variant:"subtle",variantActive:"default",radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:s,leftSection:r.jsxs(p,{w:"100%",align:"center",gap:"sm",children:[z(t.icon),r.jsxs(p,{direction:"column",children:[r.jsx(p,{children:t.label}),t.description&&r.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?r.jsx(p,{children:a?r.jsx(De,{size:14}):r.jsx(Le,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&r.jsxs(p,{direction:"column","data-parent-level":n,children:[r.jsx(p,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*n,bottom:16}}),t.children.filter(i=>!i.can||i.can()).map((i,u)=>r.jsx(fe,{item:i,level:n+1,onItemClick:e.onItemClick,theme:e.theme},u))]})]})},Bt=e=>{const{item:t,level:n}=e,o=T(),h=m.useCallback(s=>{if(!s.children)return!1;for(const i of s.children)if(i.href&&o.isActive(i.href)||h(i))return!0;return!1},[]),[l,a]=m.useState(h(t)),c=s=>{e.item.target||s.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return r.jsx(I,{size:e.item.theme?.size??e.theme.button?.size??(n===0?"sm":"xs"),variant:"subtle",variantActive:"default",tooltip:t.children?void 0:{label:t.label,position:"right"},radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:c,icon:z(t.icon)??r.jsx(It,{}),href:e.item.href,target:e.item.target,menu:t.children?{position:"right",on:"hover",items:t.children.filter(s=>!s.can||s.can()).map(s=>({label:s.label,href:s.href,icon:z(s.icon),children:s.children?.filter(i=>!i.can||i.can())}))}:void 0,...e.item.actionProps})},Pt=e=>{const t=T(),[n,o]=R("alepha.ui.sidebar.opened"),[h]=R("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const N of e.noSidebarWhen.paths)if(t.isActive(N,{startWith:!0}))return!1}return!0},[a,c]=m.useState(l());ae({"react:transition:end":()=>{c(l())},"react:transition:begin":()=>{o(!1)}},[]);const s=[{position:"left",type:"burger"}],i=a&&e.sidebarProps!==void 0,u=i||e.appBarProps||e.header,b=u?60:0,d=e.footer?24:0,_=i?h?78:300:0;return r.jsxs(g,{w:"100%",flex:1,padding:"md",header:u?{height:60}:void 0,navbar:i?{width:h?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!n}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[r.jsx(g.Header,{bg:F.colors.surface,...e.appShellHeaderProps,children:e.header??r.jsx(zt,{items:s,...e.appBarProps})}),i&&r.jsx(g.Navbar,{bg:F.colors.surface,...e.appShellNavbarProps,children:r.jsx(yt,{collapsed:h,...e.sidebarProps??{}})}),r.jsx(g.Main,{pl:_,pt:b,pb:d,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??r.jsx(le,{})}),e.footer&&r.jsx(g.Footer,{bg:F.colors.surface,...e.appShellFooterProps,children:e.footer})]})},qt=()=>r.jsx(Pt,{sidebarProps:{gap:4,collapsed:!0,items:[{label:"Dashboard",icon:r.jsx(He,{}),href:"/"},{type:"divider"},{label:"Actions",icon:r.jsx(We,{}),href:"/actions"},{label:"Queues",icon:r.jsx($e,{}),href:"/queues"},{label:"Topics",icon:r.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:r.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:r.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:r.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:r.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:r.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:r.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:r.jsx(I,{intent:"none",icon:et,href:"/",active:!1,children:"Devtools"})},{position:"center",element:r.jsx(Z,{})},{position:"right",element:r.jsx(pe,{})}]},children:r.jsx(le,{})});export{qt as DevLayout,qt as default};
@@ -1 +1 @@
1
- import{r as W,q as C,j as e,B as o,t as R,aI as q,aB as x,aF as w}from"./entry.Cjxjbqvs.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:I,unstyled:_,children:h,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:E,mod:F,attributes:S,...g},B)=>{const a=C({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:I,unstyled:_,attributes:S});return e.jsx(o,{...a("root"),ref:B,__vars:{"--label-fz":q(r),"--label-lh":R(r,"label-lh")},mod:[{"label-position":j},F],variant:v,size:r,...g,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[h,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});D.displayName="@mantine/core/InlineInput";function k({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{k as I,D as a,N as b};
1
+ import{r as W,q as C,j as e,B as o,t as R,aI as q,aB as x,aF as w}from"./entry.r_sixgJG.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:I,unstyled:_,children:h,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:E,mod:F,attributes:S,...g},B)=>{const a=C({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:I,unstyled:_,attributes:S});return e.jsx(o,{...a("root"),ref:B,__vars:{"--label-fz":q(r),"--label-lh":R(r,"label-lh")},mod:[{"label-position":j},F],variant:v,size:r,...g,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[h,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});D.displayName="@mantine/core/InlineInput";function k({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{k as I,D as a,N as b};
@@ -0,0 +1 @@
1
+ import{w as T,Y as J,Z as R,r as u,j as e,F as m,T as o,B as j,H as f,V as z,ae as C,z as B,ac as k,ad as D,a9 as I,a5 as A,af as M}from"./entry.r_sixgJG.js";import{J as w}from"./chunk.CSlinMdh.js";import{d as O}from"./chunk.DRx03mgu.js";import{S as y,B as E}from"./chunk.CMrSghiM.js";import{T as b}from"./chunk.DhCpNWJE.js";import{S as N,I as L,N as F}from"./chunk.CNyKXw81.js";import{T as $}from"./chunk.CD3lZA1D.js";import"./chunk.BlqFPyLh.js";import"./chunk.CcRPc1V0.js";import"./chunk.BjFrJKj1.js";import"./chunk.VyCl7mMj.js";import"./chunk.uyVen0u2.js";const _=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],P=T("outline","device-floppy","DeviceFloppy",_);const H=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],U=T("outline","edit","Edit",H),X=({atoms:t,selectedAtom:n,onSelectAtom:i,search:x,onSearchChange:l})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsx(C,{placeholder:"Search atoms...",leftSection:e.jsx(B,{size:14}),size:"xs",value:x,onChange:r=>l(r.target.value)})}),e.jsx(k,{style:{flex:1},children:e.jsxs(j,{children:[e.jsxs(o,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:f.colors.background,borderBottom:`1px solid ${f.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Atoms (",t.length,")"]}),t.map(r=>{const h=n?.name===r.name,s=r.currentValue!==void 0;return e.jsxs(m,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>i(r),style:{cursor:"pointer",backgroundColor:h?"#228be615":void 0,borderLeft:h?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${f.colors.border}`},children:[e.jsx(z,{size:14,opacity:.5}),e.jsx(o,{size:"sm",style:{flex:1},truncate:!0,children:r.name}),s&&e.jsx(E,{size:"xs",variant:"light",color:"green",children:"set"})]},r.name)})]})})]}),V=({schema:t,value:n,onChange:i,path:x=""})=>{if(!t)return null;let l=t;if(t.anyOf){const s=t.anyOf.find(c=>c.type!=="null");s&&(l=s)}const r=l.type,h=l.format;if(r==="object"&&l.properties)return e.jsx(y,{gap:"sm",children:Object.entries(l.properties).map(([s,c])=>e.jsxs(j,{children:[e.jsxs(o,{size:"sm",fw:500,mb:4,children:[c.title||s,c.description&&e.jsx(o,{span:!0,size:"xs",c:"dimmed",ml:"xs",children:c.description})]}),e.jsx(V,{schema:c,value:n?.[s],onChange:d=>i({...n,[s]:d}),path:x?`${x}.${s}`:s})]},s))});if(r==="array"){const s=n??[];return e.jsxs(y,{gap:"xs",children:[s.map((c,d)=>e.jsxs(m,{gap:"xs",align:"center",children:[e.jsx(j,{style:{flex:1},children:e.jsx(V,{schema:l.items,value:c,onChange:g=>{const v=[...s];v[d]=g,i(v)},path:`${x}[${d}]`})}),e.jsx(I,{size:"sm",variant:"light",color:"red",onClick:()=>{const g=s.filter((v,p)=>p!==d);i(g)},children:e.jsx(M,{size:14})})]},d)),e.jsx(A,{size:"xs",variant:"light",onClick:()=>i([...s,void 0]),children:"Add item"})]})}return r==="boolean"?e.jsx(N,{checked:n??!1,onChange:s=>i(s.currentTarget.checked)}):r==="number"||r==="integer"?e.jsx(F,{size:"sm",value:n??"",onChange:s=>i(s===""?void 0:s),allowDecimal:r==="number"}):l.enum?e.jsxs("select",{value:n??"",onChange:s=>i(s.target.value||void 0),style:{padding:"6px 10px",borderRadius:4,border:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface,width:"100%"},children:[e.jsx("option",{value:"",children:"Select..."}),l.enum.map(s=>e.jsx("option",{value:s,children:s},s))]}):h==="date"||h==="date-time"?e.jsx(C,{size:"sm",type:h==="date"?"date":"datetime-local",value:n??"",onChange:s=>i(s.target.value||void 0)}):h==="textarea"||l.multiline?e.jsx($,{size:"sm",value:n??"",onChange:s=>i(s.target.value||void 0),autosize:!0,minRows:2,maxRows:6}):e.jsx(C,{size:"sm",value:n??"",onChange:s=>i(s.target.value||void 0)})},Y=({atom:t})=>e.jsx(k,{h:"100%",p:"md",children:e.jsxs(y,{gap:"lg",children:[t.description&&e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(o,{size:"sm",c:"dimmed",children:t.description})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),t.currentValue!==void 0?e.jsx(w,{data:t.currentValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(not set - using default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Default Value"}),t.defaultValue!==void 0?e.jsx(w,{data:t.defaultValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(no default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(w,{data:t.schema,maxDepth:2})]})]})}),Z=({atom:t,onSave:n})=>{const[i,x]=u.useState(t.currentValue??t.defaultValue),[l,r]=u.useState(!1),[h,s]=u.useState(""),[c,d]=u.useState(null);u.useEffect(()=>{const a=t.currentValue??t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)},[t]);const g=a=>{s(a);try{const S=JSON.parse(a);x(S),d(null)}catch{d("Invalid JSON")}},v=()=>{n(i)},p=()=>{const a=t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)};return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsxs(m,{align:"center",justify:"space-between",children:[e.jsx(m,{gap:"xs",align:"center",children:e.jsx(N,{size:"xs",label:"JSON mode",checked:l,onChange:a=>r(a.currentTarget.checked)})}),e.jsxs(m,{gap:"xs",children:[e.jsx(D,{label:"Reset to default",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:p,children:e.jsx(L,{size:14})})}),e.jsx(A,{size:"xs",leftSection:e.jsx(P,{size:14}),onClick:v,disabled:l&&!!c,children:"Save"})]})]})}),e.jsx(k,{style:{flex:1},p:"md",children:l?e.jsxs(y,{gap:"xs",children:[e.jsx($,{value:h,onChange:a=>g(a.target.value),autosize:!0,minRows:10,maxRows:20,error:c,styles:{input:{fontFamily:"monospace"}}}),c&&e.jsx(o,{size:"xs",c:"red",children:c})]}):e.jsx(V,{schema:t.schema,value:i,onChange:x})})]})},q=({atom:t,onSave:n})=>{const i=t.currentValue!==void 0;return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{px:"md",py:"sm",style:{borderBottom:`1px solid ${f.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(z,{size:18,opacity:.7}),e.jsx(o,{size:"md",fw:600,children:t.name}),e.jsx(E,{size:"xs",variant:"light",color:i?"green":"gray",children:i?"has value":"default"})]})}),e.jsxs(b,{defaultValue:"info",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(b.List,{px:"md",children:[e.jsx(b.Tab,{value:"info",children:"Info"}),e.jsx(b.Tab,{value:"edit",leftSection:e.jsx(U,{size:14}),children:"Edit"})]}),e.jsx(b.Panel,{value:"info",style:{flex:1,overflow:"hidden"},children:e.jsx(Y,{atom:t})}),e.jsx(b.Panel,{value:"edit",style:{flex:1,overflow:"hidden"},children:e.jsx(Z,{atom:t,onSave:x=>n(t,x)})})]})]})},G=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{size:"sm",children:"Select an atom to view its details"})]})}),K=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{children:"No atoms found"}),e.jsx(o,{size:"sm",c:"dimmed",children:"Use $atom primitive to define state atoms"})]})}),de=()=>{const t=J(R),[n,i]=u.useState([]),[x,l]=u.useState(!0),[r,h]=u.useState(null),[s,c]=u.useState(""),d=u.useCallback(()=>{t.fetch("/devtools/api/metadata",{schema:{response:O}}).then(p=>{if(i(p.data.atoms),l(!1),r){const a=p.data.atoms.find(S=>S.name===r.name);a&&h(a)}})},[r?.name]);u.useEffect(()=>{d()},[]);const g=u.useMemo(()=>{if(!s)return n;const p=s.toLowerCase();return n.filter(a=>a.name.toLowerCase().includes(p))},[n,s]),v=u.useCallback(async(p,a)=>{try{await t.fetch("/devtools/api/atoms",{method:"POST",body:JSON.stringify({name:p.name,value:a})}),d()}catch(S){console.error("Failed to save atom:",S)}},[d]);return x?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(o,{c:"dimmed",children:"Loading..."})}):n.length===0?e.jsx(K,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(j,{w:260,style:{borderRight:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface},children:e.jsx(X,{atoms:g,selectedAtom:r,onSelectAtom:h,search:s,onSearchChange:c})}),e.jsx(j,{style:{flex:1,overflow:"hidden"},children:r?e.jsx(q,{atom:r,onSave:v}):e.jsx(G,{})})]})};export{de as DevAtomsViewer,de as default};