adonisjs-server-stats 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/core/index.js +24 -22
  2. package/dist/core/log-utils.d.ts +14 -0
  3. package/dist/core/split-pane.d.ts +18 -0
  4. package/dist/core/trace-utils.d.ts +5 -0
  5. package/dist/core/types.d.ts +1 -1
  6. package/dist/react/{CacheSection-D5J5moz7.js → CacheSection-UCMptWyn.js} +1 -1
  7. package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-CA8LB1J5.js} +1 -1
  8. package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-DfFd-WRq.js} +1 -1
  9. package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-Bdg8YMer.js} +1 -1
  10. package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
  11. package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-CM7stSyh.js} +1 -1
  12. package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-BDhEiomM.js} +1 -1
  13. package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-ByQ-9blq.js} +1 -1
  14. package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CMfY98Rl.js} +1 -1
  15. package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-DF3qEv9O.js} +1 -1
  16. package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-BbrBWIOb.js} +1 -1
  17. package/dist/react/LogsSection-DcFTZY7b.js +227 -0
  18. package/dist/react/LogsTab-CicucmVk.js +103 -0
  19. package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-C4T1ur51.js} +1 -1
  20. package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-PswteoF9.js} +1 -1
  21. package/dist/react/{QueriesTab-GrHRAREt.js → QueriesTab-osLUWd4L.js} +1 -1
  22. package/dist/react/RelatedLogs-DFDOyUMr.js +40 -0
  23. package/dist/react/RequestsSection-Nag30rEA.js +341 -0
  24. package/dist/react/{RoutesSection-F7nANhF0.js → RoutesSection-BUSkM6PY.js} +1 -1
  25. package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-DgVzd2PZ.js} +1 -1
  26. package/dist/react/TimelineTab-Covg5weo.js +220 -0
  27. package/dist/react/{index-DDzo1bZk.js → index-Cflz9Ebj.js} +390 -395
  28. package/dist/react/index.js +1 -1
  29. package/dist/react/react/components/shared/JsonViewer.d.ts +2 -1
  30. package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
  31. package/dist/react/style.css +1 -1
  32. package/dist/src/controller/debug_controller.js +1 -1
  33. package/dist/src/dashboard/dashboard_controller.js +13 -0
  34. package/dist/src/dashboard/dashboard_store.d.ts +1 -0
  35. package/dist/src/dashboard/dashboard_store.js +88 -41
  36. package/dist/src/dashboard/migrator.js +6 -0
  37. package/dist/src/data/data_access.d.ts +7 -0
  38. package/dist/src/data/data_access.js +32 -1
  39. package/dist/src/debug/trace_collector.d.ts +1 -1
  40. package/dist/src/debug/trace_collector.js +2 -1
  41. package/dist/src/debug/types.d.ts +4 -0
  42. package/dist/src/edge/client/dashboard.js +2 -2
  43. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  44. package/dist/src/edge/client-vue/dashboard.js +4 -4
  45. package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
  46. package/dist/src/middleware/request_tracking_middleware.d.ts +1 -0
  47. package/dist/src/middleware/request_tracking_middleware.js +3 -1
  48. package/dist/src/provider/server_stats_provider.d.ts +3 -3
  49. package/dist/src/provider/server_stats_provider.js +29 -15
  50. package/dist/src/routes/register_routes.js +7 -2
  51. package/dist/src/styles/components.css +162 -0
  52. package/dist/src/styles/debug-panel.css +9 -0
  53. package/dist/src/types.d.ts +1 -1
  54. package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-oFAJL3mo.js} +2 -2
  55. package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-BhfJ4KqL.js} +1 -1
  56. package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-BcNyhyHs.js} +1 -1
  57. package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-r60Q5Lmu.js} +2 -2
  58. package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
  59. package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-BHL-hkQw.js} +2 -2
  60. package/dist/vue/{JobsTab-BCvhOARO.js → JobsTab-WFnxPdN7.js} +1 -1
  61. package/dist/vue/{JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js → JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js} +25 -23
  62. package/dist/vue/LogsSection-DRMGzJmg.js +252 -0
  63. package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
  64. package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CXh6Ja1B.js} +1 -1
  65. package/dist/vue/{QueriesSection-D4Fs0YH6.js → QueriesSection-IodIsCJ-.js} +1 -1
  66. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
  67. package/dist/vue/RequestsSection-BPuMdmMc.js +401 -0
  68. package/dist/vue/{RoutesSection-Ys5dTzvF.js → RoutesSection-NKo3Rbq3.js} +1 -1
  69. package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
  70. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
  71. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
  72. package/dist/vue/components/shared/JsonViewer.vue.d.ts +3 -0
  73. package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
  74. package/dist/vue/index-Dtgysd26.js +1229 -0
  75. package/dist/vue/index.js +1 -1
  76. package/dist/vue/style.css +1 -1
  77. package/package.json +1 -1
  78. package/dist/react/LogsSection-hAsLaKOC.js +0 -212
  79. package/dist/react/LogsTab-QouH4NPQ.js +0 -88
  80. package/dist/react/RequestsSection-DtwnJOnM.js +0 -209
  81. package/dist/react/TimelineSection-F5ThmTdy.js +0 -158
  82. package/dist/react/TimelineTab-Dvpf-I5C.js +0 -193
  83. package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
  84. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
  85. package/dist/vue/LogsSection-C4NRFOpA.js +0 -227
  86. package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
  87. package/dist/vue/RequestsSection-B0A5SKcM.js +0 -243
  88. package/dist/vue/TimelineSection-D38iHB08.js +0 -186
  89. package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
  90. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
  91. package/dist/vue/index-Bj6pm5g3.js +0 -1235
