@alepha/devtools 0.14.3 → 0.14.4

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 (148) hide show
  1. package/assets/devtools/actions.html +37 -0
  2. package/assets/devtools/actions.html.br +0 -0
  3. package/assets/devtools/actions.html.gz +0 -0
  4. package/assets/devtools/asset.BZV40eAE.css.br +0 -0
  5. package/assets/devtools/asset.BZV40eAE.css.gz +0 -0
  6. package/assets/devtools/asset.DbJSgVPr.css.br +0 -0
  7. package/assets/devtools/asset.DbJSgVPr.css.gz +0 -0
  8. package/assets/devtools/atoms.html +37 -0
  9. package/assets/devtools/atoms.html.br +0 -0
  10. package/assets/devtools/atoms.html.gz +0 -0
  11. package/assets/devtools/caches.html +37 -0
  12. package/assets/devtools/caches.html.br +0 -0
  13. package/assets/devtools/caches.html.gz +0 -0
  14. package/assets/devtools/{chunk.XsVAJU_N.js → chunk.5EOPWu_h.js} +1 -1
  15. package/assets/devtools/chunk.5EOPWu_h.js.br +0 -0
  16. package/assets/devtools/chunk.5EOPWu_h.js.gz +0 -0
  17. package/assets/devtools/{chunk.Dwv4A_H_.js → chunk.B-FEo0lV.js} +1 -1
  18. package/assets/devtools/chunk.B-FEo0lV.js.br +0 -0
  19. package/assets/devtools/chunk.B-FEo0lV.js.gz +0 -0
  20. package/assets/devtools/{chunk.I1TSx4X4.js → chunk.BCBZ1wAk.js} +1 -1
  21. package/assets/devtools/chunk.BCBZ1wAk.js.br +0 -0
  22. package/assets/devtools/chunk.BCBZ1wAk.js.gz +0 -0
  23. package/assets/devtools/{chunk.ChDpavl2.js → chunk.BKZ6YEV4.js} +1 -1
  24. package/assets/devtools/chunk.BKZ6YEV4.js.br +0 -0
  25. package/assets/devtools/chunk.BKZ6YEV4.js.gz +0 -0
  26. package/assets/devtools/{chunk.DN-SKgAD.js → chunk.BQQ5nN1l.js} +1 -1
  27. package/assets/devtools/chunk.BQQ5nN1l.js.br +0 -0
  28. package/assets/devtools/chunk.BQQ5nN1l.js.gz +0 -0
  29. package/assets/devtools/{chunk.CAWWjC4E.js → chunk.BX7p74D8.js} +1 -1
  30. package/assets/devtools/chunk.BX7p74D8.js.br +0 -0
  31. package/assets/devtools/chunk.BX7p74D8.js.gz +0 -0
  32. package/assets/devtools/{chunk.DF8tZYh8.js → chunk.BZpSlmHc.js} +1 -1
  33. package/assets/devtools/chunk.BZpSlmHc.js.br +0 -0
  34. package/assets/devtools/chunk.BZpSlmHc.js.gz +0 -0
  35. package/assets/devtools/{chunk.DcaVw31J.js → chunk.BgMi2Pqe.js} +1 -1
  36. package/assets/devtools/chunk.BgMi2Pqe.js.br +0 -0
  37. package/assets/devtools/chunk.BgMi2Pqe.js.gz +0 -0
  38. package/assets/devtools/chunk.BjFrJKj1.js.br +2 -0
  39. package/assets/devtools/chunk.BjFrJKj1.js.gz +0 -0
  40. package/assets/devtools/{chunk.ByuRJbSC.js → chunk.BjOMCPQ3.js} +1 -1
  41. package/assets/devtools/chunk.BjOMCPQ3.js.br +0 -0
  42. package/assets/devtools/chunk.BjOMCPQ3.js.gz +0 -0
  43. package/assets/devtools/chunk.BlqFPyLh.js.br +0 -0
  44. package/assets/devtools/chunk.BlqFPyLh.js.gz +0 -0
  45. package/assets/devtools/{chunk.DLDchrhP.js → chunk.BqEqrty9.js} +1 -1
  46. package/assets/devtools/chunk.BqEqrty9.js.br +0 -0
  47. package/assets/devtools/chunk.BqEqrty9.js.gz +0 -0
  48. package/assets/devtools/{chunk.BPjMdorr.js → chunk.BuGWOypT.js} +1 -1
  49. package/assets/devtools/chunk.BuGWOypT.js.br +0 -0
  50. package/assets/devtools/chunk.BuGWOypT.js.gz +0 -0
  51. package/assets/devtools/{chunk.UAANdYnt.js → chunk.C3geCUq9.js} +1 -1
  52. package/assets/devtools/chunk.C3geCUq9.js.br +0 -0
  53. package/assets/devtools/chunk.C3geCUq9.js.gz +0 -0
  54. package/assets/devtools/{chunk.BjjA59Pf.js → chunk.CEbDj1NR.js} +1 -1
  55. package/assets/devtools/chunk.CEbDj1NR.js.br +0 -0
  56. package/assets/devtools/chunk.CEbDj1NR.js.gz +0 -0
  57. package/assets/devtools/{chunk.BC4Lys4j.js → chunk.CIYikik4.js} +1 -1
  58. package/assets/devtools/chunk.CIYikik4.js.br +0 -0
  59. package/assets/devtools/chunk.CIYikik4.js.gz +0 -0
  60. package/assets/devtools/{chunk.Bdi_dTor.js → chunk.CQO49DQF.js} +1 -1
  61. package/assets/devtools/chunk.CQO49DQF.js.br +0 -0
  62. package/assets/devtools/chunk.CQO49DQF.js.gz +0 -0
  63. package/assets/devtools/{chunk.C1yl87Yo.js → chunk.CWwJDVEM.js} +1 -1
  64. package/assets/devtools/chunk.CWwJDVEM.js.br +0 -0
  65. package/assets/devtools/chunk.CWwJDVEM.js.gz +0 -0
  66. package/assets/devtools/{chunk.CYVZxO-p.js → chunk.CZ4J9K5b.js} +1 -1
  67. package/assets/devtools/chunk.CZ4J9K5b.js.br +4 -0
  68. package/assets/devtools/chunk.CZ4J9K5b.js.gz +0 -0
  69. package/assets/devtools/{chunk.mJxmm31y.js → chunk.CoD2sLa1.js} +1 -1
  70. package/assets/devtools/chunk.CoD2sLa1.js.br +0 -0
  71. package/assets/devtools/chunk.CoD2sLa1.js.gz +0 -0
  72. package/assets/devtools/{chunk.CQ8PqHT0.js → chunk.CsxSstrk.js} +1 -1
  73. package/assets/devtools/chunk.CsxSstrk.js.br +0 -0
  74. package/assets/devtools/chunk.CsxSstrk.js.gz +0 -0
  75. package/assets/devtools/{chunk.BeYM7pih.js → chunk.D0jFBu2p.js} +1 -1
  76. package/assets/devtools/chunk.D0jFBu2p.js.br +0 -0
  77. package/assets/devtools/chunk.D0jFBu2p.js.gz +0 -0
  78. package/assets/devtools/{chunk.BNC0DJB8.js → chunk.D7ro5_n3.js} +1 -1
  79. package/assets/devtools/chunk.D7ro5_n3.js.br +0 -0
  80. package/assets/devtools/chunk.D7ro5_n3.js.gz +0 -0
  81. package/assets/devtools/{chunk.BBrq-Wwo.js → chunk.W-1mjDd7.js} +1 -1
  82. package/assets/devtools/chunk.W-1mjDd7.js.br +0 -0
  83. package/assets/devtools/chunk.W-1mjDd7.js.gz +0 -0
  84. package/assets/devtools/{chunk.B3_W5FaN.js → chunk._3YEef80.js} +1 -1
  85. package/assets/devtools/chunk._3YEef80.js.br +0 -0
  86. package/assets/devtools/chunk._3YEef80.js.gz +0 -0
  87. package/assets/devtools/{chunk.DI-f4xNk.js → chunk._t5z0lP9.js} +1 -1
  88. package/assets/devtools/chunk._t5z0lP9.js.br +0 -0
  89. package/assets/devtools/chunk._t5z0lP9.js.gz +0 -0
  90. package/assets/devtools/{chunk.DxjqPOcc.js → chunk.albVVSQX.js} +1 -1
  91. package/assets/devtools/chunk.albVVSQX.js.br +0 -0
  92. package/assets/devtools/chunk.albVVSQX.js.gz +0 -0
  93. package/assets/devtools/{chunk.C5K_AIru.js → chunk.bPNpu2iW.js} +1 -1
  94. package/assets/devtools/chunk.bPNpu2iW.js.br +0 -0
  95. package/assets/devtools/chunk.bPNpu2iW.js.gz +0 -0
  96. package/assets/devtools/{chunk.DAVfKvCa.js → chunk.fWijEdcZ.js} +1 -1
  97. package/assets/devtools/chunk.fWijEdcZ.js.br +0 -0
  98. package/assets/devtools/chunk.fWijEdcZ.js.gz +0 -0
  99. package/assets/devtools/{chunk.ospt8-RN.js → chunk.ffYG67rk.js} +1 -1
  100. package/assets/devtools/chunk.ffYG67rk.js.br +0 -0
  101. package/assets/devtools/chunk.ffYG67rk.js.gz +0 -0
  102. package/assets/devtools/{chunk.C6NWzsJg.js → chunk.lo8X57tY.js} +1 -1
  103. package/assets/devtools/chunk.lo8X57tY.js.br +0 -0
  104. package/assets/devtools/chunk.lo8X57tY.js.gz +0 -0
  105. package/assets/devtools/{chunk.PWK2K2kI.js → chunk.rqjDVBSo.js} +1 -1
  106. package/assets/devtools/chunk.rqjDVBSo.js.br +0 -0
  107. package/assets/devtools/chunk.rqjDVBSo.js.gz +0 -0
  108. package/assets/devtools/{chunk.INuuLdYd.js → chunk.u4exfSZ6.js} +1 -1
  109. package/assets/devtools/chunk.u4exfSZ6.js.br +0 -0
  110. package/assets/devtools/chunk.u4exfSZ6.js.gz +0 -0
  111. package/assets/devtools/chunk.uyVen0u2.js.br +0 -0
  112. package/assets/devtools/chunk.uyVen0u2.js.gz +0 -0
  113. package/assets/devtools/{chunk.iyc5GsVj.js → chunk.xjh83uy1.js} +1 -1
  114. package/assets/devtools/chunk.xjh83uy1.js.br +0 -0
  115. package/assets/devtools/chunk.xjh83uy1.js.gz +0 -0
  116. package/assets/devtools/{chunk.BOc4btAA.js → chunk.yZM2qlCX.js} +1 -1
  117. package/assets/devtools/chunk.yZM2qlCX.js.br +0 -0
  118. package/assets/devtools/chunk.yZM2qlCX.js.gz +0 -0
  119. package/assets/devtools/db.html +34 -0
  120. package/assets/devtools/db.html.br +0 -0
  121. package/assets/devtools/db.html.gz +0 -0
  122. package/assets/devtools/entry.BWhdC3SJ.js +79 -0
  123. package/assets/devtools/entry.BWhdC3SJ.js.br +0 -0
  124. package/assets/devtools/entry.BWhdC3SJ.js.gz +0 -0
  125. package/assets/devtools/env.html +35 -0
  126. package/assets/devtools/env.html.br +0 -0
  127. package/assets/devtools/env.html.gz +0 -0
  128. package/assets/devtools/graph.html +38 -0
  129. package/assets/devtools/graph.html.br +0 -0
  130. package/assets/devtools/graph.html.gz +0 -0
  131. package/assets/devtools/index.html +28 -8
  132. package/assets/devtools/index.html.br +0 -0
  133. package/assets/devtools/index.html.gz +0 -0
  134. package/assets/devtools/logs.html +38 -0
  135. package/assets/devtools/logs.html.br +0 -0
  136. package/assets/devtools/logs.html.gz +0 -0
  137. package/assets/devtools/queues.html +30 -0
  138. package/assets/devtools/queues.html.br +0 -0
  139. package/assets/devtools/queues.html.gz +0 -0
  140. package/assets/devtools/topics.html +38 -0
  141. package/assets/devtools/topics.html.br +0 -0
  142. package/assets/devtools/topics.html.gz +0 -0
  143. package/dist/index.d.ts +16 -1
  144. package/dist/index.js +0 -1
  145. package/dist/index.js.map +1 -1
  146. package/package.json +5 -5
  147. package/src/index.ts +0 -4
  148. package/assets/devtools/entry.DBfTnVUe.js +0 -75