@@ -1 +1 @@
1
- (function(){"use strict";var ne,x,Oe,J,Ie,De,Be,je,ge,be,ve,re={},se=[],Vt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;function U(e,n){for(var r in n)e[r]=n[r];return e}function ye(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function le(e,n,r){var s,l,i,o={};for(i in n)i=="key"?s=n[i]:i=="ref"?l=n[i]:o[i]=n[i];if(arguments.length>2&&(o.children=arguments.length>3?ne.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ie(e,o,s,l,null)}function ie(e,n,r,s,l){var i={type:e,props:n,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:l??++Oe,__i:-1,__u:0};return l==null&&x.vnode!=null&&x.vnode(i),i}function I(e){return e.children}function H(e,n){this.props=e,this.context=n}function K(e,n){if(n==null)return e.__?K(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?K(e):null}function Wt(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,s=[],l=[],i=U({},n);i.__v=n.__v+1,x.vnode&&x.vnode(i),we(e.__P,i,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,s,r??K(n),!!(32&n.__u),l),i.__v=n.__v,i.__.__k[i.__i]=i,We(s,i,l),n.__e=n.__=null,i.__e!=r&&Re(i)}}function Re(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Re(e)}function Fe(e){(!e.__d&&(e.__d=!0)&&J.push(e)&&!ae.__r++||Ie!=x.debounceRendering)&&((Ie=x.debounceRendering)||De)(ae)}function ae(){for(var e,n=1;J.length;)J.length>n&&J.sort(Be),e=J.shift(),n=J.length,Wt(e);ae.__r=0}function Ue(e,n,r,s,l,i,o,h,d,a,f){var c,u,p,_,g,v,b,m=s&&s.__k||se,$=n.length;for(d=qt(r,n,m,d,$),c=0;c<$;c++)(p=r.__k[c])!=null&&(u=p.__i!=-1&&m[p.__i]||re,p.__i=c,v=we(e,p,u,l,i,o,h,d,a,f),_=p.__e,p.ref&&u.ref!=p.ref&&(u.ref&&xe(u.ref,null,p),f.push(p.ref,p.__c||_,p)),g==null&&_!=null&&(g=_),(b=!!(4&p.__u))||u.__k===p.__k?d=He(p,d,e,b):typeof p.type=="function"&&v!==void 0?d=v:_&&(d=_.nextSibling),p.__u&=-7);return r.__e=g,d}function qt(e,n,r,s,l){var i,o,h,d,a,f=r.length,c=f,u=0;for(e.__k=new Array(l),i=0;i<l;i++)(o=n[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[i]=ie(null,o,null,null,null):G(o)?o=e.__k[i]=ie(I,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[i]=ie(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[i]=o,d=i+u,o.__=e,o.__b=e.__b+1,h=null,(a=o.__i=Jt(o,r,d,c))!=-1&&(c--,(h=r[a])&&(h.__u|=2)),h==null||h.__v==null?(a==-1&&(l>f?u--:l<f&&u++),typeof o.type!="function"&&(o.__u|=4)):a!=d&&(a==d-1?u--:a==d+1?u++:(a>d?u--:u++,o.__u|=4))):e.__k[i]=null;if(c)for(i=0;i<f;i++)(h=r[i])!=null&&(2&h.__u)==0&&(h.__e==s&&(s=K(h)),Je(h,h));return s}function He(e,n,r,s){var l,i;if(typeof e.type=="function"){for(l=e.__k,i=0;l&&i<l.length;i++)l[i]&&(l[i].__=e,n=He(l[i],n,r,s));return n}e.__e!=n&&(s&&(n&&e.type&&!n.parentNode&&(n=K(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function oe(e,n){return n=n||[],e==null||typeof e=="boolean"||(G(e)?e.some(function(r){oe(r,n)}):n.push(e)),n}function Jt(e,n,r,s){var l,i,o,h=e.key,d=e.type,a=n[r],f=a!=null&&(2&a.__u)==0;if(a===null&&h==null||f&&h==a.key&&d==a.type)return r;if(s>(f?1:0)){for(l=r-1,i=r+1;l>=0||i<n.length;)if((a=n[o=l>=0?l--:i++])!=null&&(2&a.__u)==0&&h==a.key&&d==a.type)return o}return-1}function ze(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Vt.test(n)?r:r+"px"}function ce(e,n,r,s,l){var i,o;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof s=="string"&&(e.style.cssText=s=""),s)for(n in s)r&&n in r||ze(e.style,n,"");if(r)for(n in r)s&&r[n]==s[n]||ze(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")i=n!=(n=n.replace(je,"$1")),o=n.toLowerCase(),n=o in e||n=="onFocusOut"||n=="onFocusIn"?o.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=r,r?s?r.u=s.u:(r.u=ge,e.addEventListener(n,i?ve:be,i)):e.removeEventListener(n,i?ve:be,i);else{if(l=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function Ve(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n.t==null)n.t=ge++;else if(n.t<r.u)return;return r(x.event?x.event(n):n)}}}function we(e,n,r,s,l,i,o,h,d,a){var f,c,u,p,_,g,v,b,m,$,k,y,w,P,C,M=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[h=n.__e=r.__e]),(f=x.__b)&&f(n);e:if(typeof M=="function")try{if(b=n.props,m="prototype"in M&&M.prototype.render,$=(f=M.contextType)&&s[f.__c],k=f?$?$.props.value:f.__:s,r.__c?v=(c=n.__c=r.__c).__=c.__E:(m?n.__c=c=new M(b,k):(n.__c=c=new H(b,k),c.constructor=M,c.render=Qt),$&&$.sub(c),c.state||(c.state={}),c.__n=s,u=c.__d=!0,c.__h=[],c._sb=[]),m&&c.__s==null&&(c.__s=c.state),m&&M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=U({},c.__s)),U(c.__s,M.getDerivedStateFromProps(b,c.__s))),p=c.props,_=c.state,c.__v=n,u)m&&M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),m&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(m&&M.getDerivedStateFromProps==null&&b!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(b,k),n.__v==r.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(b,c.__s,k)===!1){n.__v!=r.__v&&(c.props=b,c.state=c.__s,c.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(q){q&&(q.__=n)}),se.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(b,c.__s,k),m&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,_,g)})}if(c.context=k,c.props=b,c.__P=e,c.__e=!1,y=x.__r,w=0,m)c.state=c.__s,c.__d=!1,y&&y(n),f=c.render(c.props,c.state,c.context),se.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,y&&y(n),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++w<25);c.state=c.__s,c.getChildContext!=null&&(s=U(U({},s),c.getChildContext())),m&&!u&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,_)),P=f!=null&&f.type===I&&f.key==null?qe(f.props.children):f,h=Ue(e,G(P)?P:[P],n,r,s,l,i,o,h,d,a),c.base=n.__e,n.__u&=-161,c.__h.length&&o.push(c),v&&(c.__E=c.__=null)}catch(q){if(n.__v=null,d||i!=null)if(q.then){for(n.__u|=d?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;i[i.indexOf(h)]=null,n.__e=h}else{for(C=i.length;C--;)ye(i[C]);Ne(n)}else n.__e=r.__e,n.__k=r.__k,q.then||Ne(n);x.__e(q,n,r)}else i==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):h=n.__e=Kt(r.__e,n,r,s,l,i,o,d,a);return(f=x.diffed)&&f(n),128&n.__u?void 0:h}function Ne(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ne))}function We(e,n,r){for(var s=0;s<r.length;s++)xe(r[s],r[++s],r[++s]);x.__c&&x.__c(n,e),e.some(function(l){try{e=l.__h,l.__h=[],e.some(function(i){i.call(l)})}catch(i){x.__e(i,l.__v)}})}function qe(e){return typeof e!="object"||e==null||e.__b>0?e:G(e)?e.map(qe):U({},e)}function Kt(e,n,r,s,l,i,o,h,d){var a,f,c,u,p,_,g,v=r.props||re,b=n.props,m=n.type;if(m=="svg"?l="http://www.w3.org/2000/svg":m=="math"?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((p=i[a])&&"setAttribute"in p==!!m&&(m?p.localName==m:p.nodeType==3)){e=p,i[a]=null;break}}if(e==null){if(m==null)return document.createTextNode(b);e=document.createElementNS(l,m,b.is&&b),h&&(x.__m&&x.__m(n,i),h=!1),i=null}if(m==null)v===b||h&&e.data==b||(e.data=b);else{if(i=i&&ne.call(e.childNodes),!h&&i!=null)for(v={},a=0;a<e.attributes.length;a++)v[(p=e.attributes[a]).name]=p.value;for(a in v)p=v[a],a=="dangerouslySetInnerHTML"?c=p:a=="children"||a in b||a=="value"&&"defaultValue"in b||a=="checked"&&"defaultChecked"in b||ce(e,a,null,p,l);for(a in b)p=b[a],a=="children"?u=p:a=="dangerouslySetInnerHTML"?f=p:a=="value"?_=p:a=="checked"?g=p:h&&typeof p!="function"||v[a]===p||ce(e,a,p,v[a],l);if(f)h||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(c&&(e.innerHTML=""),Ue(n.type=="template"?e.content:e,G(u)?u:[u],n,r,s,m=="foreignObject"?"http://www.w3.org/1999/xhtml":l,i,o,i?i[0]:r.__k&&K(r,0),h,d),i!=null)for(a=i.length;a--;)ye(i[a]);h||(a="value",m=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[a]||m=="progress"&&!_||m=="option"&&_!=v[a])&&ce(e,a,_,v[a],l),a="checked",g!=null&&g!=e[a]&&ce(e,a,g,v[a],l))}return e}function xe(e,n,r){try{if(typeof e=="function"){var s=typeof e.__u=="function";s&&e.__u(),s&&n==null||(e.__u=e(n))}else e.current=n}catch(l){x.__e(l,r)}}function Je(e,n,r){var s,l;if(x.unmount&&x.unmount(e),(s=e.ref)&&(s.current&&s.current!=e.__e||xe(s,null,n)),(s=e.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(i){x.__e(i,n)}s.base=s.__P=null}if(s=e.__k)for(l=0;l<s.length;l++)s[l]&&Je(s[l],n,r||typeof e.type!="function");r||ye(e.__e),e.__c=e.__=e.__e=void 0}function Qt(e,n,r){return this.constructor(e,r)}function Ke(e,n,r){var s,l,i,o;n==document&&(n=document.documentElement),x.__&&x.__(e,n),l=(s=!1)?null:n.__k,i=[],o=[],we(n,e=n.__k=le(I,null,[e]),l||re,re,n.namespaceURI,l?null:n.firstChild?ne.call(n.childNodes):null,i,l?l.__e:n.firstChild,s,o),We(i,e,o)}ne=se.slice,x={__e:function(e,n,r,s){for(var l,i,o;n=n.__;)if((l=n.__c)&&!l.__)try{if((i=l.constructor)&&i.getDerivedStateFromError!=null&&(l.setState(i.getDerivedStateFromError(e)),o=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e,s||{}),o=l.__d),o)return l.__E=l}catch(h){e=h}throw e}},Oe=0,H.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=U({},this.state),typeof e=="function"&&(e=e(U({},r),this.props)),e&&U(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Fe(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fe(this))},H.prototype.render=I,J=[],De=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Be=function(e,n){return e.__v.__b-n.__v.__b},ae.__r=0,je=/(PointerCapture)$|Capture$/i,ge=0,be=Ve(!1),ve=Ve(!0);var Gt=0;function t(e,n,r,s,l,i){n||(n={});var o,h,d=n;if("ref"in d)for(h in d={},n)h=="ref"?o=n[h]:d[h]=n[h];var a={type:e,props:d,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Gt,__i:-1,__u:0,__source:l,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(h in o)d[h]===void 0&&(d[h]=o[h]);return x.vnode&&x.vnode(a),a}var X,L,$e,Qe,Z=0,Ge=[],E=x,Xe=E.__b,Ze=E.__r,Ye=E.diffed,et=E.__c,tt=E.unmount,nt=E.__;function ke(e,n){E.__h&&E.__h(L,e,Z||n),Z=0;var r=L.__H||(L.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function N(e){return Z=1,Xt(lt,e)}function Xt(e,n,r){var s=ke(X++,2);if(s.t=e,!s.__c&&(s.__=[r?r(n):lt(void 0,n),function(h){var d=s.__N?s.__N[0]:s.__[0],a=s.t(d,h);d!==a&&(s.__N=[a,s.__[1]],s.__c.setState({}))}],s.__c=L,!L.__f)){var l=function(h,d,a){if(!s.__c.__H)return!0;var f=s.__c.__H.__.filter(function(u){return u.__c});if(f.every(function(u){return!u.__N}))return!i||i.call(this,h,d,a);var c=s.__c.props!==h;return f.some(function(u){if(u.__N){var p=u.__[0];u.__=u.__N,u.__N=void 0,p!==u.__[0]&&(c=!0)}}),i&&i.call(this,h,d,a)||c};L.__f=!0;var i=L.shouldComponentUpdate,o=L.componentWillUpdate;L.componentWillUpdate=function(h,d,a){if(this.__e){var f=i;i=void 0,l(h,d,a),i=f}o&&o.call(this,h,d,a)},L.shouldComponentUpdate=l}return s.__N||s.__}function z(e,n){var r=ke(X++,3);!E.__s&&st(r.__H,n)&&(r.__=e,r.u=n,L.__H.__h.push(r))}function B(e){return Z=5,T(function(){return{current:e}},[])}function T(e,n){var r=ke(X++,7);return st(r.__H,n)&&(r.__=e(),r.__H=n,r.__h=e),r.__}function S(e,n){return Z=8,T(function(){return e},n)}function Zt(){for(var e;e=Ge.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(de),n.__h.some(Ce),n.__h=[]}catch(r){n.__h=[],E.__e(r,e.__v)}}}E.__b=function(e){L=null,Xe&&Xe(e)},E.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),nt&&nt(e,n)},E.__r=function(e){Ze&&Ze(e),X=0;var n=(L=e.__c).__H;n&&($e===L?(n.__h=[],L.__h=[],n.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(n.__h.some(de),n.__h.some(Ce),n.__h=[],X=0)),$e=L},E.diffed=function(e){Ye&&Ye(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(Ge.push(n)!==1&&Qe===E.requestAnimationFrame||((Qe=E.requestAnimationFrame)||Yt)(Zt)),n.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),$e=L=null},E.__c=function(e,n){n.some(function(r){try{r.__h.some(de),r.__h=r.__h.filter(function(s){return!s.__||Ce(s)})}catch(s){n.some(function(l){l.__h&&(l.__h=[])}),n=[],E.__e(s,r.__v)}}),et&&et(e,n)},E.unmount=function(e){tt&&tt(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(s){try{de(s)}catch(l){n=l}}),r.__H=void 0,n&&E.__e(n,r.__v))};var rt=typeof requestAnimationFrame=="function";function Yt(e){var n,r=function(){clearTimeout(s),rt&&cancelAnimationFrame(n),setTimeout(e)},s=setTimeout(r,35);rt&&(n=requestAnimationFrame(r))}function de(e){var n=L,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),L=n}function Ce(e){var n=L;e.__c=e.__(),L=n}function st(e,n){return!e||e.length!==n.length||n.some(function(r,s){return r!==e[s]})}function lt(e,n){return typeof n=="function"?n(e):n}function en(e,n){for(var r in n)e[r]=n[r];return e}function it(e,n){for(var r in e)if(r!=="__source"&&!(r in n))return!0;for(var s in n)if(s!=="__source"&&e[s]!==n[s])return!0;return!1}function at(e,n){this.props=e,this.context=n}(at.prototype=new H).isPureReactComponent=!0,at.prototype.shouldComponentUpdate=function(e,n){return it(this.props,e)||it(this.state,n)};var ot=x.__b;x.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ot&&ot(e)};var tn=x.__e;x.__e=function(e,n,r,s){if(e.then){for(var l,i=n;i=i.__;)if((l=i.__c)&&l.__c)return n.__e==null&&(n.__e=r.__e,n.__k=r.__k),l.__c(e,n)}tn(e,n,r,s)};var ct=x.unmount;function dt(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),e.__c.__H=null),(e=en({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(s){return dt(s,n,r)})),e}function ht(e,n,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(s){return ht(s,n,r)}),e.__c&&e.__c.__P===n&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Y(){this.__u=0,this.o=null,this.__b=null}function ut(e){if(!e.__)return null;var n=e.__.__c;return n&&n.__a&&n.__a(e)}function D(e){var n,r,s,l=null;function i(o){if(n||(n=e()).then(function(h){h&&(l=h.default||h),s=!0},function(h){r=h,s=!0}),r)throw r;if(!s)throw n;return l?le(l,o):null}return i.displayName="Lazy",i.__f=!0,i}function he(){this.i=null,this.l=null}x.unmount=function(e){var n=e.__c;n&&(n.__z=!0),n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),ct&&ct(e)},(Y.prototype=new H).__c=function(e,n){var r=n.__c,s=this;s.o==null&&(s.o=[]),s.o.push(r);var l=ut(s.__v),i=!1,o=function(){i||s.__z||(i=!0,r.__R=null,l?l(d):d())};r.__R=o;var h=r.__P;r.__P=null;var d=function(){if(!--s.__u){if(s.state.__a){var a=s.state.__a;s.__v.__k[0]=ht(a,a.__c.__P,a.__c.__O)}var f;for(s.setState({__a:s.__b=null});f=s.o.pop();)f.__P=h,f.forceUpdate()}};s.__u++||32&n.__u||s.setState({__a:s.__b=s.__v.__k[0]}),e.then(o,o)},Y.prototype.componentWillUnmount=function(){this.o=[]},Y.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),s=this.__v.__k[0].__c;this.__v.__k[0]=dt(this.__b,r,s.__O=s.__P)}this.__b=null}var l=n.__a&&le(I,null,e.fallback);return l&&(l.__u&=-33),[le(I,null,n.__a?null:e.children),l]};var ft=function(e,n,r){if(++r[1]===r[0]&&e.l.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};(he.prototype=new H).__a=function(e){var n=this,r=ut(n.__v),s=n.l.get(e);return s[0]++,function(l){var i=function(){n.props.revealOrder?(s.push(l),ft(n,e,s)):l()};r?r(i):i()}},he.prototype.render=function(e){this.i=null,this.l=new Map;var n=oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&n.reverse();for(var r=n.length;r--;)this.l.set(n[r],this.i=[1,0,this.i]);return e.children},he.prototype.componentDidUpdate=he.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,r){ft(e,r,n)})};var nn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,rn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,sn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ln=/[A-Z0-9]/g,an=typeof document<"u",on=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var pt=x.event;function cn(){}function dn(){return this.cancelBubble}function hn(){return this.defaultPrevented}x.event=function(e){return pt&&(e=pt(e)),e.persist=cn,e.isPropagationStopped=dn,e.isDefaultPrevented=hn,e.nativeEvent=e};var un={enumerable:!1,configurable:!0,get:function(){return this.class}},_t=x.vnode;x.vnode=function(e){typeof e.type=="string"&&(function(n){var r=n.props,s=n.type,l={},i=s.indexOf("-")===-1;for(var o in r){var h=r[o];if(!(o==="value"&&"defaultValue"in r&&h==null||an&&o==="children"&&s==="noscript"||o==="class"||o==="className")){var d=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&h===!0?h="":d==="translate"&&h==="no"?h=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?o="ondblclick":d!=="onchange"||s!=="input"&&s!=="textarea"||on(r.type)?d==="onfocus"?o="onfocusin":d==="onblur"?o="onfocusout":sn.test(o)&&(o=d):d=o="oninput":i&&rn.test(o)?o=o.replace(ln,"-$&").toLowerCase():h===null&&(h=void 0),d==="oninput"&&l[o=d]&&(o="oninputCapture"),l[o]=h}}s=="select"&&l.multiple&&Array.isArray(l.value)&&(l.value=oe(r.children).forEach(function(a){a.props.selected=l.value.indexOf(a.props.value)!=-1})),s=="select"&&l.defaultValue!=null&&(l.value=oe(r.children).forEach(function(a){a.props.selected=l.multiple?l.defaultValue.indexOf(a.props.value)!=-1:l.defaultValue==a.props.value})),r.class&&!r.className?(l.class=r.class,Object.defineProperty(l,"className",un)):r.className&&(l.class=l.className=r.className),n.props=l})(e),e.$$typeof=nn,_t&&_t(e)};var mt=x.__r;x.__r=function(e){mt&&mt(e),e.__c};var gt=x.diffed;x.diffed=function(e){gt&&gt(e);var n=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in n&&n.value!==r.value&&(r.value=n.value==null?"":n.value)};const A={queries:{viewBox:"0 0 24 24",elements:['<ellipse cx="12" cy="5" rx="9" ry="3"/>','<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/>','<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>']},events:{viewBox:"0 0 24 24",elements:['<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>']},emails:{viewBox:"0 0 24 24",elements:['<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>','<polyline points="22,6 12,13 2,6"/>']},routes:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<line x1="2" y1="12" x2="22" y2="12"/>','<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>']},logs:{viewBox:"0 0 24 24",elements:['<line x1="8" y1="6" x2="21" y2="6"/>','<line x1="8" y1="12" x2="21" y2="12"/>','<line x1="8" y1="18" x2="21" y2="18"/>','<line x1="3" y1="6" x2="3.01" y2="6"/>','<line x1="3" y1="12" x2="3.01" y2="12"/>','<line x1="3" y1="18" x2="3.01" y2="18"/>']},timeline:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},cache:{viewBox:"0 0 24 24",elements:['<rect x="2" y="2" width="20" height="8" rx="2" ry="2"/>','<rect x="2" y="14" width="20" height="8" rx="2" ry="2"/>','<line x1="6" y1="6" x2="6.01" y2="6"/>','<line x1="6" y1="18" x2="6.01" y2="18"/>']},jobs:{viewBox:"0 0 24 24",elements:['<rect x="2" y="7" width="20" height="14" rx="2" ry="2"/>','<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>']},config:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="3"/>','<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>']},internals:{viewBox:"0 0 24 24",elements:['<rect x="4" y="4" width="16" height="16" rx="2"/>','<rect x="9" y="9" width="6" height="6"/>','<line x1="9" y1="1" x2="9" y2="4"/>','<line x1="15" y1="1" x2="15" y2="4"/>','<line x1="9" y1="20" x2="9" y2="23"/>','<line x1="15" y1="20" x2="15" y2="23"/>','<line x1="20" y1="9" x2="23" y2="9"/>','<line x1="20" y1="14" x2="23" y2="14"/>','<line x1="1" y1="9" x2="4" y2="9"/>','<line x1="1" y1="14" x2="4" y2="14"/>']},overview:{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="7" height="7"/>','<rect x="14" y="3" width="7" height="7"/>','<rect x="14" y="14" width="7" height="7"/>','<rect x="3" y="14" width="7" height="7"/>']},requests:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},"dashboard-timeline":{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<polyline points="12 6 12 12 16 14"/>']},"custom-pane":{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="18" height="18" rx="2"/>','<path d="M9 3v18"/>']},wrench:{viewBox:"0 0 24 24",elements:['<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>']},"external-link":{viewBox:"0 0 24 24",elements:['<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>','<polyline points="15 3 21 3 21 9"/>','<line x1="10" y1="14" x2="21" y2="3"/>']},sun:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="5"/>','<line x1="12" y1="1" x2="12" y2="3"/>','<line x1="12" y1="21" x2="12" y2="23"/>','<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>','<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>','<line x1="1" y1="12" x2="3" y2="12"/>','<line x1="21" y1="12" x2="23" y2="12"/>','<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>','<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>']},moon:{viewBox:"0 0 24 24",elements:['<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>']},search:{viewBox:"0 0 24 24",elements:['<circle cx="11" cy="11" r="8"/>','<line x1="21" y1="21" x2="16.65" y2="16.65"/>']},eye:{viewBox:"0 0 24 24",elements:['<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>','<circle cx="12" cy="12" r="3"/>']},"eye-off":{viewBox:"0 0 24 24",elements:['<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/>','<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/>','<line x1="1" y1="1" x2="23" y2="23"/>','<path d="M14.12 14.12a3 3 0 1 1-4.24-4.24"/>']},"chevron-right":{viewBox:"0 0 24 24",elements:['<path d="M9 18l6-6-6-6"/>']},"chevron-left":{viewBox:"0 0 24 24",elements:['<path d="M15 18l-6-6 6-6"/>']},"open-external":{viewBox:"0 0 16 16",elements:['<path d="M6 3H3v10h10v-3M9 1h6v6M7 9L15 1"/>']}};class ue extends Error{status;constructor(n=403){super(`Unauthorized (HTTP ${n})`),this.name="UnauthorizedError",this.status=n}}class fn extends Error{status;body;constructor(n,r){super(`API error (HTTP ${n})`),this.name="ApiError",this.status=n,this.body=r}}class Se{baseUrl;authToken;constructor(n){this.baseUrl=n.baseUrl.replace(/\/+$/,""),this.authToken=n.authToken}async fetch(n,r){const l={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...r?.headers},i=await globalThis.fetch(`${this.baseUrl}${n}`,{...r,headers:l,credentials:this.authToken?"omit":"include"});if(r?.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(i.status===401||i.status===403)throw new ue(i.status);if(!i.ok){const o=await i.text().catch(()=>"");throw new fn(i.status,o)}return i.json()}async get(n,r){const s=r?`${n}?${r}`:n;return this.fetch(s)}async post(n,r){const s={method:"POST",...r!==void 0?{body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}:{}};return this.fetch(n,s)}async delete(n){return this.fetch(n,{method:"DELETE"})}}const bt="/admin/api/debug",vt={tracing:!1,process:!1,system:!1,http:!1,db:!1,redis:!1,queues:!1,cache:!1,app:!1,log:!1,emails:!1,dashboard:!1,customPanes:[]};function pn(e){return{tracing:e.features?.tracing??!1,process:e.features?.process??!1,system:e.features?.system??!1,http:e.features?.http??!1,db:e.features?.db??!1,redis:e.features?.redis??!1,queues:e.features?.queues??!1,cache:e.features?.cache??!1,app:e.features?.app??!1,log:e.features?.log??!1,emails:e.features?.emails??!1,dashboard:e.features?.dashboard??!1,customPanes:e.customPanes??[]}}async function _n(e,n=bt){const r=`${n.replace(/\/+$/,"")}/config`;return e.fetch(r)}async function mn(e){const{baseUrl:n="",debugEndpoint:r=bt,authToken:s}=e,l=new Se({baseUrl:n,authToken:s});try{const i=await _n(l,r);return pn(i)}catch{return vt}}function gn(e={}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e,[l,i]=N(vt),[o,h]=N(!0),[d,a]=N(null),f=B(!1);return z(()=>{if(f.current)return;f.current=!0;let c=!1;return(async()=>{try{const p=await mn({baseUrl:n,debugEndpoint:r,authToken:s});c||(i(p),h(!1))}catch(p){c||(a(p instanceof Error?p:new Error(String(p))),h(!1))}})(),()=>{c=!0}},[n,r,s]),{features:l,isLoading:o,error:d}}const fe="ss-dash-theme",Te="ss-theme-change";function Le(){if(typeof window>"u")return"light";const e=localStorage.getItem(fe);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function bn(e){typeof window>"u"||(localStorage.setItem(fe,e),window.dispatchEvent(new CustomEvent(Te,{detail:e})))}function vn(){const n=Le()==="dark"?"light":"dark";return bn(n),n}function yn(e){if(typeof window>"u")return()=>{};const n=i=>{const o=i.detail;(o==="dark"||o==="light")&&e(o)},r=i=>{if(i.key===fe){const o=i.newValue;e(o==="dark"||o==="light"?o:Le())}},s=window.matchMedia("(prefers-color-scheme: dark)"),l=i=>{localStorage.getItem(fe)||e(i.matches?"dark":"light")};return window.addEventListener(Te,n),window.addEventListener("storage",r),s.addEventListener("change",l),()=>{window.removeEventListener(Te,n),window.removeEventListener("storage",r),s.removeEventListener("change",l)}}function wn(){const[e,n]=N(()=>Le());z(()=>yn(l=>{n(l)}),[]);const r=S(()=>{const s=vn();return n(s),s},[]);return{theme:e,toggleTheme:r}}function Nn({theme:e,onToggle:n,className:r="",classPrefix:s="ss-dash"}){const l=e==="dark";return t("button",{type:"button",className:`${s==="ss-dbg"?"ss-dbg-theme-toggle":"ss-dash-theme-btn"} ${r}`,onClick:n,title:l?"Switch to light theme":"Switch to dark theme","aria-label":l?"Switch to light theme":"Switch to dark theme",children:l?t("svg",{width:"16",height:"16",viewBox:A.sun.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A.sun.elements.join("")}}):t("svg",{width:"16",height:"16",viewBox:A.moon.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A.moon.elements.join("")}})})}const xn=D(()=>Promise.resolve().then(()=>Kn)),$n=D(()=>Promise.resolve().then(()=>Qn)),kn=D(()=>Promise.resolve().then(()=>Gn)),Cn=D(()=>Promise.resolve().then(()=>Xn)),Sn=D(()=>Promise.resolve().then(()=>nr)),Tn=D(()=>Promise.resolve().then(()=>sr)),Ln=D(()=>Promise.resolve().then(()=>lr)),En=D(()=>Promise.resolve().then(()=>dr)),An=D(()=>Promise.resolve().then(()=>br)),Pn=D(()=>Promise.resolve().then(()=>Pr)),Mn=D(()=>Promise.resolve().then(()=>Mr));function On(e){const{defaultOpen:n=!1,dashboardPath:r,isOpen:s,onOpenChange:l,isLive:i=!1,...o}=e,[h,d]=N(n),a=s!==void 0?s:h,f=y=>{l?l(y):d(y)},[c,u]=N("queries"),{features:p}=gn(o),{theme:_,toggleTheme:g}=wn(),v=p.customPanes||[];z(()=>{const y=w=>{w.key==="Escape"&&a&&f(!1)};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[a]);const b=T(()=>[{id:"queries",label:"Queries",visible:!0},{id:"events",label:"Events",visible:!0},{id:"emails",label:"Emails",visible:!0},{id:"routes",label:"Routes",visible:!0},{id:"logs",label:"Logs",visible:!0},{id:"timeline",label:"Timeline",visible:p.tracing},{id:"cache",label:"Cache",visible:p.cache},{id:"jobs",label:"Jobs",visible:p.queues},{id:"config",label:"Config",visible:!0},{id:"internals",label:"Internals",visible:!0}],[p]),m=T(()=>b.filter(y=>y.visible),[b]);z(()=>{const y=[...m.map(w=>w.id),...v.map(w=>w.id)];!y.includes(c)&&y.length>0&&u(y[0])},[m,v,c]);const $=S(()=>{f(!a)},[a]),k=S(()=>{const y={options:o},w=v.find(C=>C.id===c);if(w)return t(Y,{fallback:t("div",{className:"ss-dbg-empty",children:"Loading..."}),children:t(Mn,{pane:w,options:o})});const P={queries:t(xn,{...y}),events:t($n,{...y}),emails:t(kn,{...y}),routes:t(Cn,{...y,currentPath:typeof window<"u"?window.location.pathname:""}),logs:t(Sn,{...y}),timeline:t(Tn,{...y}),cache:t(Ln,{...y,dashboardPath:r}),jobs:t(En,{...y,dashboardPath:r}),config:t(An,{...y,dashboardPath:r}),internals:t(Pn,{...y})};return t(Y,{fallback:t("div",{className:"ss-dbg-empty",children:"Loading..."}),children:P[c]||t("div",{className:"ss-dbg-empty",children:"Unknown tab"})})},[c,o,v]);return t(I,{children:[s===void 0&&t("button",{type:"button",className:`ss-dbg-btn ${a?"ss-dbg-active":""}`,onClick:$,title:"Toggle debug panel",id:"ss-dbg-wrench",children:t("svg",{width:"14",height:"14",viewBox:A.wrench.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A.wrench.elements.join("")}})}),t("div",{className:`ss-dbg-panel ${a?"ss-dbg-open":""}`,"data-ss-theme":_,id:"ss-dbg-panel",children:[t("div",{className:"ss-dbg-tabs",children:[t("div",{className:"ss-dbg-tabs-scroll",children:[m.map(y=>t("button",{type:"button",className:`ss-dbg-tab ${c===y.id?"ss-dbg-active":""}`,onClick:()=>u(y.id),children:[A[y.id]?t("svg",{className:"ss-dbg-tab-icon",viewBox:A[y.id].viewBox,dangerouslySetInnerHTML:{__html:A[y.id].elements.join("")}}):null,y.label]},y.id)),v.map(y=>t("button",{type:"button",className:`ss-dbg-tab ${c===y.id?"ss-dbg-active":""}`,onClick:()=>u(y.id),children:y.label},y.id))]}),t("div",{className:"ss-dbg-tabs-right",children:[t("span",{className:`ss-dbg-conn-mode ${i?"ss-dbg-conn-live":"ss-dbg-conn-polling"}`,title:i?"Connected via Transmit (SSE) — real-time updates":"Polling every 3s",children:i?"live":"polling"}),t(Nn,{theme:_,onToggle:g,classPrefix:"ss-dbg"}),r&&t("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"ss-dbg-dashboard-link",title:"Open dashboard",children:t("svg",{width:"14",height:"14",viewBox:A["external-link"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A["external-link"].elements.join("")}})}),t("button",{type:"button",className:"ss-dbg-close",onClick:()=>f(!1),title:"Close panel",children:"×"})]})]}),t("div",{className:"ss-dbg-content",children:a&&k()})]})]})}window.__ssDebugPanel={mount(e,n,r){Ke(t(On,{debugEndpoint:n.debugEndpoint,authToken:n.authToken,dashboardPath:n.dashboardPath||void 0,isOpen:!0,isLive:r}),e)},unmount(e){Ke(null,e)}};const In=3e3,Dn=100,Bn=500;function jn(e){if(!e&&e!==0)return"-";const n=Math.floor(e),r=Math.floor(n/86400),s=Math.floor(n%86400/3600),l=Math.floor(n%3600/60);return r>0?`${r}d ${s}h`:s>0?`${s}h ${l}m`:l>0?`${l}m ${n%60}s`:`${n}s`}function j(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e>=1?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`}function yt(e){return/([+-]\d{2}:?\d{2}|Z)\s*$/.test(e)?e:e+"Z"}function V(e){if(!e)return"-";const n=typeof e=="string"?new Date(yt(e)):new Date(e);return Number.isNaN(n.getTime())?"-":n.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+String(n.getMilliseconds()).padStart(3,"0")}function R(e){if(!e)return"-";const n=typeof e=="string"?new Date(yt(e)).getTime():e,r=Math.floor((Date.now()-n)/1e3);return r<0?"just now":r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}function Q(e){return e>Bn?"very-slow":e>Dn?"slow":"normal"}function pe(e,n=100){if(e===null)return"null";if(e===void 0)return"-";if(typeof e=="string")return'"'+(e.length>40?e.slice(0,40)+"...":e)+'"';if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const s="["+e.slice(0,3).map(l=>pe(l,30)).join(", ")+(e.length>3?", ..."+e.length+" items":"")+"]";return s.length>n?"["+e.length+" items]":s}if(typeof e=="object"){const r=Object.keys(e);if(r.length===0)return"{}";const s=[];for(let i=0;i<Math.min(r.length,4);i++)s.push(r[i]+": "+pe(e[r[i]],30));const l="{ "+s.join(", ")+(r.length>4?", ...+"+(r.length-4):"")+" }";return l.length>n?"{ "+r.slice(0,6).join(", ")+(r.length>6?", ...":"")+" }":l}return String(e)}function Rn(e){return e<0?"no expiry":e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h`:`${Math.floor(e/86400)}d`}function Fn(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Un(e,n){if(!n)return e;const r=n.toLowerCase();return e.filter(s=>s.sql.toLowerCase().includes(r)||s.model&&s.model.toLowerCase().includes(r)||s.method.toLowerCase().includes(r))}function Hn(e){const n={};for(const r of e)n[r.sql]=(n[r.sql]||0)+1;return n}function zn(e,n){const r=e.filter(i=>i.duration>100).length,s=Object.values(n).filter(i=>i>1).length,l=e.length>0?e.reduce((i,o)=>i+o.duration,0)/e.length:0;return{slowCount:r,dupCount:s,avgDuration:l,totalCount:e.length}}const Vn={queries:"/queries",events:"/events",emails:"/emails",routes:"/routes",logs:"/logs",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config",internals:"/diagnostics"};function Wn(e){return Vn[e]||`/${e}`}class qn{client;endpoint;refreshInterval;callbacks;timer=null;currentTab=null;fetchOnceCache={};abortController=null;constructor(n){this.client=new Se({baseUrl:n.baseUrl,authToken:n.authToken}),this.endpoint=n.endpoint??"/admin/api/debug",this.refreshInterval=n.refreshInterval??In,this.callbacks={onData:n.onData,onLoading:n.onLoading,onError:n.onError,onUnauthorized:n.onUnauthorized}}start(n){this.stop(),this.currentTab=n,this.callbacks.onLoading(!0),this.callbacks.onError(null),this.fetchData(),this.timer=setInterval(()=>this.fetchData(),this.refreshInterval)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null),this.abortController?.abort(),this.abortController=null}switchTab(n){this.start(n)}refresh(){this.currentTab&&this.fetchData()}async fetchCustomPane(n,r=!1){if(r&&this.fetchOnceCache[n]!==void 0){this.callbacks.onData(this.fetchOnceCache[n]),this.callbacks.onLoading(!1);return}this.callbacks.onLoading(!0);try{const s=await this.client.fetch(n);this.callbacks.onData(s),this.callbacks.onError(null),r&&(this.fetchOnceCache[n]=s)}catch(s){if(s instanceof ue){this.callbacks.onUnauthorized(s);return}this.callbacks.onError(s instanceof Error?s:new Error(String(s)))}finally{this.callbacks.onLoading(!1)}}cacheForTab(n,r){this.fetchOnceCache[n]=r}clearCache(){this.fetchOnceCache={}}async fetchData(){const n=this.currentTab;if(!n)return;if(this.fetchOnceCache[n]!==void 0){this.callbacks.onData(this.fetchOnceCache[n]),this.callbacks.onLoading(!1);return}this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const s=`${this.endpoint}${Wn(n)}`,l=await this.client.fetch(s,{signal:r.signal});if(r.signal.aborted)return;this.callbacks.onData(l),this.callbacks.onError(null),this.callbacks.onLoading(!1)}catch(s){if(s instanceof DOMException&&s.name==="AbortError"||r.signal.aborted)return;if(s instanceof ue){this.callbacks.onError(s),this.callbacks.onLoading(!1),this.stop(),this.callbacks.onUnauthorized(s);return}this.callbacks.onError(s instanceof Error?s:new Error(String(s))),this.callbacks.onLoading(!1)}}}function F(e,n={}){const{baseUrl:r="",debugEndpoint:s="/admin/api/debug",authToken:l}=n,[i,o]=N(null),[h,d]=N(!0),[a,f]=N(null),c=B(null);c.current||(c.current=new qn({baseUrl:r,endpoint:s,authToken:l,onData:g=>o(g),onLoading:g=>d(g),onError:g=>f(g),onUnauthorized:g=>f(g)})),z(()=>{const g=c.current;return g.start(e),()=>g.stop()},[e]);const u=S(()=>{c.current?.refresh()},[]),p=S(()=>{o(null)},[]),_=S((g,v)=>{c.current?.cacheForTab(g,v)},[]);return{data:i,isLoading:h,error:a,refresh:u,clearData:p,cacheForTab:_}}const Jn="ss-col-resize",wt="ss-resizing";function Nt(e){const n=Array.from(e.querySelectorAll("thead th"));if(n.length===0)return()=>{};const r=[];let s=!1;function l(){if(!s){s=!0;for(const i of n)i.style.width=i.offsetWidth+"px";e.style.tableLayout="fixed"}}for(const i of n){let o=function(d){d.preventDefault(),d.stopPropagation(),l();const a=d.clientX,f=i.offsetWidth;h.classList.add(wt),h.setPointerCapture(d.pointerId);function c(p){const _=p.clientX-a,g=Math.max(30,f+_);i.style.width=g+"px"}function u(){h.classList.remove(wt),h.removeEventListener("pointermove",c),h.removeEventListener("pointerup",u)}h.addEventListener("pointermove",c),h.addEventListener("pointerup",u)};if(!i.textContent?.trim())continue;const h=document.createElement("div");h.className=Jn,i.appendChild(h),h.addEventListener("pointerdown",o),r.push(()=>{h.removeEventListener("pointerdown",o),h.remove()})}return()=>{for(const i of r)i()}}function W(e=[]){const n=B(null),r=B(null);return z(()=>(n.current&&(r.current?.(),r.current=Nt(n.current)),()=>{r.current?.(),r.current=null}),e),S(l=>{r.current?.(),r.current=null,n.current=l,l&&(r.current=Nt(l))},[])}function xt({options:e}){const{data:n,isLoading:r,error:s}=F("queries",e),[l,i]=N(""),[o,h]=N(null),d=T(()=>n?.queries||[],[n]),a=T(()=>Un(d,l),[d,l]),f=T(()=>Hn(d),[d]),c=T(()=>zn(d,f),[d,f]),u=S(_=>{h(g=>g===_?null:_)},[]),p=W([a]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading queries..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter queries...",value:l,onChange:_=>i(_.target.value)}),t("span",{className:"ss-dbg-summary",children:[a.length," queries",c.slowCount>0&&` | ${c.slowCount} slow`,c.dupCount>0&&` | ${c.dupCount} dup`,a.length>0&&` | avg ${j(c.avgDuration)}`]})]}),a.length===0?t("div",{className:"ss-dbg-empty",children:"No queries captured"}):t("table",{ref:p,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"70px"}}),t("col",{style:{width:"100px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"SQL"}),t("th",{children:"Duration"}),t("th",{children:"Method"}),t("th",{children:"Model"}),t("th",{children:"Time"})]})}),t("tbody",{children:a.map(_=>t("tr",{children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:_.id}),t("td",{children:[t("span",{className:`ss-dbg-sql ${o===_.id?"ss-dbg-expanded":""}`,onClick:()=>u(_.id),role:"button",tabIndex:0,onKeyDown:g=>g.key==="Enter"&&u(_.id),children:_.sql}),f[_.sql]>1&&t("span",{className:"ss-dbg-dup",children:[" x",f[_.sql]]}),_.inTransaction&&t("span",{className:"ss-dbg-dup",children:" TXN"})]}),t("td",{className:`ss-dbg-duration ${Q(_.duration)==="very-slow"?"ss-dbg-very-slow":Q(_.duration)==="slow"?"ss-dbg-slow":""}`,children:j(_.duration)}),t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${_.method.toLowerCase()}`,children:_.method})}),t("td",{className:"ss-dbg-c-muted",children:_.model||"-"}),t("td",{className:"ss-dbg-event-time",title:V(_.timestamp),children:R(_.timestamp)})]},_.id))})]})]})}const Kn=Object.freeze(Object.defineProperty({__proto__:null,QueriesTab:xt,default:xt},Symbol.toStringTag,{value:"Module"}));function Ee({data:e,maxPreviewLength:n=100,className:r="",classPrefix:s="ss-dash"}){const[l,i]=N(!1),o=T(()=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},[e]),h=T(()=>typeof o=="object"&&o!==null?pe(o,n):String(o??"-"),[o,n]),d=T(()=>typeof o=="object"&&o!==null?JSON.stringify(o,null,2):String(o),[o]),a=S(()=>{i(c=>!c)},[]),f=S(async()=>{try{await navigator.clipboard.writeText(d)}catch{}},[d]);return!e&&e!==0&&e!==!1?t("span",{className:`ss-dim ${s}-c-dim`,children:"-"}):t("div",{className:`${s}-data-cell ${r}`,children:[t("span",{className:`${s}-data-preview`,onClick:a,role:"button",tabIndex:0,onKeyDown:c=>c.key==="Enter"&&a(),children:h}),l&&t("div",{className:`${s}-data-full`,onClick:a,children:[t("button",{className:`${s}-copy-btn`,onClick:c=>{c.stopPropagation(),f()},title:"Copy to clipboard",type:"button",children:"Copy"}),t("pre",{children:d})]})]})}function $t({options:e}){const{data:n,isLoading:r,error:s}=F("events",e),[l,i]=N(""),o=T(()=>{const d=n?.events||[];if(!l)return d;const a=l.toLowerCase();return d.filter(f=>(f.event||"").toLowerCase().includes(a)||(f.data||"").toLowerCase().includes(a))},[n,l]),h=W([o]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading events..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter events...",value:l,onChange:d=>i(d.target.value)}),t("span",{className:"ss-dbg-summary",children:[o.length," events"]})]}),o.length===0?t("div",{className:"ss-dbg-empty",children:"No events captured"}):t("table",{ref:h,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"20%"}}),t("col",{}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"Event"}),t("th",{children:"Data"}),t("th",{children:"Time"})]})}),t("tbody",{children:o.map(d=>{const a=d.timestamp||d.created_at||d.createdAt;return t("tr",{children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:d.id}),t("td",{className:"ss-dbg-event-name",children:d.event}),t("td",{className:"ss-dbg-event-data",children:t(Ee,{data:d.data,maxPreviewLength:80,classPrefix:"ss-dbg"})}),t("td",{className:"ss-dbg-event-time",title:V(a),children:R(a)})]},d.id)})})]})]})}const Qn=Object.freeze(Object.defineProperty({__proto__:null,EventsTab:$t,default:$t},Symbol.toStringTag,{value:"Module"}));function kt({options:e}){const{data:n,isLoading:r,error:s}=F("emails",e),[l,i]=N(""),[o,h]=N(null),[d,a]=N(null),[f,c]=N(!1),u=T(()=>{const m=n?.emails||[];if(!l)return m;const $=l.toLowerCase();return m.filter(k=>(k.subject||"").toLowerCase().includes($)||(k.to||"").toLowerCase().includes($)||(k.from||"").toLowerCase().includes($)||(k.mailer||"").toLowerCase().includes($))},[n,l]),p=T(()=>u.find(m=>m.id===o),[u,o]),_=S(async m=>{if(h(m.id),a(m.html||null),!m.html&&m.id){c(!0);try{const $=e?.debugEndpoint||"/admin/api/debug",k={};e?.authToken&&(k.Authorization=`Bearer ${e.authToken}`);const y=await fetch(`${$}/emails/${m.id}/preview`,{headers:k,credentials:e?.authToken?"omit":"include"});y.ok&&a(await y.text())}catch{}finally{c(!1)}}},[e]),g=S(()=>{h(null),a(null),c(!1)},[]),v={sent:"ss-dbg-email-status-sent",sending:"ss-dbg-email-status-sending",queueing:"ss-dbg-email-status-queued",queued:"ss-dbg-email-status-queued",failed:"ss-dbg-email-status-failed"},b=W([u]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading emails..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):p?t("div",{className:"ss-dbg-email-preview",children:[t("div",{className:"ss-dbg-email-preview-header",children:[t("div",{className:"ss-dbg-email-preview-meta",children:[t("div",{children:[t("strong",{children:"Subject:"})," ",p.subject]}),t("div",{children:[t("strong",{children:"From:"})," ",p.from]}),t("div",{children:[t("strong",{children:"To:"})," ",p.to]}),p.cc&&t("div",{children:[t("strong",{children:"CC:"})," ",p.cc]})]}),t("button",{className:"ss-dbg-btn-clear",onClick:g,type:"button",children:"×"})]}),f?t("div",{className:"ss-dbg-empty",children:"Loading preview..."}):d?t("iframe",{className:"ss-dbg-email-iframe",srcDoc:d,title:"Email preview",sandbox:""}):t("div",{style:{padding:"12px",whiteSpace:"pre-wrap"},children:p.text||"No content"})]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter emails...",value:l,onChange:m=>i(m.target.value)}),t("span",{className:"ss-dbg-summary",children:[u.length," emails"]})]}),u.length===0?t("div",{className:"ss-dbg-empty",children:"No emails captured"}):t("table",{ref:b,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"140px"}}),t("col",{style:{width:"140px"}}),t("col",{}),t("col",{style:{width:"70px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"40px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"From"}),t("th",{children:"To"}),t("th",{children:"Subject"}),t("th",{children:"Status"}),t("th",{children:"Mailer"}),t("th",{title:"Attachments",children:"📎"}),t("th",{children:"Time"})]})}),t("tbody",{children:u.map(m=>t("tr",{className:"ss-dbg-email-row",onClick:()=>_(m),children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:m.id}),t("td",{className:"ss-dbg-c-secondary",title:m.from,children:m.from}),t("td",{className:"ss-dbg-c-secondary",title:m.to,children:m.to}),t("td",{className:"ss-dbg-c-sql",children:m.subject}),t("td",{children:t("span",{className:`ss-dbg-email-status ${v[m.status]||""}`,children:m.status})}),t("td",{className:"ss-dbg-c-muted",children:m.mailer}),t("td",{className:"ss-dbg-c-dim",style:{textAlign:"center"},children:m.attachmentCount>0?m.attachmentCount:"-"}),t("td",{className:"ss-dbg-event-time",title:V(m.timestamp||m.created_at||m.createdAt),children:R(m.timestamp||m.created_at||m.createdAt)})]},m.id))})]})]})}const Gn=Object.freeze(Object.defineProperty({__proto__:null,EmailsTab:kt,default:kt},Symbol.toStringTag,{value:"Module"}));function Ct({options:e,currentPath:n}){const{data:r,isLoading:s,error:l}=F("routes",e),[i,o]=N(""),h=T(()=>{const a=r?.routes||[];if(!i)return a;const f=i.toLowerCase();return a.filter(c=>c.pattern.toLowerCase().includes(f)||c.handler.toLowerCase().includes(f)||c.method.toLowerCase().includes(f)||c.name&&c.name.toLowerCase().includes(f))},[r,i]),d=W([h]);return s&&!r?t("div",{className:"ss-dbg-empty",children:"Loading routes..."}):l?t("div",{className:"ss-dbg-empty",children:["Error: ",l.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter routes...",value:i,onChange:a=>o(a.target.value)}),t("span",{className:"ss-dbg-summary",children:[h.length," routes"]})]}),h.length===0?t("div",{className:"ss-dbg-empty",children:"No routes found"}):t("table",{ref:d,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"70px"}}),t("col",{style:{width:"25%"}}),t("col",{style:{width:"15%"}}),t("col",{}),t("col",{style:{width:"20%"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"Method"}),t("th",{children:"Pattern"}),t("th",{children:"Name"}),t("th",{children:"Handler"}),t("th",{children:"Middleware"})]})}),t("tbody",{children:h.map((a,f)=>{const c=n&&(a.pattern===n||new RegExp("^"+a.pattern.replace(/:[^/]+/g,"[^/]+")+"$").test(n));return t("tr",{className:c?"ss-dbg-current-route":"",children:[t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${a.method.toLowerCase()}`,children:a.method})}),t("td",{className:"ss-dbg-c-text",children:a.pattern}),t("td",{className:"ss-dbg-c-muted",children:a.name||"-"}),t("td",{className:"ss-dbg-c-sql",children:a.handler}),t("td",{className:"ss-dbg-c-dim",style:{fontSize:"10px"},children:a.middleware.length>0?a.middleware.join(", "):"-"})]},`${a.method}-${a.pattern}-${f}`)})})]})]})}const Xn=Object.freeze(Object.defineProperty({__proto__:null,RoutesTab:Ct,default:Ct},Symbol.toStringTag,{value:"Module"})),Zn=["all","error","warn","info","debug"];function St(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function Tt(e){return e.msg||e.message||JSON.stringify(e)}function Yn(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Lt(e){const n=e.data||{};return e.requestId||e.request_id||e["x-request-id"]||n.requestId||n.request_id||n["x-request-id"]||""}function er(e,n="ss-dbg-log-level"){switch(e){case"error":case"fatal":return`${n}-error`;case"warn":return`${n}-warn`;case"info":return`${n}-info`;case"debug":return`${n}-debug`;case"trace":return`${n}-trace`;default:return`${n}-info`}}function tr(e,n){return n==="all"?e:e.filter(r=>{const s=St(r);return n==="error"?s==="error"||s==="fatal":s===n})}function Et({options:e}){const{data:n,isLoading:r,error:s}=F("logs",e),[l,i]=N("all"),[o,h]=N(""),[d,a]=N(""),f=T(()=>{let u=Array.isArray(n)?n:n?.logs||n?.entries||[];if(u=tr(u,l),d){const p=d.toLowerCase();u=u.filter(_=>Lt(_).toLowerCase().includes(p))}if(o){const p=o.toLowerCase();u=u.filter(_=>Tt(_).toLowerCase().includes(p))}return u},[n,l,o,d]),c=S(u=>{a(p=>p===u?"":u)},[]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading logs..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-log-filters",children:[Zn.map(u=>t("button",{type:"button",className:`ss-dbg-log-filter ${l===u?"ss-dbg-active":""}`,onClick:()=>i(u),children:u},u)),d&&t("button",{type:"button",className:"ss-dbg-log-filter ss-dbg-active",onClick:()=>a(""),children:["req: ",d.slice(0,8)," x"]}),t("span",{className:"ss-dbg-summary",style:{marginLeft:"auto"},children:[f.length," entries"]})]}),t("div",{className:"ss-dbg-search-bar",children:t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter log messages...",value:o,onChange:u=>h(u.target.value)})}),t("div",{style:{overflow:"auto",flex:1},children:f.length===0?t("div",{className:"ss-dbg-empty",children:"No log entries"}):f.slice(-200).reverse().map((u,p)=>{const _=St(u),g=Tt(u),v=Yn(u),b=Lt(u);return t("div",{className:"ss-dbg-log-entry",children:[t("span",{className:`ss-dbg-log-level ${er(_)}`,children:_.toUpperCase()}),t("span",{className:"ss-dbg-log-time",title:v?V(v):"",children:v?R(v):"-"}),b?t("span",{className:"ss-dbg-log-reqid",onClick:()=>c(b),role:"button",tabIndex:0,title:b,onKeyDown:m=>m.key==="Enter"&&c(b),children:b.slice(0,8)}):t("span",{className:"ss-dbg-log-reqid-empty",children:"-"}),t("span",{className:"ss-dbg-log-msg",children:g})]},p)})})]})}const nr=Object.freeze(Object.defineProperty({__proto__:null,LogsTab:Et,default:Et},Symbol.toStringTag,{value:"Module"}));function At(e="",n){const r=B(null);return S(()=>(r.current||(r.current=new Se({baseUrl:e,authToken:n})),r.current),[e,n])}const Pt={request:"#1e3a5f",middleware:"rgba(30, 58, 95, 0.7)",db:"#6d28d9",view:"#0e7490",mail:"#059669",event:"#b45309",custom:"#525252"},rr=[{label:"Request",color:"#1e3a5f"},{label:"Middleware",color:"rgba(30, 58, 95, 0.7)"},{label:"Database",color:"#6d28d9"},{label:"View",color:"#0e7490"},{label:"Mail",color:"#059669"},{label:"Event",color:"#b45309"}];function Mt({options:e}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e||{},{data:l,isLoading:i,error:o}=F("timeline",e),[h,d]=N(""),[a,f]=N(null),[c,u]=N(null),[p,_]=N(!1),[g,v]=N(null),b=T(()=>{const w=l?.traces||[];if(!h)return w;const P=h.toLowerCase();return w.filter(C=>C.url.toLowerCase().includes(P)||C.method.toLowerCase().includes(P)||String(C.statusCode).includes(P))},[l,h]),m=At(n,s);z(()=>{if(a===null){u(null),v(null);return}let w=!1;return _(!0),v(null),m().get(`${r}/traces/${a}`).then(C=>{w||(u(C),_(!1))}).catch(C=>{w||(v(C instanceof Error?C.message:"Failed to load trace"),_(!1))}),()=>{w=!0}},[a,r,m]);const $=S(w=>{f(P=>P===w?null:w)},[]),k=S(w=>w>=500?"ss-dbg-status-5xx":w>=400?"ss-dbg-status-4xx":w>=300?"ss-dbg-status-3xx":"ss-dbg-status-2xx",[]),y=W([b]);if(i&&!l)return t("div",{className:"ss-dbg-empty",children:"Loading traces..."});if(o)return t("div",{className:"ss-dbg-empty",children:["Error: ",o.message]});if(a!==null){if(p)return t("div",{className:"ss-dbg-empty",children:"Loading trace detail..."});if(g)return t("div",{children:[t("div",{className:"ss-dbg-tl-detail-header",children:t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>f(null),children:"← Back"})}),t("div",{className:"ss-dbg-empty",children:["Error: ",g]})]});if(!c)return t("div",{className:"ss-dbg-empty",children:"Loading trace detail..."});const w=c.spans||[],P=c.warnings||[];return t("div",{children:[t("div",{className:"ss-dbg-tl-detail-header",children:[t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>f(null),children:"← Back"}),t("span",{className:`ss-dbg-method ss-dbg-method-${c.method.toLowerCase()}`,children:c.method}),t("span",{className:"ss-dbg-tl-detail-url",children:c.url}),t("span",{className:`ss-dbg-status ${k(c.statusCode)}`,children:c.statusCode}),t("span",{className:"ss-dbg-tl-meta",children:[j(c.totalDuration)," · ",c.spanCount," spans"]})]}),t("div",{className:"ss-dbg-tl-legend",children:rr.map(C=>t("div",{className:"ss-dbg-tl-legend-item",children:[t("div",{className:"ss-dbg-tl-legend-dot",style:{background:C.color}}),t("span",{children:C.label})]},C.label))}),t("div",{style:{padding:"8px 12px",overflow:"auto"},children:w.length===0?t("div",{className:"ss-dbg-empty",children:"No spans captured for this request"}):w.map(C=>{const M=c.totalDuration||1,q=C.startOffset/M*100,Or=Math.max(C.duration/M*100,.5);return t("div",{className:"ss-dbg-tl-row",children:[t("div",{className:"ss-dbg-tl-label",title:C.label,children:C.label}),t("div",{className:"ss-dbg-tl-track",children:t("div",{className:`ss-dbg-tl-bar ss-dbg-tl-bar-${C.category}`,style:{left:`${q}%`,width:`${Or}%`,background:Pt[C.category]||Pt.custom},title:`${C.label}: ${j(C.duration)}`})}),t("span",{className:"ss-dbg-tl-dur",children:j(C.duration)})]},C.id)})}),P.length>0&&t("div",{className:"ss-dbg-tl-warnings",children:[t("div",{className:"ss-dbg-tl-warnings-title",children:"Warnings"}),P.map((C,M)=>t("div",{className:"ss-dbg-tl-warning",children:C},M))]})]})}return t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter traces...",value:h,onChange:w=>d(w.target.value)}),t("span",{className:"ss-dbg-summary",children:[b.length," traces"]})]}),b.length===0?t("div",{className:"ss-dbg-empty",children:"No traces captured. Enable tracing in config."}):t("table",{ref:y,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"70px"}}),t("col",{}),t("col",{style:{width:"60px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"50px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"Method"}),t("th",{children:"URL"}),t("th",{children:"Status"}),t("th",{children:"Duration"}),t("th",{children:"Spans"}),t("th",{children:"Time"})]})}),t("tbody",{children:b.map(w=>t("tr",{className:"ss-dbg-email-row",onClick:()=>$(w.id),children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:w.id}),t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${w.method.toLowerCase()}`,children:w.method})}),t("td",{title:w.url,children:w.url}),t("td",{children:t("span",{className:`ss-dbg-status ${k(w.statusCode)}`,children:w.statusCode})}),t("td",{className:`ss-dbg-duration ${Q(w.totalDuration)==="very-slow"?"ss-dbg-very-slow":Q(w.totalDuration)==="slow"?"ss-dbg-slow":""}`,children:j(w.totalDuration)}),t("td",{className:"ss-dbg-c-muted",style:{textAlign:"center"},children:w.spanCount}),t("td",{className:"ss-dbg-event-time",title:V(w.timestamp),children:R(w.timestamp)})]},w.id))})]})]})}const sr=Object.freeze(Object.defineProperty({__proto__:null,TimelineTab:Mt,default:Mt},Symbol.toStringTag,{value:"Module"}));function Ae(e,n){const r=T(()=>e?e.replace(/\/+$/,"")+"/api":null,[e]),s=T(()=>r?{...n,debugEndpoint:r}:n,[r,n]);return{dashApiBase:r,resolvedOptions:s}}function Ot({options:e,dashboardPath:n}){const{dashApiBase:r,resolvedOptions:s}=Ae(n,e),{data:l,isLoading:i,error:o}=F("cache",s),[h,d]=N(""),[a,f]=N(null),[c,u]=N(null),p=T(()=>{const m=l?.keys||[];if(!h)return m;const $=h.toLowerCase();return m.filter(k=>k.key.toLowerCase().includes($))},[l,h]),_=S(async m=>{if(a===m){f(null),u(null);return}f(m);try{const{baseUrl:$="",authToken:k}=e||{},y=r||e?.debugEndpoint||"/admin/api/debug",w=`${$}${y}/cache/${encodeURIComponent(m)}`,P={Accept:"application/json"};k&&(P.Authorization=`Bearer ${k}`);const M=await(await fetch(w,{headers:P,credentials:k?"omit":"same-origin"})).json();u(M)}catch{u({error:"Failed to fetch key value"})}},[a,e,r]),g=W([p]);if(i&&!l)return t("div",{className:"ss-dbg-empty",children:"Loading cache data..."});if(o)return t("div",{className:"ss-dbg-empty",children:["Error: ",o.message]});if(!l)return t("div",{className:"ss-dbg-empty",children:"Cache inspector not available"});const b=l.stats||l;return t("div",{children:[t("div",{className:"ss-dbg-cache-stats",children:[t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Hit Rate:"}),t("span",{className:"ss-dbg-cache-stat-value",children:[b.hitRate!==null&&b.hitRate!==void 0?b.hitRate.toFixed(1):"0","%"]})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Hits:"}),t("span",{className:"ss-dbg-cache-stat-value",children:b.totalHits??0})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Misses:"}),t("span",{className:"ss-dbg-cache-stat-value",children:b.totalMisses??0})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Keys:"}),t("span",{className:"ss-dbg-cache-stat-value",children:b.keyCount??"-"})]})]}),t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter keys...",value:h,onChange:m=>d(m.target.value)}),t("span",{className:"ss-dbg-summary",children:[p.length," keys"]})]}),a&&!!c&&t("div",{className:"ss-dbg-cache-detail",children:[t("strong",{children:a}),t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>f(null),children:["←"," Back"]}),t(Ee,{data:c,classPrefix:"ss-dbg"})]}),p.length===0?t("div",{className:"ss-dbg-empty",children:"No cache keys found"}):t("table",{ref:g,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"Key"}),t("th",{children:"Type"}),t("th",{children:"TTL"}),t("th",{children:"Size"})]})}),t("tbody",{children:p.map(m=>t("tr",{className:"ss-dbg-email-row",onClick:()=>_(m.key),children:[t("td",{className:"ss-dbg-c-sql",children:m.key}),t("td",{className:"ss-dbg-c-muted",children:m.type}),t("td",{className:"ss-dbg-c-muted",children:m.ttl>0?Rn(m.ttl):"-"}),t("td",{className:"ss-dbg-c-dim",children:m.size>0?Fn(m.size):"-"})]},m.key))})]})]})}const lr=Object.freeze(Object.defineProperty({__proto__:null,CacheTab:Ot,default:Ot},Symbol.toStringTag,{value:"Module"})),ir=["all","active","waiting","delayed","completed","failed"];function ar(e,n="ss-dbg-job-status"){switch(e){case"completed":case"failed":case"active":case"waiting":case"delayed":return`${n}-${e}`;default:return"ss-dbg-badge-muted"}}function or(e){if(!e)return[];if(Array.isArray(e))return e;const n=e;return n.jobs||n.data||[]}function cr(e){if(!e||Array.isArray(e))return null;const n=e;return n.stats||n.overview||null}function It({options:e,dashboardPath:n}){const{dashApiBase:r,resolvedOptions:s}=Ae(n,e),{data:l,isLoading:i,error:o}=F("jobs",s),[h,d]=N("all"),[a,f]=N(null),c=T(()=>{const g=or(l);return h==="all"?g:g.filter(v=>v.status===h)},[l,h]),u=S(async g=>{f(g);try{const{baseUrl:v="",authToken:b}=e||{},m=r||e?.debugEndpoint||"/admin/api/debug",$=`${v}${m}/jobs/${g}/retry`,k={Accept:"application/json"};b&&(k.Authorization=`Bearer ${b}`),await fetch($,{method:"POST",headers:k,credentials:b?"omit":"same-origin"})}catch{}f(null)},[e,r]),p=W([c]);if(!r)return t("div",{className:"ss-dbg-empty",children:"Queue inspector not available (no dashboard configured)"});if(i&&!l)return t("div",{className:"ss-dbg-empty",children:"Loading jobs..."});if(o)return t("div",{className:"ss-dbg-empty",children:["Error: ",o.message]});if(!l)return t("div",{className:"ss-dbg-empty",children:"Queue inspector not available"});const _=cr(l);return t("div",{children:[t("div",{className:"ss-dbg-job-stats-area",children:[t("div",{className:"ss-dbg-job-stats",children:[t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Active:"}),t("span",{className:"ss-dbg-job-stat-value",children:_?.active??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Waiting:"}),t("span",{className:"ss-dbg-job-stat-value",children:_?.waiting??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Delayed:"}),t("span",{className:"ss-dbg-job-stat-value",children:_?.delayed??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Completed:"}),t("span",{className:"ss-dbg-job-stat-value",children:_?.completed??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Failed:"}),t("span",{className:"ss-dbg-job-stat-value ss-dbg-c-red",children:_?.failed??0})]})]}),t("div",{className:"ss-dbg-log-filters",children:ir.map(g=>t("button",{type:"button",className:`ss-dbg-job-filter ${h===g?"ss-dbg-active":""}`,onClick:()=>d(g),children:g},g))})]}),c.length===0?t("div",{className:"ss-dbg-empty",children:"No jobs found"}):t("table",{ref:p,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"15%"}}),t("col",{style:{width:"80px"}}),t("col",{}),t("col",{style:{width:"50px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"60px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"ID"}),t("th",{children:"Name"}),t("th",{children:"Status"}),t("th",{children:"Payload"}),t("th",{children:"Tries"}),t("th",{children:"Duration"}),t("th",{children:"Time"}),t("th",{})]})}),t("tbody",{children:c.map(g=>{const v=g;return t("tr",{children:[t("td",{className:"ss-dbg-c-dim",children:g.id}),t("td",{className:"ss-dbg-c-sql",title:g.name,children:g.name}),t("td",{children:t("span",{className:`ss-dbg-badge ${ar(g.status)}`,children:g.status})}),t("td",{children:t(Ee,{data:g.payload||g.data,maxPreviewLength:60,classPrefix:"ss-dbg"})}),t("td",{className:"ss-dbg-c-muted",style:{textAlign:"center"},children:g.attempts||v.attemptsMade||0}),t("td",{className:"ss-dbg-duration",children:g.duration!==null?j(g.duration):"-"}),t("td",{className:"ss-dbg-event-time",title:V(g.timestamp||g.createdAt||v.processedAt||v.created_at),children:R(g.timestamp||g.createdAt||v.processedAt||v.created_at)}),t("td",{children:g.status==="failed"&&t("button",{type:"button",className:"ss-dbg-retry-btn",onClick:()=>u(g.id),disabled:a===g.id,children:a===g.id?"...":"Retry"})})]},g.id)})})]})]})}const dr=Object.freeze(Object.defineProperty({__proto__:null,JobsTab:It,default:It},Symbol.toStringTag,{value:"Module"}));function O(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function Pe(e,n=""){if(typeof e!="object"||e===null||e===void 0)return[{path:n,value:e}];if(Array.isArray(e)||O(e))return[{path:n,value:e}];const r=[];for(const s of Object.keys(e)){const l=n?`${n}.${s}`:s,i=e[s];typeof i=="object"&&i!==null&&!Array.isArray(i)&&!O(i)?r.push(...Pe(i,l)):r.push({path:l,value:i})}return r}function Me(e){return e==null?{text:"null",color:"var(--ss-dim)"}:typeof e=="boolean"?{text:String(e),color:e?"var(--ss-green-fg)":"var(--ss-red-fg)"}:typeof e=="number"?{text:String(e),color:"var(--ss-amber-fg)"}:Array.isArray(e)?{text:`[${e.map(r=>r==null?"null":typeof r=="object"?JSON.stringify(r):String(r)).join(", ")}]`,color:"var(--ss-purple-fg)"}:typeof e=="object"?{text:JSON.stringify(e),color:"var(--ss-dim)"}:{text:String(e)}}function Dt(e){if(e==null||typeof e!="object"||Array.isArray(e)||O(e))return 1;let n=0;for(const r of Object.keys(e))n+=Dt(e[r]);return n}function hr(e){if(e==null||typeof e!="object"||Array.isArray(e)||O(e))return[];const n=[];for(const r of Object.keys(e)){const s=e[r];s!==null&&typeof s=="object"&&!Array.isArray(s)&&!O(s)&&n.push(r)}return n}function _e(e,n,r){n&&navigator.clipboard.writeText(e).then(()=>{const s=n.textContent;n.textContent="✓",n.classList.add(`${r}-copy-row-ok`),setTimeout(()=>{n.textContent=s,n.classList.remove(`${r}-copy-row-ok`)},1200)}).catch(()=>{})}function me({redacted:e,p:n}){const[r,s]=N(!1);return t("span",{className:`${n}-config-redacted`,style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[t("span",{children:r?e.value:e.display}),t("button",{type:"button",className:`${n}-btn`,title:r?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:l=>{l.stopPropagation(),s(i=>!i)},children:r?t("svg",{width:"14",height:"14",viewBox:A["eye-off"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A["eye-off"].elements.join("")}}):t("svg",{width:"14",height:"14",viewBox:A.eye.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A.eye.elements.join("")}})})]})}function ur({env:e,search:n,p:r}){const s=B(new Map),l=n.toLowerCase(),i=Object.entries(e).filter(([o,h])=>{if(!l)return!0;const d=O(h)?h.display:h==null?"":String(h);return o.toLowerCase().includes(l)||d.toLowerCase().includes(l)});return t("div",{className:`${r}-config-table-wrap`,children:t("table",{className:`${r}-table ${r}-config-env-table`,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Variable"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:[i.map(([o,h])=>{const d=O(h),a=d?h.display:h==null?"null":String(h),f=`${o}=${a}`;return t("tr",{children:[t("td",{className:`${r}-env-key`,children:t("span",{className:`${r}-config-key`,children:o})}),t("td",{className:`${r}-env-val`,children:d?t(me,{redacted:h,p:r}):t("span",{className:`${r}-config-val`,children:a})}),t("td",{children:!d&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:c=>{s.current.set(o,c)},onClick:c=>{c.stopPropagation(),_e(f,s.current.get(o)??null,r)},children:"⎘"})})]},o)}),i.length===0&&t("tr",{children:t("td",{colSpan:3,style:{textAlign:"center",color:"var(--ss-dim)"},children:"No matching variables"})})]})]})})}function fr({source:e,search:n,p:r}){const s=B(new Map),l=n.toLowerCase(),i=Pe(e,""),o=i.filter(h=>{const d=O(h.value)?h.value.display:h.value===null||h.value===void 0?"":String(h.value);return h.path.toLowerCase().includes(l)||d.toLowerCase().includes(l)});return t("div",{className:`${r}-config-table-wrap`,children:[t("table",{className:`${r}-table`,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Path"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:[o.map(h=>{const d=O(h.value),a=d?null:Me(h.value),f=d?h.value.display:a.text,c=`${h.path}: ${f}`;return t("tr",{children:[t("td",{children:t("span",{className:`${r}-config-key`,style:{whiteSpace:"nowrap"},children:h.path})}),t("td",{children:d?t(me,{redacted:h.value,p:r}):t("span",{className:`${r}-config-val`,style:{wordBreak:"break-all",color:a.color},children:a.text})}),t("td",{children:!d&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:u=>{s.current.set(h.path,u)},onClick:u=>{u.stopPropagation(),_e(c,s.current.get(h.path)??null,r)},children:"⎘"})})]},h.path)}),o.length===0&&t("tr",{children:t("td",{colSpan:3,style:{textAlign:"center",color:"var(--ss-dim)"},children:"No matching entries"})})]})]}),t("div",{style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"},children:[o.length," of ",i.length," entries"]})]})}function pr({obj:e,prefix:n,p:r}){const s=B(new Map),l=Pe(e,n);return t("table",{className:`${r}-table ${r}-config-inner-table`,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"35%"},children:"Key"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:l.map(i=>{const o=i.path.indexOf(n+".")===0?i.path.slice(n.length+1):i.path,h=O(i.value),d=h?null:Me(i.value),a=h?i.value.display:d.text,f=`${i.path}: ${a}`;return t("tr",{children:[t("td",{title:o,children:t("span",{className:`${r}-config-key`,children:o})}),t("td",{title:a,children:h?t(me,{redacted:i.value,p:r}):t("span",{className:`${r}-config-val`,style:{color:d.color},children:d.text})}),t("td",{children:!h&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:c=>{s.current.set(i.path,c)},onClick:c=>{c.stopPropagation(),_e(f,s.current.get(i.path)??null,r)},children:"⎘"})})]},i.path)})})]})}function _r({value:e,p:n}){if(e==null)return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-dim)"},children:"null"});if(O(e))return t(me,{redacted:e,p:n});if(typeof e=="boolean")return t("span",{className:`${n}-config-val`,style:{color:e?"var(--ss-green-fg)":"var(--ss-red-fg)"},children:String(e)});if(typeof e=="number")return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-amber-fg)"},children:String(e)});if(Array.isArray(e)){const r=e.map(s=>s==null?"null":typeof s=="object"?JSON.stringify(s):String(s));return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-purple-fg)"},children:["[",r.join(", "),"]"]})}return typeof e=="object"?t("span",{className:`${n}-config-val`,style:{color:"var(--ss-dim)"},children:JSON.stringify(e)}):t("span",{className:`${n}-config-val`,children:String(e)})}function mr({obj:e,expandedPaths:n,onToggle:r,p:s}){if(e==null||typeof e!="object"||Array.isArray(e)||O(e))return null;const l=Object.keys(e),i=B(new Map);return t("div",{className:`${s}-config-sections`,children:l.map(o=>{const h=e[o],d=h!==null&&typeof h=="object"&&!Array.isArray(h)&&!O(h),a=n.has(o),f=O(h);return t("div",{className:`${s}-config-section`,children:[t("div",{className:`${s}-config-section-header${d?"":` ${s}-config-leaf`}`,onClick:d?()=>r(o):void 0,style:{cursor:d?"pointer":"default"},children:[d?t("span",{className:`${s}-config-toggle`,children:a?"▼":"▶"}):t("span",{className:`${s}-config-toggle`,style:{visibility:"hidden"},children:"•"}),t("span",{className:`${s}-config-key`,children:o}),d?t("span",{className:`${s}-config-count`,children:[Dt(h)," entries"]}):t(I,{children:[t("span",{className:`${s}-config-val`,style:{marginLeft:"8px"},children:t(_r,{value:h,p:s})}),!f&&t("button",{type:"button",className:`${s}-copy-row-btn`,style:{marginLeft:"4px"},title:"Copy",ref:c=>{i.current.set(o,c)},onClick:c=>{c.stopPropagation();const u=Me(h);_e(`${o}: ${u.text}`,i.current.get(o)??null,s)},children:"⎘"})]})]}),d&&a&&t("div",{className:`${s}-config-section-body`,children:t(pr,{obj:h,prefix:o,p:s})})]},o)})})}function gr({data:e,isLoading:n,classPrefix:r}){const s=r,[l,i]=N(""),[o,h]=N(""),[d,a]=N("app"),[f,c]=N(new Set),[u,p]=N("Copy JSON");z(()=>{const $=setTimeout(()=>h(l),200);return()=>clearTimeout($)},[l]);const _=e,g=S($=>{c(k=>{const y=new Set(k);return y.has($)?y.delete($):y.add($),y})},[]),v=S(()=>{if(!_)return;const $=d==="app"?_.app:_.env;if(!$)return;const k=hr($);c(new Set(k))},[_,d]),b=S(()=>{c(new Set)},[]),m=S(async()=>{if(_)try{const $=d==="app"?_.app:_.env;await navigator.clipboard.writeText(JSON.stringify($,null,2)),p("Copied!"),setTimeout(()=>p("Copy JSON"),1500)}catch{}},[_,d]);return t("div",{children:[t("div",{className:`${s}-config-toolbar`,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"},children:[t("button",{type:"button",className:`${s}-config-tab${d==="app"?` ${s}-active`:""}`,onClick:()=>a("app"),children:"App Config"}),t("button",{type:"button",className:`${s}-config-tab${d==="env"?` ${s}-active`:""}`,onClick:()=>a("env"),children:"Env"}),t("div",{style:{position:"relative",flex:1},children:[t("input",{type:"text",className:`${s}-search`,placeholder:"Search keys and values...",value:l,onChange:$=>i($.target.value),style:{width:"100%"}}),l&&t("button",{type:"button",onClick:()=>i(""),style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"var(--ss-dim)",padding:"0 2px",lineHeight:1},children:"×"})]}),d==="app"&&!o&&t(I,{children:[t("button",{type:"button",className:`${s}-btn`,onClick:v,children:"Expand All"}),t("button",{type:"button",className:`${s}-btn`,onClick:b,children:"Collapse All"})]}),t("button",{type:"button",className:`${s}-btn`,onClick:m,children:u})]}),n&&!e?t("div",{className:`${s}-empty`,children:"Loading config..."}):_?d==="env"?t(ur,{env:_.env??{},search:o,p:s}):o?t(fr,{source:_.app??{},search:o,p:s}):t("div",{className:`${s}-config-table-wrap`,children:t(mr,{obj:_.app,expandedPaths:f,onToggle:g,p:s})}):t("div",{className:`${s}-empty`,children:"Config not available"})]})}function Bt({options:e,dashboardPath:n}){const{resolvedOptions:r}=Ae(n,e),{data:s,isLoading:l,error:i}=F("config",r);return i?t("div",{className:"ss-dbg-empty",children:["Error: ",i.message]}):t(gr,{data:s,isLoading:l,classPrefix:"ss-dbg"})}const br=Object.freeze(Object.defineProperty({__proto__:null,ConfigTab:Bt,default:Bt},Symbol.toStringTag,{value:"Module"})),vr=["password","secret","token","key","credential","auth"];function jt(e){const n=e.toLowerCase();return vr.some(r=>n.includes(r))}function Rt(e){if(e==null)return"-";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.join(", ")||"-";try{return JSON.stringify(e)}catch{return String(e)}}const yr={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function wr(e){return yr[e]||e}const Nr={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function xr(e){return Nr[e]||e}const $r=["healthy","active","connected","available","ready"],kr=["errored","unavailable"];function Cr(e){return $r.includes(e)?"ok":kr.includes(e)?"err":""}function ee({status:e,prefix:n}){const r=Cr(e);let s=`${n}-dot`;return r==="ok"?s+=` ${n}-dot-ok`:r==="err"&&(s+=` ${n}-dot-err`),t("span",{className:s})}const Ft=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:A.eye.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A.eye.elements.join("")}}),Ut=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:A["eye-off"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:A["eye-off"].elements.join("")}});function Sr({value:e}){const[n,r]=N(!1);return t("span",{children:[n?e:"••••••••"," ",t("button",{type:"button",onClick:()=>r(s=>!s),style:{background:"none",border:"1px solid var(--ss-border)",borderRadius:3,padding:"0 4px",fontSize:"10px",color:"var(--ss-dim)",cursor:"pointer",verticalAlign:"middle"},children:n?t(Ut,{}):t(Ft,{})})]})}function Tr({current:e,max:n,prefix:r}){const s=n>0?Math.min(100,Math.round(e/n*100)):0,l=s>=100;return t("div",{className:`${r}-bar`,children:[t("div",{className:`${r}-bar-track`,children:t("div",{className:`${r}-bar-fill${l?` ${r}-bar-fill-warn`:""}`,style:{width:`${s}%`}})}),t("span",{className:`${r}-bar-pct${l?` ${r}-bar-pct-warn`:""}`,children:[s,"%"]})]})}function Lr({config:e,prefix:n}){const r=Object.entries(e);return r.length===0?t("span",{className:`${n}-c-dim`,children:"-"}):t("span",{className:`${n}-c-muted`,children:r.map(([s,l],i)=>t("span",{children:[i>0&&", ",t("span",{className:`${n}-c-dim`,children:s}),"=",jt(s)&&typeof l=="string"?t(Sr,{value:l}):t("span",{children:Rt(l)})]},s))})}function te({label:e,value:n,prefix:r}){return t("div",{className:`${r}-info-card`,children:[t("span",{className:`${r}-info-card-label`,children:e}),t("span",{className:`${r}-info-card-value`,children:n})]})}function Er({data:e,tableClassName:n,classPrefix:r}){const s=r||"ss-dash",[l,i]=N(new Set),o=S(d=>{i(a=>{const f=new Set(a);return f.has(d)?f.delete(d):f.add(d),f})},[]),h=S((d,a)=>{if(a==null)return t("span",{className:`${s}-c-dim`,children:"null"});if(typeof a=="boolean")return t("span",{className:a?`${s}-c-green`:`${s}-c-red`,children:String(a)});if(Array.isArray(a))return t("span",{children:a.join(", ")||"-"});const f=Rt(a);if(jt(d)){const c=l.has(d);return t("span",{children:[c?f:"••••••••"," ",t("button",{type:"button",onClick:()=>o(d),style:{background:"none",border:"1px solid var(--ss-border)",borderRadius:3,padding:"0 4px",fontSize:"10px",color:"var(--ss-dim)",cursor:"pointer",verticalAlign:"middle"},children:c?t(Ut,{}):t(Ft,{})})]})}return t("span",{children:f})},[l,o,s]);return t("div",{children:[t("h3",{className:`${s}-internals-title`,children:"Package Info"}),t("div",{className:`${s}-info-cards`,children:[t(te,{label:"Version",value:e.package.version||"-",prefix:s}),t(te,{label:"Node.js",value:e.package.nodeVersion||"-",prefix:s}),t(te,{label:"AdonisJS",value:e.package.adonisVersion||"-",prefix:s}),t(te,{label:"Uptime",value:jn(e.package.uptime),prefix:s}),t(te,{label:"Renderer",value:e.devToolbar?.renderer||"preact",prefix:s})]}),e.collectors.length>0&&t(I,{children:[t("h3",{className:`${s}-internals-title`,children:"Collectors"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Collector"}),t("th",{children:"Status"}),t("th",{children:"Last Error"}),t("th",{children:"Config"})]})}),t("tbody",{children:e.collectors.map(d=>t("tr",{children:[t("td",{children:[t("code",{children:d.name}),d.label&&d.label!==d.name&&t("span",{className:`${s}-c-dim`,children:[" ",d.label]})]}),t("td",{children:[t(ee,{status:d.status,prefix:s}),d.status]}),t("td",{className:d.lastError?`${s}-c-red`:`${s}-c-dim`,children:d.lastError?t(I,{children:[d.lastError,d.lastErrorAt&&t("span",{className:`${s}-c-dim`,style:{fontSize:"10px"},children:R(d.lastErrorAt)})]}):"-"}),t("td",{children:t(Lr,{config:d.config,prefix:s})})]},d.name))})]})]}),t("h3",{className:`${s}-internals-title`,children:"Buffers"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Buffer"}),t("th",{children:"Usage"}),t("th",{children:"Fill %"})]})}),t("tbody",{children:Object.entries(e.buffers).map(([d,a])=>t("tr",{children:[t("td",{style:{textTransform:"capitalize"},children:d}),t("td",{children:[a.current.toLocaleString()," / ",a.max.toLocaleString()]}),t("td",{children:t(Tr,{current:a.current,max:a.max,prefix:s})})]},d))})]}),t("h3",{className:`${s}-internals-title`,children:"Timers"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Timer"}),t("th",{children:"Status"}),t("th",{children:"Interval"})]})}),t("tbody",{children:Object.entries(e.timers).map(([d,a])=>t("tr",{children:[t("td",{children:wr(d)}),t("td",{children:[t(ee,{status:a.active?"active":"inactive",prefix:s}),t("span",{className:a.active?`${s}-c-green`:`${s}-c-dim`,children:a.active?"active":"inactive"})]}),t("td",{children:a.active?a.intervalMs?j(a.intervalMs):a.debounceMs?`${j(a.debounceMs)} (debounce)`:"-":t("span",{className:`${s}-c-dim`,children:"—"})})]},d))})]}),t("h3",{className:`${s}-internals-title`,children:"Integrations"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Integration"}),t("th",{children:"Status"}),t("th",{children:"Details"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"Transmit (SSE)"}),t("td",{children:[t(ee,{status:e.transmit.available?"connected":"inactive",prefix:s}),e.transmit.available?"connected":"unavailable"]}),t("td",{style:{fontSize:"11px"},children:e.transmit.channels.length>0?`Channels: ${e.transmit.channels.join(", ")}`:"-"})]}),Object.entries(e.integrations).map(([d,a])=>{const f=a.active??a.available??!1,c=a.active?"active":a.available?"available":"unavailable";let u=a.mode?`Mode: ${a.mode}`:"-";return d==="edgePlugin"&&a.active?u="@serverStats() tag registered":d==="cacheInspector"&&a.available?u="Redis dependency detected":d==="queueInspector"&&a.available&&(u="Queue dependency detected"),t("tr",{children:[t("td",{children:xr(d)}),t("td",{children:[t(ee,{status:f?"active":"inactive",prefix:s}),c]}),t("td",{className:`${s}-c-dim`,style:{fontSize:"11px"},children:u})]},d)})]})]}),e.storage&&t(I,{children:[t("h3",{className:`${s}-internals-title`,children:"Storage (SQLite)"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Metric"}),t("th",{children:"Value"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"Status"}),t("td",{children:[t(ee,{status:e.storage.ready?"ready":"inactive",prefix:s}),e.storage.ready?"ready":"not ready"]})]}),t("tr",{children:[t("td",{children:"DB Path"}),t("td",{children:t("code",{children:e.storage.dbPath})})]}),t("tr",{children:[t("td",{children:"File Size"}),t("td",{children:[e.storage.fileSizeMb.toFixed(1)," MB"]})]}),t("tr",{children:[t("td",{children:"WAL Size"}),t("td",{children:[e.storage.walSizeMb.toFixed(1)," MB"]})]}),t("tr",{children:[t("td",{children:"Retention"}),t("td",{children:[e.storage.retentionDays," days"]})]}),t("tr",{children:[t("td",{children:"Last Cleanup"}),t("td",{children:e.storage.lastCleanupAt?R(e.storage.lastCleanupAt):"-"})]})]})]}),e.storage.tables.length>0&&t("table",{className:n,style:{marginTop:8},children:[t("thead",{children:t("tr",{children:[t("th",{children:"Table"}),t("th",{children:"Rows"})]})}),t("tbody",{children:e.storage.tables.map(d=>t("tr",{children:[t("td",{children:t("code",{children:d.name})}),t("td",{children:d.rowCount.toLocaleString()})]},d.name))})]})]}),t("h3",{className:`${s}-internals-title`,children:"Resolved Config"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Setting"}),t("th",{children:"Value"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"intervalMs"}),t("td",{children:e.config.intervalMs})]}),t("tr",{children:[t("td",{children:"transport"}),t("td",{children:e.config.transport})]}),t("tr",{children:[t("td",{children:"channelName"}),t("td",{children:e.config.channelName})]}),t("tr",{children:[t("td",{children:"endpoint"}),t("td",{children:e.config.endpoint===!1?"false":e.config.endpoint})]}),t("tr",{children:[t("td",{children:"skipInTest"}),t("td",{children:h("skipInTest",e.config.skipInTest)})]}),t("tr",{children:[t("td",{children:"onStats callback"}),t("td",{children:e.config.hasOnStatsCallback?"defined":"not defined"})]}),t("tr",{children:[t("td",{children:"shouldShow callback"}),t("td",{children:e.config.hasShouldShowCallback?"defined":"not defined"})]})]})]}),t("h4",{className:`${s}-internals-title`,children:"DevToolbar"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Setting"}),t("th",{children:"Value"})]})}),t("tbody",{children:Object.entries(e.devToolbar).map(([d,a])=>t("tr",{children:[t("td",{children:d==="customPaneCount"?"customPanes":d}),t("td",{children:d==="customPaneCount"?`${a} registered`:h(d,a)})]},d))})]})]})}const Ar=3e3;function Ht({options:e}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e||{},[l,i]=N(null),[o,h]=N(!0),[d,a]=N(null),f=B(null),c=At(n,s),u=S(async()=>{try{const _=await c().get(`${r}/diagnostics`);i(_),a(null),h(!1)}catch(p){if(p instanceof ue){a(p),h(!1),f.current&&(clearInterval(f.current),f.current=null);return}a(p instanceof Error?p:new Error(String(p))),h(!1)}},[r,c]);return z(()=>(h(!0),a(null),u(),f.current=setInterval(u,Ar),()=>{f.current&&(clearInterval(f.current),f.current=null)}),[u]),o&&!l?t("div",{className:"ss-dbg-empty",children:"Loading diagnostics..."}):d?t("div",{className:"ss-dbg-empty",children:["Error: ",d.message]}):l?t(Er,{data:l,tableClassName:"ss-dbg-table",classPrefix:"ss-dbg"}):t("div",{className:"ss-dbg-empty",children:"Diagnostics not available"})}const Pr=Object.freeze(Object.defineProperty({__proto__:null,InternalsTab:Ht,default:Ht},Symbol.toStringTag,{value:"Module"}));function zt({pane:e,options:n}){({...n});const{data:r,isLoading:s,error:l,clearData:i}=F(e.endpoint.replace(/^\//,""),{...n,debugEndpoint:""}),[o,h]=N(""),d=T(()=>{if(!r)return[];const u=e.dataKey||e.id;let p=r;for(const _ of u.split("."))p=p?.[_];return Array.isArray(p)?p:[]},[r,e.dataKey,e.id]),a=T(()=>{if(!o)return d;const u=o.toLowerCase(),p=e.columns.filter(_=>_.searchable).map(_=>_.key);return p.length===0?d:d.filter(_=>p.some(g=>{const v=_[g];return v!==null&&String(v).toLowerCase().includes(u)}))},[d,o,e.columns]),f=(u,p)=>{if(u==null)return t("span",{className:"ss-dbg-c-dim",children:"-"});switch(p.format||"text"){case"time":return t("span",{className:"ss-dbg-event-time",title:V(u),children:typeof u=="number"?R(u):String(u)});case"timeAgo":return t("span",{className:"ss-dbg-event-time",title:V(u),children:R(u)});case"duration":{const g=typeof u=="number"?u:parseFloat(String(u));return isNaN(g)?String(u):t("span",{className:`ss-dbg-duration ${Q(g)==="very-slow"?"ss-dbg-very-slow":Q(g)==="slow"?"ss-dbg-slow":""}`,children:j(g)})}case"method":return t("span",{className:`ss-dbg-method ss-dbg-method-${String(u).toLowerCase()}`,children:String(u)});case"json":{let g=u;if(typeof u=="string")try{g=JSON.parse(u)}catch{}return pe(g,80)}case"badge":{const g=String(u).toLowerCase(),b=(p.badgeColorMap||{})[g]||"muted";return t("span",{className:`ss-dbg-badge ss-dbg-badge-${b}`,children:String(u)})}default:return String(u)}},c=W([a]);return s&&!r?t("div",{className:"ss-dbg-empty",children:["Loading ",e.label,"..."]}):l?t("div",{className:"ss-dbg-empty",children:["Error: ",l.message]}):t("div",{children:[e.search&&t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:e.search.placeholder,value:o,onChange:u=>h(u.target.value)}),t("span",{className:"ss-dbg-summary",children:[a.length," items"]}),e.clearable&&t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:i,children:"Clear"})]}),a.length===0?t("div",{className:"ss-dbg-empty",children:"No data"}):t("table",{ref:c,className:"ss-dbg-table",children:[t("thead",{children:t("tr",{children:e.columns.map(u=>t("th",{children:u.label},u.key))})}),t("tbody",{children:a.map((u,p)=>t("tr",{children:e.columns.map(_=>t("td",{children:f(u[_.key],_)},_.key))},u.id??p))})]})]})}const Mr=Object.freeze(Object.defineProperty({__proto__:null,CustomPaneTab:zt,default:zt},Symbol.toStringTag,{value:"Module"}))})();
1
+ (function(){"use strict";var se,$,je,K,Fe,He,Ue,ze,ye,we,Ne,le={},ie=[],Yt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y=Array.isArray;function z(e,n){for(var r in n)e[r]=n[r];return e}function xe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(e,n,r){var s,i,l,c={};for(l in n)l=="key"?s=n[l]:l=="ref"?i=n[l]:c[l]=n[l];if(arguments.length>2&&(c.children=arguments.length>3?se.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(l in e.defaultProps)c[l]===void 0&&(c[l]=e.defaultProps[l]);return oe(e,c,s,i,null)}function oe(e,n,r,s,i){var l={type:e,props:n,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++je,__i:-1,__u:0};return i==null&&$.vnode!=null&&$.vnode(l),l}function R(e){return e.children}function V(e,n){this.props=e,this.context=n}function Q(e,n){if(n==null)return e.__?Q(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Q(e):null}function Xt(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,s=[],i=[],l=z({},n);l.__v=n.__v+1,$.vnode&&$.vnode(l),$e(e.__P,l,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,s,r??Q(n),!!(32&n.__u),i),l.__v=n.__v,l.__.__k[l.__i]=l,Ge(s,l,i),n.__e=n.__=null,l.__e!=r&&Ve(l)}}function Ve(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Ve(e)}function qe(e){(!e.__d&&(e.__d=!0)&&K.push(e)&&!ce.__r++||Fe!=$.debounceRendering)&&((Fe=$.debounceRendering)||He)(ce)}function ce(){for(var e,n=1;K.length;)K.length>n&&K.sort(Ue),e=K.shift(),n=K.length,Xt(e);ce.__r=0}function We(e,n,r,s,i,l,c,d,o,a,h){var u,f,g,p,_,b,y,m=s&&s.__k||ie,N=n.length;for(o=Zt(r,n,m,o,N),u=0;u<N;u++)(g=r.__k[u])!=null&&(f=g.__i!=-1&&m[g.__i]||le,g.__i=u,b=$e(e,g,f,i,l,c,d,o,a,h),p=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&ke(f.ref,null,g),h.push(g.ref,g.__c||p,g)),_==null&&p!=null&&(_=p),(y=!!(4&g.__u))||f.__k===g.__k?o=Je(g,o,e,y):typeof g.type=="function"&&b!==void 0?o=b:p&&(o=p.nextSibling),g.__u&=-7);return r.__e=_,o}function Zt(e,n,r,s,i){var l,c,d,o,a,h=r.length,u=h,f=0;for(e.__k=new Array(i),l=0;l<i;l++)(c=n[l])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=e.__k[l]=oe(null,c,null,null,null):Y(c)?c=e.__k[l]=oe(R,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=e.__k[l]=oe(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):e.__k[l]=c,o=l+f,c.__=e,c.__b=e.__b+1,d=null,(a=c.__i=en(c,r,o,u))!=-1&&(u--,(d=r[a])&&(d.__u|=2)),d==null||d.__v==null?(a==-1&&(i>h?f--:i<h&&f++),typeof c.type!="function"&&(c.__u|=4)):a!=o&&(a==o-1?f--:a==o+1?f++:(a>o?f--:f++,c.__u|=4))):e.__k[l]=null;if(u)for(l=0;l<h;l++)(d=r[l])!=null&&(2&d.__u)==0&&(d.__e==s&&(s=Q(d)),Xe(d,d));return s}function Je(e,n,r,s){var i,l;if(typeof e.type=="function"){for(i=e.__k,l=0;i&&l<i.length;l++)i[l]&&(i[l].__=e,n=Je(i[l],n,r,s));return n}e.__e!=n&&(s&&(n&&e.type&&!n.parentNode&&(n=Q(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function de(e,n){return n=n||[],e==null||typeof e=="boolean"||(Y(e)?e.some(function(r){de(r,n)}):n.push(e)),n}function en(e,n,r,s){var i,l,c,d=e.key,o=e.type,a=n[r],h=a!=null&&(2&a.__u)==0;if(a===null&&d==null||h&&d==a.key&&o==a.type)return r;if(s>(h?1:0)){for(i=r-1,l=r+1;i>=0||l<n.length;)if((a=n[c=i>=0?i--:l++])!=null&&(2&a.__u)==0&&d==a.key&&o==a.type)return c}return-1}function Ke(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Yt.test(n)?r:r+"px"}function ue(e,n,r,s,i){var l,c;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof s=="string"&&(e.style.cssText=s=""),s)for(n in s)r&&n in r||Ke(e.style,n,"");if(r)for(n in r)s&&r[n]==s[n]||Ke(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")l=n!=(n=n.replace(ze,"$1")),c=n.toLowerCase(),n=c in e||n=="onFocusOut"||n=="onFocusIn"?c.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+l]=r,r?s?r.u=s.u:(r.u=ye,e.addEventListener(n,l?Ne:we,l)):e.removeEventListener(n,l?Ne:we,l);else{if(i=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function Qe(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n.t==null)n.t=ye++;else if(n.t<r.u)return;return r($.event?$.event(n):n)}}}function $e(e,n,r,s,i,l,c,d,o,a){var h,u,f,g,p,_,b,y,m,N,C,v,w,A,M,D=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(o=!!(32&r.__u),l=[d=n.__e=r.__e]),(h=$.__b)&&h(n);e:if(typeof D=="function")try{if(y=n.props,m="prototype"in D&&D.prototype.render,N=(h=D.contextType)&&s[h.__c],C=h?N?N.props.value:h.__:s,r.__c?b=(u=n.__c=r.__c).__=u.__E:(m?n.__c=u=new D(y,C):(n.__c=u=new V(y,C),u.constructor=D,u.render=nn),N&&N.sub(u),u.state||(u.state={}),u.__n=s,f=u.__d=!0,u.__h=[],u._sb=[]),m&&u.__s==null&&(u.__s=u.state),m&&D.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=z({},u.__s)),z(u.__s,D.getDerivedStateFromProps(y,u.__s))),g=u.props,p=u.state,u.__v=n,f)m&&D.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),m&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(m&&D.getDerivedStateFromProps==null&&y!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,C),n.__v==r.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,C)===!1){n.__v!=r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(W){W&&(W.__=n)}),ie.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&c.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,C),m&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,p,_)})}if(u.context=C,u.props=y,u.__P=e,u.__e=!1,v=$.__r,w=0,m)u.state=u.__s,u.__d=!1,v&&v(n),h=u.render(u.props,u.state,u.context),ie.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,v&&v(n),h=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++w<25);u.state=u.__s,u.getChildContext!=null&&(s=z(z({},s),u.getChildContext())),m&&!f&&u.getSnapshotBeforeUpdate!=null&&(_=u.getSnapshotBeforeUpdate(g,p)),A=h!=null&&h.type===R&&h.key==null?Ye(h.props.children):h,d=We(e,Y(A)?A:[A],n,r,s,i,l,c,d,o,a),u.base=n.__e,n.__u&=-161,u.__h.length&&c.push(u),b&&(u.__E=u.__=null)}catch(W){if(n.__v=null,o||l!=null)if(W.then){for(n.__u|=o?160:128;d&&d.nodeType==8&&d.nextSibling;)d=d.nextSibling;l[l.indexOf(d)]=null,n.__e=d}else{for(M=l.length;M--;)xe(l[M]);Ce(n)}else n.__e=r.__e,n.__k=r.__k,W.then||Ce(n);$.__e(W,n,r)}else l==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):d=n.__e=tn(r.__e,n,r,s,i,l,c,o,a);return(h=$.diffed)&&h(n),128&n.__u?void 0:d}function Ce(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ce))}function Ge(e,n,r){for(var s=0;s<r.length;s++)ke(r[s],r[++s],r[++s]);$.__c&&$.__c(n,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(l){l.call(i)})}catch(l){$.__e(l,i.__v)}})}function Ye(e){return typeof e!="object"||e==null||e.__b>0?e:Y(e)?e.map(Ye):z({},e)}function tn(e,n,r,s,i,l,c,d,o){var a,h,u,f,g,p,_,b=r.props||le,y=n.props,m=n.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),l!=null){for(a=0;a<l.length;a++)if((g=l[a])&&"setAttribute"in g==!!m&&(m?g.localName==m:g.nodeType==3)){e=g,l[a]=null;break}}if(e==null){if(m==null)return document.createTextNode(y);e=document.createElementNS(i,m,y.is&&y),d&&($.__m&&$.__m(n,l),d=!1),l=null}if(m==null)b===y||d&&e.data==y||(e.data=y);else{if(l=l&&se.call(e.childNodes),!d&&l!=null)for(b={},a=0;a<e.attributes.length;a++)b[(g=e.attributes[a]).name]=g.value;for(a in b)g=b[a],a=="dangerouslySetInnerHTML"?u=g:a=="children"||a in y||a=="value"&&"defaultValue"in y||a=="checked"&&"defaultChecked"in y||ue(e,a,null,g,i);for(a in y)g=y[a],a=="children"?f=g:a=="dangerouslySetInnerHTML"?h=g:a=="value"?p=g:a=="checked"?_=g:d&&typeof g!="function"||b[a]===g||ue(e,a,g,b[a],i);if(h)d||u&&(h.__html==u.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(u&&(e.innerHTML=""),We(n.type=="template"?e.content:e,Y(f)?f:[f],n,r,s,m=="foreignObject"?"http://www.w3.org/1999/xhtml":i,l,c,l?l[0]:r.__k&&Q(r,0),d,o),l!=null)for(a=l.length;a--;)xe(l[a]);d||(a="value",m=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[a]||m=="progress"&&!p||m=="option"&&p!=b[a])&&ue(e,a,p,b[a],i),a="checked",_!=null&&_!=e[a]&&ue(e,a,_,b[a],i))}return e}function ke(e,n,r){try{if(typeof e=="function"){var s=typeof e.__u=="function";s&&e.__u(),s&&n==null||(e.__u=e(n))}else e.current=n}catch(i){$.__e(i,r)}}function Xe(e,n,r){var s,i;if($.unmount&&$.unmount(e),(s=e.ref)&&(s.current&&s.current!=e.__e||ke(s,null,n)),(s=e.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(l){$.__e(l,n)}s.base=s.__P=null}if(s=e.__k)for(i=0;i<s.length;i++)s[i]&&Xe(s[i],n,r||typeof e.type!="function");r||xe(e.__e),e.__c=e.__=e.__e=void 0}function nn(e,n,r){return this.constructor(e,r)}function Ze(e,n,r){var s,i,l,c;n==document&&(n=document.documentElement),$.__&&$.__(e,n),i=(s=!1)?null:n.__k,l=[],c=[],$e(n,e=n.__k=ae(R,null,[e]),i||le,le,n.namespaceURI,i?null:n.firstChild?se.call(n.childNodes):null,l,i?i.__e:n.firstChild,s,c),Ge(l,e,c)}se=ie.slice,$={__e:function(e,n,r,s){for(var i,l,c;n=n.__;)if((i=n.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(e)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,s||{}),c=i.__d),c)return i.__E=i}catch(d){e=d}throw e}},je=0,V.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},r),this.props)),e&&z(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),qe(this))},V.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qe(this))},V.prototype.render=R,K=[],He=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ue=function(e,n){return e.__v.__b-n.__v.__b},ce.__r=0,ze=/(PointerCapture)$|Capture$/i,ye=0,we=Qe(!1),Ne=Qe(!0);var rn=0;function t(e,n,r,s,i,l){n||(n={});var c,d,o=n;if("ref"in o)for(d in o={},n)d=="ref"?c=n[d]:o[d]=n[d];var a={type:e,props:o,key:r,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--rn,__i:-1,__u:0,__source:i,__self:l};if(typeof e=="function"&&(c=e.defaultProps))for(d in c)o[d]===void 0&&(o[d]=c[d]);return $.vnode&&$.vnode(a),a}var X,T,Se,et,Z=0,tt=[],L=$,nt=L.__b,rt=L.__r,st=L.diffed,lt=L.__c,it=L.unmount,at=L.__;function Te(e,n){L.__h&&L.__h(T,e,Z||n),Z=0;var r=T.__H||(T.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function x(e){return Z=1,sn(dt,e)}function sn(e,n,r){var s=Te(X++,2);if(s.t=e,!s.__c&&(s.__=[r?r(n):dt(void 0,n),function(d){var o=s.__N?s.__N[0]:s.__[0],a=s.t(o,d);o!==a&&(s.__N=[a,s.__[1]],s.__c.setState({}))}],s.__c=T,!T.__f)){var i=function(d,o,a){if(!s.__c.__H)return!0;var h=s.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!l||l.call(this,d,o,a);var u=s.__c.props!==d;return h.some(function(f){if(f.__N){var g=f.__[0];f.__=f.__N,f.__N=void 0,g!==f.__[0]&&(u=!0)}}),l&&l.call(this,d,o,a)||u};T.__f=!0;var l=T.shouldComponentUpdate,c=T.componentWillUpdate;T.componentWillUpdate=function(d,o,a){if(this.__e){var h=l;l=void 0,i(d,o,a),l=h}c&&c.call(this,d,o,a)},T.shouldComponentUpdate=i}return s.__N||s.__}function F(e,n){var r=Te(X++,3);!L.__s&&ct(r.__H,n)&&(r.__=e,r.u=n,T.__H.__h.push(r))}function O(e){return Z=5,S(function(){return{current:e}},[])}function S(e,n){var r=Te(X++,7);return ct(r.__H,n)&&(r.__=e(),r.__H=n,r.__h=e),r.__}function k(e,n){return Z=8,S(function(){return e},n)}function ln(){for(var e;e=tt.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(he),n.__h.some(Le),n.__h=[]}catch(r){n.__h=[],L.__e(r,e.__v)}}}L.__b=function(e){T=null,nt&&nt(e)},L.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),at&&at(e,n)},L.__r=function(e){rt&&rt(e),X=0;var n=(T=e.__c).__H;n&&(Se===T?(n.__h=[],T.__h=[],n.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(n.__h.some(he),n.__h.some(Le),n.__h=[],X=0)),Se=T},L.diffed=function(e){st&&st(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(tt.push(n)!==1&&et===L.requestAnimationFrame||((et=L.requestAnimationFrame)||an)(ln)),n.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Se=T=null},L.__c=function(e,n){n.some(function(r){try{r.__h.some(he),r.__h=r.__h.filter(function(s){return!s.__||Le(s)})}catch(s){n.some(function(i){i.__h&&(i.__h=[])}),n=[],L.__e(s,r.__v)}}),lt&&lt(e,n)},L.unmount=function(e){it&&it(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(s){try{he(s)}catch(i){n=i}}),r.__H=void 0,n&&L.__e(n,r.__v))};var ot=typeof requestAnimationFrame=="function";function an(e){var n,r=function(){clearTimeout(s),ot&&cancelAnimationFrame(n),setTimeout(e)},s=setTimeout(r,35);ot&&(n=requestAnimationFrame(r))}function he(e){var n=T,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),T=n}function Le(e){var n=T;e.__c=e.__(),T=n}function ct(e,n){return!e||e.length!==n.length||n.some(function(r,s){return r!==e[s]})}function dt(e,n){return typeof n=="function"?n(e):n}function on(e,n){for(var r in n)e[r]=n[r];return e}function ut(e,n){for(var r in e)if(r!=="__source"&&!(r in n))return!0;for(var s in n)if(s!=="__source"&&e[s]!==n[s])return!0;return!1}function ht(e,n){this.props=e,this.context=n}(ht.prototype=new V).isPureReactComponent=!0,ht.prototype.shouldComponentUpdate=function(e,n){return ut(this.props,e)||ut(this.state,n)};var ft=$.__b;$.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ft&&ft(e)};var cn=$.__e;$.__e=function(e,n,r,s){if(e.then){for(var i,l=n;l=l.__;)if((i=l.__c)&&i.__c)return n.__e==null&&(n.__e=r.__e,n.__k=r.__k),i.__c(e,n)}cn(e,n,r,s)};var pt=$.unmount;function gt(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),e.__c.__H=null),(e=on({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(s){return gt(s,n,r)})),e}function _t(e,n,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(s){return _t(s,n,r)}),e.__c&&e.__c.__P===n&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function ee(){this.__u=0,this.o=null,this.__b=null}function mt(e){if(!e.__)return null;var n=e.__.__c;return n&&n.__a&&n.__a(e)}function B(e){var n,r,s,i=null;function l(c){if(n||(n=e()).then(function(d){d&&(i=d.default||d),s=!0},function(d){r=d,s=!0}),r)throw r;if(!s)throw n;return i?ae(i,c):null}return l.displayName="Lazy",l.__f=!0,l}function fe(){this.i=null,this.l=null}$.unmount=function(e){var n=e.__c;n&&(n.__z=!0),n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),pt&&pt(e)},(ee.prototype=new V).__c=function(e,n){var r=n.__c,s=this;s.o==null&&(s.o=[]),s.o.push(r);var i=mt(s.__v),l=!1,c=function(){l||s.__z||(l=!0,r.__R=null,i?i(o):o())};r.__R=c;var d=r.__P;r.__P=null;var o=function(){if(!--s.__u){if(s.state.__a){var a=s.state.__a;s.__v.__k[0]=_t(a,a.__c.__P,a.__c.__O)}var h;for(s.setState({__a:s.__b=null});h=s.o.pop();)h.__P=d,h.forceUpdate()}};s.__u++||32&n.__u||s.setState({__a:s.__b=s.__v.__k[0]}),e.then(c,c)},ee.prototype.componentWillUnmount=function(){this.o=[]},ee.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),s=this.__v.__k[0].__c;this.__v.__k[0]=gt(this.__b,r,s.__O=s.__P)}this.__b=null}var i=n.__a&&ae(R,null,e.fallback);return i&&(i.__u&=-33),[ae(R,null,n.__a?null:e.children),i]};var bt=function(e,n,r){if(++r[1]===r[0]&&e.l.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};(fe.prototype=new V).__a=function(e){var n=this,r=mt(n.__v),s=n.l.get(e);return s[0]++,function(i){var l=function(){n.props.revealOrder?(s.push(i),bt(n,e,s)):i()};r?r(l):l()}},fe.prototype.render=function(e){this.i=null,this.l=new Map;var n=de(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&n.reverse();for(var r=n.length;r--;)this.l.set(n[r],this.i=[1,0,this.i]);return e.children},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,r){bt(e,r,n)})};var dn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,un=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,hn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,fn=/[A-Z0-9]/g,pn=typeof document<"u",gn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};V.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(V.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var vt=$.event;function _n(){}function mn(){return this.cancelBubble}function bn(){return this.defaultPrevented}$.event=function(e){return vt&&(e=vt(e)),e.persist=_n,e.isPropagationStopped=mn,e.isDefaultPrevented=bn,e.nativeEvent=e};var vn={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=$.vnode;$.vnode=function(e){typeof e.type=="string"&&(function(n){var r=n.props,s=n.type,i={},l=s.indexOf("-")===-1;for(var c in r){var d=r[c];if(!(c==="value"&&"defaultValue"in r&&d==null||pn&&c==="children"&&s==="noscript"||c==="class"||c==="className")){var o=c.toLowerCase();c==="defaultValue"&&"value"in r&&r.value==null?c="value":c==="download"&&d===!0?d="":o==="translate"&&d==="no"?d=!1:o[0]==="o"&&o[1]==="n"?o==="ondoubleclick"?c="ondblclick":o!=="onchange"||s!=="input"&&s!=="textarea"||gn(r.type)?o==="onfocus"?c="onfocusin":o==="onblur"?c="onfocusout":hn.test(c)&&(c=o):o=c="oninput":l&&un.test(c)?c=c.replace(fn,"-$&").toLowerCase():d===null&&(d=void 0),o==="oninput"&&i[c=o]&&(c="oninputCapture"),i[c]=d}}s=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=de(r.children).forEach(function(a){a.props.selected=i.value.indexOf(a.props.value)!=-1})),s=="select"&&i.defaultValue!=null&&(i.value=de(r.children).forEach(function(a){a.props.selected=i.multiple?i.defaultValue.indexOf(a.props.value)!=-1:i.defaultValue==a.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",vn)):r.className&&(i.class=i.className=r.className),n.props=i})(e),e.$$typeof=dn,yt&&yt(e)};var wt=$.__r;$.__r=function(e){wt&&wt(e),e.__c};var Nt=$.diffed;$.diffed=function(e){Nt&&Nt(e);var n=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in n&&n.value!==r.value&&(r.value=n.value==null?"":n.value)};var xt={Fragment:R};const E={queries:{viewBox:"0 0 24 24",elements:['<ellipse cx="12" cy="5" rx="9" ry="3"/>','<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/>','<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>']},events:{viewBox:"0 0 24 24",elements:['<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>']},emails:{viewBox:"0 0 24 24",elements:['<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>','<polyline points="22,6 12,13 2,6"/>']},routes:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<line x1="2" y1="12" x2="22" y2="12"/>','<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>']},logs:{viewBox:"0 0 24 24",elements:['<line x1="8" y1="6" x2="21" y2="6"/>','<line x1="8" y1="12" x2="21" y2="12"/>','<line x1="8" y1="18" x2="21" y2="18"/>','<line x1="3" y1="6" x2="3.01" y2="6"/>','<line x1="3" y1="12" x2="3.01" y2="12"/>','<line x1="3" y1="18" x2="3.01" y2="18"/>']},timeline:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},cache:{viewBox:"0 0 24 24",elements:['<rect x="2" y="2" width="20" height="8" rx="2" ry="2"/>','<rect x="2" y="14" width="20" height="8" rx="2" ry="2"/>','<line x1="6" y1="6" x2="6.01" y2="6"/>','<line x1="6" y1="18" x2="6.01" y2="18"/>']},jobs:{viewBox:"0 0 24 24",elements:['<rect x="2" y="7" width="20" height="14" rx="2" ry="2"/>','<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>']},config:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="3"/>','<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>']},internals:{viewBox:"0 0 24 24",elements:['<rect x="4" y="4" width="16" height="16" rx="2"/>','<rect x="9" y="9" width="6" height="6"/>','<line x1="9" y1="1" x2="9" y2="4"/>','<line x1="15" y1="1" x2="15" y2="4"/>','<line x1="9" y1="20" x2="9" y2="23"/>','<line x1="15" y1="20" x2="15" y2="23"/>','<line x1="20" y1="9" x2="23" y2="9"/>','<line x1="20" y1="14" x2="23" y2="14"/>','<line x1="1" y1="9" x2="4" y2="9"/>','<line x1="1" y1="14" x2="4" y2="14"/>']},overview:{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="7" height="7"/>','<rect x="14" y="3" width="7" height="7"/>','<rect x="14" y="14" width="7" height="7"/>','<rect x="3" y="14" width="7" height="7"/>']},requests:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},"dashboard-timeline":{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<polyline points="12 6 12 12 16 14"/>']},"custom-pane":{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="18" height="18" rx="2"/>','<path d="M9 3v18"/>']},wrench:{viewBox:"0 0 24 24",elements:['<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>']},"external-link":{viewBox:"0 0 24 24",elements:['<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>','<polyline points="15 3 21 3 21 9"/>','<line x1="10" y1="14" x2="21" y2="3"/>']},sun:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="5"/>','<line x1="12" y1="1" x2="12" y2="3"/>','<line x1="12" y1="21" x2="12" y2="23"/>','<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>','<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>','<line x1="1" y1="12" x2="3" y2="12"/>','<line x1="21" y1="12" x2="23" y2="12"/>','<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>','<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>']},moon:{viewBox:"0 0 24 24",elements:['<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>']},search:{viewBox:"0 0 24 24",elements:['<circle cx="11" cy="11" r="8"/>','<line x1="21" y1="21" x2="16.65" y2="16.65"/>']},eye:{viewBox:"0 0 24 24",elements:['<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>','<circle cx="12" cy="12" r="3"/>']},"eye-off":{viewBox:"0 0 24 24",elements:['<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/>','<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/>','<line x1="1" y1="1" x2="23" y2="23"/>','<path d="M14.12 14.12a3 3 0 1 1-4.24-4.24"/>']},"chevron-right":{viewBox:"0 0 24 24",elements:['<path d="M9 18l6-6-6-6"/>']},"chevron-left":{viewBox:"0 0 24 24",elements:['<path d="M15 18l-6-6 6-6"/>']},"open-external":{viewBox:"0 0 16 16",elements:['<path d="M6 3H3v10h10v-3M9 1h6v6M7 9L15 1"/>']}};class pe extends Error{status;constructor(n=403){super(`Unauthorized (HTTP ${n})`),this.name="UnauthorizedError",this.status=n}}class yn extends Error{status;body;constructor(n,r){super(`API error (HTTP ${n})`),this.name="ApiError",this.status=n,this.body=r}}class Ee{baseUrl;authToken;constructor(n){this.baseUrl=n.baseUrl.replace(/\/+$/,""),this.authToken=n.authToken}async fetch(n,r){const i={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...r?.headers},l=await globalThis.fetch(`${this.baseUrl}${n}`,{...r,headers:i,credentials:this.authToken?"omit":"include"});if(r?.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(l.status===401||l.status===403)throw new pe(l.status);if(!l.ok){const c=await l.text().catch(()=>"");throw new yn(l.status,c)}return l.json()}async get(n,r){const s=r?`${n}?${r}`:n;return this.fetch(s)}async post(n,r){const s={method:"POST",...r!==void 0?{body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}:{}};return this.fetch(n,s)}async delete(n){return this.fetch(n,{method:"DELETE"})}}const $t="/admin/api/debug",Ct={tracing:!1,process:!1,system:!1,http:!1,db:!1,redis:!1,queues:!1,cache:!1,app:!1,log:!1,emails:!1,dashboard:!1,customPanes:[]};function wn(e){return{tracing:e.features?.tracing??!1,process:e.features?.process??!1,system:e.features?.system??!1,http:e.features?.http??!1,db:e.features?.db??!1,redis:e.features?.redis??!1,queues:e.features?.queues??!1,cache:e.features?.cache??!1,app:e.features?.app??!1,log:e.features?.log??!1,emails:e.features?.emails??!1,dashboard:e.features?.dashboard??!1,customPanes:e.customPanes??[]}}async function Nn(e,n=$t){const r=`${n.replace(/\/+$/,"")}/config`;return e.fetch(r)}async function xn(e){const{baseUrl:n="",debugEndpoint:r=$t,authToken:s}=e,i=new Ee({baseUrl:n,authToken:s});try{const l=await Nn(i,r);return wn(l)}catch{return Ct}}function $n(e={}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e,[i,l]=x(Ct),[c,d]=x(!0),[o,a]=x(null),h=O(!1);return F(()=>{if(h.current)return;h.current=!0;let u=!1;return(async()=>{try{const g=await xn({baseUrl:n,debugEndpoint:r,authToken:s});u||(l(g),d(!1))}catch(g){u||(a(g instanceof Error?g:new Error(String(g))),d(!1))}})(),()=>{u=!0}},[n,r,s]),{features:i,isLoading:c,error:o}}const ge="ss-dash-theme",Ae="ss-theme-change";function Me(){if(typeof window>"u")return"light";const e=localStorage.getItem(ge);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Cn(e){typeof window>"u"||(localStorage.setItem(ge,e),window.dispatchEvent(new CustomEvent(Ae,{detail:e})))}function kn(){const n=Me()==="dark"?"light":"dark";return Cn(n),n}function Sn(e){if(typeof window>"u")return()=>{};const n=l=>{const c=l.detail;(c==="dark"||c==="light")&&e(c)},r=l=>{if(l.key===ge){const c=l.newValue;e(c==="dark"||c==="light"?c:Me())}},s=window.matchMedia("(prefers-color-scheme: dark)"),i=l=>{localStorage.getItem(ge)||e(l.matches?"dark":"light")};return window.addEventListener(Ae,n),window.addEventListener("storage",r),s.addEventListener("change",i),()=>{window.removeEventListener(Ae,n),window.removeEventListener("storage",r),s.removeEventListener("change",i)}}function Tn(){const[e,n]=x(()=>Me());F(()=>Sn(i=>{n(i)}),[]);const r=k(()=>{const s=kn();return n(s),s},[]);return{theme:e,toggleTheme:r}}function Ln({theme:e,onToggle:n,className:r="",classPrefix:s="ss-dash"}){const i=e==="dark";return t("button",{type:"button",className:`${s==="ss-dbg"?"ss-dbg-theme-toggle":"ss-dash-theme-btn"} ${r}`,onClick:n,title:i?"Switch to light theme":"Switch to dark theme","aria-label":i?"Switch to light theme":"Switch to dark theme",children:i?t("svg",{width:"16",height:"16",viewBox:E.sun.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E.sun.elements.join("")}}):t("svg",{width:"16",height:"16",viewBox:E.moon.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E.moon.elements.join("")}})})}const En=B(()=>Promise.resolve().then(()=>tr)),An=B(()=>Promise.resolve().then(()=>nr)),Mn=B(()=>Promise.resolve().then(()=>rr)),Pn=B(()=>Promise.resolve().then(()=>sr)),On=B(()=>Promise.resolve().then(()=>ar)),In=B(()=>Promise.resolve().then(()=>hr)),Dn=B(()=>Promise.resolve().then(()=>fr)),Rn=B(()=>Promise.resolve().then(()=>br)),Bn=B(()=>Promise.resolve().then(()=>kr)),jn=B(()=>Promise.resolve().then(()=>Fr)),Fn=B(()=>Promise.resolve().then(()=>Hr));function Hn(e){const{defaultOpen:n=!1,dashboardPath:r,isOpen:s,onOpenChange:i,isLive:l=!1,...c}=e,[d,o]=x(n),a=s!==void 0?s:d,h=v=>{i?i(v):o(v)},[u,f]=x("queries"),{features:g}=$n(c),{theme:p,toggleTheme:_}=Tn(),b=g.customPanes||[];F(()=>{const v=w=>{w.key==="Escape"&&a&&h(!1)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a]);const y=S(()=>[{id:"queries",label:"Queries",visible:!0},{id:"events",label:"Events",visible:!0},{id:"emails",label:"Emails",visible:!0},{id:"routes",label:"Routes",visible:!0},{id:"logs",label:"Logs",visible:!0},{id:"timeline",label:"Requests",visible:g.tracing},{id:"cache",label:"Cache",visible:g.cache},{id:"jobs",label:"Jobs",visible:g.queues},{id:"config",label:"Config",visible:!0},{id:"internals",label:"Internals",visible:!0}],[g]),m=S(()=>y.filter(v=>v.visible),[y]);F(()=>{const v=[...m.map(w=>w.id),...b.map(w=>w.id)];!v.includes(u)&&v.length>0&&f(v[0])},[m,b,u]);const N=k(()=>{h(!a)},[a]),C=k(()=>{const v={options:c},w=b.find(M=>M.id===u);if(w)return t(ee,{fallback:t("div",{className:"ss-dbg-empty",children:"Loading..."}),children:t(Fn,{pane:w,options:c})});const A={queries:t(En,{...v}),events:t(An,{...v}),emails:t(Mn,{...v}),routes:t(Pn,{...v,currentPath:typeof window<"u"?window.location.pathname:""}),logs:t(On,{...v}),timeline:t(In,{...v}),cache:t(Dn,{...v,dashboardPath:r}),jobs:t(Rn,{...v,dashboardPath:r}),config:t(Bn,{...v,dashboardPath:r}),internals:t(jn,{...v})};return t(ee,{fallback:t("div",{className:"ss-dbg-empty",children:"Loading..."}),children:A[u]||t("div",{className:"ss-dbg-empty",children:"Unknown tab"})})},[u,c,b]);return t(R,{children:[s===void 0&&t("button",{type:"button",className:`ss-dbg-btn ${a?"ss-dbg-active":""}`,onClick:N,title:"Toggle debug panel",id:"ss-dbg-wrench",children:t("svg",{width:"14",height:"14",viewBox:E.wrench.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E.wrench.elements.join("")}})}),t("div",{className:`ss-dbg-panel ${a?"ss-dbg-open":""}`,"data-ss-theme":p,id:"ss-dbg-panel",children:[t("div",{className:"ss-dbg-tabs",children:[t("div",{className:"ss-dbg-tabs-scroll",children:[m.map(v=>t("button",{type:"button",className:`ss-dbg-tab ${u===v.id?"ss-dbg-active":""}`,onClick:()=>f(v.id),children:[E[v.id]?t("svg",{className:"ss-dbg-tab-icon",viewBox:E[v.id].viewBox,dangerouslySetInnerHTML:{__html:E[v.id].elements.join("")}}):null,v.label]},v.id)),b.map(v=>t("button",{type:"button",className:`ss-dbg-tab ${u===v.id?"ss-dbg-active":""}`,onClick:()=>f(v.id),children:v.label},v.id))]}),t("div",{className:"ss-dbg-tabs-right",children:[t("span",{className:`ss-dbg-conn-mode ${l?"ss-dbg-conn-live":"ss-dbg-conn-polling"}`,title:l?"Connected via Transmit (SSE) — real-time updates":"Polling every 3s",children:l?"live":"polling"}),t(Ln,{theme:p,onToggle:_,classPrefix:"ss-dbg"}),r&&t("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"ss-dbg-dashboard-link",title:"Open dashboard",children:t("svg",{width:"14",height:"14",viewBox:E["external-link"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E["external-link"].elements.join("")}})}),t("button",{type:"button",className:"ss-dbg-close",onClick:()=>h(!1),title:"Close panel",children:"×"})]})]}),t("div",{className:"ss-dbg-content",children:a&&C()})]})]})}window.__ssDebugPanel={mount(e,n,r){Ze(t(Hn,{debugEndpoint:n.debugEndpoint,authToken:n.authToken,dashboardPath:n.dashboardPath||void 0,isOpen:!0,isLive:r}),e)},unmount(e){Ze(null,e)}};const Un=3e3,zn=100,Vn=500;function qn(e){if(!e&&e!==0)return"-";const n=Math.floor(e),r=Math.floor(n/86400),s=Math.floor(n%86400/3600),i=Math.floor(n%3600/60);return r>0?`${r}d ${s}h`:s>0?`${s}h ${i}m`:i>0?`${i}m ${n%60}s`:`${n}s`}function H(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e>=1?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`}function kt(e){return/([+-]\d{2}:?\d{2}|Z)\s*$/.test(e)?e:e+"Z"}function q(e){if(!e)return"-";const n=typeof e=="string"?new Date(kt(e)):new Date(e);return Number.isNaN(n.getTime())?"-":n.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+String(n.getMilliseconds()).padStart(3,"0")}function j(e){if(!e)return"-";const n=typeof e=="string"?new Date(kt(e)).getTime():e,r=Math.floor((Date.now()-n)/1e3);return r<0?"just now":r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}function G(e){return e>Vn?"very-slow":e>zn?"slow":"normal"}function _e(e,n=100){if(e===null)return"null";if(e===void 0)return"-";if(typeof e=="string")return'"'+(e.length>40?e.slice(0,40)+"...":e)+'"';if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const s="["+e.slice(0,3).map(i=>_e(i,30)).join(", ")+(e.length>3?", ..."+e.length+" items":"")+"]";return s.length>n?"["+e.length+" items]":s}if(typeof e=="object"){const r=Object.keys(e);if(r.length===0)return"{}";const s=[];for(let l=0;l<Math.min(r.length,4);l++)s.push(r[l]+": "+_e(e[r[l]],30));const i="{ "+s.join(", ")+(r.length>4?", ...+"+(r.length-4):"")+" }";return i.length>n?"{ "+r.slice(0,6).join(", ")+(r.length>6?", ...":"")+" }":i}return String(e)}function Wn(e){return e<0?"no expiry":e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h`:`${Math.floor(e/86400)}d`}function Jn(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Kn(e,n){if(!n)return e;const r=n.toLowerCase();return e.filter(s=>s.sql.toLowerCase().includes(r)||s.model&&s.model.toLowerCase().includes(r)||s.method.toLowerCase().includes(r))}function Qn(e){const n={};for(const r of e)n[r.sql]=(n[r.sql]||0)+1;return n}function Gn(e,n){const r=e.filter(l=>l.duration>100).length,s=Object.values(n).filter(l=>l>1).length,i=e.length>0?e.reduce((l,c)=>l+c.duration,0)/e.length:0;return{slowCount:r,dupCount:s,avgDuration:i,totalCount:e.length}}const Yn={queries:"/queries",events:"/events",emails:"/emails",routes:"/routes",logs:"/logs",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config",internals:"/diagnostics"};function Xn(e){return Yn[e]||`/${e}`}class Zn{client;endpoint;refreshInterval;callbacks;timer=null;currentTab=null;fetchOnceCache={};abortController=null;constructor(n){this.client=new Ee({baseUrl:n.baseUrl,authToken:n.authToken}),this.endpoint=n.endpoint??"/admin/api/debug",this.refreshInterval=n.refreshInterval??Un,this.callbacks={onData:n.onData,onLoading:n.onLoading,onError:n.onError,onUnauthorized:n.onUnauthorized}}start(n){this.stop(),this.currentTab=n,this.callbacks.onLoading(!0),this.callbacks.onError(null),this.fetchData(),this.timer=setInterval(()=>this.fetchData(),this.refreshInterval)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null),this.abortController?.abort(),this.abortController=null}switchTab(n){this.start(n)}refresh(){this.currentTab&&this.fetchData()}async fetchCustomPane(n,r=!1){if(r&&this.fetchOnceCache[n]!==void 0){this.callbacks.onData(this.fetchOnceCache[n]),this.callbacks.onLoading(!1);return}this.callbacks.onLoading(!0);try{const s=await this.client.fetch(n);this.callbacks.onData(s),this.callbacks.onError(null),r&&(this.fetchOnceCache[n]=s)}catch(s){if(s instanceof pe){this.callbacks.onUnauthorized(s);return}this.callbacks.onError(s instanceof Error?s:new Error(String(s)))}finally{this.callbacks.onLoading(!1)}}cacheForTab(n,r){this.fetchOnceCache[n]=r}clearCache(){this.fetchOnceCache={}}async fetchData(){const n=this.currentTab;if(!n)return;if(this.fetchOnceCache[n]!==void 0){this.callbacks.onData(this.fetchOnceCache[n]),this.callbacks.onLoading(!1);return}this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const s=`${this.endpoint}${Xn(n)}`,i=await this.client.fetch(s,{signal:r.signal});if(r.signal.aborted)return;this.callbacks.onData(i),this.callbacks.onError(null),this.callbacks.onLoading(!1)}catch(s){if(s instanceof DOMException&&s.name==="AbortError"||r.signal.aborted)return;if(s instanceof pe){this.callbacks.onError(s),this.callbacks.onLoading(!1),this.stop(),this.callbacks.onUnauthorized(s);return}this.callbacks.onError(s instanceof Error?s:new Error(String(s))),this.callbacks.onLoading(!1)}}}function U(e,n={}){const{baseUrl:r="",debugEndpoint:s="/admin/api/debug",authToken:i}=n,[l,c]=x(null),[d,o]=x(!0),[a,h]=x(null),u=O(null);u.current||(u.current=new Zn({baseUrl:r,endpoint:s,authToken:i,onData:_=>c(_),onLoading:_=>o(_),onError:_=>h(_),onUnauthorized:_=>h(_)})),F(()=>{const _=u.current;return _.start(e),()=>_.stop()},[e]);const f=k(()=>{u.current?.refresh()},[]),g=k(()=>{c(null)},[]),p=k((_,b)=>{u.current?.cacheForTab(_,b)},[]);return{data:l,isLoading:d,error:a,refresh:f,clearData:g,cacheForTab:p}}const er="ss-col-resize",St="ss-resizing";function Tt(e){const n=Array.from(e.querySelectorAll("thead th"));if(n.length===0)return()=>{};const r=[];let s=!1;function i(){if(!s){s=!0;for(const l of n)l.style.width=l.offsetWidth+"px";e.style.tableLayout="fixed"}}for(const l of n){let c=function(o){o.preventDefault(),o.stopPropagation(),i();const a=o.clientX,h=l.offsetWidth;d.classList.add(St),d.setPointerCapture(o.pointerId);function u(g){const p=g.clientX-a,_=Math.max(30,h+p);l.style.width=_+"px"}function f(){d.classList.remove(St),d.removeEventListener("pointermove",u),d.removeEventListener("pointerup",f)}d.addEventListener("pointermove",u),d.addEventListener("pointerup",f)};if(!l.textContent?.trim())continue;const d=document.createElement("div");d.className=er,l.appendChild(d),d.addEventListener("pointerdown",c),r.push(()=>{d.removeEventListener("pointerdown",c),d.remove()})}return()=>{for(const l of r)l()}}function J(e=[]){const n=O(null),r=O(null);return F(()=>(n.current&&(r.current?.(),r.current=Tt(n.current)),()=>{r.current?.(),r.current=null}),e),k(i=>{r.current?.(),r.current=null,n.current=i,i&&(r.current=Tt(i))},[])}function Lt({options:e}){const{data:n,isLoading:r,error:s}=U("queries",e),[i,l]=x(""),[c,d]=x(null),o=S(()=>n?.queries||[],[n]),a=S(()=>Kn(o,i),[o,i]),h=S(()=>Qn(o),[o]),u=S(()=>Gn(o,h),[o,h]),f=k(p=>{d(_=>_===p?null:p)},[]),g=J([a]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading queries..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter queries...",value:i,onChange:p=>l(p.target.value)}),t("span",{className:"ss-dbg-summary",children:[a.length," queries",u.slowCount>0&&` | ${u.slowCount} slow`,u.dupCount>0&&` | ${u.dupCount} dup`,a.length>0&&` | avg ${H(u.avgDuration)}`]})]}),a.length===0?t("div",{className:"ss-dbg-empty",children:"No queries captured"}):t("table",{ref:g,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"70px"}}),t("col",{style:{width:"100px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"SQL"}),t("th",{children:"Duration"}),t("th",{children:"Method"}),t("th",{children:"Model"}),t("th",{children:"Time"})]})}),t("tbody",{children:a.map(p=>t("tr",{children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:p.id}),t("td",{children:[t("span",{className:`ss-dbg-sql ${c===p.id?"ss-dbg-expanded":""}`,onClick:()=>f(p.id),role:"button",tabIndex:0,onKeyDown:_=>_.key==="Enter"&&f(p.id),children:p.sql}),h[p.sql]>1&&t("span",{className:"ss-dbg-dup",children:[" x",h[p.sql]]}),p.inTransaction&&t("span",{className:"ss-dbg-dup",children:" TXN"})]}),t("td",{className:`ss-dbg-duration ${G(p.duration)==="very-slow"?"ss-dbg-very-slow":G(p.duration)==="slow"?"ss-dbg-slow":""}`,children:H(p.duration)}),t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${p.method.toLowerCase()}`,children:p.method})}),t("td",{className:"ss-dbg-c-muted",children:p.model||"-"}),t("td",{className:"ss-dbg-event-time",title:q(p.timestamp),children:j(p.timestamp)})]},p.id))})]})]})}const tr=Object.freeze(Object.defineProperty({__proto__:null,QueriesTab:Lt,default:Lt},Symbol.toStringTag,{value:"Module"}));function te({data:e,maxPreviewLength:n=100,className:r="",classPrefix:s="ss-dash",defaultExpanded:i=!1}){const[l,c]=x(i),d=S(()=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},[e]),o=S(()=>typeof d=="object"&&d!==null?_e(d,n):String(d??"-"),[d,n]),a=S(()=>typeof d=="object"&&d!==null?JSON.stringify(d,null,2):String(d),[d]),h=k(()=>{c(f=>!f)},[]),u=k(async()=>{try{await navigator.clipboard.writeText(a)}catch{}},[a]);return!e&&e!==0&&e!==!1?t("span",{className:`ss-dim ${s}-c-dim`,children:"-"}):t("div",{className:`${s}-data-cell ${r}`,children:[!l&&t("span",{className:`${s}-data-preview`,onClick:h,role:"button",tabIndex:0,onKeyDown:f=>f.key==="Enter"&&h(),children:o}),l&&t("div",{className:`${s}-data-full`,onClick:h,children:[t("button",{className:`${s}-copy-btn`,onClick:f=>{f.stopPropagation(),u()},title:"Copy to clipboard",type:"button",children:"Copy"}),t("pre",{children:a})]})]})}function Et({options:e}){const{data:n,isLoading:r,error:s}=U("events",e),[i,l]=x(""),c=S(()=>{const o=n?.events||[];if(!i)return o;const a=i.toLowerCase();return o.filter(h=>(h.event||"").toLowerCase().includes(a)||(h.data||"").toLowerCase().includes(a))},[n,i]),d=J([c]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading events..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter events...",value:i,onChange:o=>l(o.target.value)}),t("span",{className:"ss-dbg-summary",children:[c.length," events"]})]}),c.length===0?t("div",{className:"ss-dbg-empty",children:"No events captured"}):t("table",{ref:d,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"20%"}}),t("col",{}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"Event"}),t("th",{children:"Data"}),t("th",{children:"Time"})]})}),t("tbody",{children:c.map(o=>{const a=o.timestamp||o.created_at||o.createdAt;return t("tr",{children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:o.id}),t("td",{className:"ss-dbg-event-name",children:o.event}),t("td",{className:"ss-dbg-event-data",children:t(te,{data:o.data,maxPreviewLength:80,classPrefix:"ss-dbg"})}),t("td",{className:"ss-dbg-event-time",title:q(a),children:j(a)})]},o.id)})})]})]})}const nr=Object.freeze(Object.defineProperty({__proto__:null,EventsTab:Et,default:Et},Symbol.toStringTag,{value:"Module"}));function At({options:e}){const{data:n,isLoading:r,error:s}=U("emails",e),[i,l]=x(""),[c,d]=x(null),[o,a]=x(null),[h,u]=x(!1),f=S(()=>{const m=n?.emails||[];if(!i)return m;const N=i.toLowerCase();return m.filter(C=>(C.subject||"").toLowerCase().includes(N)||(C.to||"").toLowerCase().includes(N)||(C.from||"").toLowerCase().includes(N)||(C.mailer||"").toLowerCase().includes(N))},[n,i]),g=S(()=>f.find(m=>m.id===c),[f,c]),p=k(async m=>{if(d(m.id),a(m.html||null),!m.html&&m.id){u(!0);try{const N=e?.debugEndpoint||"/admin/api/debug",C={};e?.authToken&&(C.Authorization=`Bearer ${e.authToken}`);const v=await fetch(`${N}/emails/${m.id}/preview`,{headers:C,credentials:e?.authToken?"omit":"include"});v.ok&&a(await v.text())}catch{}finally{u(!1)}}},[e]),_=k(()=>{d(null),a(null),u(!1)},[]),b={sent:"ss-dbg-email-status-sent",sending:"ss-dbg-email-status-sending",queueing:"ss-dbg-email-status-queued",queued:"ss-dbg-email-status-queued",failed:"ss-dbg-email-status-failed"},y=J([f]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading emails..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):g?t("div",{className:"ss-dbg-email-preview",children:[t("div",{className:"ss-dbg-email-preview-header",children:[t("div",{className:"ss-dbg-email-preview-meta",children:[t("div",{children:[t("strong",{children:"Subject:"})," ",g.subject]}),t("div",{children:[t("strong",{children:"From:"})," ",g.from]}),t("div",{children:[t("strong",{children:"To:"})," ",g.to]}),g.cc&&t("div",{children:[t("strong",{children:"CC:"})," ",g.cc]})]}),t("button",{className:"ss-dbg-btn-clear",onClick:_,type:"button",children:"×"})]}),h?t("div",{className:"ss-dbg-empty",children:"Loading preview..."}):o?t("iframe",{className:"ss-dbg-email-iframe",srcDoc:o,title:"Email preview",sandbox:""}):t("div",{style:{padding:"12px",whiteSpace:"pre-wrap"},children:g.text||"No content"})]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter emails...",value:i,onChange:m=>l(m.target.value)}),t("span",{className:"ss-dbg-summary",children:[f.length," emails"]})]}),f.length===0?t("div",{className:"ss-dbg-empty",children:"No emails captured"}):t("table",{ref:y,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"140px"}}),t("col",{style:{width:"140px"}}),t("col",{}),t("col",{style:{width:"70px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"40px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"From"}),t("th",{children:"To"}),t("th",{children:"Subject"}),t("th",{children:"Status"}),t("th",{children:"Mailer"}),t("th",{title:"Attachments",children:"📎"}),t("th",{children:"Time"})]})}),t("tbody",{children:f.map(m=>t("tr",{className:"ss-dbg-email-row",onClick:()=>p(m),children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:m.id}),t("td",{className:"ss-dbg-c-secondary",title:m.from,children:m.from}),t("td",{className:"ss-dbg-c-secondary",title:m.to,children:m.to}),t("td",{className:"ss-dbg-c-sql",children:m.subject}),t("td",{children:t("span",{className:`ss-dbg-email-status ${b[m.status]||""}`,children:m.status})}),t("td",{className:"ss-dbg-c-muted",children:m.mailer}),t("td",{className:"ss-dbg-c-dim",style:{textAlign:"center"},children:m.attachmentCount>0?m.attachmentCount:"-"}),t("td",{className:"ss-dbg-event-time",title:q(m.timestamp||m.created_at||m.createdAt),children:j(m.timestamp||m.created_at||m.createdAt)})]},m.id))})]})]})}const rr=Object.freeze(Object.defineProperty({__proto__:null,EmailsTab:At,default:At},Symbol.toStringTag,{value:"Module"}));function Mt({options:e,currentPath:n}){const{data:r,isLoading:s,error:i}=U("routes",e),[l,c]=x(""),d=S(()=>{const a=r?.routes||[];if(!l)return a;const h=l.toLowerCase();return a.filter(u=>u.pattern.toLowerCase().includes(h)||u.handler.toLowerCase().includes(h)||u.method.toLowerCase().includes(h)||u.name&&u.name.toLowerCase().includes(h))},[r,l]),o=J([d]);return s&&!r?t("div",{className:"ss-dbg-empty",children:"Loading routes..."}):i?t("div",{className:"ss-dbg-empty",children:["Error: ",i.message]}):t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter routes...",value:l,onChange:a=>c(a.target.value)}),t("span",{className:"ss-dbg-summary",children:[d.length," routes"]})]}),d.length===0?t("div",{className:"ss-dbg-empty",children:"No routes found"}):t("table",{ref:o,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"70px"}}),t("col",{style:{width:"25%"}}),t("col",{style:{width:"15%"}}),t("col",{}),t("col",{style:{width:"20%"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"Method"}),t("th",{children:"Pattern"}),t("th",{children:"Name"}),t("th",{children:"Handler"}),t("th",{children:"Middleware"})]})}),t("tbody",{children:d.map((a,h)=>{const u=n&&(a.pattern===n||new RegExp("^"+a.pattern.replace(/:[^/]+/g,"[^/]+")+"$").test(n));return t("tr",{className:u?"ss-dbg-current-route":"",children:[t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${a.method.toLowerCase()}`,children:a.method})}),t("td",{className:"ss-dbg-c-text",children:a.pattern}),t("td",{className:"ss-dbg-c-muted",children:a.name||"-"}),t("td",{className:"ss-dbg-c-sql",children:a.handler}),t("td",{className:"ss-dbg-c-dim",style:{fontSize:"10px"},children:a.middleware.length>0?a.middleware.join(", "):"-"})]},`${a.method}-${a.pattern}-${h}`)})})]})]})}const sr=Object.freeze(Object.defineProperty({__proto__:null,RoutesTab:Mt,default:Mt},Symbol.toStringTag,{value:"Module"})),lr=["all","error","warn","info","debug"];function Pe(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function Oe(e){return e.msg||e.message||JSON.stringify(e)}function Pt(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Ie(e){const n=e.data||{};return e.requestId||e.request_id||e["x-request-id"]||n.requestId||n.request_id||n["x-request-id"]||""}function Ot(e,n="ss-dbg-log-level"){switch(e){case"error":case"fatal":return`${n}-error`;case"warn":return`${n}-warn`;case"info":return`${n}-info`;case"debug":return`${n}-debug`;case"trace":return`${n}-trace`;default:return`${n}-info`}}function ir(e,n){return n==="all"?e:e.filter(r=>{const s=Pe(r);return n==="error"?s==="error"||s==="fatal":s===n})}const It=new Set(["level","time","pid","hostname","msg","message","v","name","levelName","level_name","timestamp","createdAt","created_at","requestId","request_id","x-request-id","id","data"]);function Dt(e){if(e.data){let r=null;if(typeof e.data=="string")try{r=JSON.parse(e.data)}catch{}else typeof e.data=="object"&&!Array.isArray(e.data)&&(r=e.data);if(r){const s={};for(const[i,l]of Object.entries(r))It.has(i)||(s[i]=l);if(Object.keys(s).length>0)return s}}const n={};for(const[r,s]of Object.entries(e))It.has(r)||(n[r]=s);return Object.keys(n).length>0?n:null}function Rt({options:e}){const{data:n,isLoading:r,error:s}=U("logs",e),[i,l]=x("all"),[c,d]=x(""),[o,a]=x(""),[h,u]=x(null),f=S(()=>{let p=Array.isArray(n)?n:n?.logs||n?.entries||[];if(p=ir(p,i),o){const _=o.toLowerCase();p=p.filter(b=>Ie(b).toLowerCase().includes(_))}if(c){const _=c.toLowerCase();p=p.filter(b=>Oe(b).toLowerCase().includes(_))}return p},[n,i,c,o]),g=k(p=>{a(_=>_===p?"":p)},[]);return r&&!n?t("div",{className:"ss-dbg-empty",children:"Loading logs..."}):s?t("div",{className:"ss-dbg-empty",children:["Error: ",s.message]}):t("div",{children:[t("div",{className:"ss-dbg-log-filters",children:[lr.map(p=>t("button",{type:"button",className:`ss-dbg-log-filter ${i===p?"ss-dbg-active":""}`,onClick:()=>l(p),children:p},p)),o&&t("button",{type:"button",className:"ss-dbg-log-filter ss-dbg-active",onClick:()=>a(""),children:["req: ",o.slice(0,8)," x"]}),t("span",{className:"ss-dbg-summary",style:{marginLeft:"auto"},children:[f.length," entries"]})]}),t("div",{className:"ss-dbg-search-bar",children:t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter log messages...",value:c,onChange:p=>d(p.target.value)})}),t("div",{style:{overflow:"auto",flex:1},children:f.length===0?t("div",{className:"ss-dbg-empty",children:"No log entries"}):f.slice(0,200).map((p,_)=>{const b=Pe(p),y=Oe(p),m=Pt(p),N=Ie(p),C=Dt(p);return t(xt.Fragment,{children:[t("div",{className:`ss-dbg-log-entry${C?" ss-dbg-log-entry-expandable":""}`,onClick:()=>C&&u(h===_?null:_),children:[t("span",{className:`ss-dbg-log-level ${Ot(b)}`,children:b.toUpperCase()}),t("span",{className:"ss-dbg-log-time",title:m?q(m):"",children:m?j(m):"-"}),N?t("span",{className:"ss-dbg-log-reqid",onClick:v=>{v.stopPropagation(),g(N)},role:"button",tabIndex:0,title:N,onKeyDown:v=>{v.key==="Enter"&&(v.stopPropagation(),g(N))},children:N.slice(0,8)}):t("span",{className:"ss-dbg-log-reqid-empty",children:"-"}),C?t("span",{className:`ss-dbg-log-expand-icon${h===_?" ss-dbg-log-expand-icon-open":""}`,children:"▶"}):t("span",{style:{width:14}}),t("span",{className:"ss-dbg-log-msg",children:y})]}),h===_&&C&&t("div",{className:"ss-dbg-log-detail",children:t(te,{data:C,classPrefix:"ss-dbg",defaultExpanded:!0})})]},_)})})]})}const ar=Object.freeze(Object.defineProperty({__proto__:null,LogsTab:Rt,default:Rt},Symbol.toStringTag,{value:"Module"}));function or(e){const{container:n,handle:r,topPane:s,bottomPane:i,storageKey:l,minHeight:c=60}=e;if(l){const o=localStorage.getItem(l);if(o){const a=parseFloat(o);a>0&&a<1&&(s.style.flex=`${a}`,i.style.flex=`${1-a}`)}}function d(o){o.preventDefault(),r.setPointerCapture(o.pointerId);const h=n.getBoundingClientRect().height,u=o.clientY,f=s.getBoundingClientRect().height;function g(_){const b=_.clientY-u;let y=f+b;const m=h-c-r.offsetHeight;y=Math.max(c,Math.min(y,m));const N=y/(h-r.offsetHeight);s.style.flex=`${N}`,i.style.flex=`${1-N}`}function p(){if(r.removeEventListener("pointermove",g),r.removeEventListener("pointerup",p),l){const _=n.getBoundingClientRect().height-r.offsetHeight;if(_>0){const b=s.getBoundingClientRect().height/_;localStorage.setItem(l,String(b))}}}r.addEventListener("pointermove",g),r.addEventListener("pointerup",p)}return r.addEventListener("pointerdown",d),()=>{r.removeEventListener("pointerdown",d)}}function Bt(e="",n){const r=O(null);return k(()=>(r.current||(r.current=new Ee({baseUrl:e,authToken:n})),r.current),[e,n])}function cr({logs:e,classPrefix:n="ss-dash"}){const[r,s]=x(null);return e.length===0?null:t("div",{children:[t("div",{className:`${n}-related-logs-title`,children:["Related Logs",t("span",{className:`${n}-related-logs-count`,children:["(",e.length,")"]})]}),t("div",{className:`${n}-log-entries`,style:{overflow:"auto"},children:e.map((i,l)=>{const c=Pe(i),d=Oe(i),o=Ie(i),a=Pt(i),h=Dt(i);return t(xt.Fragment,{children:[t("div",{className:`${n}-log-entry${h?` ${n}-log-entry-expandable`:""}`,onClick:()=>h&&s(r===l?null:l),children:[t("span",{className:`${n}-log-level ${Ot(c,`${n}-log-level`)}`,children:c.toUpperCase()}),t("span",{className:`${n}-log-time`,title:a?q(a):"",children:a?j(a):"-"}),o?t("span",{className:`${n}-log-reqid`,title:o,children:o.slice(0,8)}):t("span",{className:`${n}-log-reqid-empty`,children:"--"}),h?t("span",{className:`${n}-log-expand-icon${r===l?` ${n}-log-expand-icon-open`:""}`,children:"▶"}):t("span",{style:{width:14}}),t("span",{className:`${n}-log-msg`,children:d})]}),r===l&&h&&t("div",{className:`${n}-log-detail`,children:t(te,{data:h,classPrefix:n,defaultExpanded:!0})})]},i.id||l)})})]})}function dr({children:e,classPrefix:n="ss-dbg",storageKey:r}){const s=O(null),i=O(null),l=O(null),c=O(null);return F(()=>{if(s.current&&i.current&&l.current&&c.current)return or({container:s.current,handle:i.current,topPane:l.current,bottomPane:c.current,storageKey:r})},[r]),t("div",{ref:s,className:`${n}-split-container`,children:[t("div",{ref:l,className:`${n}-split-top`,children:e[0]}),t("div",{ref:i,className:`${n}-split-handle`}),t("div",{ref:c,className:`${n}-split-bottom`,children:e[1]})]})}const jt={request:"#1e3a5f",middleware:"rgba(30, 58, 95, 0.7)",db:"#6d28d9",view:"#0e7490",mail:"#059669",event:"#b45309",custom:"#525252"},ur=[{label:"Request",color:"#1e3a5f"},{label:"Middleware",color:"rgba(30, 58, 95, 0.7)"},{label:"Database",color:"#6d28d9"},{label:"View",color:"#0e7490"},{label:"Mail",color:"#059669"},{label:"Event",color:"#b45309"}];function Ft({options:e}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e||{},{data:i,isLoading:l,error:c}=U("timeline",e),[d,o]=x(""),[a,h]=x(null),[u,f]=x(null),[g,p]=x(!1),[_,b]=x(null),y=S(()=>{const w=i?.traces||[];if(!d)return w;const A=d.toLowerCase();return w.filter(M=>M.url.toLowerCase().includes(A)||M.method.toLowerCase().includes(A)||String(M.statusCode).includes(A))},[i,d]),m=Bt(n,s);F(()=>{if(a===null){f(null),b(null);return}let w=!1;return p(!0),b(null),m().get(`${r}/traces/${a}`).then(M=>{w||(f(M),p(!1))}).catch(M=>{w||(b(M instanceof Error?M.message:"Failed to load trace"),p(!1))}),()=>{w=!0}},[a,r,m]);const N=k(w=>{h(A=>A===w?null:w)},[]),C=k(w=>w>=500?"ss-dbg-status-5xx":w>=400?"ss-dbg-status-4xx":w>=300?"ss-dbg-status-3xx":"ss-dbg-status-2xx",[]),v=J([y]);if(l&&!i)return t("div",{className:"ss-dbg-empty",children:"Loading traces..."});if(c)return t("div",{className:"ss-dbg-empty",children:["Error: ",c.message]});if(a!==null){if(g)return t("div",{className:"ss-dbg-empty",children:"Loading trace detail..."});if(_)return t("div",{children:[t("div",{className:"ss-dbg-tl-detail-header",children:t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>h(null),children:"← Back"})}),t("div",{className:"ss-dbg-empty",children:["Error: ",_]})]});if(!u)return t("div",{className:"ss-dbg-empty",children:"Loading trace detail..."});const w=u.spans||[],A=u.warnings||[],M=u.logs||[],D=M.length>0,W=t("div",{children:[t("div",{className:"ss-dbg-tl-legend",children:ur.map(P=>t("div",{className:"ss-dbg-tl-legend-item",children:[t("div",{className:"ss-dbg-tl-legend-dot",style:{background:P.color}}),t("span",{children:P.label})]},P.label))}),t("div",{style:{padding:"8px 12px",overflow:"auto"},children:w.length===0?t("div",{className:"ss-dbg-empty",children:"No spans captured for this request"}):w.map(P=>{const ve=u.totalDuration||1,Ur=P.startOffset/ve*100,zr=Math.max(P.duration/ve*100,.5);return t("div",{className:"ss-dbg-tl-row",children:[t("div",{className:"ss-dbg-tl-label",title:P.label,children:P.label}),t("div",{className:"ss-dbg-tl-track",children:t("div",{className:`ss-dbg-tl-bar ss-dbg-tl-bar-${P.category}`,style:{left:`${Ur}%`,width:`${zr}%`,background:jt[P.category]||jt.custom},title:`${P.label}: ${H(P.duration)}`})}),t("span",{className:"ss-dbg-tl-dur",children:H(P.duration)})]},P.id)})}),A.length>0&&t("div",{className:"ss-dbg-tl-warnings",children:[t("div",{className:"ss-dbg-tl-warnings-title",children:"Warnings"}),A.map((P,ve)=>t("div",{className:"ss-dbg-tl-warning",children:P},ve))]})]});return t("div",{className:"ss-dbg-tl-detail-wrapper",children:[t("div",{className:"ss-dbg-tl-detail-header",children:[t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>h(null),children:"← Back"}),t("span",{className:`ss-dbg-method ss-dbg-method-${u.method.toLowerCase()}`,children:u.method}),t("span",{className:"ss-dbg-tl-detail-url",children:u.url}),t("span",{className:`ss-dbg-status ${C(u.statusCode)}`,children:u.statusCode}),t("span",{className:"ss-dbg-tl-meta",children:[H(u.totalDuration)," · ",u.spanCount," spans"]})]}),D?t(dr,{classPrefix:"ss-dbg",storageKey:"ss-dbg-timeline-split",children:[W,t(cr,{logs:M,classPrefix:"ss-dbg"})]}):W]})}return t("div",{children:[t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter traces...",value:d,onChange:w=>o(w.target.value)}),t("span",{className:"ss-dbg-summary",children:[y.length," traces"]})]}),y.length===0?t("div",{className:"ss-dbg-empty",children:"No traces captured. Enable tracing in config."}):t("table",{ref:v,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"70px"}}),t("col",{}),t("col",{style:{width:"60px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"50px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"#"}),t("th",{children:"Method"}),t("th",{children:"URL"}),t("th",{children:"Status"}),t("th",{children:"Duration"}),t("th",{children:"Spans"}),t("th",{children:"Time"})]})}),t("tbody",{children:y.map(w=>t("tr",{className:"ss-dbg-email-row",onClick:()=>N(w.id),children:[t("td",{className:"ss-dbg-c-dim",style:{whiteSpace:"nowrap"},children:w.id}),t("td",{children:t("span",{className:`ss-dbg-method ss-dbg-method-${w.method.toLowerCase()}`,children:w.method})}),t("td",{title:w.url,children:w.url}),t("td",{children:t("span",{className:`ss-dbg-status ${C(w.statusCode)}`,children:w.statusCode})}),t("td",{className:`ss-dbg-duration ${G(w.totalDuration)==="very-slow"?"ss-dbg-very-slow":G(w.totalDuration)==="slow"?"ss-dbg-slow":""}`,children:H(w.totalDuration)}),t("td",{className:"ss-dbg-c-muted",style:{textAlign:"center"},children:w.spanCount}),t("td",{className:"ss-dbg-event-time",title:q(w.timestamp),children:j(w.timestamp)})]},w.id))})]})]})}const hr=Object.freeze(Object.defineProperty({__proto__:null,TimelineTab:Ft,default:Ft},Symbol.toStringTag,{value:"Module"}));function De(e,n){const r=S(()=>e?e.replace(/\/+$/,"")+"/api":null,[e]),s=S(()=>r?{...n,debugEndpoint:r}:n,[r,n]);return{dashApiBase:r,resolvedOptions:s}}function Ht({options:e,dashboardPath:n}){const{dashApiBase:r,resolvedOptions:s}=De(n,e),{data:i,isLoading:l,error:c}=U("cache",s),[d,o]=x(""),[a,h]=x(null),[u,f]=x(null),g=S(()=>{const m=i?.keys||[];if(!d)return m;const N=d.toLowerCase();return m.filter(C=>C.key.toLowerCase().includes(N))},[i,d]),p=k(async m=>{if(a===m){h(null),f(null);return}h(m);try{const{baseUrl:N="",authToken:C}=e||{},v=r||e?.debugEndpoint||"/admin/api/debug",w=`${N}${v}/cache/${encodeURIComponent(m)}`,A={Accept:"application/json"};C&&(A.Authorization=`Bearer ${C}`);const D=await(await fetch(w,{headers:A,credentials:C?"omit":"same-origin"})).json();f(D)}catch{f({error:"Failed to fetch key value"})}},[a,e,r]),_=J([g]);if(l&&!i)return t("div",{className:"ss-dbg-empty",children:"Loading cache data..."});if(c)return t("div",{className:"ss-dbg-empty",children:["Error: ",c.message]});if(!i)return t("div",{className:"ss-dbg-empty",children:"Cache inspector not available"});const y=i.stats||i;return t("div",{children:[t("div",{className:"ss-dbg-cache-stats",children:[t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Hit Rate:"}),t("span",{className:"ss-dbg-cache-stat-value",children:[y.hitRate!==null&&y.hitRate!==void 0?y.hitRate.toFixed(1):"0","%"]})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Hits:"}),t("span",{className:"ss-dbg-cache-stat-value",children:y.totalHits??0})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Misses:"}),t("span",{className:"ss-dbg-cache-stat-value",children:y.totalMisses??0})]}),t("div",{className:"ss-dbg-cache-stat",children:[t("span",{className:"ss-dbg-cache-stat-label",children:"Keys:"}),t("span",{className:"ss-dbg-cache-stat-value",children:y.keyCount??"-"})]})]}),t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:"Filter keys...",value:d,onChange:m=>o(m.target.value)}),t("span",{className:"ss-dbg-summary",children:[g.length," keys"]})]}),a&&!!u&&t("div",{className:"ss-dbg-cache-detail",children:[t("strong",{children:a}),t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:()=>h(null),children:["←"," Back"]}),t(te,{data:u,classPrefix:"ss-dbg"})]}),g.length===0?t("div",{className:"ss-dbg-empty",children:"No cache keys found"}):t("table",{ref:_,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"Key"}),t("th",{children:"Type"}),t("th",{children:"TTL"}),t("th",{children:"Size"})]})}),t("tbody",{children:g.map(m=>t("tr",{className:"ss-dbg-email-row",onClick:()=>p(m.key),children:[t("td",{className:"ss-dbg-c-sql",children:m.key}),t("td",{className:"ss-dbg-c-muted",children:m.type}),t("td",{className:"ss-dbg-c-muted",children:m.ttl>0?Wn(m.ttl):"-"}),t("td",{className:"ss-dbg-c-dim",children:m.size>0?Jn(m.size):"-"})]},m.key))})]})]})}const fr=Object.freeze(Object.defineProperty({__proto__:null,CacheTab:Ht,default:Ht},Symbol.toStringTag,{value:"Module"})),pr=["all","active","waiting","delayed","completed","failed"];function gr(e,n="ss-dbg-job-status"){switch(e){case"completed":case"failed":case"active":case"waiting":case"delayed":return`${n}-${e}`;default:return"ss-dbg-badge-muted"}}function _r(e){if(!e)return[];if(Array.isArray(e))return e;const n=e;return n.jobs||n.data||[]}function mr(e){if(!e||Array.isArray(e))return null;const n=e;return n.stats||n.overview||null}function Ut({options:e,dashboardPath:n}){const{dashApiBase:r,resolvedOptions:s}=De(n,e),{data:i,isLoading:l,error:c}=U("jobs",s),[d,o]=x("all"),[a,h]=x(null),u=S(()=>{const _=_r(i);return d==="all"?_:_.filter(b=>b.status===d)},[i,d]),f=k(async _=>{h(_);try{const{baseUrl:b="",authToken:y}=e||{},m=r||e?.debugEndpoint||"/admin/api/debug",N=`${b}${m}/jobs/${_}/retry`,C={Accept:"application/json"};y&&(C.Authorization=`Bearer ${y}`),await fetch(N,{method:"POST",headers:C,credentials:y?"omit":"same-origin"})}catch{}h(null)},[e,r]),g=J([u]);if(!r)return t("div",{className:"ss-dbg-empty",children:"Queue inspector not available (no dashboard configured)"});if(l&&!i)return t("div",{className:"ss-dbg-empty",children:"Loading jobs..."});if(c)return t("div",{className:"ss-dbg-empty",children:["Error: ",c.message]});if(!i)return t("div",{className:"ss-dbg-empty",children:"Queue inspector not available"});const p=mr(i);return t("div",{children:[t("div",{className:"ss-dbg-job-stats-area",children:[t("div",{className:"ss-dbg-job-stats",children:[t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Active:"}),t("span",{className:"ss-dbg-job-stat-value",children:p?.active??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Waiting:"}),t("span",{className:"ss-dbg-job-stat-value",children:p?.waiting??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Delayed:"}),t("span",{className:"ss-dbg-job-stat-value",children:p?.delayed??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Completed:"}),t("span",{className:"ss-dbg-job-stat-value",children:p?.completed??0})]}),t("div",{className:"ss-dbg-job-stat",children:[t("span",{className:"ss-dbg-job-stat-label",children:"Failed:"}),t("span",{className:"ss-dbg-job-stat-value ss-dbg-c-red",children:p?.failed??0})]})]}),t("div",{className:"ss-dbg-log-filters",children:pr.map(_=>t("button",{type:"button",className:`ss-dbg-job-filter ${d===_?"ss-dbg-active":""}`,onClick:()=>o(_),children:_},_))})]}),u.length===0?t("div",{className:"ss-dbg-empty",children:"No jobs found"}):t("table",{ref:g,className:"ss-dbg-table",children:[t("colgroup",{children:[t("col",{style:{width:"50px"}}),t("col",{style:{width:"15%"}}),t("col",{style:{width:"80px"}}),t("col",{}),t("col",{style:{width:"50px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"80px"}}),t("col",{style:{width:"60px"}})]}),t("thead",{children:t("tr",{children:[t("th",{children:"ID"}),t("th",{children:"Name"}),t("th",{children:"Status"}),t("th",{children:"Payload"}),t("th",{children:"Tries"}),t("th",{children:"Duration"}),t("th",{children:"Time"}),t("th",{})]})}),t("tbody",{children:u.map(_=>{const b=_;return t("tr",{children:[t("td",{className:"ss-dbg-c-dim",children:_.id}),t("td",{className:"ss-dbg-c-sql",title:_.name,children:_.name}),t("td",{children:t("span",{className:`ss-dbg-badge ${gr(_.status)}`,children:_.status})}),t("td",{children:t(te,{data:_.payload||_.data,maxPreviewLength:60,classPrefix:"ss-dbg"})}),t("td",{className:"ss-dbg-c-muted",style:{textAlign:"center"},children:_.attempts||b.attemptsMade||0}),t("td",{className:"ss-dbg-duration",children:_.duration!==null?H(_.duration):"-"}),t("td",{className:"ss-dbg-event-time",title:q(_.timestamp||_.createdAt||b.processedAt||b.created_at),children:j(_.timestamp||_.createdAt||b.processedAt||b.created_at)}),t("td",{children:_.status==="failed"&&t("button",{type:"button",className:"ss-dbg-retry-btn",onClick:()=>f(_.id),disabled:a===_.id,children:a===_.id?"...":"Retry"})})]},_.id)})})]})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,JobsTab:Ut,default:Ut},Symbol.toStringTag,{value:"Module"}));function I(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function Re(e,n=""){if(typeof e!="object"||e===null||e===void 0)return[{path:n,value:e}];if(Array.isArray(e)||I(e))return[{path:n,value:e}];const r=[];for(const s of Object.keys(e)){const i=n?`${n}.${s}`:s,l=e[s];typeof l=="object"&&l!==null&&!Array.isArray(l)&&!I(l)?r.push(...Re(l,i)):r.push({path:i,value:l})}return r}function Be(e){return e==null?{text:"null",color:"var(--ss-dim)"}:typeof e=="boolean"?{text:String(e),color:e?"var(--ss-green-fg)":"var(--ss-red-fg)"}:typeof e=="number"?{text:String(e),color:"var(--ss-amber-fg)"}:Array.isArray(e)?{text:`[${e.map(r=>r==null?"null":typeof r=="object"?JSON.stringify(r):String(r)).join(", ")}]`,color:"var(--ss-purple-fg)"}:typeof e=="object"?{text:JSON.stringify(e),color:"var(--ss-dim)"}:{text:String(e)}}function zt(e){if(e==null||typeof e!="object"||Array.isArray(e)||I(e))return 1;let n=0;for(const r of Object.keys(e))n+=zt(e[r]);return n}function vr(e){if(e==null||typeof e!="object"||Array.isArray(e)||I(e))return[];const n=[];for(const r of Object.keys(e)){const s=e[r];s!==null&&typeof s=="object"&&!Array.isArray(s)&&!I(s)&&n.push(r)}return n}function me(e,n,r){n&&navigator.clipboard.writeText(e).then(()=>{const s=n.textContent;n.textContent="✓",n.classList.add(`${r}-copy-row-ok`),setTimeout(()=>{n.textContent=s,n.classList.remove(`${r}-copy-row-ok`)},1200)}).catch(()=>{})}function be({redacted:e,p:n}){const[r,s]=x(!1);return t("span",{className:`${n}-config-redacted`,style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[t("span",{children:r?e.value:e.display}),t("button",{type:"button",className:`${n}-btn`,title:r?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:i=>{i.stopPropagation(),s(l=>!l)},children:r?t("svg",{width:"14",height:"14",viewBox:E["eye-off"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E["eye-off"].elements.join("")}}):t("svg",{width:"14",height:"14",viewBox:E.eye.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E.eye.elements.join("")}})})]})}function yr({env:e,search:n,p:r}){const s=O(new Map),i=n.toLowerCase(),l=Object.entries(e).filter(([c,d])=>{if(!i)return!0;const o=I(d)?d.display:d==null?"":String(d);return c.toLowerCase().includes(i)||o.toLowerCase().includes(i)});return t("div",{className:`${r}-config-table-wrap`,children:t("table",{className:`${r}-table ${r}-config-env-table`,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Variable"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:[l.map(([c,d])=>{const o=I(d),a=o?d.display:d==null?"null":String(d),h=`${c}=${a}`;return t("tr",{children:[t("td",{className:`${r}-env-key`,children:t("span",{className:`${r}-config-key`,children:c})}),t("td",{className:`${r}-env-val`,children:o?t(be,{redacted:d,p:r}):t("span",{className:`${r}-config-val`,children:a})}),t("td",{children:!o&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:u=>{s.current.set(c,u)},onClick:u=>{u.stopPropagation(),me(h,s.current.get(c)??null,r)},children:"⎘"})})]},c)}),l.length===0&&t("tr",{children:t("td",{colSpan:3,style:{textAlign:"center",color:"var(--ss-dim)"},children:"No matching variables"})})]})]})})}function wr({source:e,search:n,p:r}){const s=O(new Map),i=n.toLowerCase(),l=Re(e,""),c=l.filter(d=>{const o=I(d.value)?d.value.display:d.value===null||d.value===void 0?"":String(d.value);return d.path.toLowerCase().includes(i)||o.toLowerCase().includes(i)});return t("div",{className:`${r}-config-table-wrap`,children:[t("table",{className:`${r}-table`,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Path"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:[c.map(d=>{const o=I(d.value),a=o?null:Be(d.value),h=o?d.value.display:a.text,u=`${d.path}: ${h}`;return t("tr",{children:[t("td",{children:t("span",{className:`${r}-config-key`,style:{whiteSpace:"nowrap"},children:d.path})}),t("td",{children:o?t(be,{redacted:d.value,p:r}):t("span",{className:`${r}-config-val`,style:{wordBreak:"break-all",color:a.color},children:a.text})}),t("td",{children:!o&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:f=>{s.current.set(d.path,f)},onClick:f=>{f.stopPropagation(),me(u,s.current.get(d.path)??null,r)},children:"⎘"})})]},d.path)}),c.length===0&&t("tr",{children:t("td",{colSpan:3,style:{textAlign:"center",color:"var(--ss-dim)"},children:"No matching entries"})})]})]}),t("div",{style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"},children:[c.length," of ",l.length," entries"]})]})}function Nr({obj:e,prefix:n,p:r}){const s=O(new Map),i=Re(e,n);return t("table",{className:`${r}-table ${r}-config-inner-table`,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"35%"},children:"Key"}),t("th",{children:"Value"}),t("th",{style:{width:36}})]})}),t("tbody",{children:i.map(l=>{const c=l.path.indexOf(n+".")===0?l.path.slice(n.length+1):l.path,d=I(l.value),o=d?null:Be(l.value),a=d?l.value.display:o.text,h=`${l.path}: ${a}`;return t("tr",{children:[t("td",{title:c,children:t("span",{className:`${r}-config-key`,children:c})}),t("td",{title:a,children:d?t(be,{redacted:l.value,p:r}):t("span",{className:`${r}-config-val`,style:{color:o.color},children:o.text})}),t("td",{children:!d&&t("button",{type:"button",className:`${r}-copy-row-btn`,title:"Copy",ref:u=>{s.current.set(l.path,u)},onClick:u=>{u.stopPropagation(),me(h,s.current.get(l.path)??null,r)},children:"⎘"})})]},l.path)})})]})}function xr({value:e,p:n}){if(e==null)return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-dim)"},children:"null"});if(I(e))return t(be,{redacted:e,p:n});if(typeof e=="boolean")return t("span",{className:`${n}-config-val`,style:{color:e?"var(--ss-green-fg)":"var(--ss-red-fg)"},children:String(e)});if(typeof e=="number")return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-amber-fg)"},children:String(e)});if(Array.isArray(e)){const r=e.map(s=>s==null?"null":typeof s=="object"?JSON.stringify(s):String(s));return t("span",{className:`${n}-config-val`,style:{color:"var(--ss-purple-fg)"},children:["[",r.join(", "),"]"]})}return typeof e=="object"?t("span",{className:`${n}-config-val`,style:{color:"var(--ss-dim)"},children:JSON.stringify(e)}):t("span",{className:`${n}-config-val`,children:String(e)})}function $r({obj:e,expandedPaths:n,onToggle:r,p:s}){if(e==null||typeof e!="object"||Array.isArray(e)||I(e))return null;const i=Object.keys(e),l=O(new Map);return t("div",{className:`${s}-config-sections`,children:i.map(c=>{const d=e[c],o=d!==null&&typeof d=="object"&&!Array.isArray(d)&&!I(d),a=n.has(c),h=I(d);return t("div",{className:`${s}-config-section`,children:[t("div",{className:`${s}-config-section-header${o?"":` ${s}-config-leaf`}`,onClick:o?()=>r(c):void 0,style:{cursor:o?"pointer":"default"},children:[o?t("span",{className:`${s}-config-toggle`,children:a?"▼":"▶"}):t("span",{className:`${s}-config-toggle`,style:{visibility:"hidden"},children:"•"}),t("span",{className:`${s}-config-key`,children:c}),o?t("span",{className:`${s}-config-count`,children:[zt(d)," entries"]}):t(R,{children:[t("span",{className:`${s}-config-val`,style:{marginLeft:"8px"},children:t(xr,{value:d,p:s})}),!h&&t("button",{type:"button",className:`${s}-copy-row-btn`,style:{marginLeft:"4px"},title:"Copy",ref:u=>{l.current.set(c,u)},onClick:u=>{u.stopPropagation();const f=Be(d);me(`${c}: ${f.text}`,l.current.get(c)??null,s)},children:"⎘"})]})]}),o&&a&&t("div",{className:`${s}-config-section-body`,children:t(Nr,{obj:d,prefix:c,p:s})})]},c)})})}function Cr({data:e,isLoading:n,classPrefix:r}){const s=r,[i,l]=x(""),[c,d]=x(""),[o,a]=x("app"),[h,u]=x(new Set),[f,g]=x("Copy JSON");F(()=>{const N=setTimeout(()=>d(i),200);return()=>clearTimeout(N)},[i]);const p=e,_=k(N=>{u(C=>{const v=new Set(C);return v.has(N)?v.delete(N):v.add(N),v})},[]),b=k(()=>{if(!p)return;const N=o==="app"?p.app:p.env;if(!N)return;const C=vr(N);u(new Set(C))},[p,o]),y=k(()=>{u(new Set)},[]),m=k(async()=>{if(p)try{const N=o==="app"?p.app:p.env;await navigator.clipboard.writeText(JSON.stringify(N,null,2)),g("Copied!"),setTimeout(()=>g("Copy JSON"),1500)}catch{}},[p,o]);return t("div",{children:[t("div",{className:`${s}-config-toolbar`,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"},children:[t("button",{type:"button",className:`${s}-config-tab${o==="app"?` ${s}-active`:""}`,onClick:()=>a("app"),children:"App Config"}),t("button",{type:"button",className:`${s}-config-tab${o==="env"?` ${s}-active`:""}`,onClick:()=>a("env"),children:"Env"}),t("div",{style:{position:"relative",flex:1},children:[t("input",{type:"text",className:`${s}-search`,placeholder:"Search keys and values...",value:i,onChange:N=>l(N.target.value),style:{width:"100%"}}),i&&t("button",{type:"button",onClick:()=>l(""),style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"var(--ss-dim)",padding:"0 2px",lineHeight:1},children:"×"})]}),o==="app"&&!c&&t(R,{children:[t("button",{type:"button",className:`${s}-btn`,onClick:b,children:"Expand All"}),t("button",{type:"button",className:`${s}-btn`,onClick:y,children:"Collapse All"})]}),t("button",{type:"button",className:`${s}-btn`,onClick:m,children:f})]}),n&&!e?t("div",{className:`${s}-empty`,children:"Loading config..."}):p?o==="env"?t(yr,{env:p.env??{},search:c,p:s}):c?t(wr,{source:p.app??{},search:c,p:s}):t("div",{className:`${s}-config-table-wrap`,children:t($r,{obj:p.app,expandedPaths:h,onToggle:_,p:s})}):t("div",{className:`${s}-empty`,children:"Config not available"})]})}function Vt({options:e,dashboardPath:n}){const{resolvedOptions:r}=De(n,e),{data:s,isLoading:i,error:l}=U("config",r);return l?t("div",{className:"ss-dbg-empty",children:["Error: ",l.message]}):t(Cr,{data:s,isLoading:i,classPrefix:"ss-dbg"})}const kr=Object.freeze(Object.defineProperty({__proto__:null,ConfigTab:Vt,default:Vt},Symbol.toStringTag,{value:"Module"})),Sr=["password","secret","token","key","credential","auth"];function qt(e){const n=e.toLowerCase();return Sr.some(r=>n.includes(r))}function Wt(e){if(e==null)return"-";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.join(", ")||"-";try{return JSON.stringify(e)}catch{return String(e)}}const Tr={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function Lr(e){return Tr[e]||e}const Er={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function Ar(e){return Er[e]||e}const Mr=["healthy","active","connected","available","ready"],Pr=["errored","unavailable"];function Or(e){return Mr.includes(e)?"ok":Pr.includes(e)?"err":""}function ne({status:e,prefix:n}){const r=Or(e);let s=`${n}-dot`;return r==="ok"?s+=` ${n}-dot-ok`:r==="err"&&(s+=` ${n}-dot-err`),t("span",{className:s})}const Jt=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:E.eye.viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E.eye.elements.join("")}}),Kt=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:E["eye-off"].viewBox,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:E["eye-off"].elements.join("")}});function Ir({value:e}){const[n,r]=x(!1);return t("span",{children:[n?e:"••••••••"," ",t("button",{type:"button",onClick:()=>r(s=>!s),style:{background:"none",border:"1px solid var(--ss-border)",borderRadius:3,padding:"0 4px",fontSize:"10px",color:"var(--ss-dim)",cursor:"pointer",verticalAlign:"middle"},children:n?t(Kt,{}):t(Jt,{})})]})}function Dr({current:e,max:n,prefix:r}){const s=n>0?Math.min(100,Math.round(e/n*100)):0,i=s>=100;return t("div",{className:`${r}-bar`,children:[t("div",{className:`${r}-bar-track`,children:t("div",{className:`${r}-bar-fill${i?` ${r}-bar-fill-warn`:""}`,style:{width:`${s}%`}})}),t("span",{className:`${r}-bar-pct${i?` ${r}-bar-pct-warn`:""}`,children:[s,"%"]})]})}function Rr({config:e,prefix:n}){const r=Object.entries(e);return r.length===0?t("span",{className:`${n}-c-dim`,children:"-"}):t("span",{className:`${n}-c-muted`,children:r.map(([s,i],l)=>t("span",{children:[l>0&&", ",t("span",{className:`${n}-c-dim`,children:s}),"=",qt(s)&&typeof i=="string"?t(Ir,{value:i}):t("span",{children:Wt(i)})]},s))})}function re({label:e,value:n,prefix:r}){return t("div",{className:`${r}-info-card`,children:[t("span",{className:`${r}-info-card-label`,children:e}),t("span",{className:`${r}-info-card-value`,children:n})]})}function Br({data:e,tableClassName:n,classPrefix:r}){const s=r||"ss-dash",[i,l]=x(new Set),c=k(o=>{l(a=>{const h=new Set(a);return h.has(o)?h.delete(o):h.add(o),h})},[]),d=k((o,a)=>{if(a==null)return t("span",{className:`${s}-c-dim`,children:"null"});if(typeof a=="boolean")return t("span",{className:a?`${s}-c-green`:`${s}-c-red`,children:String(a)});if(Array.isArray(a))return t("span",{children:a.join(", ")||"-"});const h=Wt(a);if(qt(o)){const u=i.has(o);return t("span",{children:[u?h:"••••••••"," ",t("button",{type:"button",onClick:()=>c(o),style:{background:"none",border:"1px solid var(--ss-border)",borderRadius:3,padding:"0 4px",fontSize:"10px",color:"var(--ss-dim)",cursor:"pointer",verticalAlign:"middle"},children:u?t(Kt,{}):t(Jt,{})})]})}return t("span",{children:h})},[i,c,s]);return t("div",{children:[t("h3",{className:`${s}-internals-title`,children:"Package Info"}),t("div",{className:`${s}-info-cards`,children:[t(re,{label:"Version",value:e.package.version||"-",prefix:s}),t(re,{label:"Node.js",value:e.package.nodeVersion||"-",prefix:s}),t(re,{label:"AdonisJS",value:e.package.adonisVersion||"-",prefix:s}),t(re,{label:"Uptime",value:qn(e.package.uptime),prefix:s}),t(re,{label:"Renderer",value:e.devToolbar?.renderer||"preact",prefix:s})]}),e.collectors.length>0&&t(R,{children:[t("h3",{className:`${s}-internals-title`,children:"Collectors"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Collector"}),t("th",{children:"Status"}),t("th",{children:"Last Error"}),t("th",{children:"Config"})]})}),t("tbody",{children:e.collectors.map(o=>t("tr",{children:[t("td",{children:[t("code",{children:o.name}),o.label&&o.label!==o.name&&t("span",{className:`${s}-c-dim`,children:[" ",o.label]})]}),t("td",{children:[t(ne,{status:o.status,prefix:s}),o.status]}),t("td",{className:o.lastError?`${s}-c-red`:`${s}-c-dim`,children:o.lastError?t(R,{children:[o.lastError,o.lastErrorAt&&t("span",{className:`${s}-c-dim`,style:{fontSize:"10px"},children:j(o.lastErrorAt)})]}):"-"}),t("td",{children:t(Rr,{config:o.config,prefix:s})})]},o.name))})]})]}),t("h3",{className:`${s}-internals-title`,children:"Buffers"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Buffer"}),t("th",{children:"Usage"}),t("th",{children:"Fill %"})]})}),t("tbody",{children:Object.entries(e.buffers).map(([o,a])=>t("tr",{children:[t("td",{style:{textTransform:"capitalize"},children:o}),t("td",{children:[a.current.toLocaleString()," / ",a.max.toLocaleString()]}),t("td",{children:t(Dr,{current:a.current,max:a.max,prefix:s})})]},o))})]}),t("h3",{className:`${s}-internals-title`,children:"Timers"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Timer"}),t("th",{children:"Status"}),t("th",{children:"Interval"})]})}),t("tbody",{children:Object.entries(e.timers).map(([o,a])=>t("tr",{children:[t("td",{children:Lr(o)}),t("td",{children:[t(ne,{status:a.active?"active":"inactive",prefix:s}),t("span",{className:a.active?`${s}-c-green`:`${s}-c-dim`,children:a.active?"active":"inactive"})]}),t("td",{children:a.active?a.intervalMs?H(a.intervalMs):a.debounceMs?`${H(a.debounceMs)} (debounce)`:"-":t("span",{className:`${s}-c-dim`,children:"—"})})]},o))})]}),t("h3",{className:`${s}-internals-title`,children:"Integrations"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{children:"Integration"}),t("th",{children:"Status"}),t("th",{children:"Details"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"Transmit (SSE)"}),t("td",{children:[t(ne,{status:e.transmit.available?"connected":"inactive",prefix:s}),e.transmit.available?"connected":"unavailable"]}),t("td",{style:{fontSize:"11px"},children:e.transmit.channels.length>0?`Channels: ${e.transmit.channels.join(", ")}`:"-"})]}),Object.entries(e.integrations).map(([o,a])=>{const h=a.active??a.available??!1,u=a.active?"active":a.available?"available":"unavailable";let f=a.mode?`Mode: ${a.mode}`:"-";return o==="edgePlugin"&&a.active?f="@serverStats() tag registered":o==="cacheInspector"&&a.available?f="Redis dependency detected":o==="queueInspector"&&a.available&&(f="Queue dependency detected"),t("tr",{children:[t("td",{children:Ar(o)}),t("td",{children:[t(ne,{status:h?"active":"inactive",prefix:s}),u]}),t("td",{className:`${s}-c-dim`,style:{fontSize:"11px"},children:f})]},o)})]})]}),e.storage&&t(R,{children:[t("h3",{className:`${s}-internals-title`,children:"Storage (SQLite)"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Metric"}),t("th",{children:"Value"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"Status"}),t("td",{children:[t(ne,{status:e.storage.ready?"ready":"inactive",prefix:s}),e.storage.ready?"ready":"not ready"]})]}),t("tr",{children:[t("td",{children:"DB Path"}),t("td",{children:t("code",{children:e.storage.dbPath})})]}),t("tr",{children:[t("td",{children:"File Size"}),t("td",{children:[e.storage.fileSizeMb.toFixed(1)," MB"]})]}),t("tr",{children:[t("td",{children:"WAL Size"}),t("td",{children:[e.storage.walSizeMb.toFixed(1)," MB"]})]}),t("tr",{children:[t("td",{children:"Retention"}),t("td",{children:[e.storage.retentionDays," days"]})]}),t("tr",{children:[t("td",{children:"Last Cleanup"}),t("td",{children:e.storage.lastCleanupAt?j(e.storage.lastCleanupAt):"-"})]})]})]}),e.storage.tables.length>0&&t("table",{className:n,style:{marginTop:8},children:[t("thead",{children:t("tr",{children:[t("th",{children:"Table"}),t("th",{children:"Rows"})]})}),t("tbody",{children:e.storage.tables.map(o=>t("tr",{children:[t("td",{children:t("code",{children:o.name})}),t("td",{children:o.rowCount.toLocaleString()})]},o.name))})]})]}),t("h3",{className:`${s}-internals-title`,children:"Resolved Config"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Setting"}),t("th",{children:"Value"})]})}),t("tbody",{children:[t("tr",{children:[t("td",{children:"intervalMs"}),t("td",{children:e.config.intervalMs})]}),t("tr",{children:[t("td",{children:"transport"}),t("td",{children:e.config.transport})]}),t("tr",{children:[t("td",{children:"channelName"}),t("td",{children:e.config.channelName})]}),t("tr",{children:[t("td",{children:"endpoint"}),t("td",{children:e.config.endpoint===!1?"false":e.config.endpoint})]}),t("tr",{children:[t("td",{children:"skipInTest"}),t("td",{children:d("skipInTest",e.config.skipInTest)})]}),t("tr",{children:[t("td",{children:"onStats callback"}),t("td",{children:e.config.hasOnStatsCallback?"defined":"not defined"})]}),t("tr",{children:[t("td",{children:"shouldShow callback"}),t("td",{children:e.config.hasShouldShowCallback?"defined":"not defined"})]})]})]}),t("h4",{className:`${s}-internals-title`,children:"DevToolbar"}),t("table",{className:n,children:[t("thead",{children:t("tr",{children:[t("th",{style:{width:"200px"},children:"Setting"}),t("th",{children:"Value"})]})}),t("tbody",{children:Object.entries(e.devToolbar).map(([o,a])=>t("tr",{children:[t("td",{children:o==="customPaneCount"?"customPanes":o}),t("td",{children:o==="customPaneCount"?`${a} registered`:d(o,a)})]},o))})]})]})}const jr=3e3;function Qt({options:e}){const{baseUrl:n="",debugEndpoint:r="/admin/api/debug",authToken:s}=e||{},[i,l]=x(null),[c,d]=x(!0),[o,a]=x(null),h=O(null),u=Bt(n,s),f=k(async()=>{try{const p=await u().get(`${r}/diagnostics`);l(p),a(null),d(!1)}catch(g){if(g instanceof pe){a(g),d(!1),h.current&&(clearInterval(h.current),h.current=null);return}a(g instanceof Error?g:new Error(String(g))),d(!1)}},[r,u]);return F(()=>(d(!0),a(null),f(),h.current=setInterval(f,jr),()=>{h.current&&(clearInterval(h.current),h.current=null)}),[f]),c&&!i?t("div",{className:"ss-dbg-empty",children:"Loading diagnostics..."}):o?t("div",{className:"ss-dbg-empty",children:["Error: ",o.message]}):i?t(Br,{data:i,tableClassName:"ss-dbg-table",classPrefix:"ss-dbg"}):t("div",{className:"ss-dbg-empty",children:"Diagnostics not available"})}const Fr=Object.freeze(Object.defineProperty({__proto__:null,InternalsTab:Qt,default:Qt},Symbol.toStringTag,{value:"Module"}));function Gt({pane:e,options:n}){({...n});const{data:r,isLoading:s,error:i,clearData:l}=U(e.endpoint.replace(/^\//,""),{...n,debugEndpoint:""}),[c,d]=x(""),o=S(()=>{if(!r)return[];const f=e.dataKey||e.id;let g=r;for(const p of f.split("."))g=g?.[p];return Array.isArray(g)?g:[]},[r,e.dataKey,e.id]),a=S(()=>{if(!c)return o;const f=c.toLowerCase(),g=e.columns.filter(p=>p.searchable).map(p=>p.key);return g.length===0?o:o.filter(p=>g.some(_=>{const b=p[_];return b!==null&&String(b).toLowerCase().includes(f)}))},[o,c,e.columns]),h=(f,g)=>{if(f==null)return t("span",{className:"ss-dbg-c-dim",children:"-"});switch(g.format||"text"){case"time":return t("span",{className:"ss-dbg-event-time",title:q(f),children:typeof f=="number"?j(f):String(f)});case"timeAgo":return t("span",{className:"ss-dbg-event-time",title:q(f),children:j(f)});case"duration":{const _=typeof f=="number"?f:parseFloat(String(f));return isNaN(_)?String(f):t("span",{className:`ss-dbg-duration ${G(_)==="very-slow"?"ss-dbg-very-slow":G(_)==="slow"?"ss-dbg-slow":""}`,children:H(_)})}case"method":return t("span",{className:`ss-dbg-method ss-dbg-method-${String(f).toLowerCase()}`,children:String(f)});case"json":{let _=f;if(typeof f=="string")try{_=JSON.parse(f)}catch{}return _e(_,80)}case"badge":{const _=String(f).toLowerCase(),y=(g.badgeColorMap||{})[_]||"muted";return t("span",{className:`ss-dbg-badge ss-dbg-badge-${y}`,children:String(f)})}default:return String(f)}},u=J([a]);return s&&!r?t("div",{className:"ss-dbg-empty",children:["Loading ",e.label,"..."]}):i?t("div",{className:"ss-dbg-empty",children:["Error: ",i.message]}):t("div",{children:[e.search&&t("div",{className:"ss-dbg-search-bar",children:[t("input",{type:"text",className:"ss-dbg-search",placeholder:e.search.placeholder,value:c,onChange:f=>d(f.target.value)}),t("span",{className:"ss-dbg-summary",children:[a.length," items"]}),e.clearable&&t("button",{type:"button",className:"ss-dbg-btn-clear",onClick:l,children:"Clear"})]}),a.length===0?t("div",{className:"ss-dbg-empty",children:"No data"}):t("table",{ref:u,className:"ss-dbg-table",children:[t("thead",{children:t("tr",{children:e.columns.map(f=>t("th",{children:f.label},f.key))})}),t("tbody",{children:a.map((f,g)=>t("tr",{children:e.columns.map(p=>t("td",{children:h(f[p.key],p)},p.key))},f.id??g))})]})]})}const Hr=Object.freeze(Object.defineProperty({__proto__:null,CustomPaneTab:Gt,default:Gt},Symbol.toStringTag,{value:"Module"}))})();