@@ -1 +1 @@
1
- import{u as Se,r as m,M as we,a as Ne,c as Ae,f as j,b as v,j as n,B as x,d as D,R as W,e as f,k as w,g as Ce,h as te,i as Ie,l as ze,I as ke,p as ye,m as Pe,n as Be,o as Re,q as $,s as O,U as _e,t as ne,v as Te,w as N,x as _,F as p,y as Ve,z as Ee,T as q,A as T,C as z,D as ae,E as Fe,G as Le,H as R,N as He,J as De,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.DBfTnVUe.js";import{g as le,a as se,A,u as Ye}from"./chunk.UAANdYnt.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.DxjqPOcc.js";import{D as Ze}from"./chunk.mJxmm31y.js";import"./chunk.DN-SKgAD.js";import"./chunk.BlqFPyLh.js";import"./chunk.I1TSx4X4.js";import"./chunk.uyVen0u2.js";import"./chunk.CAWWjC4E.js";function ie(e,t){return Se("(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 ce({keepTransitions:e}={}){const t=m.useRef(Je),r=m.useRef(-1),o=m.useContext(we),d=Ne(),l=m.useRef(d?.());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(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{o.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=ie("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(r.current)},[]),{colorScheme:o.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:u}}function et(e,t={getInitialValueInEffect:!0}){const r=ie(e,t),{colorScheme:o}=ce();return o==="auto"?r:o}const[tt,C]=Ae("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:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellAside",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"aside",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("aside",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-aside-z-index":`calc(${i??h.zIndex} + 1)`}})});K.classes=S;K.displayName="@mantine/core/AppShellAside";const X=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellFooter",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"footer",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("footer",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-footer-z-index":(i??h.zIndex)?.toString()}})});X.classes=S;X.displayName="@mantine/core/AppShellFooter";const Q=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellHeader",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"header",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("header",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-header-z-index":(i??h.zIndex)?.toString()}})});Q.classes=S;Q.displayName="@mantine/core/AppShellHeader";const G=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,vars:a,...c}=v("AppShellMain",null,e),s=C();return n.jsx(x,{component:"main",ref:t,...s.getStyles("main",{className:o,style:d,classNames:r,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 P(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function st({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:o,theme:d}){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&&(r[o?.breakpoint]=r[o?.breakpoint]||{},r[o?.breakpoint]["--app-shell-aside-width"]="100%",r[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(P(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=le(o.breakpoint,d.breakpoints)-.1;r[s]=r[s]||{},r[s]["--app-shell-aside-width"]="100%",r[s]["--app-shell-aside-offset"]="0px",r[s]["--app-shell-aside-transform"]=a,r[s]["--app-shell-aside-transform-rtl"]=c,r[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function ot({baseStyles:e,minMediaStyles:t,footer:r}){const o=r?.height,d="translateY(var(--app-shell-footer-height))",l=r?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}P(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])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=d,e["--app-shell-footer-offset"]="0px !important")}function rt({baseStyles:e,minMediaStyles:t,header:r}){const o=r?.height,d="translateY(calc(var(--app-shell-header-height) * -1))",l=r?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}P(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])))})),r?.collapsed&&(e["--app-shell-header-transform"]=d,e["--app-shell-header-offset"]="0px !important")}function nt({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:o,theme:d}){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&&(r[o?.breakpoint]=r[o?.breakpoint]||{},r[o?.breakpoint]["--app-shell-navbar-width"]="100%",r[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(P(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=le(o.breakpoint,d.breakpoints)-.1;r[s]=r[s]||{},r[s]["--app-shell-navbar-width"]="100%",r[s]["--app-shell-navbar-offset"]="0px",r[s]["--app-shell-navbar-transform"]=a,r[s]["--app-shell-navbar-transform-rtl"]=c}}function L(e){return Number(e)===0?"0px":Ce(e)}function at({padding:e,baseStyles:t,minMediaStyles:r}){y(e)&&(t["--app-shell-padding"]=L(k(e))),P(e)&&(e.base&&(t["--app-shell-padding"]=L(e.base)),w(e).forEach(o=>{o!=="base"&&(r[o]=r[o]||{},r[o]["--app-shell-padding"]=L(e[o]))}))}function lt({navbar:e,header:t,footer:r,aside:o,padding:d,theme:l}){const a={},c={},s={};nt({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),st({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,aside:o,theme:l}),rt({baseStyles:s,minMediaStyles:a,header:t}),ot({baseStyles:s,minMediaStyles:a,footer:r}),at({baseStyles:s,minMediaStyles:a,padding:d});const i=se(w(a),l.breakpoints).map(h=>({query:`(min-width: ${te(h.px)})`,styles:a[h.value]})),u=se(w(c),l.breakpoints).map(h=>({query:`(max-width: ${te(h.px)})`,styles:c[h.value]})),b=[...i,...u];return{baseStyles:s,media:b}}function it({navbar:e,header:t,aside:r,footer:o,padding:d}){const l=Ie(),a=ze(),{media:c,baseStyles:s}=lt({navbar:e,header:t,footer:o,aside:r,padding:d,theme:l});return n.jsx(ke,{media:c,styles:s,selector:a.cssVariablesSelector})}const U=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellNavbar",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"nav",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("navbar",{className:o,classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-navbar-z-index":`calc(${i??h.zIndex} + 1)`}})});U.classes=S;U.displayName="@mantine/core/AppShellNavbar";const Y=ye((e,t)=>{const{classNames:r,className:o,style:d,styles:l,vars:a,grow:c,mod:s,...i}=v("AppShellSection",null,e),u=C();return n.jsx(x,{ref:t,mod:[{grow:c},s],...u.getStyles("section",{className:o,style:d,classNames:r,styles:l}),...i})});Y.classes=S;Y.displayName="@mantine/core/AppShellSection";function ct({transitionDuration:e,disabled:t}){const[r,o]=m.useState(!0),d=m.useRef(-1),l=m.useRef(-1);return Pe("resize",()=>{o(!0),clearTimeout(d.current),d.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),200)}),Be(()=>{o(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),e||0)},[t,e]),r}const dt={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Re("app")},ht=O((e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}})),g=j((e,t)=>{const r=v("AppShell",dt,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,navbar:i,withBorder:u,padding:b,transitionDuration:h,transitionTimingFunction:V,header:I,zIndex:E,layout:B,disabled:F,aside:fe,footer:me,offsetScrollbars:be=!0,mod:ge,attributes:ve,...xe}=r,ee=$({name:"AppShell",classes:S,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:ve,vars:s,varsResolver:ht}),je=ct({disabled:F,transitionDuration:h});return n.jsxs(tt,{value:{getStyles:ee,withBorder:u,zIndex:E,disabled:F,offsetScrollbars:be},children:[n.jsx(it,{navbar:i,header:I,aside:fe,footer:me,padding:b}),n.jsx(x,{ref:t,...ee("root"),mod:[{resizing:je,layout:B,disabled:F},ge],...xe})]})});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 ut=O((e,{color:t,size:r,lineSize:o,transitionDuration:d,transitionTimingFunction:l})=>({root:{"--burger-color":t?Te(t,e):void 0,"--burger-size":ne(r,"burger-size"),"--burger-line-size":o?f(o):void 0,"--burger-transition-duration":d===void 0?void 0:`${d}ms`,"--burger-transition-timing-function":l}})),J=j((e,t)=>{const r=v("Burger",null,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,opened:i,children:u,transitionDuration:b,transitionTimingFunction:h,lineSize:V,attributes:I,...E}=r,B=$({name:"Burger",classes:de,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:I,vars:s,varsResolver:ut});return n.jsxs(_e,{...B("root"),ref:t,...E,children:[n.jsx(x,{mod:["reduce-motion",{opened:i}],...B("burger")}),u]})});J.classes=de;J.displayName="@mantine/core/Burger";var he={root:"m_dc6f14e2"};const pt=O((e,{size:t})=>({root:{"--kbd-fz":ne(t,"kbd-fz")}})),M=j((e,t)=>{const r=v("Kbd",null,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,attributes:i,...u}=r,b=$({name:"Kbd",classes:he,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:i,vars:s,varsResolver:pt});return n.jsx(x,{component:"kbd",ref:t,...b("root"),...u})});M.classes=he;M.displayName="@mantine/core/Kbd";const ft=[["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"}]],mt=N("outline","language","Language",ft);const bt=[["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"}]],gt=N("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",bt);const vt=[["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"}]],xt=N("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",vt);const jt=[["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"}]],re=N("outline","moon","Moon",jt);const St=[["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"}]],wt=N("outline","square-rounded","SquareRounded",St);const Nt=[["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"}]],H=N("outline","sun","Sun",Nt),At=e=>{const[t,r]=_("alepha.ui.sidebar.opened");return n.jsx(J,{opened:t,onClick:()=>r(!t),hiddenFrom:"sm",size:"sm",...e})},ue=e=>{const{setColorScheme:t}=ce(),r=et("light"),[o,d]=m.useState("default"),l=e.mode??"minimal";m.useEffect(()=>{d(r)},[r]);const a=()=>{t(r==="dark"?"light":"dark")};return l==="segmented"?n.jsx(Me,{value:o,onChange:c=>t(c),data:[{value:"light",label:n.jsx(p,{h:20,align:"center",justify:"center",children:n.jsx(H,{size:16})})},{value:"dark",label:n.jsx(p,{h:20,align:"center",justify:"center",children:n.jsx(re,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):n.jsx(A,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:o==="dark"?H:o==="light"?re:H,...e.actionProps})},Ct=e=>{const t=Ye();return n.jsx(A,{variant:"default",icon:mt,menu:{items:t.languages.map(r=>({label:t.tr(r),onClick:()=>t.setLang(r),active:t.lang===r}))},...e.actionProps})},Z=e=>n.jsx(A,{variant:"default",onClick:Ve.open,justify:"space-between",rightSection:n.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:n.jsxs(p,{align:"center",gap:"xs",children:[n.jsx(Ee,{size:16,color:"gray"}),n.jsx(p,{visibleFrom:"sm",miw:192,children:n.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),It=e=>{const{items:t=[]}=e,r=(a,c)=>{if("type"in a){if(a.type==="burger")return n.jsx(At,{},c);if(a.type==="dark")return n.jsx(ue,{...a.props},c);if(a.type==="search")return n.jsx(Z,{...a.props},c);if(a.type==="lang")return n.jsx(Ct,{...a.props},c);if(a.type==="spacer")return n.jsx(p,{w:16},c);if(a.type==="divider")return n.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},o=t.filter(a=>a.position==="left"),d=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return n.jsxs(p,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[n.jsx(p,{flex:1,children:o.map((a,c)=>n.jsx(p,{ml:c===0?0:"md",align:"center",children:r(a,c)},c))}),n.jsx(p,{children:d.map((a,c)=>n.jsx(p,{mx:"md",align:"center",children:r(a,c)},c))}),n.jsx(p,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>n.jsx(p,{ml:c===0?0:"md",align:"center",children:r(a,c)},c))})]})},zt=()=>{const[e,t]=_("alepha.ui.sidebar.collapsed");return n.jsx(p,{children:n.jsx(A,{icon:e?n.jsx(xt,{}):n.jsx(gt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},kt=e=>{const t=T(),{onItemClick:r}=e,o=(s,i)=>{if("type"in s){if(s.type==="spacer")return n.jsx(p,{h:16},i);if(s.type==="divider")return n.jsx(p,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},i);if(s.type==="search")return n.jsx(Z,{collapsed:e.collapsed},i);if(s.type==="toggle")return n.jsx(zt,{},i);if(s.type==="section")return e.collapsed?void 0:n.jsxs(p,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[z(s.icon),n.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:s.label},i)]},i)}return"element"in s?n.jsx(p,{children:s.element},i):s.can&&!s.can()?null:e.collapsed?n.jsx(yt,{item:s,level:0,onItemClick:r,theme:e.theme??{}},i):n.jsx(pe,{item:s,level:0,onItemClick:r,theme:e.theme??{}},i)},d=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){const s=t.concretePages.filter(i=>!i.can||i.can()).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 s}return[]},l="md",a=e.items?e.gap:"xs",c=m.useMemo(()=>d(),[]);return n.jsxs(p,{flex:1,py:l,direction:"column",className:"overflow-auto",...e.flexProps,children:[n.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="top").map((s,i)=>o(s,i))}),n.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))}),n.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="bottom").map((s,i)=>o(s,i))})]})},pe=e=>{const{item:t,level:r}=e,o=2,d=T(),l=m.useCallback(i=>{if(!i.children)return!1;for(const u of i.children)if(u.href&&d.isActive(u.href)||l(u))return!0;return!1},[]),[a,c]=m.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),r>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 n.jsxs(p,{direction:"column",ps:r===0?0:32,pos:"relative",children:[n.jsx(A,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(r===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:n.jsxs(p,{w:"100%",align:"center",gap:"sm",children:[z(t.icon),n.jsxs(p,{direction:"column",children:[n.jsx(p,{children:t.label}),t.description&&n.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?n.jsx(p,{children:a?n.jsx(Fe,{size:14}):n.jsx(Le,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&n.jsxs(p,{direction:"column","data-parent-level":r,children:[n.jsx(p,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*r,bottom:16}}),t.children.filter(i=>!i.can||i.can()).map((i,u)=>n.jsx(pe,{item:i,level:r+1,onItemClick:e.onItemClick,theme:e.theme},u))]})]})},yt=e=>{const{item:t,level:r}=e,o=T(),d=m.useCallback(s=>{if(!s.children)return!1;for(const i of s.children)if(i.href&&o.isActive(i.href)||d(i))return!0;return!1},[]),[l,a]=m.useState(d(t)),c=s=>{e.item.target||s.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return n.jsx(A,{size:e.item.theme?.size??e.theme.button?.size??(r===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)??n.jsx(wt,{}),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(),[r,o]=_("alepha.ui.sidebar.opened"),[d]=_("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const I of e.noSidebarWhen.paths)if(t.isActive(I,{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,h=e.footer?24:0,V=i?d?78:300:0;return n.jsxs(g,{w:"100%",flex:1,padding:"md",header:u?{height:60}:void 0,navbar:i?{width:d?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!r}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[n.jsx(g.Header,{bg:R.colors.surface,...e.appShellHeaderProps,children:e.header??n.jsx(It,{items:s,...e.appBarProps})}),i&&n.jsx(g.Navbar,{bg:R.colors.surface,...e.appShellNavbarProps,children:n.jsx(kt,{collapsed:d,...e.sidebarProps??{}})}),n.jsx(g.Main,{pl:V,pt:b,pb:h,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??n.jsx(He,{})}),e.footer&&n.jsx(g.Footer,{bg:R.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Wt=()=>n.jsx(Pt,{appShellHeaderProps:{bg:R.colors.background},appShellNavbarProps:{bg:"transparent"},sidebarProps:{gap:4,collapsed:!0,items:[{label:"Dashboard",icon:n.jsx(De,{}),href:"/"},{type:"divider"},{label:"Actions",icon:n.jsx(We,{}),href:"/actions"},{label:"Queues",icon:n.jsx($e,{}),href:"/queues"},{label:"Topics",icon:n.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:n.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:n.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:n.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:n.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:n.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:n.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:n.jsx(p,{h:"60px",w:"78px",style:{marginLeft:"-32px",borderRight:"1px solid var(--mantine-color-default-border)"}})},{position:"left",element:n.jsx(Z,{actionProps:{variant:"outline",bd:"1px solid var(--mantine-color-default-border)"}})},{position:"right",element:n.jsx(ue,{})}]}});export{Wt as DevLayout,Wt as default};
1
+ import{u as Se,r as m,M as we,a as Ne,c as Ae,f as j,b as v,j as n,B as x,d as D,R as W,e as f,k as w,g as Ce,h as te,i as Ie,l as ze,I as ke,p as ye,m as Pe,n as Be,o as Re,q as $,s as O,U as _e,t as ne,v as Te,w as N,x as _,F as p,y as Ve,z as Ee,T as q,A as T,C as z,D as ae,E as Fe,G as Le,H as R,N as He,J as De,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.BWhdC3SJ.js";import{g as le,a as se,A,u as Ye}from"./chunk.C3geCUq9.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.albVVSQX.js";import{D as Ze}from"./chunk.CoD2sLa1.js";import"./chunk.BQQ5nN1l.js";import"./chunk.BlqFPyLh.js";import"./chunk.BCBZ1wAk.js";import"./chunk.uyVen0u2.js";import"./chunk.BX7p74D8.js";function ie(e,t){return Se("(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 ce({keepTransitions:e}={}){const t=m.useRef(Je),r=m.useRef(-1),o=m.useContext(we),d=Ne(),l=m.useRef(d?.());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(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{o.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=ie("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(r.current)},[]),{colorScheme:o.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:u}}function et(e,t={getInitialValueInEffect:!0}){const r=ie(e,t),{colorScheme:o}=ce();return o==="auto"?r:o}const[tt,C]=Ae("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:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellAside",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"aside",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("aside",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-aside-z-index":`calc(${i??h.zIndex} + 1)`}})});K.classes=S;K.displayName="@mantine/core/AppShellAside";const X=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellFooter",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"footer",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("footer",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-footer-z-index":(i??h.zIndex)?.toString()}})});X.classes=S;X.displayName="@mantine/core/AppShellFooter";const Q=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellHeader",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"header",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("header",{className:D({[W.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-header-z-index":(i??h.zIndex)?.toString()}})});Q.classes=S;Q.displayName="@mantine/core/AppShellHeader";const G=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,vars:a,...c}=v("AppShellMain",null,e),s=C();return n.jsx(x,{component:"main",ref:t,...s.getStyles("main",{className:o,style:d,classNames:r,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 P(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function st({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:o,theme:d}){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&&(r[o?.breakpoint]=r[o?.breakpoint]||{},r[o?.breakpoint]["--app-shell-aside-width"]="100%",r[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(P(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=le(o.breakpoint,d.breakpoints)-.1;r[s]=r[s]||{},r[s]["--app-shell-aside-width"]="100%",r[s]["--app-shell-aside-offset"]="0px",r[s]["--app-shell-aside-transform"]=a,r[s]["--app-shell-aside-transform-rtl"]=c,r[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function ot({baseStyles:e,minMediaStyles:t,footer:r}){const o=r?.height,d="translateY(var(--app-shell-footer-height))",l=r?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}P(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])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=d,e["--app-shell-footer-offset"]="0px !important")}function rt({baseStyles:e,minMediaStyles:t,header:r}){const o=r?.height,d="translateY(calc(var(--app-shell-header-height) * -1))",l=r?.offset??!0;if(y(o)){const a=f(k(o));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}P(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])))})),r?.collapsed&&(e["--app-shell-header-transform"]=d,e["--app-shell-header-offset"]="0px !important")}function nt({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:o,theme:d}){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&&(r[o?.breakpoint]=r[o?.breakpoint]||{},r[o?.breakpoint]["--app-shell-navbar-width"]="100%",r[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(P(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=le(o.breakpoint,d.breakpoints)-.1;r[s]=r[s]||{},r[s]["--app-shell-navbar-width"]="100%",r[s]["--app-shell-navbar-offset"]="0px",r[s]["--app-shell-navbar-transform"]=a,r[s]["--app-shell-navbar-transform-rtl"]=c}}function L(e){return Number(e)===0?"0px":Ce(e)}function at({padding:e,baseStyles:t,minMediaStyles:r}){y(e)&&(t["--app-shell-padding"]=L(k(e))),P(e)&&(e.base&&(t["--app-shell-padding"]=L(e.base)),w(e).forEach(o=>{o!=="base"&&(r[o]=r[o]||{},r[o]["--app-shell-padding"]=L(e[o]))}))}function lt({navbar:e,header:t,footer:r,aside:o,padding:d,theme:l}){const a={},c={},s={};nt({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),st({baseStyles:s,minMediaStyles:a,maxMediaStyles:c,aside:o,theme:l}),rt({baseStyles:s,minMediaStyles:a,header:t}),ot({baseStyles:s,minMediaStyles:a,footer:r}),at({baseStyles:s,minMediaStyles:a,padding:d});const i=se(w(a),l.breakpoints).map(h=>({query:`(min-width: ${te(h.px)})`,styles:a[h.value]})),u=se(w(c),l.breakpoints).map(h=>({query:`(max-width: ${te(h.px)})`,styles:c[h.value]})),b=[...i,...u];return{baseStyles:s,media:b}}function it({navbar:e,header:t,aside:r,footer:o,padding:d}){const l=Ie(),a=ze(),{media:c,baseStyles:s}=lt({navbar:e,header:t,footer:o,aside:r,padding:d,theme:l});return n.jsx(ke,{media:c,styles:s,selector:a.cssVariablesSelector})}const U=j((e,t)=>{const{classNames:r,className:o,style:d,styles:l,unstyled:a,vars:c,withBorder:s,zIndex:i,mod:u,...b}=v("AppShellNavbar",null,e),h=C();return h.disabled?null:n.jsx(x,{component:"nav",ref:t,mod:[{"with-border":s??h.withBorder},u],...h.getStyles("navbar",{className:o,classNames:r,styles:l,style:d}),...b,__vars:{"--app-shell-navbar-z-index":`calc(${i??h.zIndex} + 1)`}})});U.classes=S;U.displayName="@mantine/core/AppShellNavbar";const Y=ye((e,t)=>{const{classNames:r,className:o,style:d,styles:l,vars:a,grow:c,mod:s,...i}=v("AppShellSection",null,e),u=C();return n.jsx(x,{ref:t,mod:[{grow:c},s],...u.getStyles("section",{className:o,style:d,classNames:r,styles:l}),...i})});Y.classes=S;Y.displayName="@mantine/core/AppShellSection";function ct({transitionDuration:e,disabled:t}){const[r,o]=m.useState(!0),d=m.useRef(-1),l=m.useRef(-1);return Pe("resize",()=>{o(!0),clearTimeout(d.current),d.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),200)}),Be(()=>{o(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>m.startTransition(()=>{o(!1)}),e||0)},[t,e]),r}const dt={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Re("app")},ht=O((e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}})),g=j((e,t)=>{const r=v("AppShell",dt,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,navbar:i,withBorder:u,padding:b,transitionDuration:h,transitionTimingFunction:V,header:I,zIndex:E,layout:B,disabled:F,aside:fe,footer:me,offsetScrollbars:be=!0,mod:ge,attributes:ve,...xe}=r,ee=$({name:"AppShell",classes:S,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:ve,vars:s,varsResolver:ht}),je=ct({disabled:F,transitionDuration:h});return n.jsxs(tt,{value:{getStyles:ee,withBorder:u,zIndex:E,disabled:F,offsetScrollbars:be},children:[n.jsx(it,{navbar:i,header:I,aside:fe,footer:me,padding:b}),n.jsx(x,{ref:t,...ee("root"),mod:[{resizing:je,layout:B,disabled:F},ge],...xe})]})});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 ut=O((e,{color:t,size:r,lineSize:o,transitionDuration:d,transitionTimingFunction:l})=>({root:{"--burger-color":t?Te(t,e):void 0,"--burger-size":ne(r,"burger-size"),"--burger-line-size":o?f(o):void 0,"--burger-transition-duration":d===void 0?void 0:`${d}ms`,"--burger-transition-timing-function":l}})),J=j((e,t)=>{const r=v("Burger",null,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,opened:i,children:u,transitionDuration:b,transitionTimingFunction:h,lineSize:V,attributes:I,...E}=r,B=$({name:"Burger",classes:de,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:I,vars:s,varsResolver:ut});return n.jsxs(_e,{...B("root"),ref:t,...E,children:[n.jsx(x,{mod:["reduce-motion",{opened:i}],...B("burger")}),u]})});J.classes=de;J.displayName="@mantine/core/Burger";var he={root:"m_dc6f14e2"};const pt=O((e,{size:t})=>({root:{"--kbd-fz":ne(t,"kbd-fz")}})),M=j((e,t)=>{const r=v("Kbd",null,e),{classNames:o,className:d,style:l,styles:a,unstyled:c,vars:s,attributes:i,...u}=r,b=$({name:"Kbd",classes:he,props:r,className:d,style:l,classNames:o,styles:a,unstyled:c,attributes:i,vars:s,varsResolver:pt});return n.jsx(x,{component:"kbd",ref:t,...b("root"),...u})});M.classes=he;M.displayName="@mantine/core/Kbd";const ft=[["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"}]],mt=N("outline","language","Language",ft);const bt=[["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"}]],gt=N("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",bt);const vt=[["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"}]],xt=N("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",vt);const jt=[["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"}]],re=N("outline","moon","Moon",jt);const St=[["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"}]],wt=N("outline","square-rounded","SquareRounded",St);const Nt=[["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"}]],H=N("outline","sun","Sun",Nt),At=e=>{const[t,r]=_("alepha.ui.sidebar.opened");return n.jsx(J,{opened:t,onClick:()=>r(!t),hiddenFrom:"sm",size:"sm",...e})},ue=e=>{const{setColorScheme:t}=ce(),r=et("light"),[o,d]=m.useState("default"),l=e.mode??"minimal";m.useEffect(()=>{d(r)},[r]);const a=()=>{t(r==="dark"?"light":"dark")};return l==="segmented"?n.jsx(Me,{value:o,onChange:c=>t(c),data:[{value:"light",label:n.jsx(p,{h:20,align:"center",justify:"center",children:n.jsx(H,{size:16})})},{value:"dark",label:n.jsx(p,{h:20,align:"center",justify:"center",children:n.jsx(re,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):n.jsx(A,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:o==="dark"?H:o==="light"?re:H,...e.actionProps})},Ct=e=>{const t=Ye();return n.jsx(A,{variant:"default",icon:mt,menu:{items:t.languages.map(r=>({label:t.tr(r),onClick:()=>t.setLang(r),active:t.lang===r}))},...e.actionProps})},Z=e=>n.jsx(A,{variant:"default",onClick:Ve.open,justify:"space-between",rightSection:n.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:n.jsxs(p,{align:"center",gap:"xs",children:[n.jsx(Ee,{size:16,color:"gray"}),n.jsx(p,{visibleFrom:"sm",miw:192,children:n.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),It=e=>{const{items:t=[]}=e,r=(a,c)=>{if("type"in a){if(a.type==="burger")return n.jsx(At,{},c);if(a.type==="dark")return n.jsx(ue,{...a.props},c);if(a.type==="search")return n.jsx(Z,{...a.props},c);if(a.type==="lang")return n.jsx(Ct,{...a.props},c);if(a.type==="spacer")return n.jsx(p,{w:16},c);if(a.type==="divider")return n.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},o=t.filter(a=>a.position==="left"),d=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return n.jsxs(p,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[n.jsx(p,{flex:1,children:o.map((a,c)=>n.jsx(p,{ml:c===0?0:"md",align:"center",children:r(a,c)},c))}),n.jsx(p,{children:d.map((a,c)=>n.jsx(p,{mx:"md",align:"center",children:r(a,c)},c))}),n.jsx(p,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>n.jsx(p,{ml:c===0?0:"md",align:"center",children:r(a,c)},c))})]})},zt=()=>{const[e,t]=_("alepha.ui.sidebar.collapsed");return n.jsx(p,{children:n.jsx(A,{icon:e?n.jsx(xt,{}):n.jsx(gt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},kt=e=>{const t=T(),{onItemClick:r}=e,o=(s,i)=>{if("type"in s){if(s.type==="spacer")return n.jsx(p,{h:16},i);if(s.type==="divider")return n.jsx(p,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},i);if(s.type==="search")return n.jsx(Z,{collapsed:e.collapsed},i);if(s.type==="toggle")return n.jsx(zt,{},i);if(s.type==="section")return e.collapsed?void 0:n.jsxs(p,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[z(s.icon),n.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:s.label},i)]},i)}return"element"in s?n.jsx(p,{children:s.element},i):s.can&&!s.can()?null:e.collapsed?n.jsx(yt,{item:s,level:0,onItemClick:r,theme:e.theme??{}},i):n.jsx(pe,{item:s,level:0,onItemClick:r,theme:e.theme??{}},i)},d=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){const s=t.concretePages.filter(i=>!i.can||i.can()).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 s}return[]},l="md",a=e.items?e.gap:"xs",c=m.useMemo(()=>d(),[]);return n.jsxs(p,{flex:1,py:l,direction:"column",className:"overflow-auto",...e.flexProps,children:[n.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="top").map((s,i)=>o(s,i))}),n.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))}),n.jsx(p,{gap:a,px:l,direction:"column",children:c.filter(s=>s.position==="bottom").map((s,i)=>o(s,i))})]})},pe=e=>{const{item:t,level:r}=e,o=2,d=T(),l=m.useCallback(i=>{if(!i.children)return!1;for(const u of i.children)if(u.href&&d.isActive(u.href)||l(u))return!0;return!1},[]),[a,c]=m.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),r>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 n.jsxs(p,{direction:"column",ps:r===0?0:32,pos:"relative",children:[n.jsx(A,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(r===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:n.jsxs(p,{w:"100%",align:"center",gap:"sm",children:[z(t.icon),n.jsxs(p,{direction:"column",children:[n.jsx(p,{children:t.label}),t.description&&n.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?n.jsx(p,{children:a?n.jsx(Fe,{size:14}):n.jsx(Le,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&n.jsxs(p,{direction:"column","data-parent-level":r,children:[n.jsx(p,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*r,bottom:16}}),t.children.filter(i=>!i.can||i.can()).map((i,u)=>n.jsx(pe,{item:i,level:r+1,onItemClick:e.onItemClick,theme:e.theme},u))]})]})},yt=e=>{const{item:t,level:r}=e,o=T(),d=m.useCallback(s=>{if(!s.children)return!1;for(const i of s.children)if(i.href&&o.isActive(i.href)||d(i))return!0;return!1},[]),[l,a]=m.useState(d(t)),c=s=>{e.item.target||s.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return n.jsx(A,{size:e.item.theme?.size??e.theme.button?.size??(r===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)??n.jsx(wt,{}),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(),[r,o]=_("alepha.ui.sidebar.opened"),[d]=_("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const I of e.noSidebarWhen.paths)if(t.isActive(I,{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,h=e.footer?24:0,V=i?d?78:300:0;return n.jsxs(g,{w:"100%",flex:1,padding:"md",header:u?{height:60}:void 0,navbar:i?{width:d?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!r}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[n.jsx(g.Header,{bg:R.colors.surface,...e.appShellHeaderProps,children:e.header??n.jsx(It,{items:s,...e.appBarProps})}),i&&n.jsx(g.Navbar,{bg:R.colors.surface,...e.appShellNavbarProps,children:n.jsx(kt,{collapsed:d,...e.sidebarProps??{}})}),n.jsx(g.Main,{pl:V,pt:b,pb:h,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??n.jsx(He,{})}),e.footer&&n.jsx(g.Footer,{bg:R.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Wt=()=>n.jsx(Pt,{appShellHeaderProps:{bg:R.colors.background},appShellNavbarProps:{bg:"transparent"},sidebarProps:{gap:4,collapsed:!0,items:[{label:"Dashboard",icon:n.jsx(De,{}),href:"/"},{type:"divider"},{label:"Actions",icon:n.jsx(We,{}),href:"/actions"},{label:"Queues",icon:n.jsx($e,{}),href:"/queues"},{label:"Topics",icon:n.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:n.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:n.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:n.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:n.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:n.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:n.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:n.jsx(p,{h:"60px",w:"78px",style:{marginLeft:"-32px",borderRight:"1px solid var(--mantine-color-default-border)"}})},{position:"left",element:n.jsx(Z,{actionProps:{variant:"outline",bd:"1px solid var(--mantine-color-default-border)"}})},{position:"right",element:n.jsx(ue,{})}]}});export{Wt as DevLayout,Wt as default};
@@ -1 +1 @@
1
- import{r as c,ao as y,ba as I,bb as j,f as B,b as N,j as P,a2 as W}from"./entry.DBfTnVUe.js";import{g as M}from"./chunk.uyVen0u2.js";var $=c.useLayoutEffect,G=function(e){var r=y.useRef(e);return $(function(){r.current=e}),r},E=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},O=function(e,r){var t=y.useRef();return y.useCallback(function(i){e.current=i,t.current&&E(t.current,null),t.current=r,r&&E(r,i)},[r])},H={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y=function(e){Object.keys(H).forEach(function(r){e.style.setProperty(r,H[r],"important")})},T=Y,o=null,C=function(e,r){var t=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?t+r.borderSize:t-r.paddingSize};function q(n,e,r,t){r===void 0&&(r=1),t===void 0&&(t=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),T(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,d=n.borderSize,a=n.sizingStyle,h=a.boxSizing;Object.keys(a).forEach(function(l){var m=l;o.style[m]=a[m]}),T(o),o.value=e;var s=C(o,n);o.value=e,s=C(o,n),o.value="x";var f=o.scrollHeight-i,g=f*r;h==="border-box"&&(g=g+i+d),s=Math.max(g,s);var v=f*t;return h==="border-box"&&(v=v+i+d),s=Math.min(v,s),[s,f]}var F=function(){},U=function(e,r){return e.reduce(function(t,i){return t[i]=r[i],t},{})},X=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z=!!document.documentElement.currentStyle,D=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var t=U(X,r),i=t.boxSizing;if(i==="")return null;Z&&i==="border-box"&&(t.width=parseFloat(t.width)+parseFloat(t.borderRightWidth)+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingRight)+parseFloat(t.paddingLeft)+"px");var d=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),a=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:d,borderSize:a}},J=D;function R(n,e,r){var t=G(r);c.useLayoutEffect(function(){var i=function(a){return t.current(a)};if(n)return n.addEventListener(e,i),function(){return n.removeEventListener(e,i)}},[])}var K=function(e,r){R(document.body,"reset",function(t){e.current.form===t.target&&r(t)})},Q=function(e){R(window,"resize",e)},V=function(e){R(document.fonts,"loadingdone",e)},ee=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],te=function(e,r){var t=e.cacheMeasurements,i=e.maxRows,d=e.minRows,a=e.onChange,h=a===void 0?F:a,s=e.onHeightChange,f=s===void 0?F:s,g=I(e,ee),v=g.value!==void 0,l=c.useRef(null),m=O(l,r),L=c.useRef(0),x=c.useRef(),p=function(){var u=l.current,z=t&&x.current?x.current:J(u);if(z){x.current=z;var w=q(z,u.value||u.placeholder||"x",d,i),b=w[0],k=w[1];L.current!==b&&(L.current=b,u.style.setProperty("height",b+"px","important"),f(b,{rowHeight:k}))}},A=function(u){v||p(),h(u)};return c.useLayoutEffect(p),K(l,function(){if(!v){var S=l.current.value;requestAnimationFrame(function(){var u=l.current;u&&S!==u.value&&p()})}}),Q(p),V(p),c.createElement("textarea",j({},g,{onChange:A,ref:m}))},re=c.forwardRef(te);const ne={size:"sm"},_=B((n,e)=>{const{autosize:r,maxRows:t,minRows:i,__staticSelector:d,resize:a,...h}=N("Textarea",ne,n),s=r&&M()!=="test",f=s?{maxRows:t,minRows:i}:{};return P.jsx(W,{component:s?re:"textarea",ref:e,...h,__staticSelector:d||"Textarea",multiline:!0,"data-no-overflow":r&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});_.classes=W.classes;_.displayName="@mantine/core/Textarea";export{_ as T};
1
+ import{r as c,ao as y,ba as I,bb as j,f as B,b as N,j as P,a2 as W}from"./entry.BWhdC3SJ.js";import{g as M}from"./chunk.uyVen0u2.js";var $=c.useLayoutEffect,G=function(e){var r=y.useRef(e);return $(function(){r.current=e}),r},E=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},O=function(e,r){var t=y.useRef();return y.useCallback(function(i){e.current=i,t.current&&E(t.current,null),t.current=r,r&&E(r,i)},[r])},H={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y=function(e){Object.keys(H).forEach(function(r){e.style.setProperty(r,H[r],"important")})},T=Y,o=null,C=function(e,r){var t=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?t+r.borderSize:t-r.paddingSize};function q(n,e,r,t){r===void 0&&(r=1),t===void 0&&(t=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),T(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,d=n.borderSize,a=n.sizingStyle,h=a.boxSizing;Object.keys(a).forEach(function(l){var m=l;o.style[m]=a[m]}),T(o),o.value=e;var s=C(o,n);o.value=e,s=C(o,n),o.value="x";var f=o.scrollHeight-i,g=f*r;h==="border-box"&&(g=g+i+d),s=Math.max(g,s);var v=f*t;return h==="border-box"&&(v=v+i+d),s=Math.min(v,s),[s,f]}var F=function(){},U=function(e,r){return e.reduce(function(t,i){return t[i]=r[i],t},{})},X=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z=!!document.documentElement.currentStyle,D=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var t=U(X,r),i=t.boxSizing;if(i==="")return null;Z&&i==="border-box"&&(t.width=parseFloat(t.width)+parseFloat(t.borderRightWidth)+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingRight)+parseFloat(t.paddingLeft)+"px");var d=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),a=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:d,borderSize:a}},J=D;function R(n,e,r){var t=G(r);c.useLayoutEffect(function(){var i=function(a){return t.current(a)};if(n)return n.addEventListener(e,i),function(){return n.removeEventListener(e,i)}},[])}var K=function(e,r){R(document.body,"reset",function(t){e.current.form===t.target&&r(t)})},Q=function(e){R(window,"resize",e)},V=function(e){R(document.fonts,"loadingdone",e)},ee=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],te=function(e,r){var t=e.cacheMeasurements,i=e.maxRows,d=e.minRows,a=e.onChange,h=a===void 0?F:a,s=e.onHeightChange,f=s===void 0?F:s,g=I(e,ee),v=g.value!==void 0,l=c.useRef(null),m=O(l,r),L=c.useRef(0),x=c.useRef(),p=function(){var u=l.current,z=t&&x.current?x.current:J(u);if(z){x.current=z;var w=q(z,u.value||u.placeholder||"x",d,i),b=w[0],k=w[1];L.current!==b&&(L.current=b,u.style.setProperty("height",b+"px","important"),f(b,{rowHeight:k}))}},A=function(u){v||p(),h(u)};return c.useLayoutEffect(p),K(l,function(){if(!v){var S=l.current.value;requestAnimationFrame(function(){var u=l.current;u&&S!==u.value&&p()})}}),Q(p),V(p),c.createElement("textarea",j({},g,{onChange:A,ref:m}))},re=c.forwardRef(te);const ne={size:"sm"},_=B((n,e)=>{const{autosize:r,maxRows:t,minRows:i,__staticSelector:d,resize:a,...h}=N("Textarea",ne,n),s=r&&M()!=="test",f=s?{maxRows:t,minRows:i}:{};return P.jsx(W,{component:s?re:"textarea",ref:e,...h,__staticSelector:d||"Textarea",multiline:!0,"data-no-overflow":r&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});_.classes=W.classes;_.displayName="@mantine/core/Textarea";export{_ as T};
@@ -1 +1 @@
1
- import{r,bv as E,f as F,b as W,q as L,ah as B,j as $,B as k,s as M,i as oe,bw as j,$ as ae,_ as ie,ak as ue,aJ as le,t as ce,v as de,a0 as fe}from"./entry.DBfTnVUe.js";import{g as me}from"./chunk.uyVen0u2.js";function ve(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:o}=n;if(o!==Object.keys(e).length)return!1;for(let a=0;a<o;a+=1){const i=n[a];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function he(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!ve(t[n],e[n]))return!1;return!0}function be(t){const e=r.useRef([]),n=r.useRef(0);return he(e.current,t)||(e.current=t,n.current+=1),[n.current]}function ge(t,e){r.useEffect(t,be(e))}function pe(t,e,n={autoInvoke:!1}){const o=r.useRef(null),a=r.useCallback((...m)=>{o.current||(o.current=window.setTimeout(()=>{t(m),o.current=null},e))},[e]),i=r.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return r.useEffect(()=>(n.autoInvoke&&a(),i),[i,a]),{start:a,clear:i}}function ye(t,e,n){const o=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||a.current)&&(o.current=new MutationObserver(t),o.current.observe(i||a.current,e)),()=>{o.current?.disconnect()}},[t,e]),a}function Re(){const[t,e]=r.useState(!1);return r.useEffect(()=>e(!0),[]),t}function we(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function Se({target:t,parent:e,ref:n,displayAfterTransitionEnd:o}){const a=r.useRef(-1),[i,m]=r.useState(!1),[w,S]=r.useState(typeof o=="boolean"?o:!1),l=()=>{if(!t||!e||!n.current)return;const u=t.getBoundingClientRect(),c=e.getBoundingClientRect(),f=window.getComputedStyle(t),h=window.getComputedStyle(e),p=E(f.borderTopWidth)+E(h.borderTopWidth),y=E(f.borderLeftWidth)+E(h.borderLeftWidth),b={top:u.top-c.top-p,left:u.left-c.left-y,width:u.width,height:u.height};n.current.style.transform=`translateY(${b.top}px) translateX(${b.left}px)`,n.current.style.width=`${b.width}px`,n.current.style.height=`${b.height}px`},d=()=>{window.clearTimeout(a.current),n.current&&(n.current.style.transitionDuration="0ms"),l(),a.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},g=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{if(l(),t)return g.current=new ResizeObserver(d),g.current.observe(t),e&&(v.current=new ResizeObserver(d),v.current.observe(e)),()=>{g.current?.disconnect(),v.current?.disconnect()}},[e,t]),r.useEffect(()=>{if(e){const u=c=>{we(c.target,e)&&(d(),S(!1))};return e.addEventListener("transitionend",u),()=>{e.removeEventListener("transitionend",u)}}},[e]),pe(()=>{me()!=="test"&&m(!0)},20,{autoInvoke:!0}),ye(u=>{u.forEach(c=>{c.type==="attributes"&&c.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:w}}var P={root:"m_96b553a6"};const Ce=M((t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}})),_=F((t,e)=>{const n=W("FloatingIndicator",null,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,target:l,parent:d,transitionDuration:g,mod:v,displayAfterTransitionEnd:u,attributes:c,...f}=n,h=L({name:"FloatingIndicator",classes:P,props:n,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:c,vars:S,varsResolver:Ce}),p=r.useRef(null),{initialized:y,hidden:b}=Se({target:l,parent:d,ref:p,displayAfterTransitionEnd:u}),N=B(e,p);return!l||!d?null:$.jsx(k,{ref:N,mod:[{initialized:y,hidden:b},v],...h("root"),...f})});_.displayName="@mantine/core/FloatingIndicator";_.classes=P;var A={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Ne={withItemsBorders:!0},Ee=M((t,{radius:e,color:n,transitionDuration:o,size:a,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:fe(e),"--sc-color":n?de(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":i,"--sc-padding":ce(a,"sc-padding"),"--sc-font-size":le(a)}})),q=F((t,e)=>{const n=W("SegmentedControl",Ne,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,data:l,value:d,defaultValue:g,onChange:v,size:u,name:c,disabled:f,readOnly:h,fullWidth:p,orientation:y,radius:b,color:N,transitionDuration:$e,transitionTimingFunction:ke,variant:D,autoContrast:H,withItemsBorders:J,mod:K,attributes:U,...X}=n,R=L({name:"SegmentedControl",props:n,classes:A,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:U,vars:S,varsResolver:Ee}),z=oe(),O=l.map(s=>typeof s=="string"?{label:s,value:s}:s),Y=Re(),[G,Q]=r.useState(j()),[Z,V]=r.useState(null),[x,ee]=r.useState({}),te=(s,T)=>{x[T]=s,ee(x)},[C,ne]=ae({value:d,defaultValue:g,finalValue:Array.isArray(l)?O.find(s=>!s.disabled)?.value??l[0]?.value??null:null,onChange:v}),I=ie(c),se=O.map(s=>r.createElement(k,{...R("control"),mod:{active:C===s.value,orientation:y},key:s.value},r.createElement("input",{...R("input"),disabled:f||s.disabled,type:"radio",name:I,value:s.value,id:`${I}-${s.value}`,checked:C===s.value,onChange:()=>!h&&ne(s.value),"data-focus-ring":z.focusRing,key:`${s.value}-input`}),r.createElement(k,{component:"label",...R("label"),mod:{active:C===s.value&&!(f||s.disabled),disabled:f||s.disabled,"read-only":h},htmlFor:`${I}-${s.value}`,ref:T=>te(T,s.value),__vars:{"--sc-label-color":N!==void 0?ue({color:N,theme:z,autoContrast:H}):void 0},key:`${s.value}-label`},$.jsx("span",{...R("innerLabel"),children:s.label})))),re=B(e,s=>V(s));return ge(()=>{Q(j())},[l.length]),l.length===0?null:$.jsxs(k,{...R("root"),variant:D,size:u,ref:re,mod:[{"full-width":p,orientation:y,initialized:Y,"with-items-borders":J},K],...X,role:"radiogroup","data-disabled":f,children:[typeof C=="string"&&$.jsx(_,{target:x[C],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...R("indicator")},G),se]})});q.classes=A;q.displayName="@mantine/core/SegmentedControl";export{q as S};
1
+ import{r,bv as E,f as F,b as W,q as L,ah as B,j as $,B as k,s as M,i as oe,bw as j,$ as ae,_ as ie,ak as ue,aJ as le,t as ce,v as de,a0 as fe}from"./entry.BWhdC3SJ.js";import{g as me}from"./chunk.uyVen0u2.js";function ve(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:o}=n;if(o!==Object.keys(e).length)return!1;for(let a=0;a<o;a+=1){const i=n[a];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function he(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!ve(t[n],e[n]))return!1;return!0}function be(t){const e=r.useRef([]),n=r.useRef(0);return he(e.current,t)||(e.current=t,n.current+=1),[n.current]}function ge(t,e){r.useEffect(t,be(e))}function pe(t,e,n={autoInvoke:!1}){const o=r.useRef(null),a=r.useCallback((...m)=>{o.current||(o.current=window.setTimeout(()=>{t(m),o.current=null},e))},[e]),i=r.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return r.useEffect(()=>(n.autoInvoke&&a(),i),[i,a]),{start:a,clear:i}}function ye(t,e,n){const o=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||a.current)&&(o.current=new MutationObserver(t),o.current.observe(i||a.current,e)),()=>{o.current?.disconnect()}},[t,e]),a}function Re(){const[t,e]=r.useState(!1);return r.useEffect(()=>e(!0),[]),t}function we(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function Se({target:t,parent:e,ref:n,displayAfterTransitionEnd:o}){const a=r.useRef(-1),[i,m]=r.useState(!1),[w,S]=r.useState(typeof o=="boolean"?o:!1),l=()=>{if(!t||!e||!n.current)return;const u=t.getBoundingClientRect(),c=e.getBoundingClientRect(),f=window.getComputedStyle(t),h=window.getComputedStyle(e),p=E(f.borderTopWidth)+E(h.borderTopWidth),y=E(f.borderLeftWidth)+E(h.borderLeftWidth),b={top:u.top-c.top-p,left:u.left-c.left-y,width:u.width,height:u.height};n.current.style.transform=`translateY(${b.top}px) translateX(${b.left}px)`,n.current.style.width=`${b.width}px`,n.current.style.height=`${b.height}px`},d=()=>{window.clearTimeout(a.current),n.current&&(n.current.style.transitionDuration="0ms"),l(),a.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},g=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{if(l(),t)return g.current=new ResizeObserver(d),g.current.observe(t),e&&(v.current=new ResizeObserver(d),v.current.observe(e)),()=>{g.current?.disconnect(),v.current?.disconnect()}},[e,t]),r.useEffect(()=>{if(e){const u=c=>{we(c.target,e)&&(d(),S(!1))};return e.addEventListener("transitionend",u),()=>{e.removeEventListener("transitionend",u)}}},[e]),pe(()=>{me()!=="test"&&m(!0)},20,{autoInvoke:!0}),ye(u=>{u.forEach(c=>{c.type==="attributes"&&c.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:w}}var P={root:"m_96b553a6"};const Ce=M((t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}})),_=F((t,e)=>{const n=W("FloatingIndicator",null,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,target:l,parent:d,transitionDuration:g,mod:v,displayAfterTransitionEnd:u,attributes:c,...f}=n,h=L({name:"FloatingIndicator",classes:P,props:n,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:c,vars:S,varsResolver:Ce}),p=r.useRef(null),{initialized:y,hidden:b}=Se({target:l,parent:d,ref:p,displayAfterTransitionEnd:u}),N=B(e,p);return!l||!d?null:$.jsx(k,{ref:N,mod:[{initialized:y,hidden:b},v],...h("root"),...f})});_.displayName="@mantine/core/FloatingIndicator";_.classes=P;var A={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Ne={withItemsBorders:!0},Ee=M((t,{radius:e,color:n,transitionDuration:o,size:a,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:fe(e),"--sc-color":n?de(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":i,"--sc-padding":ce(a,"sc-padding"),"--sc-font-size":le(a)}})),q=F((t,e)=>{const n=W("SegmentedControl",Ne,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,data:l,value:d,defaultValue:g,onChange:v,size:u,name:c,disabled:f,readOnly:h,fullWidth:p,orientation:y,radius:b,color:N,transitionDuration:$e,transitionTimingFunction:ke,variant:D,autoContrast:H,withItemsBorders:J,mod:K,attributes:U,...X}=n,R=L({name:"SegmentedControl",props:n,classes:A,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:U,vars:S,varsResolver:Ee}),z=oe(),O=l.map(s=>typeof s=="string"?{label:s,value:s}:s),Y=Re(),[G,Q]=r.useState(j()),[Z,V]=r.useState(null),[x,ee]=r.useState({}),te=(s,T)=>{x[T]=s,ee(x)},[C,ne]=ae({value:d,defaultValue:g,finalValue:Array.isArray(l)?O.find(s=>!s.disabled)?.value??l[0]?.value??null:null,onChange:v}),I=ie(c),se=O.map(s=>r.createElement(k,{...R("control"),mod:{active:C===s.value,orientation:y},key:s.value},r.createElement("input",{...R("input"),disabled:f||s.disabled,type:"radio",name:I,value:s.value,id:`${I}-${s.value}`,checked:C===s.value,onChange:()=>!h&&ne(s.value),"data-focus-ring":z.focusRing,key:`${s.value}-input`}),r.createElement(k,{component:"label",...R("label"),mod:{active:C===s.value&&!(f||s.disabled),disabled:f||s.disabled,"read-only":h},htmlFor:`${I}-${s.value}`,ref:T=>te(T,s.value),__vars:{"--sc-label-color":N!==void 0?ue({color:N,theme:z,autoContrast:H}):void 0},key:`${s.value}-label`},$.jsx("span",{...R("innerLabel"),children:s.label})))),re=B(e,s=>V(s));return ge(()=>{Q(j())},[l.length]),l.length===0?null:$.jsxs(k,{...R("root"),variant:D,size:u,ref:re,mod:[{"full-width":p,orientation:y,initialized:Y,"with-items-borders":J},K],...X,role:"radiogroup","data-disabled":f,children:[typeof C=="string"&&$.jsx(_,{target:x[C],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...R("indicator")},G),se]})});q.classes=A;q.displayName="@mantine/core/SegmentedControl";export{q as S};
@@ -1 +1 @@
1
- import{r as h,j as i,B as W,f as oe,b as ae,q as ce,ah as le,s as ie,g as ue,T as A,a5 as de,E as fe,G as he,aa as pe,ab as me,ac as ye,ai as ve,F as ge,H as xe}from"./entry.DBfTnVUe.js";import{f as G}from"./chunk.BlqFPyLh.js";import{u as ke}from"./chunk.CAWWjC4E.js";function Y(e){const r=new Map;return(...n)=>{const t=JSON.stringify(n);if(r.has(t))return r.get(t);const s=e(...n);return r.set(t,s),s}}function L(e,r,n){if(!e||!r)return[];const t=n.indexOf(e),s=n.indexOf(r),c=Math.min(t,s),d=Math.max(t,s);return n.slice(c,d+1)}function H({node:e,getStyles:r,rootIndex:n,controller:t,expandOnClick:s,selectOnClick:c,isSubtree:d,level:p=1,renderNode:g,flatValues:f,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b}){const u=h.useRef(null),y=(e.children||[]).map(o=>i.jsx(H,{node:o,flatValues:f,getStyles:r,rootIndex:void 0,level:p+1,controller:t,expandOnClick:s,isSubtree:!0,renderNode:g,selectOnClick:c,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b},o.value)),v=o=>{if(o.nativeEvent.code==="ArrowRight"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]?o.currentTarget.querySelector("[role=treeitem]")?.focus():t.expand(e.value)),o.nativeEvent.code==="ArrowLeft"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]&&(e.children||[]).length>0?t.collapse(e.value):d&&G(o.currentTarget,"[role=treeitem]")?.focus()),o.nativeEvent.code==="ArrowDown"||o.nativeEvent.code==="ArrowUp"){const w=G(o.currentTarget,"[data-tree-root]");if(!w)return;o.stopPropagation(),o.preventDefault();const T=Array.from(w.querySelectorAll("[role=treeitem]")),O=T.indexOf(o.currentTarget);if(O===-1)return;const I=o.nativeEvent.code==="ArrowDown"?O+1:O-1;if(T[I]?.focus(),o.shiftKey){const E=T[I];E&&t.setSelectedState(L(t.anchorNode,E.dataset.value,f))}}o.nativeEvent.code==="Space"&&(x&&(o.stopPropagation(),o.preventDefault(),t.toggleExpanded(e.value)),b&&(o.stopPropagation(),o.preventDefault(),t.isNodeChecked(e.value)?t.uncheckNode(e.value):t.checkNode(e.value)))},N=o=>{o.stopPropagation(),m&&o.shiftKey&&t.anchorNode?(t.setSelectedState(L(t.anchorNode,e.value,f)),u.current?.focus()):(s&&t.toggleExpanded(e.value),c&&t.select(e.value),u.current?.focus())},C=t.selectedState.includes(e.value),S={...r("label"),onClick:N,"data-selected":C||void 0,"data-value":e.value,"data-hovered":t.hoveredNode===e.value||void 0};return i.jsxs("li",{...r("node",{style:{"--label-offset":`calc(var(--level-offset) * ${p-1})`}}),role:"treeitem","aria-selected":C,"data-value":e.value,"data-selected":C||void 0,"data-hovered":t.hoveredNode===e.value||void 0,"data-level":p,tabIndex:n===0?0:-1,onKeyDown:v,ref:u,onMouseOver:o=>{o.stopPropagation(),t.setHoveredNode(e.value)},onMouseLeave:o=>{o.stopPropagation(),t.setHoveredNode(null)},children:[typeof g=="function"?g({node:e,level:p,selected:C,tree:t,expanded:t.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:S}):i.jsx("div",{...S,children:e.label}),t.expandedState[e.value]&&y.length>0&&i.jsx(W,{component:"ul",role:"group",...r("subtree"),"data-level":p,children:y})]})}H.displayName="@mantine/core/TreeNode";function M(e,r,n=[]){const t=[];for(const s of e)if(Array.isArray(s.children)&&s.children.length>0){const c=M(s.children,r,n);if(c.currentTreeChecked.length===s.children.length){const d=c.currentTreeChecked.every(g=>g.checked),p={checked:d,indeterminate:!d,value:s.value,hasChildren:!0};t.push(p),n.push(p)}else if(c.currentTreeChecked.length>0){const d={checked:!1,indeterminate:!0,value:s.value,hasChildren:!0};t.push(d),n.push(d)}}else if(r.includes(s.value)){const c={checked:!0,indeterminate:!1,value:s.value,hasChildren:!1};t.push(c),n.push(c)}return{result:n,currentTreeChecked:t}}function Z(e,r){for(const n of r){if(n.value===e)return n;if(Array.isArray(n.children)){const t=Z(e,n.children);if(t)return t}}return null}function P(e,r,n=[]){const t=Z(e,r);return t?!Array.isArray(t.children)||t.children.length===0?[t.value]:(t.children.forEach(s=>{Array.isArray(s.children)&&s.children.length>0?P(s.value,r,n):n.push(s.value)}),n):n}function X(e){return e.reduce((r,n)=>(Array.isArray(n.children)&&n.children.length>0?r.push(...X(n.children)):r.push(n.value),r),[])}function be(e,r,n){return n.length===0?!1:n.includes(e)?!0:M(r,n).result.some(s=>s.value===e&&s.checked)}const Ne=Y(be);function je(e,r,n){return n.length===0?!1:M(r,n).result.some(s=>s.value===e&&s.indeterminate)}const Ce=Y(je);function _(e,r,n,t={}){return r.forEach(s=>{t[s.value]=s.value in e?e[s.value]:s.value===n,Array.isArray(s.children)&&_(e,s.children,n,t)}),t}function B(e,r){const n=_({},e,[]);return r==="*"?Object.keys(n).reduce((t,s)=>({...t,[s]:!0}),{}):(r.forEach(t=>{n[t]=!0}),n)}function Se(e,r){const n=[];return e.forEach(t=>n.push(...P(t,r))),Array.from(new Set(n))}function Q({initialSelectedState:e=[],initialCheckedState:r=[],initialExpandedState:n={},multiple:t=!1,onNodeCollapse:s,onNodeExpand:c}={}){const[d,p]=h.useState([]),[g,f]=h.useState(n),[m,x]=h.useState(e),[b,u]=h.useState(r),[y,v]=h.useState(null),[N,C]=h.useState(null),S=h.useCallback(a=>{f(l=>_(l,a,m)),u(l=>Se(l,a)),p(a)},[m,b]),o=h.useCallback(a=>{f(l=>{const j={...l,[a]:!l[a]};return j[a]?c?.(a):s?.(a),j})},[s,c]),w=h.useCallback(a=>{f(l=>(l[a]!==!1&&s?.(a),{...l,[a]:!1}))},[s]),T=h.useCallback(a=>{f(l=>(l[a]!==!0&&c?.(a),{...l,[a]:!0}))},[c]),O=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!0}),l})},[]),I=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!1}),l})},[]),E=h.useCallback(a=>x(l=>t?l.includes(a)?(v(null),l.filter(j=>j!==a)):(v(a),[...l,a]):l.includes(a)?(v(null),[]):(v(a),[a])),[]),V=h.useCallback(a=>{v(a),x(l=>t?l.includes(a)?l:[...l,a]:[a])},[]),$=h.useCallback(a=>{y===a&&v(null),x(l=>l.filter(j=>j!==a))},[]),D=h.useCallback(()=>{x([]),v(null)},[]),R=h.useCallback(a=>{const l=P(a,d);u(j=>Array.from(new Set([...j,...l])))},[d]),F=h.useCallback(a=>{const l=P(a,d);u(j=>j.filter(se=>!l.includes(se)))},[d]),ne=h.useCallback(()=>{u(()=>X(d))},[d]),re=h.useCallback(()=>{u([])},[]);return{multiple:t,expandedState:g,selectedState:m,checkedState:b,anchorNode:y,initialize:S,toggleExpanded:o,collapse:w,expand:T,expandAllNodes:O,collapseAllNodes:I,setExpandedState:f,checkNode:R,uncheckNode:F,checkAllNodes:ne,uncheckAllNodes:re,setCheckedState:u,toggleSelected:E,select:V,deselect:$,clearSelected:D,setSelectedState:x,hoveredNode:N,setHoveredNode:C,getCheckedNodes:()=>M(d,b).result,isNodeChecked:a=>Ne(a,d,b),isNodeIndeterminate:a=>Ce(a,d,b)}}var z={root:"m_f698e191",subtree:"m_75f3ecf",node:"m_f6970eb1",label:"m_dc283425"};function ee(e){return e.reduce((r,n)=>(r.push(n.value),n.children&&r.push(...ee(n.children)),r),[])}const Ae={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},we=ie((e,{levelOffset:r})=>({root:{"--level-offset":ue(r)}})),q=oe((e,r)=>{const n=ae("Tree",Ae,e),{classNames:t,className:s,style:c,styles:d,unstyled:p,vars:g,data:f,expandOnClick:m,tree:x,renderNode:b,selectOnClick:u,clearSelectionOnOutsideClick:y,allowRangeSelection:v,expandOnSpace:N,levelOffset:C,checkOnSpace:S,attributes:o,...w}=n,T=Q(),O=x||T,I=ce({name:"Tree",classes:z,props:n,className:s,style:c,classNames:t,styles:d,unstyled:p,attributes:o,vars:g,varsResolver:we}),E=ke(()=>y&&O.clearSelected()),V=le(r,E),$=h.useMemo(()=>ee(f),[f]);h.useEffect(()=>{O.initialize(f)},[f]);const D=f.map((R,F)=>i.jsx(H,{node:R,getStyles:I,rootIndex:F,expandOnClick:m,selectOnClick:u,controller:O,renderNode:b,flatValues:$,allowRangeSelection:v,expandOnSpace:N,checkOnSpace:S},R.value));return i.jsx(W,{component:"ul",ref:V,...I("root"),...w,role:"tree","aria-multiselectable":O.multiple,"data-tree-root":!0,children:D})});q.displayName="@mantine/core/Tree";q.classes=z;const U={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},k={root:{fontFamily:"var(--mantine-font-family-monospace)"},chevron:{flexShrink:0,color:"var(--mantine-color-dimmed)"},key:{color:"var(--mantine-color-cyan-text)",fontWeight:500},colon:{color:"var(--mantine-color-dimmed)"},string:{color:"var(--mantine-color-teal-text)"},number:{color:"var(--mantine-color-blue-text)"},boolean:{color:"var(--mantine-color-violet-text)"},null:{color:"var(--mantine-color-dimmed)",fontStyle:"italic"},preview:{color:"var(--mantine-color-dimmed)"}},K=e=>e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":typeof e;function J(e,r=[],n,t=!1,s=10){const c=n!==void 0?[...r,n]:r,d=c.length>0?c.join("."):"root";if(c.length>s)return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t};const p=K(e);if(p==="object"||p==="array"){const f=(p==="array"?e.map((m,x)=>[String(x),m]):Object.entries(e)).map(([m,x])=>J(x,c,m,p==="array",s)).filter(m=>m!==null);return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t,children:f.length>0?f:void 0}}return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t}}function te(e,r,n=0){if(n>=r)return[];const t=[];for(const s of e)s.children&&(t.push(s.value),t.push(...te(s.children,r,n+1)));return t}const Oe=({value:e,iconSize:r})=>{const[n,t]=h.useState(!1),s=h.useCallback(c=>{c.stopPropagation(),navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),1500)},[e]);return i.jsx(pe,{size:r+4,variant:"transparent",c:n?"green":"dimmed",onClick:s,className:"alepha-json-viewer-copy",children:n?i.jsx(me,{size:r}):i.jsx(ye,{size:r})})},Te=({node:e,expanded:r,hasChildren:n,elementProps:t,size:s,config:c,showQuotes:d,showCopyButton:p,renderValue:g})=>{const{nodeValue:f,nodeKey:m,path:x,isArrayItem:b,isRoot:u}=e,y=K(f),v=y==="object"||y==="array",N=()=>{if(!v)return null;const o=(y==="array"?f:Object.keys(f)).length,w=y==="array"?"item":"key";return r?null:i.jsx(A,{fs:"italic",component:"span",size:s,style:k.preview,children:o===0?y==="array"?"[]":"{}":y==="array"?`[ ${o} ${o===1?w:`${w}s`} ]`:`{ ${o} ${o===1?w:`${w}s`} }`})},C=()=>v?JSON.stringify(f,null,2):String(f??"");return i.jsxs(de,{gap:6,wrap:"nowrap",...t,className:`alepha-json-viewer-row ${t.className||""}`,children:[n?r?i.jsx(fe,{size:c.icon,style:k.chevron}):i.jsx(he,{size:c.icon,style:k.chevron}):i.jsx("span",{style:{width:c.icon,flexShrink:0}}),m!==void 0&&!b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:d?`"${m}"`:m}),i.jsx("span",{style:k.colon,children:":"})]}),m!==void 0&&b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:m}),i.jsx("span",{style:k.colon,children:":"})]}),n?N():v?y==="array"?i.jsx(A,{component:"span",size:s,style:k.preview,children:"[]"}):i.jsx(A,{component:"span",size:s,style:k.preview,children:"{}"}):g(f,m,x),p&&i.jsx(Oe,{value:C(),iconSize:c.icon})]})},Ie=({data:e,defaultExpandedDepth:r=2,maxDepth:n=10,size:t="sm",showQuotes:s=!1,showCopyButton:c=!0,formatValue:d})=>{const p=U[t]||U.sm,g=h.useMemo(()=>{const u=K(e);if(u==="object"||u==="array"){const N=(u==="array"?e.map((S,o)=>[String(o),S]):Object.entries(e)).map(([S,o])=>J(o,[],S,u==="array",n)).filter(S=>S!==null);return[{value:"root",label:"",nodeValue:e,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:N.length>0?N:void 0}]}const y=J(e,[],void 0,!1,n);return y?[y]:[]},[e,n]),f=h.useMemo(()=>{if(r===0)return{};if(r===1/0)return B(g,"*");const u=te(g,r+1);return B(g,u)},[g,r]),m=Q({initialExpandedState:f}),x=h.useCallback((u,y,v)=>{const N=d?.(y,u,v);if(N!==void 0)return i.jsx(A,{component:"span",size:t,style:k.string,className:"alepha-json-viewer-value",title:String(u),children:N});const C=K(u);switch(C){case"string":return i.jsxs(A,{style:k.string,component:"span",size:t,className:"alepha-json-viewer-value",title:u,children:['"',u,'"']});case"number":return i.jsx(A,{component:"span",size:t,style:k.number,children:u});case"boolean":return i.jsx(A,{component:"span",size:t,style:k.boolean,children:String(u)});case"null":case"undefined":return i.jsx(A,{component:"span",size:t,style:k.null,children:C});default:return i.jsx(A,{component:"span",size:t,children:String(u)})}},[d,s,t]),b=h.useCallback(({node:u,expanded:y,hasChildren:v,elementProps:N})=>i.jsx(Te,{node:u,expanded:y,hasChildren:v,elementProps:N,size:t,config:p,showQuotes:s,showCopyButton:c,renderValue:x}),[p,x,c,s,t]);return g.length===0?i.jsx(A,{size:t,style:k.null,children:e===null?"null":e===void 0?"undefined":"{}"}):i.jsx(q,{data:g,tree:m,levelOffset:p.levelOffset,expandOnClick:!0,renderNode:b,styles:{root:k.root}})};ve.prototype.json=function(e,r){this.open({size:"lg",title:r?.title||"Json Viewer",...r,content:i.jsx(ge,{bdrs:"md",w:"100%",flex:1,p:"sm",bg:xe.colors.surface,children:i.jsx(Ie,{size:"xs",data:e})})})};export{Ie as J};
1
+ import{r as h,j as i,B as W,f as oe,b as ae,q as ce,ah as le,s as ie,g as ue,T as A,a5 as de,E as fe,G as he,aa as pe,ab as me,ac as ye,ai as ve,F as ge,H as xe}from"./entry.BWhdC3SJ.js";import{f as G}from"./chunk.BlqFPyLh.js";import{u as ke}from"./chunk.BX7p74D8.js";function Y(e){const r=new Map;return(...n)=>{const t=JSON.stringify(n);if(r.has(t))return r.get(t);const s=e(...n);return r.set(t,s),s}}function L(e,r,n){if(!e||!r)return[];const t=n.indexOf(e),s=n.indexOf(r),c=Math.min(t,s),d=Math.max(t,s);return n.slice(c,d+1)}function H({node:e,getStyles:r,rootIndex:n,controller:t,expandOnClick:s,selectOnClick:c,isSubtree:d,level:p=1,renderNode:g,flatValues:f,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b}){const u=h.useRef(null),y=(e.children||[]).map(o=>i.jsx(H,{node:o,flatValues:f,getStyles:r,rootIndex:void 0,level:p+1,controller:t,expandOnClick:s,isSubtree:!0,renderNode:g,selectOnClick:c,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b},o.value)),v=o=>{if(o.nativeEvent.code==="ArrowRight"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]?o.currentTarget.querySelector("[role=treeitem]")?.focus():t.expand(e.value)),o.nativeEvent.code==="ArrowLeft"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]&&(e.children||[]).length>0?t.collapse(e.value):d&&G(o.currentTarget,"[role=treeitem]")?.focus()),o.nativeEvent.code==="ArrowDown"||o.nativeEvent.code==="ArrowUp"){const w=G(o.currentTarget,"[data-tree-root]");if(!w)return;o.stopPropagation(),o.preventDefault();const T=Array.from(w.querySelectorAll("[role=treeitem]")),O=T.indexOf(o.currentTarget);if(O===-1)return;const I=o.nativeEvent.code==="ArrowDown"?O+1:O-1;if(T[I]?.focus(),o.shiftKey){const E=T[I];E&&t.setSelectedState(L(t.anchorNode,E.dataset.value,f))}}o.nativeEvent.code==="Space"&&(x&&(o.stopPropagation(),o.preventDefault(),t.toggleExpanded(e.value)),b&&(o.stopPropagation(),o.preventDefault(),t.isNodeChecked(e.value)?t.uncheckNode(e.value):t.checkNode(e.value)))},N=o=>{o.stopPropagation(),m&&o.shiftKey&&t.anchorNode?(t.setSelectedState(L(t.anchorNode,e.value,f)),u.current?.focus()):(s&&t.toggleExpanded(e.value),c&&t.select(e.value),u.current?.focus())},C=t.selectedState.includes(e.value),S={...r("label"),onClick:N,"data-selected":C||void 0,"data-value":e.value,"data-hovered":t.hoveredNode===e.value||void 0};return i.jsxs("li",{...r("node",{style:{"--label-offset":`calc(var(--level-offset) * ${p-1})`}}),role:"treeitem","aria-selected":C,"data-value":e.value,"data-selected":C||void 0,"data-hovered":t.hoveredNode===e.value||void 0,"data-level":p,tabIndex:n===0?0:-1,onKeyDown:v,ref:u,onMouseOver:o=>{o.stopPropagation(),t.setHoveredNode(e.value)},onMouseLeave:o=>{o.stopPropagation(),t.setHoveredNode(null)},children:[typeof g=="function"?g({node:e,level:p,selected:C,tree:t,expanded:t.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:S}):i.jsx("div",{...S,children:e.label}),t.expandedState[e.value]&&y.length>0&&i.jsx(W,{component:"ul",role:"group",...r("subtree"),"data-level":p,children:y})]})}H.displayName="@mantine/core/TreeNode";function M(e,r,n=[]){const t=[];for(const s of e)if(Array.isArray(s.children)&&s.children.length>0){const c=M(s.children,r,n);if(c.currentTreeChecked.length===s.children.length){const d=c.currentTreeChecked.every(g=>g.checked),p={checked:d,indeterminate:!d,value:s.value,hasChildren:!0};t.push(p),n.push(p)}else if(c.currentTreeChecked.length>0){const d={checked:!1,indeterminate:!0,value:s.value,hasChildren:!0};t.push(d),n.push(d)}}else if(r.includes(s.value)){const c={checked:!0,indeterminate:!1,value:s.value,hasChildren:!1};t.push(c),n.push(c)}return{result:n,currentTreeChecked:t}}function Z(e,r){for(const n of r){if(n.value===e)return n;if(Array.isArray(n.children)){const t=Z(e,n.children);if(t)return t}}return null}function P(e,r,n=[]){const t=Z(e,r);return t?!Array.isArray(t.children)||t.children.length===0?[t.value]:(t.children.forEach(s=>{Array.isArray(s.children)&&s.children.length>0?P(s.value,r,n):n.push(s.value)}),n):n}function X(e){return e.reduce((r,n)=>(Array.isArray(n.children)&&n.children.length>0?r.push(...X(n.children)):r.push(n.value),r),[])}function be(e,r,n){return n.length===0?!1:n.includes(e)?!0:M(r,n).result.some(s=>s.value===e&&s.checked)}const Ne=Y(be);function je(e,r,n){return n.length===0?!1:M(r,n).result.some(s=>s.value===e&&s.indeterminate)}const Ce=Y(je);function _(e,r,n,t={}){return r.forEach(s=>{t[s.value]=s.value in e?e[s.value]:s.value===n,Array.isArray(s.children)&&_(e,s.children,n,t)}),t}function B(e,r){const n=_({},e,[]);return r==="*"?Object.keys(n).reduce((t,s)=>({...t,[s]:!0}),{}):(r.forEach(t=>{n[t]=!0}),n)}function Se(e,r){const n=[];return e.forEach(t=>n.push(...P(t,r))),Array.from(new Set(n))}function Q({initialSelectedState:e=[],initialCheckedState:r=[],initialExpandedState:n={},multiple:t=!1,onNodeCollapse:s,onNodeExpand:c}={}){const[d,p]=h.useState([]),[g,f]=h.useState(n),[m,x]=h.useState(e),[b,u]=h.useState(r),[y,v]=h.useState(null),[N,C]=h.useState(null),S=h.useCallback(a=>{f(l=>_(l,a,m)),u(l=>Se(l,a)),p(a)},[m,b]),o=h.useCallback(a=>{f(l=>{const j={...l,[a]:!l[a]};return j[a]?c?.(a):s?.(a),j})},[s,c]),w=h.useCallback(a=>{f(l=>(l[a]!==!1&&s?.(a),{...l,[a]:!1}))},[s]),T=h.useCallback(a=>{f(l=>(l[a]!==!0&&c?.(a),{...l,[a]:!0}))},[c]),O=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!0}),l})},[]),I=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!1}),l})},[]),E=h.useCallback(a=>x(l=>t?l.includes(a)?(v(null),l.filter(j=>j!==a)):(v(a),[...l,a]):l.includes(a)?(v(null),[]):(v(a),[a])),[]),V=h.useCallback(a=>{v(a),x(l=>t?l.includes(a)?l:[...l,a]:[a])},[]),$=h.useCallback(a=>{y===a&&v(null),x(l=>l.filter(j=>j!==a))},[]),D=h.useCallback(()=>{x([]),v(null)},[]),R=h.useCallback(a=>{const l=P(a,d);u(j=>Array.from(new Set([...j,...l])))},[d]),F=h.useCallback(a=>{const l=P(a,d);u(j=>j.filter(se=>!l.includes(se)))},[d]),ne=h.useCallback(()=>{u(()=>X(d))},[d]),re=h.useCallback(()=>{u([])},[]);return{multiple:t,expandedState:g,selectedState:m,checkedState:b,anchorNode:y,initialize:S,toggleExpanded:o,collapse:w,expand:T,expandAllNodes:O,collapseAllNodes:I,setExpandedState:f,checkNode:R,uncheckNode:F,checkAllNodes:ne,uncheckAllNodes:re,setCheckedState:u,toggleSelected:E,select:V,deselect:$,clearSelected:D,setSelectedState:x,hoveredNode:N,setHoveredNode:C,getCheckedNodes:()=>M(d,b).result,isNodeChecked:a=>Ne(a,d,b),isNodeIndeterminate:a=>Ce(a,d,b)}}var z={root:"m_f698e191",subtree:"m_75f3ecf",node:"m_f6970eb1",label:"m_dc283425"};function ee(e){return e.reduce((r,n)=>(r.push(n.value),n.children&&r.push(...ee(n.children)),r),[])}const Ae={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},we=ie((e,{levelOffset:r})=>({root:{"--level-offset":ue(r)}})),q=oe((e,r)=>{const n=ae("Tree",Ae,e),{classNames:t,className:s,style:c,styles:d,unstyled:p,vars:g,data:f,expandOnClick:m,tree:x,renderNode:b,selectOnClick:u,clearSelectionOnOutsideClick:y,allowRangeSelection:v,expandOnSpace:N,levelOffset:C,checkOnSpace:S,attributes:o,...w}=n,T=Q(),O=x||T,I=ce({name:"Tree",classes:z,props:n,className:s,style:c,classNames:t,styles:d,unstyled:p,attributes:o,vars:g,varsResolver:we}),E=ke(()=>y&&O.clearSelected()),V=le(r,E),$=h.useMemo(()=>ee(f),[f]);h.useEffect(()=>{O.initialize(f)},[f]);const D=f.map((R,F)=>i.jsx(H,{node:R,getStyles:I,rootIndex:F,expandOnClick:m,selectOnClick:u,controller:O,renderNode:b,flatValues:$,allowRangeSelection:v,expandOnSpace:N,checkOnSpace:S},R.value));return i.jsx(W,{component:"ul",ref:V,...I("root"),...w,role:"tree","aria-multiselectable":O.multiple,"data-tree-root":!0,children:D})});q.displayName="@mantine/core/Tree";q.classes=z;const U={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},k={root:{fontFamily:"var(--mantine-font-family-monospace)"},chevron:{flexShrink:0,color:"var(--mantine-color-dimmed)"},key:{color:"var(--mantine-color-cyan-text)",fontWeight:500},colon:{color:"var(--mantine-color-dimmed)"},string:{color:"var(--mantine-color-teal-text)"},number:{color:"var(--mantine-color-blue-text)"},boolean:{color:"var(--mantine-color-violet-text)"},null:{color:"var(--mantine-color-dimmed)",fontStyle:"italic"},preview:{color:"var(--mantine-color-dimmed)"}},K=e=>e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":typeof e;function J(e,r=[],n,t=!1,s=10){const c=n!==void 0?[...r,n]:r,d=c.length>0?c.join("."):"root";if(c.length>s)return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t};const p=K(e);if(p==="object"||p==="array"){const f=(p==="array"?e.map((m,x)=>[String(x),m]):Object.entries(e)).map(([m,x])=>J(x,c,m,p==="array",s)).filter(m=>m!==null);return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t,children:f.length>0?f:void 0}}return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t}}function te(e,r,n=0){if(n>=r)return[];const t=[];for(const s of e)s.children&&(t.push(s.value),t.push(...te(s.children,r,n+1)));return t}const Oe=({value:e,iconSize:r})=>{const[n,t]=h.useState(!1),s=h.useCallback(c=>{c.stopPropagation(),navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),1500)},[e]);return i.jsx(pe,{size:r+4,variant:"transparent",c:n?"green":"dimmed",onClick:s,className:"alepha-json-viewer-copy",children:n?i.jsx(me,{size:r}):i.jsx(ye,{size:r})})},Te=({node:e,expanded:r,hasChildren:n,elementProps:t,size:s,config:c,showQuotes:d,showCopyButton:p,renderValue:g})=>{const{nodeValue:f,nodeKey:m,path:x,isArrayItem:b,isRoot:u}=e,y=K(f),v=y==="object"||y==="array",N=()=>{if(!v)return null;const o=(y==="array"?f:Object.keys(f)).length,w=y==="array"?"item":"key";return r?null:i.jsx(A,{fs:"italic",component:"span",size:s,style:k.preview,children:o===0?y==="array"?"[]":"{}":y==="array"?`[ ${o} ${o===1?w:`${w}s`} ]`:`{ ${o} ${o===1?w:`${w}s`} }`})},C=()=>v?JSON.stringify(f,null,2):String(f??"");return i.jsxs(de,{gap:6,wrap:"nowrap",...t,className:`alepha-json-viewer-row ${t.className||""}`,children:[n?r?i.jsx(fe,{size:c.icon,style:k.chevron}):i.jsx(he,{size:c.icon,style:k.chevron}):i.jsx("span",{style:{width:c.icon,flexShrink:0}}),m!==void 0&&!b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:d?`"${m}"`:m}),i.jsx("span",{style:k.colon,children:":"})]}),m!==void 0&&b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:m}),i.jsx("span",{style:k.colon,children:":"})]}),n?N():v?y==="array"?i.jsx(A,{component:"span",size:s,style:k.preview,children:"[]"}):i.jsx(A,{component:"span",size:s,style:k.preview,children:"{}"}):g(f,m,x),p&&i.jsx(Oe,{value:C(),iconSize:c.icon})]})},Ie=({data:e,defaultExpandedDepth:r=2,maxDepth:n=10,size:t="sm",showQuotes:s=!1,showCopyButton:c=!0,formatValue:d})=>{const p=U[t]||U.sm,g=h.useMemo(()=>{const u=K(e);if(u==="object"||u==="array"){const N=(u==="array"?e.map((S,o)=>[String(o),S]):Object.entries(e)).map(([S,o])=>J(o,[],S,u==="array",n)).filter(S=>S!==null);return[{value:"root",label:"",nodeValue:e,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:N.length>0?N:void 0}]}const y=J(e,[],void 0,!1,n);return y?[y]:[]},[e,n]),f=h.useMemo(()=>{if(r===0)return{};if(r===1/0)return B(g,"*");const u=te(g,r+1);return B(g,u)},[g,r]),m=Q({initialExpandedState:f}),x=h.useCallback((u,y,v)=>{const N=d?.(y,u,v);if(N!==void 0)return i.jsx(A,{component:"span",size:t,style:k.string,className:"alepha-json-viewer-value",title:String(u),children:N});const C=K(u);switch(C){case"string":return i.jsxs(A,{style:k.string,component:"span",size:t,className:"alepha-json-viewer-value",title:u,children:['"',u,'"']});case"number":return i.jsx(A,{component:"span",size:t,style:k.number,children:u});case"boolean":return i.jsx(A,{component:"span",size:t,style:k.boolean,children:String(u)});case"null":case"undefined":return i.jsx(A,{component:"span",size:t,style:k.null,children:C});default:return i.jsx(A,{component:"span",size:t,children:String(u)})}},[d,s,t]),b=h.useCallback(({node:u,expanded:y,hasChildren:v,elementProps:N})=>i.jsx(Te,{node:u,expanded:y,hasChildren:v,elementProps:N,size:t,config:p,showQuotes:s,showCopyButton:c,renderValue:x}),[p,x,c,s,t]);return g.length===0?i.jsx(A,{size:t,style:k.null,children:e===null?"null":e===void 0?"undefined":"{}"}):i.jsx(q,{data:g,tree:m,levelOffset:p.levelOffset,expandOnClick:!0,renderNode:b,styles:{root:k.root}})};ve.prototype.json=function(e,r){this.open({size:"lg",title:r?.title||"Json Viewer",...r,content:i.jsx(ge,{bdrs:"md",w:"100%",flex:1,p:"sm",bg:xe.colors.surface,children:i.jsx(Ie,{size:"xs",data:e})})})};export{Ie as J};
@@ -1,2 +1,2 @@
1
- import{w as z,a3 as C,a4 as k,r as h,j as e,F as x,T as r,B as a,H as p,af as L,z as E,ad as v,S,a9 as V,ae as B,ab as I,ac as M}from"./entry.DBfTnVUe.js";import{d as $}from"./chunk.ChDpavl2.js";import{S as y,B as b}from"./chunk.DLDchrhP.js";import{C as w}from"./chunk.PWK2K2kI.js";import{T as t}from"./chunk.BjjA59Pf.js";import{I as H}from"./chunk.CYVZxO-p.js";const N=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],O=z("outline","settings","Settings",N),A=s=>{const n=new Map;for(const l of s){const i=l.schema;if(i?.properties)for(const[o,c]of Object.entries(i.properties)){if(n.has(o))continue;const d=c,u=l.values[o];let g=d.type??"unknown",m=d.format;if(d.anyOf){const j=d.anyOf.find(f=>f.type!=="null");j&&(g=j.type??"unknown",m=j.format)}n.set(o,{name:o,value:u,type:g,description:d.description,format:m})}}return Array.from(n.values()).sort((l,i)=>l.name.localeCompare(i.name))},F=({variables:s,selectedVar:n,onSelectVar:l,search:i,onSearchChange:o})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${p.colors.border}`},children:e.jsx(L,{placeholder:"Search variables...",leftSection:e.jsx(E,{size:14}),size:"xs",value:i,onChange:c=>o(c.target.value)})}),e.jsx(v,{style:{flex:1},children:e.jsxs(a,{children:[e.jsxs(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:p.colors.background,borderBottom:`1px solid ${p.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Variables (",s.length,")"]}),s.map(c=>{const d=n?.name===c.name;return e.jsxs(x,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>l(c),style:{cursor:"pointer",backgroundColor:d?"#228be615":void 0,borderLeft:d?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${p.colors.border}`},children:[e.jsx(S,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,ff:"monospace",children:c.name})]},c.name)})]})})]}),R=({variable:s})=>{const n=s.value!==void 0&&s.value!=="",l=n?String(s.value):"(not set)",i=s.name.toLowerCase().includes("secret")||s.name.toLowerCase().includes("password")||s.name.toLowerCase().includes("key")||s.name.toLowerCase().includes("token");return e.jsxs(x,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${p.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:s.format||s.type})]})}),e.jsx(v,{style:{flex:1},p:"md",children:e.jsxs(y,{gap:"lg",children:[s.description&&e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(r,{size:"sm",c:"dimmed",children:s.description})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(w,{block:!0,style:{flex:1,filter:i&&n?"blur(4px)":void 0,transition:"filter 0.2s"},onMouseEnter:o=>{i&&(o.currentTarget.style.filter="none")},onMouseLeave:o=>{i&&n&&(o.currentTarget.style.filter="blur(4px)")},children:l}),n&&e.jsx(V,{value:String(s.value),children:({copied:o,copy:c})=>e.jsx(B,{label:o?"Copied!":"Copy value",children:e.jsx(a,{onClick:c,style:{cursor:"pointer"},c:o?"teal":"dimmed",children:o?e.jsx(I,{size:16}):e.jsx(M,{size:16})})})})]}),i&&e.jsx(r,{size:"xs",c:"dimmed",mt:"xs",children:"Hover to reveal sensitive value"})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(t.Tbody,{children:[e.jsxs(t.Tr,{children:[e.jsx(t.Td,{w:120,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Type"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.type})})]}),s.format&&e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Format"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.format})})]})]})})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Usage"}),e.jsx(w,{block:!0,children:`# Set in .env file or environment
1
+ import{w as z,a3 as C,a4 as k,r as h,j as e,F as x,T as r,B as a,H as p,af as L,z as E,ad as v,S,a9 as V,ae as B,ab as I,ac as M}from"./entry.BWhdC3SJ.js";import{d as $}from"./chunk.BKZ6YEV4.js";import{S as y,B as b}from"./chunk.BqEqrty9.js";import{C as w}from"./chunk.rqjDVBSo.js";import{T as t}from"./chunk.CEbDj1NR.js";import{I as H}from"./chunk.CZ4J9K5b.js";const N=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],O=z("outline","settings","Settings",N),A=s=>{const n=new Map;for(const l of s){const i=l.schema;if(i?.properties)for(const[o,c]of Object.entries(i.properties)){if(n.has(o))continue;const d=c,u=l.values[o];let g=d.type??"unknown",m=d.format;if(d.anyOf){const j=d.anyOf.find(f=>f.type!=="null");j&&(g=j.type??"unknown",m=j.format)}n.set(o,{name:o,value:u,type:g,description:d.description,format:m})}}return Array.from(n.values()).sort((l,i)=>l.name.localeCompare(i.name))},F=({variables:s,selectedVar:n,onSelectVar:l,search:i,onSearchChange:o})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${p.colors.border}`},children:e.jsx(L,{placeholder:"Search variables...",leftSection:e.jsx(E,{size:14}),size:"xs",value:i,onChange:c=>o(c.target.value)})}),e.jsx(v,{style:{flex:1},children:e.jsxs(a,{children:[e.jsxs(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:p.colors.background,borderBottom:`1px solid ${p.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Variables (",s.length,")"]}),s.map(c=>{const d=n?.name===c.name;return e.jsxs(x,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>l(c),style:{cursor:"pointer",backgroundColor:d?"#228be615":void 0,borderLeft:d?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${p.colors.border}`},children:[e.jsx(S,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,ff:"monospace",children:c.name})]},c.name)})]})})]}),R=({variable:s})=>{const n=s.value!==void 0&&s.value!=="",l=n?String(s.value):"(not set)",i=s.name.toLowerCase().includes("secret")||s.name.toLowerCase().includes("password")||s.name.toLowerCase().includes("key")||s.name.toLowerCase().includes("token");return e.jsxs(x,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${p.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:s.format||s.type})]})}),e.jsx(v,{style:{flex:1},p:"md",children:e.jsxs(y,{gap:"lg",children:[s.description&&e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(r,{size:"sm",c:"dimmed",children:s.description})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(w,{block:!0,style:{flex:1,filter:i&&n?"blur(4px)":void 0,transition:"filter 0.2s"},onMouseEnter:o=>{i&&(o.currentTarget.style.filter="none")},onMouseLeave:o=>{i&&n&&(o.currentTarget.style.filter="blur(4px)")},children:l}),n&&e.jsx(V,{value:String(s.value),children:({copied:o,copy:c})=>e.jsx(B,{label:o?"Copied!":"Copy value",children:e.jsx(a,{onClick:c,style:{cursor:"pointer"},c:o?"teal":"dimmed",children:o?e.jsx(I,{size:16}):e.jsx(M,{size:16})})})})]}),i&&e.jsx(r,{size:"xs",c:"dimmed",mt:"xs",children:"Hover to reveal sensitive value"})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(t.Tbody,{children:[e.jsxs(t.Tr,{children:[e.jsx(t.Td,{w:120,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Type"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.type})})]}),s.format&&e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Format"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.format})})]})]})})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Usage"}),e.jsx(w,{block:!0,children:`# Set in .env file or environment
2
2
  ${s.name}=${n?s.value:"<value>"}`})]})]})})]})},D=()=>e.jsx(x,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(O,{size:48,opacity:.3}),e.jsx(r,{children:"No environment variables found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Use $env primitive to define expected environment variables"})]})}),U=({variables:s})=>e.jsx(v,{h:"100%",p:"md",children:e.jsx(y,{gap:"lg",children:e.jsxs(a,{children:[e.jsxs(x,{align:"center",gap:"xs",mb:"sm",children:[e.jsx(H,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:"All Environment Variables"}),e.jsxs(b,{size:"sm",variant:"light",children:[s.length," variables"]})]}),e.jsxs(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(t.Thead,{children:e.jsxs(t.Tr,{children:[e.jsx(t.Th,{children:"Name"}),e.jsx(t.Th,{children:"Type"}),e.jsx(t.Th,{children:"Value"})]})}),e.jsx(t.Tbody,{children:s.map(n=>{const l=n.value!==void 0&&n.value!=="",i=n.name.toLowerCase().includes("secret")||n.name.toLowerCase().includes("password")||n.name.toLowerCase().includes("key")||n.name.toLowerCase().includes("token");return e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",fw:500,children:n.name})}),e.jsx(t.Td,{children:e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:n.format||n.type})}),e.jsx(t.Td,{children:l?e.jsxs(r,{size:"sm",ff:"monospace",c:"dimmed",style:{filter:i?"blur(4px)":void 0},children:[String(n.value).slice(0,30),String(n.value).length>30?"...":""]}):e.jsx(r,{size:"sm",c:"dimmed",fs:"italic",children:"(not set)"})})]},n.name)})})]})]})})}),Q=()=>{const s=C(k),[n,l]=h.useState([]),[i,o]=h.useState(!0),[c,d]=h.useState(null),[u,g]=h.useState("");h.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:$}}).then(f=>{l(f.data.envs),o(!1)})},[]);const m=h.useMemo(()=>A(n),[n]),j=h.useMemo(()=>{if(!u)return m;const f=u.toLowerCase();return m.filter(T=>T.name.toLowerCase().includes(f))},[m,u]);return i?e.jsx(x,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):m.length===0?e.jsx(D,{}):e.jsxs(x,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(a,{w:280,style:{borderRight:`1px solid ${p.colors.border}`,backgroundColor:p.colors.surface},children:e.jsx(F,{variables:j,selectedVar:c,onSelectVar:d,search:u,onSearchChange:g})}),e.jsx(a,{style:{flex:1,overflow:"hidden"},children:c?e.jsx(R,{variable:c}):e.jsx(U,{variables:m})})]})};export{Q as DevEnvExplorer,Q as default};
@@ -1 +1 @@
1
- import{w as C,a3 as O,a4 as R,r as x,j as e,F as m,T as i,B as c,H as j,af as D,z as B,ad as z,O as S,E as F,G as _,ae as v,a6 as $,aa as I}from"./entry.DBfTnVUe.js";import{J as w}from"./chunk.C5K_AIru.js";import{d as A}from"./chunk.ChDpavl2.js";import{S as f,B as T}from"./chunk.DLDchrhP.js";import{I as H}from"./chunk.BeYM7pih.js";import{T as g}from"./chunk.Bdi_dTor.js";import{I as J}from"./chunk.BC4Lys4j.js";import{I as V,a as G}from"./chunk.ByuRJbSC.js";import{T as q}from"./chunk.DI-f4xNk.js";import"./chunk.BlqFPyLh.js";import"./chunk.CAWWjC4E.js";import"./chunk.uyVen0u2.js";const K=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Q=C("outline","folder-open","FolderOpen",K);const U=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],W=C("outline","folder","Folder",U);const X=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",X),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,Y=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(Q,{size:14,opacity:.5}):e.jsx(W,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},Z=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>Y(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs"})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(q,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),fe=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(Z,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{fe as DevTopicsViewer,fe as default};
1
+ import{w as C,a3 as O,a4 as R,r as x,j as e,F as m,T as i,B as c,H as j,af as D,z as B,ad as z,O as S,E as F,G as _,ae as v,a6 as $,aa as I}from"./entry.BWhdC3SJ.js";import{J as w}from"./chunk.bPNpu2iW.js";import{d as A}from"./chunk.BKZ6YEV4.js";import{S as f,B as T}from"./chunk.BqEqrty9.js";import{I as H}from"./chunk.D0jFBu2p.js";import{T as g}from"./chunk.CQO49DQF.js";import{I as J}from"./chunk.CIYikik4.js";import{I as V,a as G}from"./chunk.BjOMCPQ3.js";import{T as q}from"./chunk._t5z0lP9.js";import"./chunk.BlqFPyLh.js";import"./chunk.BX7p74D8.js";import"./chunk.uyVen0u2.js";const K=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Q=C("outline","folder-open","FolderOpen",K);const U=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],W=C("outline","folder","Folder",U);const X=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",X),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,Y=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(Q,{size:14,opacity:.5}):e.jsx(W,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},Z=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>Y(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs"})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(q,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),fe=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(Z,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{fe as DevTopicsViewer,fe as default};
@@ -1 +1 @@
1
- import{w as t,j as e,F as l,T as s,Y as o}from"./entry.DBfTnVUe.js";import{A as a}from"./chunk.iyc5GsVj.js";const n=[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]],r=t("outline","tools","Tools",n),d=()=>e.jsxs(l,{direction:"column",align:"center",justify:"center",flex:1,w:"100%",gap:"xl",children:[e.jsx(l,{direction:"column",align:"center",gap:4,mb:"md",children:e.jsxs(l,{align:"center",gap:"sm",children:[e.jsx(r,{size:40,stroke:1.5,opacity:.8}),e.jsx(s,{size:"2rem",fw:300,style:{letterSpacing:"-0.02em"},children:"Alepha DevTools"})]})}),e.jsx(a,{icon:e.jsx(o,{}),title:"Work In Progress",color:"blue",variant:"light",maw:500,children:"DevTools is still in active development. New features and improvements are being added regularly. Use the navigation to explore available tools."})]});export{d as DevDashboard,d as default};
1
+ import{w as t,j as e,F as l,T as s,Y as o}from"./entry.BWhdC3SJ.js";import{A as a}from"./chunk.xjh83uy1.js";const n=[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]],r=t("outline","tools","Tools",n),d=()=>e.jsxs(l,{direction:"column",align:"center",justify:"center",flex:1,w:"100%",gap:"xl",children:[e.jsx(l,{direction:"column",align:"center",gap:4,mb:"md",children:e.jsxs(l,{align:"center",gap:"sm",children:[e.jsx(r,{size:40,stroke:1.5,opacity:.8}),e.jsx(s,{size:"2rem",fw:300,style:{letterSpacing:"-0.02em"},children:"Alepha DevTools"})]})}),e.jsx(a,{icon:e.jsx(o,{}),title:"Work In Progress",color:"blue",variant:"light",maw:500,children:"DevTools is still in active development. New features and improvements are being added regularly. Use the navigation to explore available tools."})]});export{d as DevDashboard,d as default};
@@ -1 +1 @@
1
- import{f as b,b as x,q as f,j as g,B as j,s as N,v as R}from"./entry.DBfTnVUe.js";var a={root:"m_b183c0a2"};const h=N((e,{color:s})=>({root:{"--code-bg":s?R(s,e):void 0}})),r=b((e,s)=>{const o=x("Code",null,e),{classNames:c,className:l,style:n,styles:m,unstyled:d,vars:p,color:B,block:t,variant:i,mod:v,attributes:u,...y}=o,C=f({name:"Code",props:o,classes:a,className:l,style:n,classNames:c,styles:m,unstyled:d,attributes:u,vars:p,varsResolver:h});return g.jsx(j,{component:t?"pre":"code",variant:i,ref:s,mod:[{block:t},v],...C("root"),...y,dir:"ltr"})});r.classes=a;r.displayName="@mantine/core/Code";export{r as C};
1
+ import{f as b,b as x,q as f,j as g,B as j,s as N,v as R}from"./entry.BWhdC3SJ.js";var a={root:"m_b183c0a2"};const h=N((e,{color:s})=>({root:{"--code-bg":s?R(s,e):void 0}})),r=b((e,s)=>{const o=x("Code",null,e),{classNames:c,className:l,style:n,styles:m,unstyled:d,vars:p,color:B,block:t,variant:i,mod:v,attributes:u,...y}=o,C=f({name:"Code",props:o,classes:a,className:l,style:n,classNames:c,styles:m,unstyled:d,attributes:u,vars:p,varsResolver:h});return g.jsx(j,{component:t?"pre":"code",variant:i,ref:s,mod:[{block:t},v],...C("root"),...y,dir:"ltr"})});r.classes=a;r.displayName="@mantine/core/Code";export{r as C};
@@ -1 +1 @@
1
- import{a3 as B,a4 as L,r as c,j as e,F as t,T as r,B as x,H as a,af as T,z as C,ad as S,P as v,ae as w,a6 as P,aa as A}from"./entry.DBfTnVUe.js";import{d as E}from"./chunk.ChDpavl2.js";import{S as g,B as u}from"./chunk.DLDchrhP.js";import{I as M}from"./chunk.BeYM7pih.js";import{T as j}from"./chunk.Bdi_dTor.js";import{T as n}from"./chunk.BjjA59Pf.js";import{a as O,I}from"./chunk.ByuRJbSC.js";import{I as R}from"./chunk.CYVZxO-p.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"})]})}),_=()=>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(_,{}):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{a3 as B,a4 as L,r as c,j as e,F as t,T as r,B as x,H as a,af as T,z as C,ad as S,P as v,ae as w,a6 as P,aa as A}from"./entry.BWhdC3SJ.js";import{d as E}from"./chunk.BKZ6YEV4.js";import{S as g,B as u}from"./chunk.BqEqrty9.js";import{I as M}from"./chunk.D0jFBu2p.js";import{T as j}from"./chunk.CQO49DQF.js";import{T as n}from"./chunk.CEbDj1NR.js";import{a as O,I}from"./chunk.BjOMCPQ3.js";import{I as R}from"./chunk.CZ4J9K5b.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"})]})}),_=()=>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(_,{}):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 +1 @@
1
- import{f as w,b as I,q as N,_ as S,j as e,B as k,aq as q,s as z,a0 as $}from"./entry.DBfTnVUe.js";var x={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const E=z((t,{radius:l,color:o,variant:a,autoContrast:d})=>{const r=t.variantColorResolver({color:o||t.primaryColor,theme:t,variant:a||"light",autoContrast:d});return{root:{"--alert-radius":l===void 0?void 0:$(l),"--alert-bg":o||a?r.background:void 0,"--alert-color":r.color,"--alert-bd":o||a?r.border:void 0}}}),j=w((t,l)=>{const o=I("Alert",null,t),{classNames:a,className:d,style:r,styles:f,unstyled:b,vars:h,radius:L,color:P,title:i,children:n,id:_,icon:u,withCloseButton:m,onClose:g,closeButtonLabel:B,variant:c,autoContrast:V,role:C,attributes:A,...R}=o,s=N({name:"Alert",classes:x,props:o,className:d,style:r,classNames:a,styles:f,unstyled:b,attributes:A,vars:h,varsResolver:E}),v=S(_),p=i&&`${v}-title`||void 0,y=`${v}-body`;return e.jsx(k,{id:v,...s("root",{variant:c}),variant:c,ref:l,role:C||"alert",...R,"aria-describedby":n?y:void 0,"aria-labelledby":i?p:void 0,children:e.jsxs("div",{...s("wrapper"),children:[u&&e.jsx("div",{...s("icon"),children:u}),e.jsxs("div",{...s("body"),children:[i&&e.jsx("div",{...s("title"),"data-with-close-button":m||void 0,children:e.jsx("span",{id:p,...s("label"),children:i})}),n&&e.jsx("div",{id:y,...s("message"),"data-variant":c,children:n})]}),m&&e.jsx(q,{...s("closeButton"),onClick:g,variant:"transparent",size:16,iconSize:16,"aria-label":B,unstyled:b})]})})});j.classes=x;j.displayName="@mantine/core/Alert";export{j as A};
1
+ import{f as w,b as I,q as N,_ as S,j as e,B as k,aq as q,s as z,a0 as $}from"./entry.BWhdC3SJ.js";var x={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const E=z((t,{radius:l,color:o,variant:a,autoContrast:d})=>{const r=t.variantColorResolver({color:o||t.primaryColor,theme:t,variant:a||"light",autoContrast:d});return{root:{"--alert-radius":l===void 0?void 0:$(l),"--alert-bg":o||a?r.background:void 0,"--alert-color":r.color,"--alert-bd":o||a?r.border:void 0}}}),j=w((t,l)=>{const o=I("Alert",null,t),{classNames:a,className:d,style:r,styles:f,unstyled:b,vars:h,radius:L,color:P,title:i,children:n,id:_,icon:u,withCloseButton:m,onClose:g,closeButtonLabel:B,variant:c,autoContrast:V,role:C,attributes:A,...R}=o,s=N({name:"Alert",classes:x,props:o,className:d,style:r,classNames:a,styles:f,unstyled:b,attributes:A,vars:h,varsResolver:E}),v=S(_),p=i&&`${v}-title`||void 0,y=`${v}-body`;return e.jsx(k,{id:v,...s("root",{variant:c}),variant:c,ref:l,role:C||"alert",...R,"aria-describedby":n?y:void 0,"aria-labelledby":i?p:void 0,children:e.jsxs("div",{...s("wrapper"),children:[u&&e.jsx("div",{...s("icon"),children:u}),e.jsxs("div",{...s("body"),children:[i&&e.jsx("div",{...s("title"),"data-with-close-button":m||void 0,children:e.jsx("span",{id:p,...s("label"),children:i})}),n&&e.jsx("div",{id:y,...s("message"),"data-variant":c,children:n})]}),m&&e.jsx(q,{...s("closeButton"),onClick:g,variant:"transparent",size:16,iconSize:16,"aria-label":B,unstyled:b})]})})});j.classes=x;j.displayName="@mantine/core/Alert";export{j as A};
@@ -1,2 +1,2 @@
1
- import{c as W,f as B,b as N,j as e,U as xe,B as w,Z as fe,_ as ve,$ as Q,q as je,s as ge,a0 as ye,e as be,a1 as Ce,r as f,a2 as Se,w as ze,T as b,a3 as X,a4 as Z,a5 as A,a6 as Ie,a7 as Y,a8 as Ae,a9 as ee,aa as se,ab as te,ac as oe,ad as ne,ae as we,G as Pe,H as G,F as J,K as Te,af as Ne,z as _e}from"./entry.DBfTnVUe.js";import{d as Re}from"./chunk.ChDpavl2.js";import{B as k,S as O}from"./chunk.DLDchrhP.js";import{C as U}from"./chunk.PWK2K2kI.js";import{T as Ee}from"./chunk.DI-f4xNk.js";import{I as Oe}from"./chunk.BC4Lys4j.js";import{g as V,T as I}from"./chunk.Bdi_dTor.js";import{A as re}from"./chunk.I1TSx4X4.js";import{c as Be}from"./chunk.BlqFPyLh.js";import{I as ke}from"./chunk.DF8tZYh8.js";import{S as Le}from"./chunk.DxjqPOcc.js";import"./chunk.uyVen0u2.js";const[Je,M]=W("Accordion component was not found in the tree"),[Ue,ae]=W("Accordion.Item component was not found in the tree");var _={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const $=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,chevron:c,icon:m,onClick:u,onKeyDown:r,children:n,disabled:i,mod:h,...p}=N("AccordionControl",null,s),{value:y}=ae(),a=M(),C=a.isItemActive(y),R=typeof a.order=="number",T=`h${a.order}`,v=e.jsxs(xe,{...p,...a.getStyles("control",{className:d,classNames:t,style:x,styles:l,variant:a.variant}),unstyled:a.unstyled,mod:["accordion-control",{active:C,"chevron-position":a.chevronPosition,disabled:i},h],ref:o,onClick:P=>{u?.(P),a.onChange(y)},type:"button",disabled:i,"aria-expanded":C,"aria-controls":a.getRegionId(y),id:a.getControlId(y),onKeyDown:Be({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:a.loop,orientation:"vertical",onKeyDown:r}),children:[e.jsx(w,{component:"span",mod:{rotate:!a.disableChevronRotation&&C,position:a.chevronPosition},...a.getStyles("chevron",{classNames:t,styles:l}),children:c||a.chevron}),e.jsx("span",{...a.getStyles("label",{classNames:t,styles:l}),children:n}),m&&e.jsx(w,{component:"span",mod:{"chevron-position":a.chevronPosition},...a.getStyles("icon",{classNames:t,styles:l}),children:m})]});return R?e.jsx(T,{...a.getStyles("itemTitle",{classNames:t,styles:l}),children:v}):v});$.displayName="@mantine/core/AccordionControl";$.classes=_;const D=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,value:c,mod:m,...u}=N("AccordionItem",null,s),r=M();return e.jsx(Ue,{value:{value:c},children:e.jsx(w,{ref:o,mod:[{active:r.isItemActive(c)},m],...r.getStyles("item",{className:d,classNames:t,styles:l,style:x,variant:r.variant}),...u})})});D.displayName="@mantine/core/AccordionItem";D.classes=_;const F=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,children:c,...m}=N("AccordionPanel",null,s),{value:u}=ae(),r=M();return e.jsx(fe,{ref:o,...r.getStyles("panel",{className:d,classNames:t,style:x,styles:l}),...m,in:r.isItemActive(u),transitionDuration:r.transitionDuration??200,role:"region",id:r.getRegionId(u),"aria-labelledby":r.getControlId(u),children:e.jsx("div",{...r.getStyles("content",{classNames:t,styles:l}),children:c})})});F.displayName="@mantine/core/AccordionPanel";F.classes=_;const Me={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},$e=ge((s,{transitionDuration:o,chevronSize:t,radius:d})=>({root:{"--accordion-transition-duration":o===void 0?void 0:`${o}ms`,"--accordion-chevron-size":t===void 0?void 0:be(t),"--accordion-radius":d===void 0?void 0:ye(d)}}));function j(s){const o=N("Accordion",Me,s),{classNames:t,className:d,style:x,styles:l,unstyled:g,vars:c,children:m,multiple:u,value:r,defaultValue:n,onChange:i,id:h,loop:p,transitionDuration:y,disableChevronRotation:a,chevronPosition:C,chevronSize:R,order:T,chevron:v,variant:P,radius:Ze,chevronIconSize:le,attributes:ie,...ce}=o,L=ve(h),[S,de]=Q({value:r,defaultValue:n,finalValue:u?[]:null,onChange:i}),ue=z=>Array.isArray(S)?S.includes(z):z===S,me=z=>{const he=Array.isArray(S)?S.includes(z)?S.filter(pe=>pe!==z):[...S,z]:z===S?null:z;de(he)},q=je({name:"Accordion",classes:_,props:o,className:d,style:x,classNames:t,styles:l,unstyled:g,attributes:ie,vars:c,varsResolver:$e});return e.jsx(Je,{value:{isItemActive:ue,onChange:me,getControlId:V(`${L}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:V(`${L}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:v===null?null:v||e.jsx(re,{size:le}),transitionDuration:y,disableChevronRotation:a,chevronPosition:C,order:T,loop:p,getStyles:q,variant:P,unstyled:g},children:e.jsx(w,{...q("root"),id:L,...ce,variant:P,"data-accordion":!0,children:m})})}const De=s=>s;j.extend=De;j.withProps=Ce(j);j.classes=_;j.displayName="@mantine/core/Accordion";j.Item=D;j.Panel=F;j.Control=$;j.Chevron=re;function K(s,o){if(typeof s=="string"&&s.trim().length===0)return!0;try{return o(s),!0}catch{return!1}}const Fe={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm"},H=B((s,o)=>{const{value:t,defaultValue:d,onChange:x,formatOnBlur:l,validationError:g,serialize:c,deserialize:m,onFocus:u,onBlur:r,readOnly:n,error:i,...h}=N("JsonInput",Fe,s),[p,y]=Q({value:t,defaultValue:d,finalValue:"",onChange:x}),[a,C]=f.useState(K(p,m)),R=v=>{u?.(v),C(!0)},T=v=>{typeof r=="function"&&r(v);const P=K(v.currentTarget.value,m);l&&!n&&P&&v.currentTarget.value.trim()!==""&&y(c(m(v.currentTarget.value),null,2)),C(P)};return e.jsx(Ee,{value:p,onChange:v=>y(v.currentTarget.value),onFocus:R,onBlur:T,ref:o,readOnly:n,...h,autoComplete:"off",__staticSelector:"JsonInput",error:a?i:g||!0,"data-monospace":!0})});H.classes=Se.classes;H.displayName="@mantine/core/JsonInput";const He=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],qe=ze("outline","terminal","Terminal",He),Ge=(s,o)=>{const t=[`curl -X ${s.method.toUpperCase()}`];return t.push(` '${window.location.origin}${s.fullPath}'`),s.body,t.join(` \\
1
+ import{c as W,f as B,b as N,j as e,U as xe,B as w,Z as fe,_ as ve,$ as Q,q as je,s as ge,a0 as ye,e as be,a1 as Ce,r as f,a2 as Se,w as ze,T as b,a3 as X,a4 as Z,a5 as A,a6 as Ie,a7 as Y,a8 as Ae,a9 as ee,aa as se,ab as te,ac as oe,ad as ne,ae as we,G as Pe,H as G,F as J,K as Te,af as Ne,z as _e}from"./entry.BWhdC3SJ.js";import{d as Re}from"./chunk.BKZ6YEV4.js";import{B as k,S as O}from"./chunk.BqEqrty9.js";import{C as U}from"./chunk.rqjDVBSo.js";import{T as Ee}from"./chunk._t5z0lP9.js";import{I as Oe}from"./chunk.CIYikik4.js";import{g as V,T as I}from"./chunk.CQO49DQF.js";import{A as re}from"./chunk.BCBZ1wAk.js";import{c as Be}from"./chunk.BlqFPyLh.js";import{I as ke}from"./chunk.BZpSlmHc.js";import{S as Le}from"./chunk.albVVSQX.js";import"./chunk.uyVen0u2.js";const[Je,M]=W("Accordion component was not found in the tree"),[Ue,ae]=W("Accordion.Item component was not found in the tree");var _={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const $=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,chevron:c,icon:m,onClick:u,onKeyDown:r,children:n,disabled:i,mod:h,...p}=N("AccordionControl",null,s),{value:y}=ae(),a=M(),C=a.isItemActive(y),R=typeof a.order=="number",T=`h${a.order}`,v=e.jsxs(xe,{...p,...a.getStyles("control",{className:d,classNames:t,style:x,styles:l,variant:a.variant}),unstyled:a.unstyled,mod:["accordion-control",{active:C,"chevron-position":a.chevronPosition,disabled:i},h],ref:o,onClick:P=>{u?.(P),a.onChange(y)},type:"button",disabled:i,"aria-expanded":C,"aria-controls":a.getRegionId(y),id:a.getControlId(y),onKeyDown:Be({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:a.loop,orientation:"vertical",onKeyDown:r}),children:[e.jsx(w,{component:"span",mod:{rotate:!a.disableChevronRotation&&C,position:a.chevronPosition},...a.getStyles("chevron",{classNames:t,styles:l}),children:c||a.chevron}),e.jsx("span",{...a.getStyles("label",{classNames:t,styles:l}),children:n}),m&&e.jsx(w,{component:"span",mod:{"chevron-position":a.chevronPosition},...a.getStyles("icon",{classNames:t,styles:l}),children:m})]});return R?e.jsx(T,{...a.getStyles("itemTitle",{classNames:t,styles:l}),children:v}):v});$.displayName="@mantine/core/AccordionControl";$.classes=_;const D=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,value:c,mod:m,...u}=N("AccordionItem",null,s),r=M();return e.jsx(Ue,{value:{value:c},children:e.jsx(w,{ref:o,mod:[{active:r.isItemActive(c)},m],...r.getStyles("item",{className:d,classNames:t,styles:l,style:x,variant:r.variant}),...u})})});D.displayName="@mantine/core/AccordionItem";D.classes=_;const F=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,children:c,...m}=N("AccordionPanel",null,s),{value:u}=ae(),r=M();return e.jsx(fe,{ref:o,...r.getStyles("panel",{className:d,classNames:t,style:x,styles:l}),...m,in:r.isItemActive(u),transitionDuration:r.transitionDuration??200,role:"region",id:r.getRegionId(u),"aria-labelledby":r.getControlId(u),children:e.jsx("div",{...r.getStyles("content",{classNames:t,styles:l}),children:c})})});F.displayName="@mantine/core/AccordionPanel";F.classes=_;const Me={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},$e=ge((s,{transitionDuration:o,chevronSize:t,radius:d})=>({root:{"--accordion-transition-duration":o===void 0?void 0:`${o}ms`,"--accordion-chevron-size":t===void 0?void 0:be(t),"--accordion-radius":d===void 0?void 0:ye(d)}}));function j(s){const o=N("Accordion",Me,s),{classNames:t,className:d,style:x,styles:l,unstyled:g,vars:c,children:m,multiple:u,value:r,defaultValue:n,onChange:i,id:h,loop:p,transitionDuration:y,disableChevronRotation:a,chevronPosition:C,chevronSize:R,order:T,chevron:v,variant:P,radius:Ze,chevronIconSize:le,attributes:ie,...ce}=o,L=ve(h),[S,de]=Q({value:r,defaultValue:n,finalValue:u?[]:null,onChange:i}),ue=z=>Array.isArray(S)?S.includes(z):z===S,me=z=>{const he=Array.isArray(S)?S.includes(z)?S.filter(pe=>pe!==z):[...S,z]:z===S?null:z;de(he)},q=je({name:"Accordion",classes:_,props:o,className:d,style:x,classNames:t,styles:l,unstyled:g,attributes:ie,vars:c,varsResolver:$e});return e.jsx(Je,{value:{isItemActive:ue,onChange:me,getControlId:V(`${L}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:V(`${L}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:v===null?null:v||e.jsx(re,{size:le}),transitionDuration:y,disableChevronRotation:a,chevronPosition:C,order:T,loop:p,getStyles:q,variant:P,unstyled:g},children:e.jsx(w,{...q("root"),id:L,...ce,variant:P,"data-accordion":!0,children:m})})}const De=s=>s;j.extend=De;j.withProps=Ce(j);j.classes=_;j.displayName="@mantine/core/Accordion";j.Item=D;j.Panel=F;j.Control=$;j.Chevron=re;function K(s,o){if(typeof s=="string"&&s.trim().length===0)return!0;try{return o(s),!0}catch{return!1}}const Fe={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm"},H=B((s,o)=>{const{value:t,defaultValue:d,onChange:x,formatOnBlur:l,validationError:g,serialize:c,deserialize:m,onFocus:u,onBlur:r,readOnly:n,error:i,...h}=N("JsonInput",Fe,s),[p,y]=Q({value:t,defaultValue:d,finalValue:"",onChange:x}),[a,C]=f.useState(K(p,m)),R=v=>{u?.(v),C(!0)},T=v=>{typeof r=="function"&&r(v);const P=K(v.currentTarget.value,m);l&&!n&&P&&v.currentTarget.value.trim()!==""&&y(c(m(v.currentTarget.value),null,2)),C(P)};return e.jsx(Ee,{value:p,onChange:v=>y(v.currentTarget.value),onFocus:R,onBlur:T,ref:o,readOnly:n,...h,autoComplete:"off",__staticSelector:"JsonInput",error:a?i:g||!0,"data-monospace":!0})});H.classes=Se.classes;H.displayName="@mantine/core/JsonInput";const He=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],qe=ze("outline","terminal","Terminal",He),Ge=(s,o)=>{const t=[`curl -X ${s.method.toUpperCase()}`];return t.push(` '${window.location.origin}${s.fullPath}'`),s.body,t.join(` \\
2
2
  `)},Ve={GET:"teal",POST:"blue",PUT:"orange",PATCH:"yellow",DELETE:"red"},Ke=({method:s})=>e.jsx(k,{variant:"light",color:Ve[s.toUpperCase()]||"gray",size:"sm",radius:"sm",w:60,children:s.toUpperCase()}),E=({schema:s,label:o})=>s?e.jsxs(w,{children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",mb:4,children:o}),e.jsx(U,{block:!0,style:{fontSize:11,maxHeight:200,overflow:"auto"},children:JSON.stringify(s,null,2)})]}):null,We=({action:s})=>{const o=X(Z),[t,d]=f.useState("{}"),[x,l]=f.useState(null),[g,c]=f.useState(!1),[m,u]=f.useState(null),[r,n]=f.useState(null),i=f.useCallback(async()=>{c(!0),n(null),l(null);const h=performance.now();try{let p;if(s.body&&t)try{p=JSON.parse(t)}catch{n("Invalid JSON body"),c(!1);return}const y=await o.fetch(s.fullPath,{method:s.method.toUpperCase(),body:p?JSON.stringify(p):void 0,headers:p?{"Content-Type":"application/json"}:void 0});u(Math.round(performance.now()-h)),l(JSON.stringify(y.data,null,2))}catch(p){u(Math.round(performance.now()-h)),n(p instanceof Error?p.message:"Request failed")}finally{c(!1)}},[o,s,t]);return e.jsxs(O,{gap:"md",children:[s.body&&e.jsx(H,{label:"Request Body",placeholder:'{"key": "value"}',value:t,onChange:d,minRows:4,maxRows:10,autosize:!0,formatOnBlur:!0,validationError:"Invalid JSON"}),e.jsxs(A,{children:[e.jsx(Ie,{leftSection:g?e.jsx(Y,{size:14}):e.jsx(Oe,{size:14}),onClick:i,disabled:g,size:"sm",children:"Execute"}),m!==null&&e.jsxs(b,{size:"xs",c:"dimmed",children:[m,"ms"]})]}),r&&e.jsx(Ae,{p:"sm",bg:"var(--mantine-color-red-light)",children:e.jsx(b,{size:"sm",c:"red",children:r})}),x&&e.jsxs(w,{children:[e.jsxs(A,{justify:"space-between",mb:4,children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",children:"Response"}),e.jsx(ee,{value:x,children:({copied:h,copy:p})=>e.jsx(se,{size:"xs",variant:"subtle",onClick:p,children:h?e.jsx(te,{size:12}):e.jsx(oe,{size:12})})})]}),e.jsx(ne,{h:200,children:e.jsx(U,{block:!0,style:{fontSize:11},children:x})})]})]})},Qe=({action:s})=>{const o=f.useMemo(()=>Ge(s),[s]);return e.jsxs(j.Item,{value:s.fullPath,opacity:s.disabled?.5:1,children:[e.jsx(j.Control,{children:e.jsxs(A,{gap:"sm",wrap:"nowrap",children:[e.jsx(Ke,{method:s.method}),e.jsx(b,{size:"sm",ff:"monospace",style:{wordBreak:"break-all"},children:s.fullPath}),s.secure&&e.jsx(we,{label:"Requires authentication",children:e.jsx(ke,{size:14,opacity:.5})}),s.disabled&&e.jsx(k,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsx(j.Panel,{children:e.jsxs(O,{gap:"md",children:[(s.description||s.summary)&&e.jsx(b,{size:"sm",c:"dimmed",children:s.description||s.summary}),e.jsxs(I,{defaultValue:"schema",variant:"outline",children:[e.jsxs(I.List,{children:[e.jsx(I.Tab,{value:"schema",size:"xs",children:"Schema"}),e.jsx(I.Tab,{value:"try",size:"xs",children:"Try It"}),e.jsx(I.Tab,{value:"curl",size:"xs",leftSection:e.jsx(qe,{size:12}),children:"cURL"})]}),e.jsx(I.Panel,{value:"schema",pt:"md",children:e.jsxs(O,{gap:"md",children:[e.jsxs(A,{gap:"xl",align:"flex-start",children:[e.jsx(E,{schema:s.params,label:"Path Parameters"}),e.jsx(E,{schema:s.query,label:"Query Parameters"})]}),e.jsx(E,{schema:s.body,label:"Request Body"}),e.jsx(E,{schema:s.response,label:"Response"}),!s.params&&!s.query&&!s.body&&!s.response&&e.jsx(b,{size:"sm",c:"dimmed",children:"No schema defined"})]})}),e.jsx(I.Panel,{value:"try",pt:"md",children:e.jsx(We,{action:s})}),e.jsx(I.Panel,{value:"curl",pt:"md",children:e.jsxs(w,{pos:"relative",children:[e.jsx(ee,{value:o,children:({copied:t,copy:d})=>e.jsx(se,{size:"sm",variant:"subtle",onClick:d,pos:"absolute",top:8,right:8,children:t?e.jsx(te,{size:14}):e.jsx(oe,{size:14})})}),e.jsx(U,{block:!0,style:{fontSize:11},children:o})]})})]})]})})]})},Xe=({group:s,actions:o})=>e.jsxs(w,{children:[e.jsxs(A,{gap:"xs",mb:"xs",children:[e.jsx(Pe,{size:14,opacity:.5}),e.jsx(b,{size:"xs",fw:600,tt:"uppercase",c:"dimmed",children:s}),e.jsx(k,{variant:"light",color:"gray",size:"xs",children:o.length})]}),e.jsx(j,{variant:"separated",styles:{item:{backgroundColor:G.colors.surface,border:`1px solid ${G.colors.border}`}},children:o.map(t=>e.jsx(Qe,{action:t},t.fullPath))})]}),us=()=>{const s=X(Z),[o,t]=f.useState([]),[d,x]=f.useState(!0),[l,g]=f.useState(""),[c,m]=f.useState("all");f.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:Re}}).then(n=>{t(n.data.actions),x(!1)})},[]);const u=f.useMemo(()=>o.filter(n=>{if(n.hide||c!=="all"&&n.method.toUpperCase()!==c)return!1;if(l){const i=l.toLowerCase();return n.fullPath.toLowerCase().includes(i)||n.name.toLowerCase().includes(i)||n.group.toLowerCase().includes(i)||n.description?.toLowerCase().includes(i)}return!0}),[o,l,c]),r=f.useMemo(()=>{const n={};for(const i of u){const h=i.group||"Other";n[h]||(n[h]=[]),n[h].push(i)}return Object.entries(n).sort(([i],[h])=>i.localeCompare(h))},[u]);return d?e.jsx(J,{align:"center",justify:"center",h:"100%",children:e.jsx(Y,{size:"sm"})}):e.jsxs(J,{direction:"column",gap:"md",w:"100%",h:"100%",p:"xl",children:[e.jsx(A,{justify:"space-between",wrap:"nowrap",children:e.jsxs(A,{gap:"sm",children:[e.jsx(Te,{size:24,opacity:.7}),e.jsx(b,{size:"lg",fw:500,children:"Actions"}),e.jsx(k,{variant:"light",color:"gray",size:"sm",children:u.length})]})}),e.jsxs(A,{gap:"sm",children:[e.jsx(Ne,{placeholder:"Search actions...",leftSection:e.jsx(_e,{size:14}),value:l,onChange:n=>g(n.currentTarget.value),style:{flex:1},size:"sm"}),e.jsx(Le,{size:"xs",value:c,onChange:m,data:[{label:"All",value:"all"},{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]})]}),e.jsx(ne,{flex:1,offsetScrollbars:!0,children:r.length===0?e.jsx(J,{align:"center",justify:"center",h:200,children:e.jsx(b,{c:"dimmed",children:"No actions found"})}):e.jsx(O,{gap:"md",children:r.map(([n,i])=>e.jsx(Xe,{group:n,actions:i},n))})})]})};export{us as DevActionsExplorer,us as default};