jfl 0.3.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +294 -30
  2. package/dist/commands/context-hub.d.ts.map +1 -1
  3. package/dist/commands/context-hub.js +154 -0
  4. package/dist/commands/context-hub.js.map +1 -1
  5. package/dist/commands/flows.d.ts +4 -1
  6. package/dist/commands/flows.d.ts.map +1 -1
  7. package/dist/commands/flows.js +160 -1
  8. package/dist/commands/flows.js.map +1 -1
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +42 -0
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/peter.d.ts.map +1 -1
  13. package/dist/commands/peter.js +220 -1
  14. package/dist/commands/peter.js.map +1 -1
  15. package/dist/commands/pi.d.ts +21 -0
  16. package/dist/commands/pi.d.ts.map +1 -0
  17. package/dist/commands/pi.js +154 -0
  18. package/dist/commands/pi.js.map +1 -0
  19. package/dist/commands/portfolio.d.ts.map +1 -1
  20. package/dist/commands/portfolio.js +22 -69
  21. package/dist/commands/portfolio.js.map +1 -1
  22. package/dist/commands/predict.d.ts +6 -0
  23. package/dist/commands/predict.d.ts.map +1 -0
  24. package/dist/commands/predict.js +234 -0
  25. package/dist/commands/predict.js.map +1 -0
  26. package/dist/commands/synopsis.d.ts +44 -0
  27. package/dist/commands/synopsis.d.ts.map +1 -1
  28. package/dist/commands/synopsis.js +1 -1
  29. package/dist/commands/synopsis.js.map +1 -1
  30. package/dist/commands/update.d.ts.map +1 -1
  31. package/dist/commands/update.js +49 -1
  32. package/dist/commands/update.js.map +1 -1
  33. package/dist/commands/viz.d.ts +7 -0
  34. package/dist/commands/viz.d.ts.map +1 -0
  35. package/dist/commands/viz.js +460 -0
  36. package/dist/commands/viz.js.map +1 -0
  37. package/dist/dashboard/index.d.ts +4 -5
  38. package/dist/dashboard/index.d.ts.map +1 -1
  39. package/dist/dashboard/index.js +57 -146
  40. package/dist/dashboard/index.js.map +1 -1
  41. package/dist/dashboard-static/assets/index-B6kRK9Rq.js +116 -0
  42. package/dist/dashboard-static/assets/index-BpdKJPLu.css +1 -0
  43. package/dist/dashboard-static/index.html +16 -0
  44. package/dist/index.js +112 -19
  45. package/dist/index.js.map +1 -1
  46. package/dist/lib/flow-engine.d.ts +1 -0
  47. package/dist/lib/flow-engine.d.ts.map +1 -1
  48. package/dist/lib/flow-engine.js +30 -1
  49. package/dist/lib/flow-engine.js.map +1 -1
  50. package/dist/lib/hub-client.d.ts +80 -0
  51. package/dist/lib/hub-client.d.ts.map +1 -0
  52. package/dist/lib/hub-client.js +46 -0
  53. package/dist/lib/hub-client.js.map +1 -0
  54. package/dist/lib/predictor.d.ts +99 -0
  55. package/dist/lib/predictor.d.ts.map +1 -0
  56. package/dist/lib/predictor.js +394 -0
  57. package/dist/lib/predictor.js.map +1 -0
  58. package/dist/lib/service-gtm.d.ts +86 -51
  59. package/dist/lib/service-gtm.d.ts.map +1 -1
  60. package/dist/lib/service-gtm.js +417 -242
  61. package/dist/lib/service-gtm.js.map +1 -1
  62. package/dist/lib/telemetry-agent.d.ts +57 -0
  63. package/dist/lib/telemetry-agent.d.ts.map +1 -0
  64. package/dist/lib/telemetry-agent.js +268 -0
  65. package/dist/lib/telemetry-agent.js.map +1 -0
  66. package/dist/lib/telemetry-digest.d.ts.map +1 -1
  67. package/dist/lib/telemetry-digest.js +17 -17
  68. package/dist/lib/telemetry-digest.js.map +1 -1
  69. package/dist/lib/telemetry.d.ts +1 -0
  70. package/dist/lib/telemetry.d.ts.map +1 -1
  71. package/dist/lib/telemetry.js +14 -6
  72. package/dist/lib/telemetry.js.map +1 -1
  73. package/dist/mcp/context-hub-mcp.js +0 -0
  74. package/dist/mcp/service-registry-mcp.js +0 -0
  75. package/dist/types/map.d.ts +1 -1
  76. package/dist/types/map.d.ts.map +1 -1
  77. package/dist/types/map.js.map +1 -1
  78. package/dist/utils/jfl-paths.d.ts +1 -0
  79. package/dist/utils/jfl-paths.d.ts.map +1 -1
  80. package/dist/utils/jfl-paths.js +1 -0
  81. package/dist/utils/jfl-paths.js.map +1 -1
  82. package/package.json +7 -2
  83. package/scripts/generate-changesets.sh +113 -0
  84. package/scripts/pp-branch-pr.sh +115 -0
  85. package/template/.jfl/flows-self-driving.yaml +170 -0
  86. package/dist/dashboard/components.d.ts +0 -7
  87. package/dist/dashboard/components.d.ts.map +0 -1
  88. package/dist/dashboard/components.js +0 -575
  89. package/dist/dashboard/components.js.map +0 -1
  90. package/dist/dashboard/pages.d.ts +0 -7
  91. package/dist/dashboard/pages.d.ts.map +0 -1
  92. package/dist/dashboard/pages.js +0 -1580
  93. package/dist/dashboard/pages.js.map +0 -1
  94. package/dist/dashboard/styles.d.ts +0 -7
  95. package/dist/dashboard/styles.d.ts.map +0 -1
  96. package/dist/dashboard/styles.js +0 -1110
  97. package/dist/dashboard/styles.js.map +0 -1
@@ -0,0 +1,116 @@
1
+ (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();var ke,P,dt,oe,We,ct,at,ut,Ie,Fe,Ae,_e={},ye=[],Et=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Se=Array.isArray;function Q(t,r){for(var n in r)t[n]=r[n];return t}function Oe(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Ct(t,r,n){var o,l,s,i={};for(s in r)s=="key"?o=r[s]:s=="ref"?l=r[s]:i[s]=r[s];if(arguments.length>2&&(i.children=arguments.length>3?ke.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return xe(t,i,o,l,null)}function xe(t,r,n,o,l){var s={type:t,props:r,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:l??++dt,__i:-1,__u:0};return l==null&&P.vnode!=null&&P.vnode(s),s}function X(t){return t.children}function be(t,r){this.props=t,this.context=r}function le(t,r){if(r==null)return t.__?le(t.__,t.__i+1):null;for(var n;r<t.__k.length;r++)if((n=t.__k[r])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?le(t):null}function Rt(t){if(t.__P&&t.__d){var r=t.__v,n=r.__e,o=[],l=[],s=Q({},r);s.__v=r.__v+1,P.vnode&&P.vnode(s),Ue(t.__P,s,r,t.__n,t.__P.namespaceURI,32&r.__u?[n]:null,o,n??le(r),!!(32&r.__u),l),s.__v=r.__v,s.__.__k[s.__i]=s,ft(o,s,l),r.__e=r.__=null,s.__e!=n&&pt(s)}}function pt(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(r){if(r!=null&&r.__e!=null)return t.__e=t.__c.base=r.__e}),pt(t)}function Xe(t){(!t.__d&&(t.__d=!0)&&oe.push(t)&&!we.__r++||We!=P.debounceRendering)&&((We=P.debounceRendering)||ct)(we)}function we(){for(var t,r=1;oe.length;)oe.length>r&&oe.sort(at),t=oe.shift(),r=oe.length,Rt(t);we.__r=0}function mt(t,r,n,o,l,s,i,c,a,u,x){var d,f,g,h,y,v,b,p=o&&o.__k||ye,m=r.length;for(a=Ft(n,r,p,a,m),d=0;d<m;d++)(g=n.__k[d])!=null&&(f=g.__i!=-1&&p[g.__i]||_e,g.__i=d,v=Ue(t,g,f,l,s,i,c,a,u,x),h=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&Ne(f.ref,null,g),x.push(g.ref,g.__c||h,g)),y==null&&h!=null&&(y=h),(b=!!(4&g.__u))||f.__k===g.__k?a=ht(g,a,t,b):typeof g.type=="function"&&v!==void 0?a=v:h&&(a=h.nextSibling),g.__u&=-7);return n.__e=y,a}function Ft(t,r,n,o,l){var s,i,c,a,u,x=n.length,d=x,f=0;for(t.__k=new Array(l),s=0;s<l;s++)(i=r[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?i=t.__k[s]=xe(null,i,null,null,null):Se(i)?i=t.__k[s]=xe(X,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=t.__k[s]=xe(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):t.__k[s]=i,a=s+f,i.__=t,i.__b=t.__b+1,c=null,(u=i.__i=At(i,n,a,d))!=-1&&(d--,(c=n[u])&&(c.__u|=2)),c==null||c.__v==null?(u==-1&&(l>x?f--:l<x&&f++),typeof i.type!="function"&&(i.__u|=4)):u!=a&&(u==a-1?f--:u==a+1?f++:(u>a?f--:f++,i.__u|=4))):t.__k[s]=null;if(d)for(s=0;s<x;s++)(c=n[s])!=null&&(2&c.__u)==0&&(c.__e==o&&(o=le(c)),xt(c,c));return o}function ht(t,r,n,o){var l,s;if(typeof t.type=="function"){for(l=t.__k,s=0;l&&s<l.length;s++)l[s]&&(l[s].__=t,r=ht(l[s],r,n,o));return r}t.__e!=r&&(o&&(r&&t.type&&!r.parentNode&&(r=le(t)),n.insertBefore(t.__e,r||null)),r=t.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function At(t,r,n,o){var l,s,i,c=t.key,a=t.type,u=r[n],x=u!=null&&(2&u.__u)==0;if(u===null&&c==null||x&&c==u.key&&a==u.type)return n;if(o>(x?1:0)){for(l=n-1,s=n+1;l>=0||s<r.length;)if((u=r[i=l>=0?l--:s++])!=null&&(2&u.__u)==0&&c==u.key&&a==u.type)return i}return-1}function qe(t,r,n){r[0]=="-"?t.setProperty(r,n??""):t[r]=n==null?"":typeof n!="number"||Et.test(r)?n:n+"px"}function me(t,r,n,o,l){var s,i;e:if(r=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(r in o)n&&r in n||qe(t.style,r,"");if(n)for(r in n)o&&n[r]==o[r]||qe(t.style,r,n[r])}else if(r[0]=="o"&&r[1]=="n")s=r!=(r=r.replace(ut,"$1")),i=r.toLowerCase(),r=i in t||r=="onFocusOut"||r=="onFocusIn"?i.slice(2):r.slice(2),t.l||(t.l={}),t.l[r+s]=n,n?o?n.u=o.u:(n.u=Ie,t.addEventListener(r,s?Ae:Fe,s)):t.removeEventListener(r,s?Ae:Fe,s);else{if(l=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in t)try{t[r]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&r[4]!="-"?t.removeAttribute(r):t.setAttribute(r,r=="popover"&&n==1?"":n))}}function Ve(t){return function(r){if(this.l){var n=this.l[r.type+t];if(r.t==null)r.t=Ie++;else if(r.t<n.u)return;return n(P.event?P.event(r):r)}}}function Ue(t,r,n,o,l,s,i,c,a,u){var x,d,f,g,h,y,v,b,p,m,T,S,E,z,V,$=r.type;if(r.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),s=[c=r.__e=n.__e]),(x=P.__b)&&x(r);e:if(typeof $=="function")try{if(b=r.props,p="prototype"in $&&$.prototype.render,m=(x=$.contextType)&&o[x.__c],T=x?m?m.props.value:x.__:o,n.__c?v=(d=r.__c=n.__c).__=d.__E:(p?r.__c=d=new $(b,T):(r.__c=d=new be(b,T),d.constructor=$,d.render=Pt),m&&m.sub(d),d.state||(d.state={}),d.__n=o,f=d.__d=!0,d.__h=[],d._sb=[]),p&&d.__s==null&&(d.__s=d.state),p&&$.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Q({},d.__s)),Q(d.__s,$.getDerivedStateFromProps(b,d.__s))),g=d.props,h=d.state,d.__v=r,f)p&&$.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),p&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(p&&$.getDerivedStateFromProps==null&&b!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(b,T),r.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(b,d.__s,T)===!1){r.__v!=n.__v&&(d.props=b,d.state=d.__s,d.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(I){I&&(I.__=r)}),ye.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&i.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(b,d.__s,T),p&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,h,y)})}if(d.context=T,d.props=b,d.__P=t,d.__e=!1,S=P.__r,E=0,p)d.state=d.__s,d.__d=!1,S&&S(r),x=d.render(d.props,d.state,d.context),ye.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,S&&S(r),x=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(o=Q(Q({},o),d.getChildContext())),p&&!f&&d.getSnapshotBeforeUpdate!=null&&(y=d.getSnapshotBeforeUpdate(g,h)),z=x!=null&&x.type===X&&x.key==null?gt(x.props.children):x,c=mt(t,Se(z)?z:[z],r,n,o,l,s,i,c,a,u),d.base=r.__e,r.__u&=-161,d.__h.length&&i.push(d),v&&(d.__E=d.__=null)}catch(I){if(r.__v=null,a||s!=null)if(I.then){for(r.__u|=a?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;s[s.indexOf(c)]=null,r.__e=c}else{for(V=s.length;V--;)Oe(s[V]);Me(r)}else r.__e=n.__e,r.__k=n.__k,I.then||Me(r);P.__e(I,r,n)}else s==null&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):c=r.__e=Mt(n.__e,r,n,o,l,s,i,a,u);return(x=P.diffed)&&x(r),128&r.__u?void 0:c}function Me(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Me))}function ft(t,r,n){for(var o=0;o<n.length;o++)Ne(n[o],n[++o],n[++o]);P.__c&&P.__c(r,t),t.some(function(l){try{t=l.__h,l.__h=[],t.some(function(s){s.call(l)})}catch(s){P.__e(s,l.__v)}})}function gt(t){return typeof t!="object"||t==null||t.__b>0?t:Se(t)?t.map(gt):Q({},t)}function Mt(t,r,n,o,l,s,i,c,a){var u,x,d,f,g,h,y,v=n.props||_e,b=r.props,p=r.type;if(p=="svg"?l="http://www.w3.org/2000/svg":p=="math"?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((g=s[u])&&"setAttribute"in g==!!p&&(p?g.localName==p:g.nodeType==3)){t=g,s[u]=null;break}}if(t==null){if(p==null)return document.createTextNode(b);t=document.createElementNS(l,p,b.is&&b),c&&(P.__m&&P.__m(r,s),c=!1),s=null}if(p==null)v===b||c&&t.data==b||(t.data=b);else{if(s=s&&ke.call(t.childNodes),!c&&s!=null)for(v={},u=0;u<t.attributes.length;u++)v[(g=t.attributes[u]).name]=g.value;for(u in v)g=v[u],u=="dangerouslySetInnerHTML"?d=g:u=="children"||u in b||u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b||me(t,u,null,g,l);for(u in b)g=b[u],u=="children"?f=g:u=="dangerouslySetInnerHTML"?x=g:u=="value"?h=g:u=="checked"?y=g:c&&typeof g!="function"||v[u]===g||me(t,u,g,v[u],l);if(x)c||d&&(x.__html==d.__html||x.__html==t.innerHTML)||(t.innerHTML=x.__html),r.__k=[];else if(d&&(t.innerHTML=""),mt(r.type=="template"?t.content:t,Se(f)?f:[f],r,n,o,p=="foreignObject"?"http://www.w3.org/1999/xhtml":l,s,i,s?s[0]:n.__k&&le(n,0),c,a),s!=null)for(u=s.length;u--;)Oe(s[u]);c||(u="value",p=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[u]||p=="progress"&&!h||p=="option"&&h!=v[u])&&me(t,u,h,v[u],l),u="checked",y!=null&&y!=t[u]&&me(t,u,y,v[u],l))}return t}function Ne(t,r,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&r==null||(t.__u=t(r))}else t.current=r}catch(l){P.__e(l,n)}}function xt(t,r,n){var o,l;if(P.unmount&&P.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Ne(o,null,r)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){P.__e(s,r)}o.base=o.__P=null}if(o=t.__k)for(l=0;l<o.length;l++)o[l]&&xt(o[l],r,n||typeof t.type!="function");n||Oe(t.__e),t.__c=t.__=t.__e=void 0}function Pt(t,r,n){return this.constructor(t,n)}function Dt(t,r,n){var o,l,s,i;r==document&&(r=document.documentElement),P.__&&P.__(t,r),l=(o=!1)?null:r.__k,s=[],i=[],Ue(r,t=r.__k=Ct(X,null,[t]),l||_e,_e,r.namespaceURI,l?null:r.firstChild?ke.call(r.childNodes):null,s,l?l.__e:r.firstChild,o,i),ft(s,t,i)}ke=ye.slice,P={__e:function(t,r,n,o){for(var l,s,i;r=r.__;)if((l=r.__c)&&!l.__)try{if((s=l.constructor)&&s.getDerivedStateFromError!=null&&(l.setState(s.getDerivedStateFromError(t)),i=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(t,o||{}),i=l.__d),i)return l.__E=l}catch(c){t=c}throw t}},dt=0,be.prototype.setState=function(t,r){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Q({},this.state),typeof t=="function"&&(t=t(Q({},n),this.props)),t&&Q(n,t),t!=null&&this.__v&&(r&&this._sb.push(r),Xe(this))},be.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Xe(this))},be.prototype.render=X,oe=[],ct=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,at=function(t,r){return t.__v.__b-r.__v.__b},we.__r=0,ut=/(PointerCapture)$|Capture$/i,Ie=0,Fe=Ve(!1),Ae=Ve(!0);var $t=0;function e(t,r,n,o,l,s){r||(r={});var i,c,a=r;if("ref"in a)for(c in a={},r)c=="ref"?i=r[c]:a[c]=r[c];var u={type:t,props:a,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--$t,__i:-1,__u:0,__source:l,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(c in i)a[c]===void 0&&(a[c]=i[c]);return P.vnode&&P.vnode(u),u}var ue,B,Ee,Je,pe=0,bt=[],H=P,Ye=H.__b,Ke=H.__r,Qe=H.diffed,Ze=H.__c,et=H.unmount,tt=H.__;function Be(t,r){H.__h&&H.__h(B,t,pe||r),pe=0;var n=B.__H||(B.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function D(t){return pe=1,jt(yt,t)}function jt(t,r,n){var o=Be(ue++,2);if(o.t=t,!o.__c&&(o.__=[yt(void 0,r),function(c){var a=o.__N?o.__N[0]:o.__[0],u=o.t(a,c);a!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=B,!B.__f)){var l=function(c,a,u){if(!o.__c.__H)return!0;var x=o.__c.__H.__.filter(function(f){return f.__c});if(x.every(function(f){return!f.__N}))return!s||s.call(this,c,a,u);var d=o.__c.props!==c;return x.some(function(f){if(f.__N){var g=f.__[0];f.__=f.__N,f.__N=void 0,g!==f.__[0]&&(d=!0)}}),s&&s.call(this,c,a,u)||d};B.__f=!0;var s=B.shouldComponentUpdate,i=B.componentWillUpdate;B.componentWillUpdate=function(c,a,u){if(this.__e){var x=s;s=void 0,l(c,a,u),s=x}i&&i.call(this,c,a,u)},B.shouldComponentUpdate=l}return o.__N||o.__}function He(t,r){var n=Be(ue++,3);!H.__s&&_t(n.__H,r)&&(n.__=t,n.u=r,B.__H.__h.push(n))}function se(t){return pe=5,vt(function(){return{current:t}},[])}function vt(t,r){var n=Be(ue++,7);return _t(n.__H,r)&&(n.__=t(),n.__H=r,n.__h=t),n.__}function ze(t,r){return pe=8,vt(function(){return t},r)}function Lt(){for(var t;t=bt.shift();){var r=t.__H;if(t.__P&&r)try{r.__h.some(ve),r.__h.some(Pe),r.__h=[]}catch(n){r.__h=[],H.__e(n,t.__v)}}}H.__b=function(t){B=null,Ye&&Ye(t)},H.__=function(t,r){t&&r.__k&&r.__k.__m&&(t.__m=r.__k.__m),tt&&tt(t,r)},H.__r=function(t){Ke&&Ke(t),ue=0;var r=(B=t.__c).__H;r&&(Ee===B?(r.__h=[],B.__h=[],r.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(r.__h.some(ve),r.__h.some(Pe),r.__h=[],ue=0)),Ee=B},H.diffed=function(t){Qe&&Qe(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(bt.push(r)!==1&&Je===H.requestAnimationFrame||((Je=H.requestAnimationFrame)||It)(Lt)),r.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ee=B=null},H.__c=function(t,r){r.some(function(n){try{n.__h.some(ve),n.__h=n.__h.filter(function(o){return!o.__||Pe(o)})}catch(o){r.some(function(l){l.__h&&(l.__h=[])}),r=[],H.__e(o,n.__v)}}),Ze&&Ze(t,r)},H.unmount=function(t){et&&et(t);var r,n=t.__c;n&&n.__H&&(n.__H.__.some(function(o){try{ve(o)}catch(l){r=l}}),n.__H=void 0,r&&H.__e(r,n.__v))};var rt=typeof requestAnimationFrame=="function";function It(t){var r,n=function(){clearTimeout(o),rt&&cancelAnimationFrame(r),setTimeout(t)},o=setTimeout(n,35);rt&&(r=requestAnimationFrame(n))}function ve(t){var r=B,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),B=r}function Pe(t){var r=B;t.__c=t.__(),B=r}function _t(t,r){return!t||t.length!==r.length||r.some(function(n,o){return n!==t[o]})}function yt(t,r){return typeof r=="function"?r(t):r}const Ot=()=>{const r=new URLSearchParams(window.location.search).get("token");if(r){localStorage.setItem("jfl-token",r);const n=new URL(window.location.href);return n.searchParams.delete("token"),window.history.replaceState({},"",n.toString()),r}return localStorage.getItem("jfl-token")||""};let Ce=null;function De(){return Ce||(Ce=Ot()),Ce}async function N(t,r={}){const n={"Content-Type":"application/json",...De()?{Authorization:`Bearer ${De()}`}:{},...r.headers||{}},o=await fetch(t,{...r,headers:n});if(o.status===401)throw new Error("Unauthorized");if(!o.ok)throw new Error(`API error: ${o.status}`);return o.json()}function Ut(t,r,n){const o=`${t}${t.includes("?")?"&":"?"}token=${De()}`,l=new EventSource(o);return l.onmessage=s=>{try{r(JSON.parse(s.data))}catch{}},l.onerror=s=>n==null?void 0:n(s),()=>l.close()}const M={status:()=>N("/api/context/status"),events:(t=50,r)=>{let n=`/api/events?limit=${t}`;return r&&(n+=`&pattern=${encodeURIComponent(r)}`),N(n)},leaderboard:()=>N("/api/eval/leaderboard"),trajectory:(t,r="composite")=>N(`/api/eval/trajectory?agent=${encodeURIComponent(t)}&metric=${r}`),journal:()=>N("/api/context",{method:"POST",body:JSON.stringify({})}).then(t=>t.items||[]),search:t=>N(`/api/context/search?q=${encodeURIComponent(t)}`),services:()=>N("/api/services"),projects:()=>N("/api/projects"),flows:()=>N("/api/flows"),flowExecutions:()=>N("/api/flows/executions"),approveFlow:(t,r)=>N(`/api/flows/${encodeURIComponent(t)}/approve`,{method:"POST",body:JSON.stringify({trigger_event_id:r})}),memoryStatus:()=>N("/api/memory/status"),memorySearch:(t,r)=>{const n={query:t};return r&&r!=="all"&&(n.type=r),N("/api/memory/search",{method:"POST",body:JSON.stringify(n)})},publishEvent:(t,r,n="dashboard")=>N("/api/events",{method:"POST",body:JSON.stringify({type:t,source:n,data:r})}),toggleFlow:(t,r)=>N(`/api/flows/${encodeURIComponent(t)}/toggle`,{method:"POST",body:JSON.stringify({enabled:r})}),spawnAction:(t,r,n)=>N("/api/actions/spawn",{method:"POST",body:JSON.stringify({command:t,args:r,event_type:n})}),predictions:()=>N("/api/eval/predictions"),synopsis:(t=24)=>N(`/api/synopsis?hours=${t}`),telemetryDigest:(t=168)=>N(`/api/telemetry/digest?hours=${t}`),telemetryAgentStatus:()=>N("/api/telemetry/agent"),telemetryAgentRun:()=>N("/api/telemetry/agent/run",{method:"POST"})};function U(t,r,n=[]){const[o,l]=D(null),[s,i]=D(!0),[c,a]=D(null),u=se(),x=ze(()=>{t().then(d=>{l(d),a(null),i(!1)}).catch(d=>{a(d.message),i(!1)})},n);return He(()=>(x(),u.current=setInterval(x,r),()=>clearInterval(u.current)),[x,r]),{data:o,loading:s,error:c,refetch:x}}function Nt(t,r){const[n,o]=D(!1);return He(()=>{const l=localStorage.getItem("jfl-token")||"",s=`${t}${t.includes("?")?"&":"?"}token=${l}`,i=new EventSource(s);return i.onopen=()=>o(!0),i.onmessage=c=>{try{r(JSON.parse(c.data))}catch{}},i.onerror=()=>o(!1),()=>i.close()},[t]),{connected:n}}function w(...t){return t.filter(Boolean).join(" ")}function q(t){const r=Date.now()-new Date(t).getTime(),n=Math.floor(r/1e3);if(n<60)return`${n}s ago`;const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const l=Math.floor(o/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function wt({name:t}){return e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"shrink-0",children:{dashboard:e(X,{children:[e("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),e("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),e("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),e("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),journal:e("path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"}),events:e("path",{d:"M13 2 3 14h9l-1 8 10-12h-9z"}),services:e(X,{children:[e("path",{d:"m12 2-10 5 10 5 10-5z"}),e("path",{d:"m2 17 10 5 10-5"}),e("path",{d:"m2 12 10 5 10-5"})]}),agents:e(X,{children:[e("circle",{cx:"12",cy:"8",r:"5"}),e("path",{d:"M20 21a8 8 0 0 0-16 0"})]}),flows:e(X,{children:[e("rect",{x:"3",y:"3",width:"8",height:"8",rx:"2"}),e("rect",{x:"13",y:"13",width:"8",height:"8",rx:"2"}),e("path",{d:"M7 11v4a2 2 0 0 0 2 2h4"})]}),health:e("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"}),experiments:e(X,{children:[e("circle",{cx:"7",cy:"12",r:"2"}),e("circle",{cx:"12",cy:"7",r:"2"}),e("circle",{cx:"17",cy:"10",r:"2"}),e("circle",{cx:"12",cy:"17",r:"2"}),e("path",{d:"M7 12l5-5M12 7l5 3M17 10l-5 7"})]}),topology:e(X,{children:[e("circle",{cx:"5",cy:"6",r:"2"}),e("circle",{cx:"12",cy:"4",r:"2"}),e("circle",{cx:"19",cy:"8",r:"2"}),e("circle",{cx:"7",cy:"18",r:"2"}),e("circle",{cx:"17",cy:"17",r:"2"}),e("path",{d:"M7 6l5-2M14 4l5 4M5 8l2 10M12 6l5 11M9 18h8"})]}),telemetry:e(X,{children:[e("path",{d:"M3 3v18h18"}),e("path",{d:"m7 16 4-8 4 4 4-6"})]}),search:e(X,{children:[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.3-4.3"})]})}[t]})}const Bt=[{items:[{id:"overview",label:"Dashboard",icon:"dashboard"}]},{label:"Workspace",items:[{id:"journal",label:"Journal",icon:"journal"},{id:"events",label:"Events",icon:"events"},{id:"flows",label:"Flows",icon:"flows"}]},{label:"Infra",items:[{id:"services",label:"Services",icon:"services"},{id:"topology",label:"Topology",icon:"topology"},{id:"health",label:"Health",icon:"health"},{id:"telemetry",label:"Telemetry",icon:"telemetry"}]},{label:"Eval",items:[{id:"agents",label:"Agents",icon:"agents"},{id:"experiments",label:"Experiments",icon:"experiments"}]}];function Ht({status:t,currentPage:r,setPage:n}){var u;const o=(t==null?void 0:t.type)||"standalone",l=((u=t==null?void 0:t.config)==null?void 0:u.name)||"JFL",s=(t==null?void 0:t.status)||"unknown",i=(t==null?void 0:t.children)||[],a=U(()=>M.leaderboard(),3e4).data||[];return e("aside",{class:"w-56 h-screen bg-sidebar flex flex-col fixed left-0 top-0 z-10 border-r border-sidebar-border",children:[e("div",{class:"px-4 pt-5 pb-4",children:e("div",{class:"flex items-center gap-2.5",children:[e("div",{class:w("w-7 h-7 rounded-lg flex items-center justify-center text-xs font-bold",s==="ok"||s==="running"?"bg-success/15 text-success":"bg-warning/15 text-warning"),children:l.charAt(0).toUpperCase()}),e("div",{class:"min-w-0",children:[e("div",{class:"font-semibold text-sm text-sidebar-foreground truncate",children:l}),e("div",{class:"flex items-center gap-1.5 mt-0.5",children:[e("span",{class:"text-[10px] mono text-muted-foreground uppercase tracking-wider",children:o}),(t==null?void 0:t.port)&&e("span",{class:"text-[10px] mono text-muted-foreground",children:[":",t.port]})]})]})]})}),e("div",{class:"px-3 pb-3",children:e(zt,{setPage:n})}),e("nav",{class:"flex-1 overflow-y-auto pb-2",children:[Bt.map((x,d)=>{const f=x.items.filter(g=>!g.modes||g.modes.includes(o));return f.length?e("div",{class:d>0?"mt-5":"",children:[x.label&&e("div",{class:"px-4 pb-1 text-[10px] uppercase tracking-widest text-muted-foreground font-medium",children:x.label}),f.map(g=>e("button",{onClick:()=>n(g.id),class:w("w-full flex items-center gap-2.5 px-4 py-1.5 text-[13px] transition-colors relative",r===g.id?"text-sidebar-foreground font-medium bg-accent/60 before:absolute before:left-0 before:top-[5px] before:bottom-[5px] before:w-[2px] before:bg-info before:rounded-r":"text-muted-foreground hover:text-sidebar-foreground hover:bg-accent/30"),children:[e(wt,{name:g.icon}),g.label]},g.id))]},d):null}),a.length>0&&e("div",{class:"mt-5",children:[e("div",{class:"px-4 pb-1 text-[10px] uppercase tracking-widest text-muted-foreground font-medium",children:"Agents"}),a.sort((x,d)=>(d.composite||0)-(x.composite||0)).slice(0,8).map(x=>{const d=x.delta!=null&&x.delta>0;return e("button",{onClick:()=>n("agents"),class:"w-full flex items-center gap-2.5 px-4 py-1 text-[13px] text-muted-foreground hover:text-sidebar-foreground transition-colors",children:[e("span",{class:w("w-[6px] h-[6px] rounded-full shrink-0",d?"bg-success":"bg-muted-foreground/50")}),e("span",{class:"truncate",children:x.agent}),x.composite!=null&&e("span",{class:"ml-auto mono text-[10px] tabular-nums",children:x.composite.toFixed(2)})]},x.agent)})]})]}),i.length>0&&e("div",{class:"border-t border-sidebar-border py-3 px-4",children:[e("div",{class:"text-[10px] uppercase tracking-widest text-muted-foreground font-medium mb-2",children:"Products"}),e("div",{class:"space-y-1.5",children:i.map(x=>e("div",{class:"flex items-center gap-2",children:[e("span",{class:w("w-[6px] h-[6px] rounded-full shrink-0",x.status==="ok"?"bg-success":x.status==="error"?"bg-destructive":"bg-muted-foreground/50")}),e("span",{class:"text-xs text-sidebar-foreground truncate flex-1",children:x.name}),e("span",{class:"text-[10px] mono text-muted-foreground",children:[":",x.port]})]},x.name))})]}),e("div",{class:"px-4 py-3 border-t border-sidebar-border",children:e("div",{class:"text-[10px] text-muted-foreground/60 mono",children:"jfl v0.3.0"})})]})}function zt({setPage:t}){const[r,n]=D(""),[o,l]=D([]),[s,i]=D(!1),c=async()=>{var a;if(r.trim()){i(!0);try{const u=await M.memorySearch(r.trim());l(((a=u.results)==null?void 0:a.slice(0,5))||[])}catch{l([])}i(!1)}};return e("div",{class:"relative",children:[e("div",{class:"flex items-center gap-1.5 bg-accent/40 rounded-md px-2.5 py-1.5 border border-sidebar-border/50 focus-within:border-info/50 transition-colors",children:[e(wt,{name:"search"}),e("input",{type:"text",placeholder:"Search journals...",value:r,onInput:a=>n(a.target.value),onKeyDown:a=>a.key==="Enter"&&c(),class:"bg-transparent text-xs text-sidebar-foreground placeholder:text-muted-foreground/50 outline-none flex-1 min-w-0"}),s&&e("span",{class:"text-[10px] text-muted-foreground animate-pulse-dot",children:"..."})]}),o.length>0&&e("div",{class:"absolute top-full left-0 right-0 mt-1 bg-card border border-border rounded-md shadow-lg z-50 max-h-60 overflow-y-auto",children:o.map((a,u)=>{var x;return e("button",{onClick:()=>{l([]),n(""),t("journal")},class:"w-full text-left px-3 py-2 hover:bg-muted/30 transition-colors border-b border-border/30 last:border-0",children:[e("div",{class:"text-xs font-medium truncate",children:a.title||((x=a.content)==null?void 0:x.slice(0,60))}),e("div",{class:"flex items-center gap-2 mt-0.5",children:[a.type&&e("span",{class:"text-[10px] mono text-info",children:a.type}),a.relevance&&e("span",{class:w("text-[10px] mono",a.relevance==="high"?"text-success":"text-muted-foreground"),children:a.relevance})]})]},u)})})]})}function Gt(t,r){var l,s;const n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=[];for(let i=6;i>=0;i--){const c=new Date;c.setDate(c.getDate()-i);const a=c.toISOString().slice(0,10);o.push({label:n[c.getDay()],date:a,events:0,journal:0})}for(const i of t){const c=(l=i.ts)==null?void 0:l.slice(0,10),a=o.find(u=>u.date===c);a&&a.events++}for(const i of r){const c=(s=i.timestamp)==null?void 0:s.slice(0,10),a=o.find(u=>u.date===c);a&&a.journal++}return o}function Wt({events:t,journalItems:r}){const n=Gt(t,r),o=Math.max(...n.map(l=>l.events+l.journal),1);return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-4",children:[e("h3",{class:"text-sm font-medium",children:"Activity"}),e("span",{class:"text-xs text-muted-foreground",children:"last 7 days"})]}),e("div",{class:"flex items-end justify-between gap-2 h-24",children:n.map(l=>{const s=l.events+l.journal,i=o>0?l.events/o*80:0,c=o>0?l.journal/o*80:0;return e("div",{class:"flex-1 flex flex-col items-center gap-1",children:[e("div",{class:"w-full flex flex-col items-center justify-end h-20",children:e("div",{class:"w-full max-w-8 flex flex-col-reverse gap-px",children:[l.journal>0&&e("div",{class:"w-full bg-success/80 rounded-t-sm",style:{height:`${Math.max(c,3)}px`}}),l.events>0&&e("div",{class:"w-full bg-info/60 rounded-t-sm",style:{height:`${Math.max(i,3)}px`}})]})}),e("span",{class:"text-[10px] text-muted-foreground",children:l.label}),e("span",{class:"text-[10px] mono text-muted-foreground",children:s})]},l.date)})}),e("div",{class:"flex items-center gap-4 mt-3 justify-center",children:[e("span",{class:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[e("span",{class:"inline-block w-2.5 h-2.5 rounded-sm bg-info/60"})," events"]}),e("span",{class:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[e("span",{class:"inline-block w-2.5 h-2.5 rounded-sm bg-success/80"})," journal"]})]})]})}function re({label:t,value:r,sub:n,trend:o,icon:l}){return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-2",children:[e("span",{class:"text-xs text-muted-foreground uppercase tracking-wider",children:t}),l&&e("span",{class:"text-muted-foreground",children:l})]}),e("div",{class:"text-2xl font-semibold mono",children:r}),n&&e("div",{class:`text-xs mt-1 ${o==="up"?"text-success":o==="down"?"text-destructive":"text-muted-foreground"}`,children:n})]})}function Te({data:t,width:r=120,height:n=32,color:o="var(--success)",className:l=""}){if(!t.length)return null;const s=Math.min(...t),c=Math.max(...t)-s||1,a=2,u=t.map((x,d)=>{const f=a+d/(t.length-1||1)*(r-a*2),g=n-a-(x-s)/c*(n-a*2);return`${f},${g}`}).join(" ");return e("svg",{width:r,height:n,class:l,viewBox:`0 0 ${r} ${n}`,children:[e("polyline",{points:u,fill:"none",stroke:o,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e("circle",{cx:parseFloat(u.split(" ").pop().split(",")[0]),cy:parseFloat(u.split(" ").pop().split(",")[1]),r:"2.5",fill:o})]})}const Xt={ok:"bg-success",active:"bg-success",error:"bg-destructive",down:"bg-destructive",warning:"bg-warning",idle:"bg-muted-foreground"};function Z({status:t,label:r,pulse:n=!0}){return e("span",{class:"inline-flex items-center gap-1.5",children:[e("span",{class:w("inline-block w-2 h-2 rounded-full",Xt[t]||"bg-muted-foreground",n&&(t==="ok"||t==="active")&&"animate-pulse-dot")}),r&&e("span",{class:"text-xs text-muted-foreground",children:r})]})}const qt={"eval:scored":"text-info","flow:triggered":"text-warning","journal:entry":"text-success","session:started":"text-accent-foreground","session:ended":"text-muted-foreground",error:"text-destructive"};function Vt({events:t,maxItems:r=20}){const n=t.slice(0,r);return n.length?e("div",{class:"space-y-1",children:n.map(o=>{var l,s,i;return e("div",{class:"flex items-start gap-3 py-2 px-3 rounded hover:bg-muted/30 transition-colors text-sm animate-fade-in",children:[e("span",{class:"text-[10px] text-muted-foreground mono whitespace-nowrap mt-0.5",children:q(o.ts)}),e("span",{class:`text-xs mono font-medium whitespace-nowrap ${qt[o.type]||"text-foreground"}`,children:o.type}),e("span",{class:"text-xs text-muted-foreground truncate flex-1",children:[o.source,((l=o.data)==null?void 0:l.agent)&&` / ${o.data.agent}`,((s=o.data)==null?void 0:s.title)&&` — ${o.data.title}`,((i=o.data)==null?void 0:i.composite)!=null&&` (${Number(o.data.composite).toFixed(4)})`]})]},o.id)})}):e("div",{class:"text-sm text-muted-foreground py-8 text-center",children:"No events yet"})}function Jt({agent:t,onClick:r}){const n=t.composite!=null?t.composite.toFixed(4):"—",o=t.delta!=null?`${t.delta>=0?"+":""}${t.delta.toFixed(4)}`:null,l=t.delta!=null?t.delta>0?"up":t.delta<0?"down":"neutral":"neutral",s=l==="up"?"text-success":l==="down"?"text-destructive":"text-muted-foreground",i=Object.entries(t.metrics).filter(([c])=>c!=="composite");return e("button",{onClick:r,class:"w-full text-left bg-card rounded-lg border border-border p-4 hover:border-muted-foreground/40 transition-colors animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-3",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:"active"}),e("span",{class:"font-medium text-sm",children:t.agent})]}),t.model_version&&e("span",{class:"text-[10px] mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:t.model_version})]}),e("div",{class:"flex items-end justify-between",children:[e("div",{children:[e("div",{class:"text-2xl font-semibold mono",children:n}),o&&e("span",{class:`text-xs mono ${s}`,children:o})]}),t.trajectory.length>1&&e(Te,{data:t.trajectory,color:l==="up"?"var(--success)":l==="down"?"var(--destructive)":"var(--info)"})]}),i.length>0&&e("div",{class:"mt-3 pt-3 border-t border-border grid grid-cols-2 gap-x-4 gap-y-1",children:i.map(([c,a])=>e("div",{class:"flex justify-between text-xs",children:[e("span",{class:"text-muted-foreground",children:c}),e("span",{class:"mono",children:typeof a=="number"?a.toFixed(4):a})]},c))})]})}function Yt(t){const r={};for(const n of t){const o=Object.keys(n.metrics).filter(s=>s!=="composite");let l="other";o.some(s=>["ndcg@10","mrr","precision@5"].includes(s))?l="productrank":o.some(s=>["avg_rank","keywords_ranked","rank_rate"].includes(s))&&(l="seo"),r[l]||(r[l]=[]),r[l].push(n)}return r}function Kt({status:t}){var m,T,S;const r=U(()=>M.events(200),5e3),n=U(()=>M.leaderboard(),15e3),o=U(()=>M.services(),15e3),l=U(()=>M.journal(),15e3),s=U(()=>M.synopsis(24),3e4),i=(t==null?void 0:t.type)||"standalone",c=t==null?void 0:t.config,a=(t==null?void 0:t.children)||[],u=((m=r.data)==null?void 0:m.events)||[],x=n.data||[],d=o.data||{},f=l.data||[],g=a.filter(E=>E.status==="ok").length,h=((T=c==null?void 0:c.registered_services)==null?void 0:T.length)||0,y=Object.keys(d).length,v=Math.max(h,y),b=((S=c==null?void 0:c.openclaw_agents)==null?void 0:S.length)||0,p=Yt(x);return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("div",{children:[e("h1",{class:"text-xl font-semibold",children:(c==null?void 0:c.name)||"Dashboard"}),(c==null?void 0:c.description)&&e("p",{class:"text-sm text-muted-foreground mt-1",children:c.description})]}),e(Qt,{})]}),e("div",{class:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[i==="portfolio"&&e(re,{label:"Products",value:a.length,sub:`${g}/${a.length} healthy`,trend:g===a.length?"up":"down"}),e(re,{label:"Services",value:v,sub:`${h} registered`}),e(re,{label:"Agents",value:x.length+b,sub:`${x.length} eval · ${b} openclaw`}),e(re,{label:"Events",value:u.length,sub:"recent"})]}),e(Wt,{events:u,journalItems:f}),e(or,{events:u}),s.data&&e(sr,{data:s.data}),i==="portfolio"&&a.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Products"}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:a.map(E=>{const z=Object.values(d).filter(I=>I.name.startsWith(E.name.replace("-gtm",""))),V=x.filter(I=>I.agent.startsWith(E.name.replace("-gtm",""))),$=V.length>0?V.reduce((I,ne)=>(ne.composite||0)>(I.composite||0)?ne:I):null;return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-2",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:E.status}),e("span",{class:"font-medium",children:E.name})]}),e("span",{class:"text-xs mono text-muted-foreground",children:[":",E.port]})]}),e("div",{class:"grid grid-cols-3 gap-3 mt-3",children:[e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Services"}),e("div",{class:"text-lg font-semibold mono",children:z.length})]}),e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Agents"}),e("div",{class:"text-lg font-semibold mono",children:V.length})]}),e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Top Score"}),e("div",{class:"text-lg font-semibold mono",children:($==null?void 0:$.composite)!=null?$.composite.toFixed(2):"—"})]})]}),z.length>0&&e("div",{class:"flex flex-wrap gap-1.5 mt-3 pt-3 border-t border-border",children:z.map(I=>e("span",{class:"inline-flex items-center gap-1 text-[10px] mono bg-muted px-1.5 py-0.5 rounded",children:[e(Z,{status:I.status==="active"?"ok":"idle",pulse:!1}),I.name.replace(`${E.name.replace("-gtm","")}-`,"")]},I.name))})]},E.name)})})]}),Object.keys(p).length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Eval Leaderboards"}),e("div",{class:"space-y-4",children:Object.entries(p).map(([E,z])=>e(Zt,{title:E==="productrank"?"ProductRank":E==="seo"?"SEO":"Other",agents:z},E))})]}),i!=="portfolio"&&v>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Services"}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:Object.values(d).map(E=>e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-1",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:E.status==="active"?"ok":"idle"}),e("span",{class:"font-medium text-sm",children:E.name})]}),E.type&&e("span",{class:"text-[10px] mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded uppercase",children:E.type})]}),E.description&&e("p",{class:"text-xs text-muted-foreground mt-1",children:E.description})]},E.name))})]}),e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Recent Activity"}),e("div",{class:"bg-card rounded-lg border border-border",children:e(tr,{events:u,journal:f})})]})]})}function Qt(){const[t,r]=D(null),n=[{label:"run eval",event:"eval:run-requested",data:{source:"dashboard"}},{label:"health check",event:"custom",data:{title:"Manual health check",source:"dashboard"}},{label:"run peter",spawn:!0,command:"jfl",args:["peter","run"]}],o=async l=>{try{l.spawn?await M.spawnAction(l.command,l.args,l.event):await M.publishEvent(l.event,l.data||{}),r(l.label),setTimeout(()=>r(null),2e3)}catch(s){console.error("Action failed:",s)}};return e("div",{class:"flex items-center gap-2",children:[e("span",{class:"text-xs text-muted-foreground",children:"Actions:"}),n.map(l=>e("button",{onClick:()=>o(l),class:w("text-[10px] mono px-2 py-1 rounded transition-colors",t===l.label?"bg-success/15 text-success":"bg-muted text-muted-foreground hover:text-foreground hover:bg-muted/80"),children:t===l.label?"done":l.label},l.label))]})}function Zt({title:t,agents:r}){const n=[...r].sort((s,i)=>(i.composite||0)-(s.composite||0)),o=new Set;for(const s of n)for(const i of Object.keys(s.metrics))i!=="composite"&&o.add(i);const l=[...o].slice(0,4);return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:t}),e("span",{class:"text-[10px] text-muted-foreground ml-2",children:[n.length," agents"]})]}),e("table",{class:"w-full text-sm",children:[e("thead",{children:e("tr",{class:"border-b border-border text-xs text-muted-foreground",children:[e("th",{class:"text-left py-2 px-3 font-medium w-8",children:"#"}),e("th",{class:"text-left py-2 px-3 font-medium",children:"Agent"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Score"}),l.map(s=>e("th",{class:"text-right py-2 px-3 font-medium hidden lg:table-cell",children:s},s)),e("th",{class:"text-right py-2 px-3 font-medium w-20",children:"Trend"})]})}),e("tbody",{children:n.map((s,i)=>{const c=s.delta,a=c!=null?c>0?"text-success":c<0?"text-destructive":"text-muted-foreground":"text-muted-foreground";return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-2 px-3 mono text-muted-foreground",children:i+1}),e("td",{class:"py-2 px-3",children:[e("div",{class:"font-medium",children:s.agent}),e("div",{class:"flex items-center gap-2",children:[s.model_version&&e("span",{class:"text-[10px] mono text-muted-foreground",children:s.model_version}),c!=null&&e("span",{class:`text-[10px] mono ${a}`,children:[c>=0?"+":"",c.toFixed(4)]})]})]}),e("td",{class:"py-2 px-3 mono text-right text-lg font-semibold",children:s.composite!=null?s.composite.toFixed(4):"—"}),l.map(u=>e("td",{class:"py-2 px-3 mono text-right text-muted-foreground hidden lg:table-cell",children:s.metrics[u]!=null?s.metrics[u].toFixed(4):"—"},u)),e("td",{class:"py-2 px-3 text-right",children:s.trajectory.length>1&&e(Te,{data:s.trajectory,width:80,height:24,color:c!=null&&c>0?"var(--success)":c!=null&&c<0?"var(--destructive)":"var(--info)"})})]},s.agent)})})]})]})}const er={"eval:scored":"text-info","flow:triggered":"text-warning","journal:entry":"text-success",onboard:"text-purple-400",error:"text-destructive"};function tr({events:t,journal:r}){var s;const n=[],o=t.filter(i=>!i.type.startsWith("session:"));for(const i of o.slice(0,30)){const c=i.data||{};n.push({kind:"event",ts:i.ts,type:i.type,label:c.title||c.message||c.agent||c.service||i.source||i.type,detail:c.composite!=null?`score: ${Number(c.composite).toFixed(4)}`:c.description||void 0,source:i.source})}for(const i of r.slice(0,20))n.push({kind:"journal",ts:i.timestamp||i.ts,type:i.type||"entry",label:i.title,detail:i.summary||((s=i.content)==null?void 0:s.slice(0,100)),source:i.source});n.sort((i,c)=>new Date(c.ts).getTime()-new Date(i.ts).getTime());const l=n.slice(0,25);return l.length?e("div",{class:"space-y-0.5",children:l.map((i,c)=>e("div",{class:"flex items-start gap-3 py-2 px-3 rounded hover:bg-muted/30 transition-colors text-sm",children:[e("span",{class:"text-[10px] text-muted-foreground mono whitespace-nowrap mt-0.5 min-w-[4rem]",children:q(i.ts)}),i.kind==="journal"?e("span",{class:"w-1.5 h-1.5 rounded-full bg-success mt-1.5 shrink-0"}):e("span",{class:"w-1.5 h-1.5 rounded-full bg-info mt-1.5 shrink-0"}),e("div",{class:"min-w-0 flex-1",children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:w("text-xs mono font-medium whitespace-nowrap",er[i.type]||(i.kind==="journal"?"text-success":"text-foreground")),children:i.type}),e("span",{class:"text-xs text-foreground truncate",children:i.label})]}),i.detail&&e("div",{class:"text-[10px] text-muted-foreground mt-0.5 truncate",children:i.detail})]})]},c))}):e("div",{class:"text-sm text-muted-foreground py-8 text-center",children:"No activity yet"})}function rr(t){var i;const r=t.filter(c=>c.type==="eval:scored"),n=t.filter(c=>c.type==="flow:completed"||c.type==="flow:triggered");if(r.length===0)return[];const o=new Map;for(const c of r)o.set(c.id,c);const l=new Map;for(const c of n){const a=(i=c.data)==null?void 0:i.trigger_event_id;a&&(l.has(a)||l.set(a,[]),l.get(a).push(c))}const s=[];for(const c of r){const a=c.data||{},u=a.pr_number||a.pr,x=a.agent||"peter-parker",d=a.branch,f=a.composite!=null?Number(a.composite).toFixed(4):"?",g=a.delta!=null?Number(a.delta):null,h=a.improved,v=(l.get(c.id)||[]).map(S=>{var E;return((E=S.data)==null?void 0:E.flow_name)||S.source||""}),b=v.some(S=>S.includes("auto-merge")),p=v.some(S=>S.includes("flag-regression")||S.includes("regression")),m=v.some(S=>S.includes("training")),T=[{stage:"PR Created",status:"done",ts:c.ts},{stage:"Eval",status:"done",detail:`${f} (${g!=null?(g>=0?"+":"")+g.toFixed(4):"?"})`}];h===!0||g!=null&&g>0?b?T.push({stage:"Auto-Merged",status:"done",detail:"improved"}):T.push({stage:"Merge",status:"active",detail:"pending"}):(h===!1||g!=null&&g<0)&&(p?T.push({stage:"Flagged",status:"done",detail:"regression"}):T.push({stage:"Review",status:"active",detail:"regressed"})),m&&T.push({stage:"Training Tuple",status:"done"}),s.push({pr:u?`#${u}`:"eval",branch:d,agent:x,stages:T})}return s.slice(0,5)}function nr(t,r){return t==="Flagged"?"bg-destructive/15 text-destructive border-destructive/30":t==="Auto-Merged"?"bg-success/15 text-success border-success/30":t==="Training Tuple"?"bg-purple-500/15 text-purple-400 border-purple-500/30":t==="Eval"&&r==="done"?"bg-info/15 text-info border-info/30":r==="active"?"bg-warning/15 text-warning border-warning/30 animate-pulse-dot":r==="done"?"bg-success/15 text-success border-success/30":"bg-muted text-muted-foreground border-border"}function or({events:t}){const r=rr(t);if(r.length===0)return null;const n=r.filter(l=>l.stages.some(s=>s.stage==="Auto-Merged")).length,o=r.filter(l=>l.stages.some(s=>s.stage==="Flagged")).length;return e("section",{children:[e("div",{class:"flex items-center justify-between mb-3",children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Self-Driving Loop"}),e("div",{class:"flex items-center gap-3 text-[10px] mono",children:[n>0&&e("span",{class:"text-success",children:[n," merged"]}),o>0&&e("span",{class:"text-destructive",children:[o," flagged"]}),e("span",{class:"text-muted-foreground",children:[r.length," PRs"]})]})]}),e("div",{class:"space-y-2",children:r.map((l,s)=>{const i=l.stages.some(c=>c.stage==="Flagged");return e("div",{class:w("bg-card rounded-lg border p-3 animate-fade-in",i?"border-destructive/20":"border-border"),children:[e("div",{class:"flex items-center gap-2 mb-2.5",children:[e("span",{class:w("text-xs font-semibold mono",i?"text-destructive":"text-foreground"),children:l.pr}),l.branch&&e("span",{class:"text-[10px] mono text-muted-foreground/70 truncate max-w-56",children:l.branch}),e("span",{class:"text-[10px] mono text-muted-foreground ml-auto",children:l.agent})]}),e("div",{class:"flex items-center gap-1.5",children:l.stages.map((c,a)=>e("div",{class:"flex items-center gap-1.5",children:[a>0&&e("svg",{width:"16",height:"8",viewBox:"0 0 16 8",class:"shrink-0 text-muted-foreground/30",children:e("path",{d:"M0 4h12M10 1l3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),e("div",{class:w("text-[10px] mono px-2.5 py-1.5 rounded-md border",nr(c.stage,c.status)),children:[e("div",{class:"font-medium",children:c.stage}),c.detail&&e("div",{class:"text-[9px] opacity-60 mt-0.5",children:c.detail})]})]},a))})]},s)})})]})}function sr({data:t}){const r=t.summary;return r.features+r.fixes+r.decisions+r.discoveries>0||t.commits.length>0?e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Work Summary ",e("span",{class:"text-[10px] font-normal",children:["last ",t.hours,"h"]})]}),e("div",{class:"bg-card rounded-lg border border-border p-4",children:[e("div",{class:"grid grid-cols-2 md:grid-cols-5 gap-4 mb-4",children:[r.features>0&&e("div",{children:[e("div",{class:"text-lg font-semibold mono text-success",children:r.features}),e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Features"})]}),r.fixes>0&&e("div",{children:[e("div",{class:"text-lg font-semibold mono text-warning",children:r.fixes}),e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Fixes"})]}),r.decisions>0&&e("div",{children:[e("div",{class:"text-lg font-semibold mono text-info",children:r.decisions}),e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Decisions"})]}),r.discoveries>0&&e("div",{children:[e("div",{class:"text-lg font-semibold mono text-purple-400",children:r.discoveries}),e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Discoveries"})]}),t.commits.length>0&&e("div",{children:[e("div",{class:"text-lg font-semibold mono",children:t.commits.length}),e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Commits"})]})]}),t.commits.length>0&&e("div",{class:"border-t border-border pt-3",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"Recent Commits"}),e("div",{class:"space-y-1",children:t.commits.slice(0,5).map(o=>e("div",{class:"flex items-center gap-2 text-xs",children:[e("span",{class:"mono text-muted-foreground text-[10px]",children:o.hash.slice(0,7)}),e("span",{class:"truncate",children:o.message}),e("span",{class:"text-[10px] text-muted-foreground ml-auto whitespace-nowrap",children:q(o.date)})]},o.hash))})]}),r.incompleteItems.length>0&&e("div",{class:"border-t border-border pt-3 mt-3",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"Incomplete"}),e("div",{class:"space-y-1",children:r.incompleteItems.slice(0,5).map((o,l)=>e("div",{class:"text-xs text-warning/80 flex items-center gap-1.5",children:[e("span",{class:"w-1 h-1 rounded-full bg-warning/60 shrink-0"}),o]},l))})]})]})]}):null}const kt=["scout","planner","builder","reviewer","tester"],St={"cost-optimized":{scout:"haiku",planner:"sonnet",builder:"sonnet",reviewer:"sonnet",tester:"haiku"},balanced:{scout:"haiku",planner:"sonnet",builder:"sonnet",reviewer:"opus",tester:"sonnet"},"quality-first":{scout:"sonnet",planner:"opus",builder:"sonnet",reviewer:"opus",tester:"sonnet"}},$e={scout:"sonnet",planner:"opus",builder:"opus",reviewer:"opus",tester:"sonnet"},je={haiku:"bg-success/15 text-success",sonnet:"bg-info/15 text-info",opus:"bg-purple-500/15 text-purple-400"},lr={scout:"Explores codebase, gathers context",planner:"Designs approach, breaks down tasks",builder:"Writes code, implements features",reviewer:"Reviews output, catches issues",tester:"Validates correctness, runs checks"};function ir(t){const r={};for(const n of t){const o=Object.keys(n.metrics).filter(s=>s!=="composite");let l="other";o.some(s=>["ndcg@10","mrr","precision@5"].includes(s))?l="ProductRank":o.some(s=>["avg_rank","keywords_ranked","rank_rate"].includes(s))&&(l="SEO"),r[l]||(r[l]=[]),r[l].push(n)}return r}function dr(){const t=U(()=>M.leaderboard(),15e3),[r,n]=D(null),o=t.data||[],l=ir(o);return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("h1",{class:"text-xl font-semibold",children:"Agents"}),e("span",{class:"text-sm text-muted-foreground",children:[o.length," tracked"]})]}),e(cr,{}),t.loading?e("div",{class:"text-sm text-muted-foreground",children:"Loading..."}):o.length===0?e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:[e("div",{class:"text-muted-foreground text-sm",children:"No eval data yet"}),e("div",{class:"text-muted-foreground text-xs mt-1",children:"Run evaluations to see agent performance here"})]}):Object.entries(l).map(([s,i])=>e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:[s,e("span",{class:"text-[10px] ml-2 normal-case",children:["(",i.length," agents)"]})]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:i.sort((c,a)=>(a.composite||0)-(c.composite||0)).map(c=>e(Jt,{agent:c,onClick:()=>n(c.agent===r?null:c.agent)},c.agent))}),r&&i.some(c=>c.agent===r)&&e(mr,{agentName:r})]},s))]})}function cr(){const[t,r]=D("balanced"),[n,o]=D(!1),[l,s]=D(!1),c=U(()=>M.events(50,"peter:*").then(d=>((d==null?void 0:d.events)||[]).filter(g=>g.type.startsWith("peter:"))),15e3).data||[],a=c.find(d=>d.type==="peter:started"),u=c.filter(d=>d.type==="peter:task-completed").length,x=a&&!c.some(d=>d.type==="peter:all-complete"&&d.ts>a.ts);return e("section",{children:[e("div",{class:"flex items-center justify-between mb-3",children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:["Peter Parker",e("span",{class:"text-[10px] ml-2 normal-case",children:"RL Orchestrator"})]}),x&&e("span",{class:"text-[10px] mono px-1.5 py-0.5 rounded bg-success/10 text-success uppercase animate-pulse-dot",children:"running"})]}),e("div",{class:"grid grid-cols-1 md:grid-cols-5 gap-3 mb-4",children:kt.map(d=>{const f=St[t][d],g=$e[d],y=c.filter(v=>{var b,p;return((b=v.data)==null?void 0:b.agent_role)===d||((p=v.data)==null?void 0:p.role)===d})[0];return e("div",{class:"bg-card rounded-lg border border-border p-3 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-2",children:[e("span",{class:"text-xs font-medium capitalize",children:d}),e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",je[f]),children:f})]}),e("div",{class:"text-[10px] text-muted-foreground mb-2",children:lr[d]}),e("div",{class:"flex items-center justify-between pt-2 border-t border-border",children:[e("span",{class:"text-[10px] mono text-muted-foreground",children:["fallback: ",g]}),y&&e("span",{class:"text-[10px] mono text-muted-foreground",children:q(y.ts)})]})]},d)})}),e("div",{class:"flex items-center gap-2 mb-4",children:[e("span",{class:"text-xs text-muted-foreground",children:"Profile:"}),["cost-optimized","balanced","quality-first"].map(d=>e("button",{onClick:()=>r(d),class:w("text-[10px] mono px-2 py-1 rounded transition-colors",t===d?"bg-info/15 text-info":"bg-muted text-muted-foreground hover:text-foreground"),children:d},d)),e("button",{onClick:async()=>{try{await M.spawnAction("jfl",["peter","run","--profile",t],"peter:started"),s(!0),setTimeout(()=>s(!1),3e3)}catch(d){console.error("Failed to spawn:",d)}},class:w("text-[10px] mono px-2 py-1 rounded transition-colors",l?"bg-success/15 text-success":"bg-info/15 text-info hover:bg-info/25"),children:l?"spawned":"run peter"}),e("button",{onClick:()=>o(!n),class:"ml-auto text-[10px] mono text-muted-foreground hover:text-foreground transition-colors",children:[n?"hide":"show"," full table"]})]}),n&&e(ar,{activeProfile:t}),c.length>0?e("div",{class:"bg-card rounded-lg border border-border overflow-hidden",children:[e("div",{class:"px-3 py-2 border-b border-border flex items-center justify-between",children:[e("span",{class:"text-xs font-medium",children:"Event Log"}),e("span",{class:"text-[10px] mono text-muted-foreground",children:[u," tasks completed"]})]}),e("div",{class:"max-h-64 overflow-y-auto",children:e("table",{class:"w-full text-xs",children:e("tbody",{children:c.slice(0,20).map((d,f)=>e(pr,{event:d},f))})})})]}):e("div",{class:"bg-card rounded-lg border border-border/50 p-6 text-center",children:[e("div",{class:"text-muted-foreground text-sm",children:"No orchestrator activity yet"}),e("div",{class:"text-muted-foreground text-[10px] mt-1 mono",children:["jfl peter start --profile ",t]})]})]})}function ar({activeProfile:t}){const r=["cost-optimized","balanced","quality-first"];return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden mb-4 animate-fade-in",children:e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"border-b border-border text-muted-foreground",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Role"}),r.map(n=>e("th",{class:w("text-center py-2 px-3 font-medium",n===t&&"text-info"),children:n.split("-").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" ")},n)),e("th",{class:"text-center py-2 px-3 font-medium",children:"Fallback"})]})}),e("tbody",{children:kt.map(n=>e("tr",{class:"border-b border-border/50",children:[e("td",{class:"py-2 px-3 font-medium capitalize",children:n}),r.map(o=>{const l=St[o][n];return e("td",{class:"py-2 px-3 text-center",children:e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded inline-block",je[l],o===t&&"ring-1 ring-info/30"),children:l})},o)}),e("td",{class:"py-2 px-3 text-center",children:e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded inline-block",je[$e[n]]),children:$e[n]})})]},n))})]})})}const ur={"peter:started":{color:"text-info",label:"RUN STARTED"},"peter:task-selected":{color:"text-warning",label:"TASK SELECTED"},"peter:task-completed":{color:"text-success",label:"TASK DONE"},"peter:all-complete":{color:"text-success",label:"ALL COMPLETE"}};function pr({event:t}){const r=ur[t.type]||{color:"text-muted-foreground",label:t.type},n=t.data,o=n.task_name||n.bead_title||n.title||"",l=n.agent_role||n.role||"",s=n.model||n.execution_llm||"";return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:w("py-1.5 px-3 mono whitespace-nowrap",r.color),children:r.label}),e("td",{class:"py-1.5 px-3 truncate max-w-48",children:o}),e("td",{class:"py-1.5 px-3 mono text-muted-foreground",children:[l&&e("span",{class:"capitalize",children:l}),s&&e("span",{class:"ml-2 text-[10px]",children:["(",s,")"]})]}),e("td",{class:"py-1.5 px-3 mono text-muted-foreground text-right whitespace-nowrap",children:q(t.ts)})]})}function mr({agentName:t}){var o;const r=U(()=>M.trajectory(t),3e4,[t]),n=((o=r.data)==null?void 0:o.points)||[];return e("div",{class:"bg-card rounded-lg border border-border p-4 mt-4 animate-fade-in",children:[e("h3",{class:"text-sm font-medium mb-3",children:[t," — Trajectory"]}),r.loading?e("div",{class:"text-sm text-muted-foreground",children:"Loading..."}):n.length===0?e("div",{class:"text-sm text-muted-foreground",children:"No trajectory data"}):e("div",{class:"max-h-48 overflow-y-auto",children:e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border",children:[e("th",{class:"text-left py-1 font-medium",children:"Time"}),e("th",{class:"text-right py-1 font-medium",children:"Score"}),e("th",{class:"text-right py-1 font-medium",children:"Model"})]})}),e("tbody",{children:n.slice().reverse().slice(0,20).map((l,s)=>e("tr",{class:"border-b border-border/50",children:[e("td",{class:"py-1 mono text-muted-foreground",children:new Date(l.ts).toLocaleString()}),e("td",{class:"py-1 mono text-right",children:l.value.toFixed(4)}),e("td",{class:"py-1 mono text-right text-muted-foreground",children:l.model_version||"—"})]},s))})]})})]})}function hr(){const t=U(()=>M.journal(),1e4),[r,n]=D(""),[o,l]=D(null),s=t.data||[],i={};for(const d of s)i[d.type]=(i[d.type]||0)+1;const c=Object.entries(i).sort((d,f)=>f[1]-d[1]),a=Math.max(...Object.values(i),1),u={feature:"bg-success",fix:"bg-destructive",decision:"bg-warning",milestone:"bg-info",discovery:"bg-info/70",submission:"bg-accent",iteration:"bg-muted-foreground",spec:"bg-muted-foreground/70"},x=s.filter(d=>{var f,g;if(o&&d.type!==o)return!1;if(r){const h=r.toLowerCase();return d.title.toLowerCase().includes(h)||((f=d.content)==null?void 0:f.toLowerCase().includes(h))||((g=d.source)==null?void 0:g.toLowerCase().includes(h))}return!0});return e("div",{class:"space-y-5",children:[e("div",{class:"flex items-center justify-between",children:[e("h1",{class:"text-xl font-semibold",children:"Journal"}),e("span",{class:"text-sm text-muted-foreground",children:[x.length," entries"]})]}),e("div",{class:"relative",children:[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.3-4.3"})]}),e("input",{type:"text",placeholder:"Search journal entries...",value:r,onInput:d=>n(d.target.value),class:"w-full bg-card border border-border rounded-lg pl-10 pr-4 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-info/50 transition-colors"})]}),c.length>0&&e("div",{class:"flex flex-wrap gap-1.5",children:[e("button",{onClick:()=>l(null),class:w("text-[11px] mono font-medium px-2 py-0.5 rounded-md transition-colors",o?"bg-muted/50 text-muted-foreground hover:text-foreground":"bg-foreground/10 text-foreground"),children:"all"}),c.map(([d,f])=>e("button",{onClick:()=>l(o===d?null:d),class:w("text-[11px] mono font-medium px-2 py-0.5 rounded-md transition-colors",o===d?"bg-foreground/10 text-foreground":"bg-muted/50 text-muted-foreground hover:text-foreground"),children:[d,e("span",{class:"ml-1 text-[10px] opacity-60",children:f})]},d))]}),c.length>0&&!r&&!o&&e("div",{class:"bg-card rounded-lg border border-border p-4",children:[e("h3",{class:"text-xs text-muted-foreground uppercase tracking-wider mb-3",children:"By Type"}),e("div",{class:"space-y-1.5",children:c.map(([d,f])=>e("div",{class:"flex items-center gap-3",children:[e("span",{class:`text-[10px] mono font-medium px-1.5 py-0.5 rounded ${u[d]||"bg-muted"} text-white min-w-16 text-center uppercase`,children:d}),e("div",{class:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:e("div",{class:`h-full rounded-full ${u[d]||"bg-muted-foreground"} transition-all`,style:{width:`${f/a*100}%`}})}),e("span",{class:"text-xs mono text-muted-foreground w-6 text-right",children:f})]},d))})]}),t.loading?e("div",{class:"text-sm text-muted-foreground animate-pulse-dot",children:"Loading journal..."}):x.length===0?e("div",{class:"bg-card rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r||o?"No matching entries":"No journal entries"}):e("div",{class:"space-y-1.5",children:x.map((d,f)=>e(fr,{entry:d,highlight:r},`${d.timestamp}-${f}`))})]})}function fr({entry:t,highlight:r}){const[n,o]=D(!1),s={feature:{bg:"bg-success/10",text:"text-success"},fix:{bg:"bg-destructive/10",text:"text-destructive"},decision:{bg:"bg-warning/10",text:"text-warning"},milestone:{bg:"bg-info/10",text:"text-info"},discovery:{bg:"bg-accent",text:"text-accent-foreground"}}[t.type]||{bg:"bg-muted",text:"text-muted-foreground"};return e("button",{onClick:()=>o(!n),class:"w-full text-left bg-card rounded-lg border border-border p-3 hover:border-border/80 transition-colors animate-fade-in",children:[e("div",{class:"flex items-center gap-2 mb-1",children:[e("span",{class:`text-[10px] mono font-medium px-1.5 py-0.5 rounded ${s.bg} ${s.text}`,children:t.type}),e("span",{class:"text-[10px] text-muted-foreground mono truncate",children:t.source}),e("span",{class:"text-[10px] text-muted-foreground ml-auto mono shrink-0",children:q(t.timestamp)})]}),e("div",{class:"text-sm font-medium",children:t.title}),t.content&&e("div",{class:w("text-xs text-muted-foreground mt-1",n?"":"line-clamp-2"),children:t.content})]})}const gr=[{label:"All",pattern:""},{label:"Eval",pattern:"eval:*"},{label:"Session",pattern:"session:*"},{label:"Journal",pattern:"journal:*"},{label:"Peter",pattern:"peter:*"},{label:"Flow",pattern:"flow:*"},{label:"Service",pattern:"service:*"},{label:"Hook",pattern:"hook:*"}];function xr(){var x;const[t,r]=D([]),[n,o]=D(""),[l,s]=D(""),i=U(()=>M.events(100,n||void 0),1e4,[n]);Nt("/api/events/stream",ze(d=>{r(f=>[d,...f].slice(0,50))},[]));const a=[...t,...((x=i.data)==null?void 0:x.events)||[]].filter((d,f,g)=>g.findIndex(h=>h.id===d.id)===f),u=n?a.filter(d=>{if(!n.includes("*"))return d.type===n;const f=n.replace("*","");return d.type.startsWith(f)}):a;return e("div",{class:"space-y-5",children:[e("div",{class:"flex items-center justify-between",children:[e("h1",{class:"text-xl font-semibold",children:"Events"}),e("div",{class:"flex items-center gap-3",children:[t.length>0&&e("span",{class:"text-xs text-success mono animate-pulse-dot",children:"LIVE"}),e("span",{class:"text-sm text-muted-foreground",children:[u.length," events"]})]})]}),e("div",{class:"space-y-2",children:[e("div",{class:"flex flex-wrap gap-1.5",children:gr.map(d=>e("button",{onClick:()=>{o(d.pattern),s("")},class:w("text-[11px] mono font-medium px-2 py-0.5 rounded-md transition-colors",n===d.pattern?"bg-foreground/10 text-foreground":"bg-muted/50 text-muted-foreground hover:text-foreground"),children:d.label},d.pattern))}),e("div",{class:"relative",children:[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.3-4.3"})]}),e("input",{type:"text",placeholder:"Custom pattern (e.g. peter:*, eval:scored)",value:l,onInput:d=>{const f=d.target.value;s(f),o(f)},class:"w-full bg-card border border-border rounded-lg pl-9 pr-4 py-1.5 text-xs mono text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-info/50 transition-colors"})]})]}),e("div",{class:"bg-card rounded-lg border border-border",children:i.loading&&u.length===0?e("div",{class:"p-4 text-sm text-muted-foreground animate-pulse-dot",children:"Loading events..."}):e(Vt,{events:u,maxItems:100})})]})}function Tt(t,r){return r.endsWith("*")?t.startsWith(r.slice(0,-1)):t===r}function br(t){var n,o;const r=[];for(const l of t)for(const s of t){if(l.name===s.name)continue;const i=((n=l.context_scope)==null?void 0:n.produces)||[],c=((o=s.context_scope)==null?void 0:o.consumes)||[];for(const a of i)for(const u of c)Tt(a,u)&&r.push({from:l.name,to:s.name,pattern:a})}return r}function Ge(t){switch(t){case"web":return"bg-info/15 text-info";case"cli":return"bg-success/15 text-success";case"api":return"bg-warning/15 text-warning";case"library":return"bg-purple-500/15 text-purple-400";case"gtm":return"bg-pink-500/15 text-pink-400";default:return"bg-muted text-muted-foreground"}}function vr({status:t}){var x,d;const r=U(()=>M.services(),1e4),n=(t==null?void 0:t.children)||[],o=(t==null?void 0:t.type)||"standalone",l=((x=t==null?void 0:t.config)==null?void 0:x.registered_services)||[],s=((d=t==null?void 0:t.config)==null?void 0:d.openclaw_agents)||[],i=r.data?Object.values(r.data):[],c=br(l),a={};if(o==="portfolio")for(const f of n){const g=f.name.replace("-gtm","");a[f.name]=i.filter(h=>h.name.startsWith(g))}const u=l.length+i.length+s.length;return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("h1",{class:"text-xl font-semibold",children:"Services"}),e("span",{class:"text-sm text-muted-foreground",children:[u," total"]})]}),l.length>0&&l.some(f=>f.context_scope)&&e(_r,{services:l,flows:c,children:n}),c.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Data Flows (",c.length,")"]}),e("div",{class:"bg-card rounded-lg border border-border overflow-hidden",children:c.map((f,g)=>e("div",{class:w("flex items-center gap-3 px-4 py-2 text-sm",g>0&&"border-t border-border/50"),children:[e("span",{class:"mono text-xs font-medium text-info min-w-40",children:f.pattern}),e("span",{class:"text-xs text-muted-foreground",children:f.from}),e("svg",{width:"16",height:"8",viewBox:"0 0 16 8",class:"shrink-0 text-muted-foreground",children:e("path",{d:"M0 4h12M10 1l3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),e("span",{class:"text-xs text-muted-foreground",children:f.to})]},g))})]}),l.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Registered Services (",l.length,")"]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:l.map(f=>e(yr,{service:f},f.name))})]}),o==="portfolio"&&n.length>0&&n.map(f=>{const g=a[f.name]||[];return g.length===0?null:e("section",{children:[e("div",{class:"flex items-center gap-2 mb-3",children:[e(Z,{status:f.status}),e("h2",{class:"text-sm font-medium",children:f.name}),e("span",{class:"text-xs mono text-muted-foreground",children:[":",f.port]}),e("span",{class:"text-[10px] text-muted-foreground ml-2",children:[g.length," services"]})]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:g.map(h=>e(nt,{service:h},h.name))})]},f.name)}),o!=="portfolio"&&i.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Discovered (",i.length,")"]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(f=>e(nt,{service:f},f.name))})]}),s.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Openclaw Agents (",s.length,")"]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:s.map(f=>e(wr,{agent:f},f.id))})]}),u===0&&e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:[e("div",{class:"text-muted-foreground text-sm",children:"No services registered"}),e("div",{class:"text-muted-foreground text-xs mt-1 mono",children:"jfl services register <path>"})]})]})}function _r({services:t,flows:r,children:n}){return e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Context Scope"}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.filter(o=>o.context_scope).map(o=>{var u,x;const l=n.find(d=>d.name===o.name),s=((u=o.context_scope)==null?void 0:u.produces)||[],i=((x=o.context_scope)==null?void 0:x.consumes)||[],c=r.filter(d=>d.from===o.name),a=r.filter(d=>d.to===o.name);return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-3",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:(l==null?void 0:l.status)==="ok"?"ok":"idle"}),e("span",{class:"font-medium text-sm",children:o.name})]}),e("div",{class:"flex items-center gap-1.5",children:[o.type&&e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",Ge(o.type)),children:o.type}),l&&e("span",{class:"text-[10px] mono text-muted-foreground",children:[":",l.port]})]})]}),s.length>0&&e("div",{class:"mb-2",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Produces"}),e("div",{class:"flex flex-wrap gap-1",children:s.map(d=>{const f=c.some(g=>g.pattern===d);return e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded",f?"bg-success/15 text-success":"bg-success/5 text-success/60"),children:d},d)})})]}),i.length>0&&e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Consumes"}),e("div",{class:"flex flex-wrap gap-1",children:i.map(d=>{const f=a.some(g=>Tt(g.pattern,d));return e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded",f?"bg-info/15 text-info":"bg-info/5 text-info/60"),children:d},d)})})]}),(c.length>0||a.length>0)&&e("div",{class:"mt-3 pt-2 border-t border-border",children:e("div",{class:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[c.length>0&&e("span",{children:[c.length," outgoing"]}),a.length>0&&e("span",{children:[a.length," incoming"]})]})})]},o.name)})})]})}function yr({service:t}){const r=t.path?t.path.replace(/^\/Users\/[^/]+\//,"~/").replace(/^\/home\/[^/]+\//,"~/"):null;return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-1",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:t.status==="active"?"ok":"idle"}),e("span",{class:"font-medium text-sm",children:t.name})]}),t.type&&e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",Ge(t.type)),children:t.type})]}),r&&e("div",{class:"text-[10px] mono text-muted-foreground mt-1 truncate",children:r}),t.context_scope&&e("div",{class:"mt-2 space-y-1",children:[t.context_scope.produces&&t.context_scope.produces.length>0&&e("div",{class:"flex flex-wrap gap-1",children:[e("span",{class:"text-[10px] text-muted-foreground mr-1",children:"produces:"}),t.context_scope.produces.map(n=>e("span",{class:"text-[10px] bg-success/10 text-success px-1.5 py-0.5 rounded mono",children:n},n))]}),t.context_scope.consumes&&t.context_scope.consumes.length>0&&e("div",{class:"flex flex-wrap gap-1",children:[e("span",{class:"text-[10px] text-muted-foreground mr-1",children:"consumes:"}),t.context_scope.consumes.map(n=>e("span",{class:"text-[10px] bg-info/10 text-info px-1.5 py-0.5 rounded mono",children:n},n))]})]})]})}function nt({service:t}){return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-1",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:t.status==="active"?"ok":"idle"}),e("span",{class:"font-medium text-sm",children:t.name})]}),t.type&&e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",Ge(t.type)),children:t.type})]}),t.description&&e("p",{class:"text-xs text-muted-foreground mt-1",children:t.description})]})}function wr({agent:t}){const r=t.registered_at?new Date(t.registered_at).toLocaleDateString():null;return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-1",children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:"w-[6px] h-[6px] rounded-full bg-purple-400 shrink-0"}),e("span",{class:"font-medium text-sm",children:t.id})]}),e("span",{class:"text-[10px] mono bg-purple-500/15 text-purple-400 px-1.5 py-0.5 rounded uppercase",children:t.runtime})]}),r&&e("div",{class:"text-[10px] text-muted-foreground mt-1",children:["Registered ",r]})]})}function ot(t){return t.gated?"pending_approval":t.error||t.actions_failed&&t.actions_failed>0?"failed":t.completed_at?"completed":"running"}function kr(){const t=U(()=>M.flows(),1e4),r=U(()=>M.flowExecutions(),1e4),n=t.data||[],o=r.data,l=Array.isArray(o)?o:(o==null?void 0:o.executions)||[],s=l.filter(i=>ot(i)==="pending_approval");return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("h1",{class:"text-xl font-semibold",children:"Flows"}),e("span",{class:"text-sm text-muted-foreground",children:[n.length," defined"]})]}),s.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-warning uppercase tracking-wider mb-3",children:["Pending Approval (",s.length,")"]}),e("div",{class:"space-y-2",children:s.map((i,c)=>e(Tr,{exec:i},c))})]}),t.loading?e("div",{class:"text-sm text-muted-foreground animate-pulse-dot",children:"Loading flows..."}):n.length===0?e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:[e("div",{class:"text-muted-foreground text-sm",children:"No flows configured"}),e("div",{class:"text-muted-foreground text-xs mt-1 mono",children:"jfl flows add"})]}):e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Flow Definitions"}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:n.map(i=>e(Sr,{flow:i,execCount:l.filter(c=>c.flow===i.name).length},i.name))})]}),l.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Execution History (",l.length,")"]}),e("div",{class:"bg-card rounded-lg border border-border overflow-hidden",children:e("table",{class:"w-full text-sm",children:[e("thead",{children:e("tr",{class:"border-b border-border text-xs text-muted-foreground",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Flow"}),e("th",{class:"text-left py-2 px-3 font-medium",children:"Status"}),e("th",{class:"text-left py-2 px-3 font-medium hidden md:table-cell",children:"Trigger"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"When"})]})}),e("tbody",{children:l.slice(0,25).map((i,c)=>{const a=ot(i),u=a==="completed"?"text-success":a==="running"?"text-info animate-pulse-dot":a==="failed"?"text-destructive":a==="pending_approval"?"text-warning":"text-muted-foreground";return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-2 px-3 font-medium",children:i.flow}),e("td",{class:`py-2 px-3 mono text-xs ${u}`,children:a}),e("td",{class:"py-2 px-3 mono text-xs text-muted-foreground hidden md:table-cell truncate max-w-48",children:i.trigger_event_type||i.trigger_event_id}),e("td",{class:"py-2 px-3 mono text-xs text-muted-foreground text-right",children:q(i.started_at)})]},c)})})]})})]})]})}function Sr({flow:t,execCount:r}){var i,c,a;const n=typeof t.trigger=="string"?t.trigger:((i=t.trigger)==null?void 0:i.pattern)||"unknown",o=typeof t.trigger=="object"?(c=t.trigger)==null?void 0:c.source:void 0,l=t.enabled!==!1,s=(a=t.gate)==null?void 0:a.requires_approval;return e("div",{class:w("bg-card rounded-lg border border-border p-4 animate-fade-in",!l&&"opacity-50"),children:[e("div",{class:"flex items-center justify-between mb-2",children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:w("w-[6px] h-[6px] rounded-full",l?"bg-success":"bg-muted-foreground/50")}),e("span",{class:"font-medium text-sm",children:t.name})]}),e("div",{class:"flex items-center gap-1.5",children:[s&&e("span",{class:"text-[10px] mono px-1.5 py-0.5 rounded bg-warning/10 text-warning uppercase",children:"gated"}),e("button",{onClick:async u=>{u.stopPropagation();try{await M.toggleFlow(t.name,!l)}catch(x){console.error("Failed to toggle:",x)}},class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase cursor-pointer transition-colors",l?"bg-success/10 text-success hover:bg-success/20":"bg-muted text-muted-foreground hover:bg-muted/80"),children:l?"on":"off"})]})]}),e("div",{class:"flex items-center gap-2 mb-1",children:[e("span",{class:"text-xs mono text-info",children:n}),o&&e("span",{class:"text-[10px] mono text-muted-foreground",children:["from ",o]})]}),t.description&&e("div",{class:"text-xs text-muted-foreground mb-2",children:t.description}),e("div",{class:"flex items-center justify-between pt-2 border-t border-border",children:[e("div",{class:"flex flex-wrap gap-1",children:t.actions.map((u,x)=>e("span",{class:"text-[10px] mono bg-muted px-1.5 py-0.5 rounded",children:u.type},x))}),r>0&&e("span",{class:"text-[10px] text-muted-foreground",children:[r," runs"]})]})]})}function Tr({exec:t}){const r=async()=>{try{await M.approveFlow(t.flow,t.trigger_event_id)}catch(n){console.error("Failed to approve:",n)}};return e("div",{class:"bg-card rounded-lg border border-warning/30 p-4 animate-fade-in",children:e("div",{class:"flex items-center justify-between",children:[e("div",{children:[e("div",{class:"flex items-center gap-2 mb-1",children:[e("span",{class:"w-[6px] h-[6px] rounded-full bg-warning animate-pulse"}),e("span",{class:"font-medium text-sm",children:t.flow}),e("span",{class:"text-[10px] mono text-warning uppercase",children:"needs approval"})]}),e("div",{class:"text-xs mono text-muted-foreground",children:[t.trigger_event_type||t.trigger_event_id," — ",q(t.started_at)]})]}),e("button",{onClick:r,class:"px-3 py-1.5 text-xs font-medium rounded bg-success/15 text-success hover:bg-success/25 transition-colors",children:"Approve"})]})})}function Er({status:t}){var c,a;const r=U(()=>M.projects(),15e3),n=U(()=>M.memoryStatus(),3e4),o=(t==null?void 0:t.sources)||{},l=Object.values(o).filter(Boolean).length,s=Object.keys(o).length,i=n.data;return e("div",{class:"space-y-6",children:[e("h1",{class:"text-xl font-semibold",children:"System Health"}),e("div",{class:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[e(re,{label:"Hub",value:(t==null?void 0:t.status)==="running"||(t==null?void 0:t.status)==="ok"?"OK":(t==null?void 0:t.status)||"--",sub:`port :${(t==null?void 0:t.port)||"--"}`,trend:(t==null?void 0:t.status)==="running"||(t==null?void 0:t.status)==="ok"?"up":"down"}),e(re,{label:"Sources",value:`${l}/${s}`,sub:"connected",trend:l===s?"up":"down"}),e(re,{label:"Items",value:(t==null?void 0:t.itemCount)||0,sub:"indexed"}),e(re,{label:"Memories",value:(i==null?void 0:i.total_memories)||0,sub:(c=i==null?void 0:i.embeddings)!=null&&c.available?"with embeddings":"keyword only"})]}),e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Context Sources"}),e("div",{class:"grid grid-cols-2 md:grid-cols-4 gap-3",children:Object.entries(o).map(([u,x])=>e("div",{class:"bg-card rounded-lg border border-border p-3 animate-fade-in",children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:w("w-[6px] h-[6px] rounded-full",x?"bg-success":"bg-destructive")}),e("span",{class:"text-sm font-medium capitalize",children:u})]}),e("div",{class:"text-[10px] text-muted-foreground mt-1",children:x?"connected":"disconnected"})]},u))})]}),i&&Object.keys(i.by_type||{}).length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Index"}),e("div",{class:"bg-card rounded-lg border border-border p-4",children:[e("div",{class:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Object.entries(i.by_type).map(([u,x])=>e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:u}),e("div",{class:"text-lg font-semibold mono",children:x})]},u))}),e("div",{class:"mt-3 pt-3 border-t border-border flex items-center gap-4 text-xs text-muted-foreground",children:[i.embeddings&&e("span",{children:["Embeddings: ",i.embeddings.count," / ",i.total_memories]}),((a=i.date_range)==null?void 0:a.earliest)&&e("span",{children:["Range: ",new Date(i.date_range.earliest).toLocaleDateString()," - ",new Date(i.date_range.latest).toLocaleDateString()]})]})]})]}),r.data&&r.data.length>0&&e("section",{children:[e("h2",{class:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:["Tracked Projects (",r.data.length,")"]}),e("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:r.data.map(u=>e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-1",children:[e("div",{class:"flex items-center gap-2",children:[e(Z,{status:u.status==="OK"?"ok":u.status==="error"?"error":"idle"}),e("span",{class:"font-medium text-sm",children:u.name})]}),e("span",{class:"text-xs mono text-muted-foreground",children:[":",u.port]})]}),e("div",{class:"text-xs text-muted-foreground mono truncate",children:u.path}),e("div",{class:"flex items-center gap-3 mt-1.5",children:[u.pid&&e("span",{class:"text-[10px] text-muted-foreground",children:["PID ",u.pid]}),u.port&&u.status==="OK"&&e("a",{href:`http://localhost:${u.port}/dashboard/`,target:"_blank",rel:"noopener",class:"text-[10px] text-info hover:underline",children:"Open Dashboard"})]})]},u.name))})]})]})}function Cr(t){return t.map((r,n)=>{const o=n>0?t[n-1].value:r.value,l=r.value-o;return{ts:r.ts,value:r.value,model_version:r.model_version||"unknown",delta:l,improved:n===0||l>0,index:n}})}function Rr(){const t=U(()=>M.leaderboard(),15e3),[r,n]=D(null),o=t.data||[],l=o.length>0?o.reduce((i,c)=>(c.composite||0)>(i.composite||0)?c:i).agent:null,s=r||l;return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("div",{children:[e("h1",{class:"text-xl font-semibold",children:"Experiments"}),e("p",{class:"text-sm text-muted-foreground mt-0.5",children:"RL experiment loop — score trajectory over eval runs"})]}),o.length>1&&e("div",{class:"flex items-center gap-2",children:[e("span",{class:"text-xs text-muted-foreground",children:"Agent:"}),o.sort((i,c)=>(c.composite||0)-(i.composite||0)).map(i=>e("button",{onClick:()=>n(i.agent),class:w("text-[10px] mono px-2 py-1 rounded transition-colors",s===i.agent?"bg-info/15 text-info":"bg-muted text-muted-foreground hover:text-foreground"),children:i.agent},i.agent))]})]}),s?e(Fr,{agentName:s}):e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:[e("div",{class:"text-muted-foreground text-sm",children:"No eval data yet"}),e("div",{class:"text-muted-foreground text-[10px] mt-1 mono",children:"Run evaluations to see experiment runs here"})]}),e(Pr,{agents:o}),e(Dr,{})]})}function Fr({agentName:t}){var l;const r=U(()=>M.trajectory(t),15e3,[t]),n=((l=r.data)==null?void 0:l.points)||[],o=Cr(n);return r.loading?e("div",{class:"text-sm text-muted-foreground",children:"Loading trajectory..."}):o.length===0?e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:e("div",{class:"text-muted-foreground text-sm",children:["No trajectory data for ",t]})}):e(X,{children:[e(Ar,{runs:o,agentName:t}),e(Mr,{runs:o})]})}function Ar({runs:t,agentName:r}){const n=t.map(c=>c.value),o=t.filter(c=>c.improved).length,l=t.length-o,s=t.reduce((c,a)=>a.value>c.value?a:c),i=t[t.length-1];return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"flex items-center justify-between mb-4",children:[e("div",{children:[e("h2",{class:"text-sm font-medium",children:[r," — Experiment Dot Plot"]}),e("div",{class:"text-[10px] text-muted-foreground mt-0.5 mono",children:[t.length," runs — ",o," improved, ",l," regressed"]})]}),e("div",{class:"flex items-center gap-4",children:[e("div",{class:"text-right",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Best"}),e("div",{class:"text-sm font-semibold mono text-success",children:s.value.toFixed(4)})]}),e("div",{class:"text-right",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Latest"}),e("div",{class:"text-sm font-semibold mono",children:i.value.toFixed(4)})]})]})]}),e("div",{class:"flex items-center gap-0.5 flex-wrap py-2",children:t.map((c,a)=>e("span",{class:w("inline-block w-2 h-2 rounded-full mx-0.5 transition-transform hover:scale-150 cursor-default",c.improved?"bg-success":"bg-muted-foreground/30"),title:`#${c.index+1}: ${c.value.toFixed(4)} (${c.model_version}) ${c.delta>=0?"+":""}${c.delta.toFixed(4)}`},a))}),e("div",{class:"mt-3 pt-3 border-t border-border",children:e(Te,{data:n,width:600,height:40,color:i.delta>=0?"var(--success)":"var(--destructive)",className:"w-full"})}),e("div",{class:"flex items-center gap-4 mt-3 text-[10px] text-muted-foreground",children:[e("span",{class:"flex items-center gap-1.5",children:[e("span",{class:"inline-block w-2 h-2 rounded-full bg-success"}),"improved"]}),e("span",{class:"flex items-center gap-1.5",children:[e("span",{class:"inline-block w-2 h-2 rounded-full bg-muted-foreground/30"}),"regressed"]})]})]})}function Mr({runs:t}){const r=[...t].reverse(),[n,o]=D(!1),l=n?r:r.slice(0,20);return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border flex items-center justify-between",children:[e("span",{class:"text-xs font-medium",children:"Score Timeline"}),e("span",{class:"text-[10px] mono text-muted-foreground",children:[t.length," experiments"]})]}),e("div",{class:"max-h-96 overflow-y-auto",children:e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border sticky top-0 bg-card",children:[e("th",{class:"text-left py-2 px-3 font-medium w-8",children:"#"}),e("th",{class:"text-left py-2 px-3 font-medium",children:"Time"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Score"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Delta"}),e("th",{class:"text-left py-2 px-3 font-medium",children:"Model"}),e("th",{class:"text-center py-2 px-3 font-medium",children:"Status"})]})}),e("tbody",{children:l.map(s=>{const i=s.delta>0?"text-success":s.delta<0?"text-destructive":"text-muted-foreground";return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-1.5 px-3 mono text-muted-foreground",children:s.index+1}),e("td",{class:"py-1.5 px-3 mono text-muted-foreground whitespace-nowrap",children:q(s.ts)}),e("td",{class:"py-1.5 px-3 mono text-right font-medium",children:s.value.toFixed(4)}),e("td",{class:w("py-1.5 px-3 mono text-right",i),children:s.index===0?"—":`${s.delta>=0?"+":""}${s.delta.toFixed(4)}`}),e("td",{class:"py-1.5 px-3 mono text-muted-foreground",children:s.model_version}),e("td",{class:"py-1.5 px-3 text-center",children:e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",s.improved?"bg-success/15 text-success":"bg-muted text-muted-foreground"),children:s.improved?"kept":"discarded"})})]},s.index)})})]})}),r.length>20&&!n&&e("div",{class:"px-3 py-2 border-t border-border",children:e("button",{onClick:()=>o(!0),class:"text-[10px] mono text-info hover:text-info/80 transition-colors",children:["show all ",r.length," experiments"]})})]})}function Pr({agents:t}){if(t.length===0)return null;const r=[...t].sort((n,o)=>(o.composite||0)-(n.composite||0));return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Agent Leaderboard"}),e("span",{class:"text-[10px] text-muted-foreground ml-2",children:[r.length," agents"]})]}),e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border",children:[e("th",{class:"text-left py-2 px-3 font-medium w-8",children:"#"}),e("th",{class:"text-left py-2 px-3 font-medium",children:"Agent"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Score"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Delta"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Experiments"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Improvement Rate"}),e("th",{class:"text-right py-2 px-3 font-medium w-24",children:"Trend"})]})}),e("tbody",{children:r.map((n,o)=>{const l=n.trajectory||[],s=l.filter((a,u)=>u>0&&a>l[u-1]).length,i=l.length>1?s/(l.length-1)*100:0,c=n.delta!=null?n.delta>0?"text-success":n.delta<0?"text-destructive":"text-muted-foreground":"text-muted-foreground";return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-2 px-3 mono text-muted-foreground",children:o+1}),e("td",{class:"py-2 px-3",children:[e("div",{class:"font-medium",children:n.agent}),n.model_version&&e("span",{class:"text-[10px] mono text-muted-foreground",children:n.model_version})]}),e("td",{class:"py-2 px-3 mono text-right font-semibold",children:n.composite!=null?n.composite.toFixed(4):"—"}),e("td",{class:w("py-2 px-3 mono text-right",c),children:n.delta!=null?`${n.delta>=0?"+":""}${n.delta.toFixed(4)}`:"—"}),e("td",{class:"py-2 px-3 mono text-right text-muted-foreground",children:l.length}),e("td",{class:"py-2 px-3 mono text-right",children:l.length>1?e("span",{class:w(i>=50?"text-success":"text-warning"),children:[i.toFixed(0),"%"]}):"—"}),e("td",{class:"py-2 px-3 text-right",children:l.length>1&&e(Te,{data:l,width:80,height:24,color:n.delta!=null&&n.delta>0?"var(--success)":n.delta!=null&&n.delta<0?"var(--destructive)":"var(--info)"})})]},n.agent)})})]})]})}function Dr(){const r=U(()=>M.predictions(),3e4).data,n=r==null?void 0:r.accuracy,o=(r==null?void 0:r.recent)||[],l=n&&n.total>0;return e("div",{class:"bg-card rounded-lg border border-border animate-fade-in",children:[e("div",{class:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e("div",{children:[e("h2",{class:"text-sm font-medium",children:"Stratus Prediction Accuracy"}),e("div",{class:"text-[10px] text-muted-foreground mt-0.5 mono",children:"JEPA rollout + chat ensemble — predicted vs actual eval deltas"})]}),l&&e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded uppercase",n.direction_accuracy>=.7?"bg-success/15 text-success":n.direction_accuracy>=.5?"bg-warning/15 text-warning":"bg-destructive/15 text-destructive"),children:[(n.direction_accuracy*100).toFixed(0),"% direction accuracy"]})]}),e("div",{class:"p-4",children:[e("div",{class:"grid grid-cols-5 gap-4 mb-4",children:[e("div",{class:"text-center",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Total"}),e("div",{class:"text-lg font-semibold mono",children:l?n.total:"—"})]}),e("div",{class:"text-center",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Resolved"}),e("div",{class:"text-lg font-semibold mono",children:l?n.resolved:"—"})]}),e("div",{class:"text-center",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Direction"}),e("div",{class:w("text-lg font-semibold mono",l&&n.direction_accuracy>=.7?"text-success":l&&n.direction_accuracy>=.5?"text-warning":l?"text-destructive":"text-muted-foreground/40"),children:l?`${(n.direction_accuracy*100).toFixed(0)}%`:"—"})]}),e("div",{class:"text-center",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Mean Error"}),e("div",{class:"text-lg font-semibold mono",children:l&&n.resolved>0?n.mean_delta_error.toFixed(4):"—"})]}),e("div",{class:"text-center",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase",children:"Calibration"}),e("div",{class:"text-lg font-semibold mono",children:l&&n.resolved>0?n.calibration.toFixed(2):"—"})]})]}),o.length>0?e("div",{class:"overflow-hidden rounded border border-border/50",children:e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border bg-muted/30",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Proposal"}),e("th",{class:"text-center py-2 px-3 font-medium",children:"Method"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Predicted"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Actual"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Error"}),e("th",{class:"text-center py-2 px-3 font-medium",children:"Direction"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Goal Prox"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"When"})]})}),e("tbody",{children:o.map(s=>e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-1.5 px-3 max-w-48 truncate",title:s.proposal.description,children:s.proposal.description}),e("td",{class:"py-1.5 px-3 text-center",children:e("span",{class:w("text-[10px] mono px-1.5 py-0.5 rounded",s.prediction.method==="ensemble"?"bg-info/15 text-info":s.prediction.method==="rollout"?"bg-warning/15 text-warning":"bg-muted text-muted-foreground"),children:s.prediction.method})}),e("td",{class:w("py-1.5 px-3 mono text-right",s.prediction.delta>=0?"text-success":"text-destructive"),children:[s.prediction.delta>=0?"+":"",s.prediction.delta.toFixed(4)]}),e("td",{class:"py-1.5 px-3 mono text-right",children:s.actual?e("span",{class:s.actual.delta>=0?"text-success":"text-destructive",children:[s.actual.delta>=0?"+":"",s.actual.delta.toFixed(4)]}):e("span",{class:"text-muted-foreground/40",children:"pending"})}),e("td",{class:"py-1.5 px-3 mono text-right",children:s.accuracy?s.accuracy.delta_error.toFixed(4):"—"}),e("td",{class:"py-1.5 px-3 text-center",children:s.accuracy?e("span",{class:w("inline-block w-2 h-2 rounded-full",s.accuracy.direction_correct?"bg-success":"bg-destructive")}):e("span",{class:"inline-block w-2 h-2 rounded-full bg-muted-foreground/30"})}),e("td",{class:"py-1.5 px-3 mono text-right text-muted-foreground",children:s.prediction.brain_goal_proximity>0?s.prediction.brain_goal_proximity.toFixed(2):"—"}),e("td",{class:"py-1.5 px-3 mono text-right text-muted-foreground whitespace-nowrap",children:q(s.ts)})]},s.prediction_id))})]})}):e("div",{class:"text-center py-6 text-muted-foreground text-xs",children:["No predictions yet. Run ",e("span",{class:"mono",children:"jfl predict"})," before a PP change to see Stratus prediction accuracy here."]})]})]})}function $r(){const[t,r]=D(168),n=U(()=>M.telemetryDigest(t),3e4,[t]),o=U(()=>M.telemetryAgentStatus(),15e3),[l,s]=D(null),i=n.data,c=o.data,a=async()=>{var u;s("running...");try{const x=await M.telemetryAgentRun();s(`${((u=x.insights)==null?void 0:u.length)||0} insights`),setTimeout(()=>s(null),3e3)}catch{s("error"),setTimeout(()=>s(null),3e3)}};return e("div",{class:"space-y-6",children:[e("div",{class:"flex items-center justify-between",children:[e("div",{children:[e("h1",{class:"text-xl font-semibold",children:"Telemetry"}),e("p",{class:"text-sm text-muted-foreground mt-0.5",children:"Cost analysis, command usage, and system health"})]}),e("div",{class:"flex items-center gap-2",children:[24,72,168].map(u=>e("button",{onClick:()=>r(u),class:w("text-[10px] mono px-2 py-1 rounded transition-colors",t===u?"bg-info/15 text-info":"bg-muted text-muted-foreground hover:text-foreground"),children:u===24?"24h":u===72?"3d":"7d"},u))})]}),c&&e("div",{class:"bg-card rounded-lg border border-border p-3 flex items-center gap-4",children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:w("w-2 h-2 rounded-full",c.running?"bg-success animate-pulse-dot":"bg-muted-foreground/50")}),e("span",{class:"text-xs font-medium",children:"Telemetry Agent"})]}),e("div",{class:"flex items-center gap-4 text-[10px] text-muted-foreground mono",children:[e("span",{children:c.running?"active":"stopped"}),c.lastRun&&e("span",{children:["last: ",q(c.lastRun)]}),e("span",{children:["runs: ",c.runCount]}),e("span",{children:["patterns: ",c.lastInsights.length]})]}),e("button",{onClick:a,class:w("ml-auto text-[10px] mono px-2 py-1 rounded transition-colors",l?l==="error"?"bg-destructive/15 text-destructive":"bg-success/15 text-success":"bg-muted text-muted-foreground hover:text-foreground hover:bg-muted/80"),children:l||"run now"})]}),i?e(X,{children:[e("div",{class:"grid grid-cols-5 gap-4",children:[e(de,{label:"Events",value:i.totalEvents}),e(de,{label:"Cost",value:`$${i.totalCostUsd.toFixed(2)}`}),e(de,{label:"Sessions",value:i.sessions.started,sub:i.sessions.crashed>0?`${i.sessions.crashed} crashed`:"healthy",subColor:i.sessions.crashed>0?"text-destructive":"text-success"}),e(de,{label:"Flows",value:i.flows.triggered,sub:`${i.flows.completed} ok / ${i.flows.failed} fail`}),e(de,{label:"Errors",value:i.errors.total,subColor:i.errors.total>0?"text-destructive":"text-success",sub:i.errors.total===0?"clean":void 0})]}),e("div",{class:"grid grid-cols-2 gap-4",children:[e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-3",children:"Hub Health"}),e("div",{class:"grid grid-cols-2 gap-3 text-xs",children:[e("div",{children:[e("span",{class:"text-muted-foreground",children:"Starts:"})," ",e("span",{class:"mono",children:i.hubHealth.starts})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"Crashes:"})," ",e("span",{class:w("mono",i.hubHealth.crashes>0?"text-destructive":""),children:i.hubHealth.crashes})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"MCP Calls:"})," ",e("span",{class:"mono",children:i.hubHealth.mcpCalls})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"Avg Latency:"})," ",e("span",{class:"mono",children:[i.hubHealth.avgMcpLatencyMs.toFixed(0),"ms"]})]})]})]}),e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Health"}),e("div",{class:"grid grid-cols-2 gap-3 text-xs",children:[e("div",{children:[e("span",{class:"text-muted-foreground",children:"Index Runs:"})," ",e("span",{class:"mono",children:i.memoryHealth.indexRuns})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"Indexed:"})," ",e("span",{class:"mono",children:i.memoryHealth.entriesIndexed})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"Errors:"})," ",e("span",{class:w("mono",i.memoryHealth.errors>0?"text-destructive":""),children:i.memoryHealth.errors})]}),e("div",{children:[e("span",{class:"text-muted-foreground",children:"Avg Duration:"})," ",e("span",{class:"mono",children:[i.memoryHealth.avgDurationMs.toFixed(0),"ms"]})]})]})]})]}),e(jr,{costs:i.costs,totalCost:i.totalCostUsd}),e(Lr,{commands:i.commands}),e(Ir,{flows:i.flows}),e(Or,{hooks:i.hooks}),e(Ur,{errors:i.errors}),e(Nr,{suggestions:i.suggestions})]}):e("div",{class:"bg-card rounded-lg border border-border p-8 text-center",children:e("div",{class:"text-muted-foreground text-sm",children:n.loading?"Loading telemetry...":"No telemetry data available"})})]})}function de({label:t,value:r,sub:n,subColor:o}){return e("div",{class:"bg-card rounded-lg border border-border p-4 animate-fade-in",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase tracking-wider",children:t}),e("div",{class:"text-2xl font-bold mono mt-1",children:r}),n&&e("div",{class:w("text-[10px] mono mt-0.5",o||"text-muted-foreground"),children:n})]})}function jr({costs:t,totalCost:r}){if(!t||t.length===0)return e("div",{class:"bg-card rounded-lg border border-border/50 p-6 text-center animate-fade-in",children:[e("div",{class:"text-muted-foreground text-xs",children:"No model cost data yet"}),e("div",{class:"text-[10px] text-muted-foreground/60 mt-1 mono",children:"Costs tracked automatically on LLM calls"})]});const n=[...t].sort((o,l)=>l.estimatedCostUsd-o.estimatedCostUsd);return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border flex items-center justify-between bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Model Costs"}),e("span",{class:"text-xs mono text-warning",children:["$",r.toFixed(4)," total"]})]}),e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Model"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Calls"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Tokens"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Cost"}),e("th",{class:"text-left py-2 px-3 font-medium w-48",children:"Share"})]})}),e("tbody",{children:n.map(o=>{const l=r>0?o.estimatedCostUsd/r*100:0;return e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-1.5 px-3 mono",children:o.model}),e("td",{class:"py-1.5 px-3 mono text-right",children:o.calls}),e("td",{class:"py-1.5 px-3 mono text-right text-muted-foreground",children:o.totalTokens.toLocaleString()}),e("td",{class:"py-1.5 px-3 mono text-right text-warning",children:["$",o.estimatedCostUsd.toFixed(4)]}),e("td",{class:"py-1.5 px-3",children:e("div",{class:"h-1.5 bg-muted rounded-full overflow-hidden",children:e("div",{class:"h-full bg-info rounded-full transition-all",style:{width:`${Math.max(l,2)}%`}})})})]},o.model)})})]})]})}function Lr({commands:t}){if(!t||t.length===0)return e("div",{class:"bg-card rounded-lg border border-border/50 p-6 text-center animate-fade-in",children:e("div",{class:"text-muted-foreground text-xs",children:"No command usage data yet"})});const r=[...t].sort((n,o)=>o.count-n.count);return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Command Usage"}),e("span",{class:"text-[10px] text-muted-foreground ml-2",children:[r.length," commands"]})]}),e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Command"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Count"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Avg Duration"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Success Rate"})]})}),e("tbody",{children:r.map(n=>e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-1.5 px-3 mono",children:n.command}),e("td",{class:"py-1.5 px-3 mono text-right",children:n.count}),e("td",{class:"py-1.5 px-3 mono text-right text-muted-foreground",children:n.avgDurationMs>1e3?`${(n.avgDurationMs/1e3).toFixed(1)}s`:`${Math.round(n.avgDurationMs)}ms`}),e("td",{class:"py-1.5 px-3 mono text-right",children:e("span",{class:w(n.successRate>=.9?"text-success":n.successRate>=.7?"text-warning":"text-destructive"),children:[(n.successRate*100).toFixed(0),"%"]})})]},n.command))})]})]})}function Ir({flows:t}){const r=(t==null?void 0:t.byFlow)||{},n=Object.entries(r);return n.length===0&&t.triggered===0?null:e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border flex items-center justify-between bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Flow Activity"}),e("span",{class:"text-[10px] mono text-muted-foreground",children:[t.triggered," triggered / ",t.completed," completed / ",t.failed," failed"]})]}),n.length>0&&e("table",{class:"w-full text-xs",children:[e("thead",{children:e("tr",{class:"text-muted-foreground border-b border-border",children:[e("th",{class:"text-left py-2 px-3 font-medium",children:"Flow"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Triggered"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Completed"}),e("th",{class:"text-right py-2 px-3 font-medium",children:"Failed"})]})}),e("tbody",{children:n.sort(([,o],[,l])=>l.triggered-o.triggered).map(([o,l])=>e("tr",{class:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e("td",{class:"py-1.5 px-3 mono",children:o}),e("td",{class:"py-1.5 px-3 mono text-right",children:l.triggered}),e("td",{class:"py-1.5 px-3 mono text-right text-success",children:l.completed}),e("td",{class:"py-1.5 px-3 mono text-right text-destructive",children:l.failed})]},o))})]})]})}function Or({hooks:t}){if(t.received===0)return null;const r=Object.entries(t.byTool||{}).sort(([,o],[,l])=>l-o),n=Object.entries(t.byEvent||{}).sort(([,o],[,l])=>l-o);return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Hooks"}),e("span",{class:"text-[10px] text-muted-foreground ml-2",children:[t.received," received"]})]}),e("div",{class:"p-3 grid grid-cols-2 gap-4",children:[r.length>0&&e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase mb-2",children:"By Tool"}),r.slice(0,10).map(([o,l])=>e("div",{class:"flex items-center justify-between py-0.5 text-xs",children:[e("span",{class:"mono truncate",children:o}),e("span",{class:"mono text-muted-foreground tabular-nums",children:l})]},o))]}),n.length>0&&e("div",{children:[e("div",{class:"text-[10px] text-muted-foreground uppercase mb-2",children:"By Event"}),n.slice(0,10).map(([o,l])=>e("div",{class:"flex items-center justify-between py-0.5 text-xs",children:[e("span",{class:"mono truncate",children:o}),e("span",{class:"mono text-muted-foreground tabular-nums",children:l})]},o))]})]}),t.fileHotspots&&t.fileHotspots.length>0&&e("div",{class:"px-3 pb-3 border-t border-border/30 pt-2",children:[e("div",{class:"text-[10px] text-muted-foreground uppercase mb-1.5",children:"File Hotspots"}),t.fileHotspots.slice(0,5).map((o,l)=>e("div",{class:"text-[10px] mono text-muted-foreground truncate py-0.5",children:o},l))]})]})}function Ur({errors:t}){const r=Object.entries(t.byType||{});return t.total===0&&r.length===0?null:e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:[e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Errors"}),e("span",{class:"text-[10px] text-destructive ml-2",children:[t.total," total"]})]}),e("div",{class:"p-3 space-y-1.5",children:r.sort(([,n],[,o])=>o-n).map(([n,o])=>e("div",{class:"flex items-center gap-3 text-xs",children:[e("span",{class:"mono text-destructive flex-1 truncate",children:n}),e("span",{class:"mono tabular-nums",children:[o,"x"]})]},n))})]})}function Nr({suggestions:t}){if(!t||t.length===0)return null;const r={high:"text-destructive border-destructive/30 bg-destructive/5",medium:"text-warning border-warning/30 bg-warning/5",low:"text-info border-info/30 bg-info/5"};return e("div",{class:"bg-card rounded-lg border border-border overflow-hidden animate-fade-in",children:[e("div",{class:"px-3 py-2 border-b border-border bg-muted/30",children:e("span",{class:"text-xs font-medium uppercase tracking-wider",children:"Suggestions"})}),e("div",{class:"p-3 space-y-2",children:t.map((n,o)=>e("div",{class:w("rounded-md border p-3",r[n.severity]||r.low),children:[e("div",{class:"flex items-center gap-2",children:[e("span",{class:"text-[10px] mono uppercase font-medium",children:n.severity}),e("span",{class:"text-xs",children:n.message})]}),n.fix&&e("div",{class:"text-[10px] mono mt-1 opacity-75",children:n.fix})]},o))})]})}const _={bg:"#191919",info:"#4a7dfc",infoGlow:"#4a7dfcaa",success:"#34d399",successGlow:"#34d39988",warning:"#eab308",warningGlow:"#eab30888",purple:"#a855f7",purpleGlow:"#a855f788",cyan:"#06b6d4",text:"#f5f5f5",textMuted:"#8b8b8b",textDim:"#5a5a5a",grid:"#2a2a2a"};function Br(t){switch(t){case"orchestrator":return{fill:_.purple,glow:_.purpleGlow};case"eval":return{fill:_.warning,glow:_.warningGlow};case"service":return{fill:_.success,glow:_.successGlow};default:return{fill:_.info,glow:_.infoGlow}}}function ce(t){switch(t){case"running":return _.success;case"idle":return _.warning;default:return _.textDim}}function Hr(){const t=Date.now(),n=[{id:"telemetry-agent",label:"Telemetry Agent",type:"agent",status:"running",eventCount:142,lastAction:"telemetry:insight emitted",lastTs:new Date(t-45e3).toISOString(),reward:[.4,.5,.6,.55,.7,.65,.8]},{id:"peter-parker",label:"Peter Parker",type:"orchestrator",status:"running",eventCount:89,lastAction:"task dispatched to builder",lastTs:new Date(t-12e4).toISOString(),reward:[.3,.4,.5,.55,.6,.7,.75]},{id:"eval-engine",label:"Eval Engine",type:"eval",status:"running",eventCount:234,lastAction:"eval:scored lobsters-prg-0.6.0",lastTs:new Date(t-3e4).toISOString(),reward:[.6,.5,.7,.8,.75,.85,.9]},{id:"productrank",label:"ProductRank",type:"service",status:"running",eventCount:567,lastAction:"ranking pipeline completed",lastTs:new Date(t-6e4).toISOString(),reward:[.7,.72,.68,.74,.78,.8,.82]},{id:"seo-agent",label:"SEO Agent",type:"agent",status:"idle",eventCount:78,lastAction:"content:published article",lastTs:new Date(t-3e5).toISOString(),reward:[.2,.3,.35,.4,.38,.42,.45]},{id:"stratus",label:"Stratus API",type:"service",status:"running",eventCount:1203,lastAction:"rollout prediction served",lastTs:new Date(t-15e3).toISOString(),reward:[.5,.55,.6,.65,.7,.75,.8]}].map(l=>{const s=Br(l.type);return{...l,x:0,y:0,targetX:0,targetY:0,radius:l.type==="orchestrator"?32:l.type==="service"?28:24,color:s.fill,glowColor:s.glow,pulsePhase:Math.random()*Math.PI*2}}),o=[{id:"e1",source:"telemetry-agent",target:"peter-parker",eventType:"telemetry:insight",active:!0,lastFired:t-45e3,color:_.info,category:"data",particles:[]},{id:"e2",source:"peter-parker",target:"eval-engine",eventType:"peter:task-completed",active:!0,lastFired:t-12e4,color:_.purple,category:"rl",particles:[]},{id:"e3",source:"eval-engine",target:"telemetry-agent",eventType:"eval:scored",active:!0,lastFired:t-3e4,color:_.warning,category:"success",particles:[]},{id:"e4",source:"productrank",target:"seo-agent",eventType:"eval:scored",active:!1,lastFired:t-6e5,color:_.success,category:"success",particles:[]},{id:"e5",source:"seo-agent",target:"productrank",eventType:"content:published",active:!1,lastFired:t-3e5,color:_.info,category:"data",particles:[]},{id:"e6",source:"peter-parker",target:"stratus",eventType:"peter:rollout-request",active:!0,lastFired:t-15e3,color:_.purple,category:"rl",particles:[]},{id:"e7",source:"stratus",target:"eval-engine",eventType:"stratus:prediction",active:!0,lastFired:t-2e4,color:_.success,category:"success",particles:[]},{id:"e8",source:"eval-engine",target:"productrank",eventType:"eval:scored",active:!0,lastFired:t-6e4,color:_.warning,category:"data",particles:[]}];for(const l of o){const s=l.active?3+Math.floor(Math.random()*3):1;for(let i=0;i<s;i++)l.particles.push({t:Math.random(),speed:8e-4+Math.random()*.0015,size:2+Math.random()*2.5,alpha:.5+Math.random()*.5,trail:[]})}return{nodes:n,edges:o}}function zr(t,r,n){const o=r/2,l=n/2,s=Math.min(r/900,n/600,1),i={"telemetry-agent":[o-260*s,l-140*s],"peter-parker":[o+40*s,l-170*s],"eval-engine":[o+280*s,l+30*s],productrank:[o-280*s,l+150*s],"seo-agent":[o-40*s,l+180*s],stratus:[o+290*s,l-150*s]};for(const c of t){const a=i[c.id];a&&(c.targetX=a[0],c.targetY=a[1],c.x===0&&c.y===0&&(c.x=a[0]+(Math.random()-.5)*60,c.y=a[1]+(Math.random()-.5)*60))}}function ae(t,r,n,o,l,s,i,c,a){const u=1-a;return[u*u*u*t+3*u*u*a*n+3*u*a*a*l+a*a*a*i,u*u*u*r+3*u*u*a*o+3*u*a*a*s+a*a*a*c]}function Le(t,r){const n=r.x-t.x,o=r.y-t.y,l=Math.sqrt(n*n+o*o),s=l>0?-o/l:0,i=l>0?n/l:0,c=Math.min(l*.25,70),a=(t.x+r.x)/2,u=(t.y+r.y)/2;return{sx:t.x,sy:t.y,c1x:a+s*c-n*.15,c1y:u+i*c-o*.15,c2x:a+s*c+n*.15,c2y:u+i*c+o*.15,ex:r.x,ey:r.y}}function Y(t,r){const n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),l=parseInt(t.slice(5,7),16);return`rgba(${n}, ${o}, ${l}, ${r})`}function Re(t,r,n,o,l){return Math.max(0,Math.sqrt((t-n)**2+(r-o)**2)-l)}const he=`
2
+ attribute vec2 a_position;
3
+ void main() {
4
+ gl_Position = vec4(a_position, 0.0, 1.0);
5
+ }
6
+ `,Gr=`
7
+ precision highp float;
8
+ uniform sampler2D u_scene;
9
+ uniform sampler2D u_bloom;
10
+ uniform vec2 u_resolution;
11
+ uniform float u_time;
12
+
13
+ float hash(vec2 p) {
14
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
15
+ }
16
+
17
+ void main() {
18
+ vec2 uv = gl_FragCoord.xy / u_resolution;
19
+ vec4 scene = texture2D(u_scene, uv);
20
+ vec4 bloom = texture2D(u_bloom, uv);
21
+ vec3 color = scene.rgb + bloom.rgb * 1.2;
22
+ float vignette = 1.0 - 0.4 * length((uv - 0.5) * 1.5);
23
+ color *= vignette;
24
+ float scan = 0.97 + 0.03 * sin(uv.y * u_resolution.y * 1.5 + u_time * 0.5);
25
+ color *= scan;
26
+ color += (hash(uv + u_time * 0.001) - 0.5) * 0.015;
27
+ color = pow(color, vec3(0.95));
28
+ gl_FragColor = vec4(color, 1.0);
29
+ }
30
+ `,Wr=`
31
+ precision highp float;
32
+ uniform sampler2D u_texture;
33
+ uniform vec2 u_resolution;
34
+ uniform float u_radius;
35
+ void main() {
36
+ vec2 uv = gl_FragCoord.xy / u_resolution;
37
+ float texelSize = 1.0 / u_resolution.x;
38
+ vec3 result = vec3(0.0);
39
+ float weights[5];
40
+ weights[0] = 0.227027;
41
+ weights[1] = 0.1945946;
42
+ weights[2] = 0.1216216;
43
+ weights[3] = 0.054054;
44
+ weights[4] = 0.016216;
45
+ result += texture2D(u_texture, uv).rgb * weights[0];
46
+ for (int i = 1; i < 5; i++) {
47
+ float offset = float(i) * texelSize * u_radius;
48
+ result += texture2D(u_texture, uv + vec2(offset, 0.0)).rgb * weights[i];
49
+ result += texture2D(u_texture, uv - vec2(offset, 0.0)).rgb * weights[i];
50
+ }
51
+ gl_FragColor = vec4(result, 1.0);
52
+ }
53
+ `,Xr=`
54
+ precision highp float;
55
+ uniform sampler2D u_texture;
56
+ uniform vec2 u_resolution;
57
+ uniform float u_radius;
58
+ void main() {
59
+ vec2 uv = gl_FragCoord.xy / u_resolution;
60
+ float texelSize = 1.0 / u_resolution.y;
61
+ vec3 result = vec3(0.0);
62
+ float weights[5];
63
+ weights[0] = 0.227027;
64
+ weights[1] = 0.1945946;
65
+ weights[2] = 0.1216216;
66
+ weights[3] = 0.054054;
67
+ weights[4] = 0.016216;
68
+ result += texture2D(u_texture, uv).rgb * weights[0];
69
+ for (int i = 1; i < 5; i++) {
70
+ float offset = float(i) * texelSize * u_radius;
71
+ result += texture2D(u_texture, uv + vec2(0.0, offset)).rgb * weights[i];
72
+ result += texture2D(u_texture, uv - vec2(0.0, offset)).rgb * weights[i];
73
+ }
74
+ gl_FragColor = vec4(result, 1.0);
75
+ }
76
+ `,qr=`
77
+ precision highp float;
78
+ uniform sampler2D u_texture;
79
+ uniform vec2 u_resolution;
80
+ uniform float u_threshold;
81
+ void main() {
82
+ vec2 uv = gl_FragCoord.xy / u_resolution;
83
+ vec4 color = texture2D(u_texture, uv);
84
+ float brightness = dot(color.rgb, vec3(0.2126, 0.7152, 0.0722));
85
+ float contribution = smoothstep(u_threshold, u_threshold + 0.15, brightness);
86
+ gl_FragColor = vec4(color.rgb * contribution * 1.5, 1.0);
87
+ }
88
+ `;function st(t,r,n){const o=t.createShader(n);return o?(t.shaderSource(o,r),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS)?o:(console.error("Shader compile error:",t.getShaderInfoLog(o)),t.deleteShader(o),null)):null}function fe(t,r,n){const o=st(t,r,t.VERTEX_SHADER),l=st(t,n,t.FRAGMENT_SHADER);if(!o||!l)return null;const s=t.createProgram();return s?(t.attachShader(s,o),t.attachShader(s,l),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)?s:(console.error("Program link error:",t.getProgramInfoLog(s)),null)):null}function ge(t,r,n){const o=t.createFramebuffer(),l=t.createTexture();return!o||!l?null:(t.bindTexture(t.TEXTURE_2D,l),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,r,n,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,0),t.bindFramebuffer(t.FRAMEBUFFER,null),{fb:o,tex:l})}function Vr(t,r,n,o){t.fillStyle=_.grid;for(let s=50;s<r;s+=50)for(let i=50;i<n;i+=50){const c=Math.sqrt((s-r/2)**2+(i-n/2)**2),a=Math.sin(o*3e-4+c*.004)*.3+.7;t.globalAlpha=.12*a,t.beginPath(),t.arc(s,i,.8,0,Math.PI*2),t.fill()}t.globalAlpha=1}function Jr(t,r,n,o,l,s,i,c){t.clearRect(0,0,r,n);const a=new Set,u=new Set,x=s||i;if(x)for(const d of l)(d.source===x||d.target===x)&&(a.add(d.source),a.add(d.target),u.add(d.id));Vr(t,r,n,c);for(const d of l){const f=o.find(A=>A.id===d.source),g=o.find(A=>A.id===d.target);if(!f||!g)continue;const h=u.has(d.id),y=u.size>0&&!h,{sx:v,sy:b,c1x:p,c1y:m,c2x:T,c2y:S,ex:E,ey:z}=Le(f,g),V=Date.now()-d.lastFired,$=V<5e3,I=$?1-V/5e3:0,ne=d.active?h?.8:.35:.08,ee=y?.05:Math.min(1,ne+I*.5);t.save(),t.globalAlpha=ee*.4,t.strokeStyle=d.color,t.shadowColor=d.color,t.shadowBlur=h?20:$?14:8,t.lineWidth=h?5:3,t.beginPath(),t.moveTo(v,b),t.bezierCurveTo(p,m,T,S,E,z),t.stroke(),t.restore(),t.save(),t.globalAlpha=ee,t.strokeStyle=d.color,t.lineWidth=h?2.5:1.2,t.beginPath(),t.moveTo(v,b),t.bezierCurveTo(p,m,T,S,E,z),t.stroke(),t.restore();const C=.88,[F,R]=ae(v,b,p,m,T,S,E,z,C),[j,L]=ae(v,b,p,m,T,S,E,z,C+.04),W=Math.atan2(L-R,j-F),k=h?9:6;if(t.save(),t.globalAlpha=ee,t.fillStyle=d.color,t.shadowColor=d.color,t.shadowBlur=6,t.translate(j,L),t.rotate(W),t.beginPath(),t.moveTo(0,0),t.lineTo(-k*1.2,-k*.5),t.lineTo(-k*1.2,k*.5),t.closePath(),t.fill(),t.restore(),d.active||$)for(const A of d.particles){const J=y?.05:A.alpha*(h?1:.6);for(let K=A.trail.length-1;K>=0;K--){const te=A.trail[K];t.save(),t.globalAlpha=te.a*J*.3,t.fillStyle=d.color,t.shadowColor=d.color,t.shadowBlur=A.size*2,t.beginPath(),t.arc(te.x,te.y,A.size*(1-K*.1),0,Math.PI*2),t.fill(),t.restore()}const[G,O]=ae(v,b,p,m,T,S,E,z,A.t);t.save(),t.globalAlpha=J,t.fillStyle="#ffffff",t.shadowColor=d.color,t.shadowBlur=A.size*6,t.beginPath(),t.arc(G,O,A.size*.6,0,Math.PI*2),t.fill(),t.restore(),t.save(),t.globalAlpha=J*.7,t.fillStyle=d.color,t.shadowColor=d.color,t.shadowBlur=A.size*10,t.beginPath(),t.arc(G,O,A.size*1.2,0,Math.PI*2),t.fill(),t.restore()}}for(const d of o){const f=s===d.id,g=i===d.id,y=a.size>0&&!a.has(d.id)&&!f&&!g?.15:1,v=Math.sin(c*.002+d.pulsePhase)*.15+.85,b=d.radius*(f?1.15:g?1.1:1);if(d.status==="running"||f||g){const T=b*(g?3.5:f?3:2.2)*v,S=t.createRadialGradient(d.x,d.y,b*.5,d.x,d.y,T);S.addColorStop(0,Y(d.color,.25*y)),S.addColorStop(.5,Y(d.color,.08*y)),S.addColorStop(1,Y(d.color,0)),t.fillStyle=S,t.beginPath(),t.arc(d.x,d.y,T,0,Math.PI*2),t.fill()}if(d.status==="running"){const T=(Math.sin(c*.003+d.pulsePhase)*.3+.5)*y,S=b*(1.5+Math.sin(c*.001+d.pulsePhase*2)*.3);t.save(),t.globalAlpha=T*.3,t.strokeStyle=d.color,t.lineWidth=1,t.setLineDash([4,6]),t.beginPath(),t.arc(d.x,d.y,S,0,Math.PI*2),t.stroke(),t.setLineDash([]),t.restore()}const p=t.createRadialGradient(d.x-b*.2,d.y-b*.2,0,d.x,d.y,b);p.addColorStop(0,Y(d.color,.3*y)),p.addColorStop(.7,Y(d.color,.12*y)),p.addColorStop(1,Y(d.color,.05*y)),t.save(),t.fillStyle=p,t.shadowColor=d.color,t.shadowBlur=g?25:f?18:10,t.globalAlpha=y,t.beginPath(),t.arc(d.x,d.y,b,0,Math.PI*2),t.fill(),t.restore(),t.save(),t.globalAlpha=y*(g?.9:f?.7:.4),t.strokeStyle=d.color,t.lineWidth=g?2:1.2,t.beginPath(),t.arc(d.x,d.y,b,0,Math.PI*2),t.stroke(),t.restore();const m=t.createRadialGradient(d.x,d.y,0,d.x,d.y,b*.35);m.addColorStop(0,Y("#ffffff",.6*y*v)),m.addColorStop(.5,Y(d.color,.4*y*v)),m.addColorStop(1,Y(d.color,0)),t.fillStyle=m,t.beginPath(),t.arc(d.x,d.y,b*.35,0,Math.PI*2),t.fill()}}function lt({data:t,color:r,width:n=48,height:o=16}){if(t.length<2)return null;const l=Math.max(...t),s=Math.min(...t),i=l-s||1,c=t.map((u,x)=>{const d=x/(t.length-1)*n,f=o-(u-s)/i*(o-2)-1;return`${d},${f}`}).join(" "),a=o-(t[t.length-1]-s)/i*(o-2)-1;return e("svg",{width:n,height:o,class:"shrink-0",children:[e("polyline",{points:c,fill:"none",stroke:r,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",opacity:"0.7"}),e("circle",{cx:String(n),cy:String(a),r:"2",fill:r,children:e("animate",{attributeName:"opacity",values:"1;0.4;1",dur:"2s",repeatCount:"indefinite"})})]})}function Yr(){const t=se(null),r=se(null),n=se(0),o=se(!0),l=se({nodes:[],edges:[],hoveredNode:null,selectedNode:null,dragging:null,dragOffset:{x:0,y:0},mouse:{x:0,y:0},time:0,liveEventQueue:[],offscreenCanvas:null,offscreenCtx:null,gl:null,programs:{threshold:null,blurH:null,blurV:null,composite:null},fbos:{scene:null,bright:null,pingpong:[null,null]},quadVBO:null,sceneTexture:null,fboWidth:0,fboHeight:0}),[s,i]=D(null),[c,a]=D(!1),[u,x]=D([]),[,d]=D(0),f=ze(h=>{const y=l.current;if(!h||y.selectedNode===h.id)y.selectedNode=null,i(null);else{y.selectedNode=h.id;const v=y.edges.filter(b=>b.source===h.id||b.target===h.id);i({node:h,edges:v,recentEvents:v.slice(0,5).map(b=>({type:b.eventType,ts:new Date(b.lastFired).toISOString(),data:`${b.source} -> ${b.target}`}))})}},[]);He(()=>{const h=t.current,y=r.current;if(!h||!y)return;const v=document.createElement("canvas"),b=v.getContext("2d");if(!b)return;const p=l.current;p.offscreenCanvas=v,p.offscreenCtx=b;const m=h.getContext("webgl",{alpha:!1,antialias:!1,premultipliedAlpha:!1});if(m){p.gl=m,p.programs.threshold=fe(m,he,qr),p.programs.blurH=fe(m,he,Wr),p.programs.blurV=fe(m,he,Xr),p.programs.composite=fe(m,he,Gr);const C=new Float32Array([-1,-1,1,-1,-1,1,1,1]),F=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,F),m.bufferData(m.ARRAY_BUFFER,C,m.STATIC_DRAW),p.quadVBO=F,p.sceneTexture=m.createTexture(),o.current=!0}else o.current=!1;const T=(C,F)=>{if(!m)return;const R=Math.floor(C/2),j=Math.floor(F/2);p.fbos.scene=ge(m,C,F),p.fbos.bright=ge(m,R,j),p.fbos.pingpong=[ge(m,R,j),ge(m,R,j)],p.fboWidth=C,p.fboHeight=F},S=()=>{const C=y.getBoundingClientRect(),F=Math.min(window.devicePixelRatio||1,2),R=Math.floor(C.width*F),j=Math.floor(C.height*F);if(h.width=R,h.height=j,h.style.width=C.width+"px",h.style.height=C.height+"px",v.width=R,v.height=j,m&&(m.viewport(0,0,R,j),T(R,j)),p.nodes.length===0){const{nodes:L,edges:W}=Hr();p.nodes=L,p.edges=W}zr(p.nodes,C.width,C.height),d(L=>L+1)};S(),window.addEventListener("resize",S);const E=C=>{const F=h.getBoundingClientRect(),R=C.clientX-F.left,j=C.clientY-F.top;if(p.mouse={x:R,y:j},p.dragging){const k=p.nodes.find(A=>A.id===p.dragging);k&&(k.x=R-p.dragOffset.x,k.y=j-p.dragOffset.y,k.targetX=k.x,k.targetY=k.y);return}let L=null,W=1/0;for(const k of p.nodes){const A=Re(k.x,k.y,R,j,k.radius*1.5);A<W&&A<20&&(W=A,L=k)}p.hoveredNode=(L==null?void 0:L.id)||null,h.style.cursor=L?"pointer":"default"},z=C=>{const F=h.getBoundingClientRect(),R=C.clientX-F.left,j=C.clientY-F.top;let L=null;for(const W of p.nodes)if(Re(W.x,W.y,R,j,W.radius*1.5)<5){L=W;break}L&&(p.dragging=L.id,p.dragOffset={x:R-L.x,y:j-L.y})},V=C=>{const F=p.dragging,R=h.getBoundingClientRect(),j=C.clientX-R.left,L=C.clientY-R.top;if(F){const k=p.nodes.find(A=>A.id===F);p.dragging=null,k&&Math.sqrt((j-(p.dragOffset.x+k.targetX))**2+(L-(p.dragOffset.y+k.targetY))**2)<5&&f(k);return}let W=null;for(const k of p.nodes)if(Re(k.x,k.y,j,L,k.radius*1.5)<5){W=k;break}W?f(W):(p.selectedNode=null,i(null))};h.addEventListener("mousemove",E),h.addEventListener("mousedown",z),h.addEventListener("mouseup",V);function $(C){if(!m||!p.quadVBO)return;m.useProgram(C),m.bindBuffer(m.ARRAY_BUFFER,p.quadVBO);const F=m.getAttribLocation(C,"a_position");m.enableVertexAttribArray(F),m.vertexAttribPointer(F,2,m.FLOAT,!1,0,0),m.drawArrays(m.TRIANGLE_STRIP,0,4)}let I=performance.now();const ne=C=>{const F=C-I;I=C,p.time=C;for(const k of p.nodes)p.dragging!==k.id&&(k.x+=(k.targetX-k.x)*.06,k.y+=(k.targetY-k.y)*.06);for(const k of p.edges){if(!k.active&&Date.now()-k.lastFired>1e4)continue;const A=p.nodes.find(O=>O.id===k.source),J=p.nodes.find(O=>O.id===k.target);if(!A||!J)continue;const G=Le(A,J);for(const O of k.particles){O.t+=O.speed*(F/16),O.t>1&&(O.t-=1,O.speed=8e-4+Math.random()*.0015,O.trail=[]);const[K,te]=ae(G.sx,G.sy,G.c1x,G.c1y,G.c2x,G.c2y,G.ex,G.ey,O.t);O.trail.unshift({x:K,y:te,a:O.alpha}),O.trail.length>8&&O.trail.pop();for(let ie=0;ie<O.trail.length;ie++)O.trail[ie].a*=.82}}const R=Math.min(window.devicePixelRatio||1,2),j=y.getBoundingClientRect(),L=j.width,W=j.height;if(b&&(b.save(),b.scale(R,R),Jr(b,L,W,p.nodes,p.edges,p.hoveredNode,p.selectedNode,C),b.restore()),m&&o.current&&p.sceneTexture&&p.fbos.scene&&p.fbos.bright&&p.fbos.pingpong[0]&&p.fbos.pingpong[1]){const k=p.fboWidth,A=p.fboHeight,J=Math.floor(k/2),G=Math.floor(A/2);m.bindTexture(m.TEXTURE_2D,p.sceneTexture),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,v),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),p.programs.threshold&&(m.bindFramebuffer(m.FRAMEBUFFER,p.fbos.bright.fb),m.viewport(0,0,J,G),m.useProgram(p.programs.threshold),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,p.sceneTexture),m.uniform1i(m.getUniformLocation(p.programs.threshold,"u_texture"),0),m.uniform2f(m.getUniformLocation(p.programs.threshold,"u_resolution"),J,G),m.uniform1f(m.getUniformLocation(p.programs.threshold,"u_threshold"),.18),$(p.programs.threshold));const O=4;for(let K=0;K<O;K++){const te=2+K*1.5;if(p.programs.blurH){const ie=K===0?p.fbos.bright:p.fbos.pingpong[1];m.bindFramebuffer(m.FRAMEBUFFER,p.fbos.pingpong[0].fb),m.viewport(0,0,J,G),m.useProgram(p.programs.blurH),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,ie.tex),m.uniform1i(m.getUniformLocation(p.programs.blurH,"u_texture"),0),m.uniform2f(m.getUniformLocation(p.programs.blurH,"u_resolution"),J,G),m.uniform1f(m.getUniformLocation(p.programs.blurH,"u_radius"),te),$(p.programs.blurH)}p.programs.blurV&&(m.bindFramebuffer(m.FRAMEBUFFER,p.fbos.pingpong[1].fb),m.viewport(0,0,J,G),m.useProgram(p.programs.blurV),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,p.fbos.pingpong[0].tex),m.uniform1i(m.getUniformLocation(p.programs.blurV,"u_texture"),0),m.uniform2f(m.getUniformLocation(p.programs.blurV,"u_resolution"),J,G),m.uniform1f(m.getUniformLocation(p.programs.blurV,"u_radius"),te),$(p.programs.blurV))}p.programs.composite&&(m.bindFramebuffer(m.FRAMEBUFFER,null),m.viewport(0,0,k,A),m.useProgram(p.programs.composite),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,p.sceneTexture),m.uniform1i(m.getUniformLocation(p.programs.composite,"u_scene"),0),m.activeTexture(m.TEXTURE1),m.bindTexture(m.TEXTURE_2D,p.fbos.pingpong[1].tex),m.uniform1i(m.getUniformLocation(p.programs.composite,"u_bloom"),1),m.uniform2f(m.getUniformLocation(p.programs.composite,"u_resolution"),k,A),m.uniform1f(m.getUniformLocation(p.programs.composite,"u_time"),C*.001),$(p.programs.composite))}else if(!o.current){const k=h.getContext("2d");k&&v&&(k.clearRect(0,0,h.width,h.height),k.drawImage(v,0,0))}n.current=requestAnimationFrame(ne)};n.current=requestAnimationFrame(ne);let ee=null;try{ee=Ut("/api/events/stream",C=>{a(!0);const F=C;x(R=>[{type:F.type,ts:F.ts},...R].slice(0,20));for(const R of p.edges)(F.type===R.eventType||F.type.startsWith(R.eventType.split(":")[0]+":"))&&(R.lastFired=Date.now(),R.active=!0,R.particles.push({t:0,speed:.003+Math.random()*.002,size:3.5,alpha:1,trail:[]}),setTimeout(()=>{R.particles.length>10&&R.particles.shift()},3e3))})}catch{}return()=>{window.removeEventListener("resize",S),h.removeEventListener("mousemove",E),h.removeEventListener("mousedown",z),h.removeEventListener("mouseup",V),cancelAnimationFrame(n.current),ee==null||ee()}},[f]);const g=l.current;return e("div",{class:"flex h-[calc(100vh-3rem)] gap-0",children:[e("div",{ref:r,class:"flex-1 relative overflow-hidden",style:{background:_.bg},children:[e("style",{children:`
89
+ @keyframes topo-breathe {
90
+ 0%, 100% { opacity: 0.25; }
91
+ 50% { opacity: 0.5; }
92
+ }
93
+ @keyframes topo-float-1 {
94
+ 0%, 100% { transform: translate(0, 0) scale(1); }
95
+ 33% { transform: translate(25px, -18px) scale(1.05); }
96
+ 66% { transform: translate(-12px, 14px) scale(0.95); }
97
+ }
98
+ @keyframes topo-float-2 {
99
+ 0%, 100% { transform: translate(0, 0) scale(1); }
100
+ 33% { transform: translate(-30px, 12px) scale(1.08); }
101
+ 66% { transform: translate(18px, -24px) scale(0.92); }
102
+ }
103
+ @keyframes topo-float-3 {
104
+ 0%, 100% { transform: translate(0, 0) scale(1); }
105
+ 33% { transform: translate(14px, 22px) scale(0.96); }
106
+ 66% { transform: translate(-22px, -14px) scale(1.04); }
107
+ }
108
+ .topo-orb-1 { animation: topo-float-1 12s ease-in-out infinite; }
109
+ .topo-orb-2 { animation: topo-float-2 15s ease-in-out infinite; }
110
+ .topo-orb-3 { animation: topo-float-3 18s ease-in-out infinite; }
111
+ @keyframes topo-status-pulse {
112
+ 0%, 100% { box-shadow: 0 0 4px currentColor; opacity: 1; }
113
+ 50% { box-shadow: 0 0 10px currentColor; opacity: 0.7; }
114
+ }
115
+ .topo-status-pulse { animation: topo-status-pulse 2s ease-in-out infinite; }
116
+ `}),e("div",{class:"absolute inset-0 pointer-events-none overflow-hidden",style:{zIndex:0},children:[e("div",{class:"absolute rounded-full topo-orb-1",style:{width:"360px",height:"360px",left:"12%",top:"18%",background:`radial-gradient(circle, ${Y(_.info,.06)} 0%, transparent 70%)`,filter:"blur(40px)"}}),e("div",{class:"absolute rounded-full topo-orb-2",style:{width:"400px",height:"400px",right:"10%",bottom:"15%",background:`radial-gradient(circle, ${Y(_.purple,.05)} 0%, transparent 70%)`,filter:"blur(50px)"}}),e("div",{class:"absolute rounded-full topo-orb-3",style:{width:"280px",height:"280px",left:"45%",top:"40%",background:`radial-gradient(circle, ${Y(_.cyan,.04)} 0%, transparent 70%)`,filter:"blur(35px)"}})]}),e("canvas",{ref:t,class:"absolute inset-0 w-full h-full",style:{zIndex:1}}),g.nodes.length>0&&e("div",{class:"absolute inset-0 pointer-events-none",style:{zIndex:2},children:g.nodes.map(h=>{const y=g.hoveredNode===h.id,v=g.selectedNode===h.id,b=g.hoveredNode||g.selectedNode,p=new Set;if(b)for(const T of g.edges)(T.source===b||T.target===b)&&(p.add(T.source),p.add(T.target));const m=p.size>0&&!p.has(h.id)&&!y&&!v;return e("div",{class:"absolute pointer-events-auto",style:{left:`${h.x}px`,top:`${h.y+h.radius+14}px`,transform:"translateX(-50%)",transition:"opacity 0.3s ease, transform 0.2s ease",opacity:m?.15:y||v?1:.8},children:e("div",{style:{background:v?"rgba(18, 18, 22, 0.92)":"rgba(18, 18, 22, 0.75)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",border:`1px solid ${v?h.color+"55":y?h.color+"33":"rgba(255,255,255,0.06)"}`,borderRadius:"10px",padding:"8px 12px",whiteSpace:"nowrap",boxShadow:v?`0 0 24px ${h.color}22, 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06)`:"0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04)",transition:"border-color 0.25s ease, box-shadow 0.3s ease"},children:[e("div",{style:{display:"flex",alignItems:"center",gap:"7px"},children:[e("span",{class:w("topo-status-pulse"),style:{width:"7px",height:"7px",borderRadius:"50%",flexShrink:0,backgroundColor:ce(h.status),color:ce(h.status),display:(h.status==="running","block"),boxShadow:h.status==="running"?void 0:"none",animation:h.status==="running"?void 0:"none"}}),e("span",{style:{fontSize:"11px",fontWeight:600,color:_.text},children:h.label}),e("span",{style:{fontSize:"8px",fontFamily:"'JetBrains Mono', monospace",padding:"1px 5px",borderRadius:"4px",backgroundColor:`${h.color}18`,color:h.color,textTransform:"uppercase",letterSpacing:"0.5px"},children:h.type})]}),e("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"5px",gap:"8px"},children:[e("span",{style:{fontSize:"9px",fontFamily:"'JetBrains Mono', monospace",color:_.textMuted},children:[h.eventCount," events"]}),e(lt,{data:h.reward,color:h.color,width:48,height:14})]})]})},h.id)})}),g.edges.length>0&&e("div",{class:"absolute inset-0 pointer-events-none",style:{zIndex:3},children:g.edges.map(h=>{const y=g.nodes.find(S=>S.id===h.source),v=g.nodes.find(S=>S.id===h.target);if(!y||!v||!(g.hoveredNode===h.source||g.hoveredNode===h.target||g.selectedNode===h.source||g.selectedNode===h.target))return null;const p=Le(y,v),[m,T]=ae(p.sx,p.sy,p.c1x,p.c1y,p.c2x,p.c2y,p.ex,p.ey,.5);return e("div",{class:"absolute",style:{left:`${m}px`,top:`${T}px`,transform:"translate(-50%, -50%)"},children:e("span",{style:{fontSize:"8px",fontFamily:"'JetBrains Mono', monospace",padding:"2px 6px",borderRadius:"5px",color:h.color,background:"rgba(15, 15, 18, 0.88)",border:`1px solid ${h.color}33`,backdropFilter:"blur(6px)",letterSpacing:"0.05em"},children:h.eventType})},h.id)})}),e("div",{class:"absolute top-5 left-5 flex items-center gap-3",style:{zIndex:10},children:[e("h1",{class:"text-base font-semibold tracking-tight",style:{color:_.text},children:"Agent Topology"}),e("span",{class:w("text-[9px] mono px-2 py-0.5 rounded-full tracking-widest uppercase",c?"text-success":"text-muted-foreground"),style:{background:c?"rgba(52, 211, 153, 0.1)":"rgba(90, 90, 90, 0.2)",border:`1px solid ${c?"rgba(52, 211, 153, 0.2)":"rgba(90, 90, 90, 0.15)"}`},children:c?"LIVE":"MOCK"})]}),e("div",{class:"absolute bottom-5 left-5 flex items-center gap-5",style:{zIndex:10},children:[{color:_.info,label:"Agent"},{color:_.purple,label:"Orchestrator"},{color:_.warning,label:"Eval"},{color:_.success,label:"Service"}].map(h=>e("div",{class:"flex items-center gap-1.5",children:[e("span",{class:"w-[6px] h-[6px] rounded-full",style:{backgroundColor:h.color,boxShadow:`0 0 6px ${h.color}88`}}),e("span",{class:"text-[9px] uppercase tracking-wider",style:{color:_.textMuted},children:h.label})]},h.label))}),e("div",{class:"absolute bottom-5 flex items-center gap-4",style:{zIndex:10,right:s?"336px":"20px",transition:"right 0.3s ease"},children:[{color:_.info,label:"Data"},{color:_.success,label:"Success"},{color:_.purple,label:"RL"}].map(h=>e("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e("svg",{width:"20",height:"4",style:{flexShrink:0},children:e("line",{x1:"0",y1:"2",x2:"20",y2:"2",stroke:h.color,"stroke-width":"1.5","stroke-dasharray":"6 4"})}),e("span",{class:"text-[9px]",style:{color:_.textMuted},children:h.label})]},h.label))}),u.length>0&&e("div",{class:"absolute bottom-5 max-w-60",style:{zIndex:10,right:s?"336px":"20px",bottom:"40px",transition:"right 0.3s ease"},children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-1.5",style:{color:_.textDim},children:"Live Events"}),e("div",{class:"space-y-0.5 max-h-28 overflow-hidden",children:u.slice(0,6).map((h,y)=>e("div",{class:"text-[9px] mono truncate animate-fade-in",style:{opacity:1-y*.14,color:_.textDim},children:[e("span",{style:{color:_.info},children:h.type})," ",e("span",{style:{opacity:.5},children:q(h.ts)})]},`${h.ts}-${y}`))})]})]}),s&&e("div",{class:"w-80 overflow-y-auto animate-slide-in",style:{background:"rgba(18, 18, 22, 0.95)",borderLeft:"1px solid rgba(60, 60, 60, 0.2)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",flexShrink:0},children:[e("div",{class:"p-4",style:{borderBottom:"1px solid rgba(60, 60, 60, 0.2)"},children:[e("div",{class:"flex items-center justify-between mb-3",children:[e("div",{class:"flex items-center gap-2.5",children:[e("span",{class:"w-3 h-3 rounded-full",style:{backgroundColor:s.node.color,boxShadow:`0 0 10px ${s.node.color}66`}}),e("h2",{class:"font-semibold text-sm",style:{color:_.text},children:s.node.label})]}),e("button",{onClick:()=>{l.current.selectedNode=null,i(null)},class:"p-1 rounded transition-colors",style:{color:_.textMuted,background:"none",border:"none",cursor:"pointer"},children:e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:e("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),e("div",{class:"flex items-center gap-2",children:[e("span",{class:"text-[9px] mono px-2 py-0.5 rounded-full uppercase tracking-wider",style:{backgroundColor:ce(s.node.status)+"15",color:ce(s.node.status),border:`1px solid ${ce(s.node.status)}22`},children:s.node.status}),e("span",{class:"text-[9px] mono px-2 py-0.5 rounded-full uppercase tracking-wider",style:{backgroundColor:s.node.color+"15",color:s.node.color,border:`1px solid ${s.node.color}22`},children:s.node.type})]})]}),e("div",{class:"p-4 space-y-5",children:[e("div",{children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-2.5",style:{color:_.textDim},children:"Stats"}),e("div",{class:"grid grid-cols-2 gap-2",children:[e("div",{class:"rounded-lg p-3",style:{background:"rgba(40, 40, 44, 0.4)",border:"1px solid rgba(60, 60, 60, 0.15)"},children:[e("div",{class:"text-[9px] uppercase tracking-wider",style:{color:_.textDim},children:"Events"}),e("div",{class:"text-lg font-semibold mono tabular-nums mt-1",style:{color:_.text},children:s.node.eventCount})]}),e("div",{class:"rounded-lg p-3",style:{background:"rgba(40, 40, 44, 0.4)",border:"1px solid rgba(60, 60, 60, 0.15)"},children:[e("div",{class:"text-[9px] uppercase tracking-wider",style:{color:_.textDim},children:"Connections"}),e("div",{class:"text-lg font-semibold mono tabular-nums mt-1",style:{color:_.text},children:s.edges.length})]})]})]}),e("div",{children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-2",style:{color:_.textDim},children:"Reward Signal"}),e("div",{class:"rounded-lg p-3",style:{background:"rgba(40, 40, 44, 0.4)",border:"1px solid rgba(60, 60, 60, 0.15)"},children:[e(lt,{data:s.node.reward,color:s.node.color,width:220,height:40}),e("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"6px"},children:[e("span",{class:"text-[9px] mono",style:{color:_.textMuted},children:"7 sessions"}),e("span",{class:"text-[9px] mono",style:{color:s.node.color},children:[(s.node.reward[s.node.reward.length-1]*100).toFixed(0),"%"]})]})]})]}),e("div",{children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-2",style:{color:_.textDim},children:"Last Action"}),e("div",{class:"text-xs",style:{color:_.text,opacity:.8},children:s.node.lastAction}),e("div",{class:"text-[9px] mono mt-1",style:{color:_.textMuted},children:s.node.lastTs?q(s.node.lastTs):"--"})]}),e("div",{children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-2",style:{color:_.textDim},children:["Connections (",s.edges.length,")"]}),e("div",{class:"space-y-1.5",children:s.edges.map(h=>{const y=h.source===s.node.id,v=l.current.nodes.find(b=>b.id===(y?h.target:h.source));return e("div",{class:"flex items-center gap-2 text-xs",children:[e("svg",{width:"12",height:"8",viewBox:"0 0 12 8",class:"shrink-0",children:y?e("path",{d:"M0 4h8M6 1l3 3-3 3",fill:"none",stroke:h.color,"stroke-width":"1.5"}):e("path",{d:"M12 4H4M6 1L3 4l3 3",fill:"none",stroke:h.color,"stroke-width":"1.5"})}),e("span",{class:"mono text-[9px]",style:{color:h.color},children:h.eventType}),e("span",{class:"text-[9px] ml-auto truncate",style:{color:_.textDim},children:[y?"to":"from"," ",(v==null?void 0:v.label)||"?"]})]},h.id)})})]}),s.recentEvents.length>0&&e("div",{children:[e("div",{class:"text-[9px] uppercase tracking-widest font-medium mb-2",style:{color:_.textDim},children:"Recent Activity"}),e("div",{class:"space-y-1",children:s.recentEvents.map((h,y)=>e("div",{class:"flex items-center justify-between text-[9px]",children:[e("span",{class:"mono",style:{color:_.info},children:h.type}),e("span",{class:"mono",style:{color:_.textMuted},children:q(h.ts)})]},y))})]})]}),e("div",{class:"p-4",style:{borderTop:"1px solid rgba(60, 60, 60, 0.15)"},children:e("div",{class:"text-[8px] mono tracking-wider",style:{color:_.textDim,opacity:.5},children:"Canvas 2D + WebGL Bloom / 4-pass Gaussian"})})]})]})}const it={overview:Kt,agents:()=>e(dr,{}),journal:()=>e(hr,{}),events:()=>e(xr,{}),services:vr,flows:()=>e(kr,{}),health:Er,experiments:()=>e(Rr,{}),telemetry:()=>e($r,{}),topology:()=>e(Yr,{})};function Kr(){const t=U(()=>M.status(),1e4),[r,n]=D("overview");if(t.loading)return e("div",{class:"flex items-center justify-center h-screen",children:e("div",{class:"text-muted-foreground text-sm animate-pulse-dot",children:"Loading dashboard..."})});if(t.error)return e("div",{class:"flex items-center justify-center h-screen",children:e("div",{class:"text-center",children:[e("div",{class:"text-destructive text-sm font-medium",children:"Connection Error"}),e("div",{class:"text-muted-foreground text-xs mt-1",children:t.error}),e("div",{class:"text-muted-foreground text-xs mt-2 mono",children:"jfl context-hub start"})]})});const o=it[r]||it.overview;return e("div",{class:"flex min-h-screen",children:[e(Ht,{status:t.data,currentPage:r,setPage:l=>n(l)}),e("main",{class:"flex-1 ml-56 p-6",children:e(o,{status:t.data})})]})}Dt(e(Kr,{}),document.getElementById("app"));
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-0{left:calc(var(--spacing) * 0)}.left-3{left:calc(var(--spacing) * 3)}.left-5{left:calc(var(--spacing) * 5)}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-56{margin-left:calc(var(--spacing) * 56)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-7{height:calc(var(--spacing) * 7)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-\[6px\]{height:6px}.h-\[calc\(100vh-3rem\)\]{height:calc(100vh - 3rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-28{max-height:calc(var(--spacing) * 28)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-80{width:calc(var(--spacing) * 80)}.w-\[6px\]{width:6px}.w-full{width:100%}.max-w-8{max-width:calc(var(--spacing) * 8)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-60{max-width:calc(var(--spacing) * 60)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-16{min-width:calc(var(--spacing) * 16)}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-\[4rem\]{min-width:4rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-px{gap:1px}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:.625rem}.rounded-md{border-radius:.5rem}.rounded-sm{border-radius:.375rem}.rounded-t-sm{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-border,.border-border\/30{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,var(--border) 30%,transparent)}}.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.border-destructive\/30{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/30{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.border-info\/30{border-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.border-info\/30{border-color:color-mix(in oklab,var(--info) 30%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-sidebar-border,.border-sidebar-border\/50{border-color:var(--sidebar-border)}@supports (color:color-mix(in lab,red,red)){.border-sidebar-border\/50{border-color:color-mix(in oklab,var(--sidebar-border) 50%,transparent)}}.border-success\/30{border-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.border-success\/30{border-color:color-mix(in oklab,var(--success) 30%,transparent)}}.border-warning\/30{border-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.border-warning\/30{border-color:color-mix(in oklab,var(--warning) 30%,transparent)}}.bg-accent,.bg-accent\/40{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/40{background-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.bg-accent\/60{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/60{background-color:color-mix(in oklab,var(--accent) 60%,transparent)}}.bg-card{background-color:var(--card)}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/5{background-color:color-mix(in oklab,var(--destructive) 5%,transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.bg-destructive\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/15{background-color:color-mix(in oklab,var(--destructive) 15%,transparent)}}.bg-foreground\/10{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/10{background-color:color-mix(in oklab,var(--foreground) 10%,transparent)}}.bg-info,.bg-info\/5{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/5{background-color:color-mix(in oklab,var(--info) 5%,transparent)}}.bg-info\/10{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/10{background-color:color-mix(in oklab,var(--info) 10%,transparent)}}.bg-info\/15{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/15{background-color:color-mix(in oklab,var(--info) 15%,transparent)}}.bg-info\/60{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/60{background-color:color-mix(in oklab,var(--info) 60%,transparent)}}.bg-info\/70{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/70{background-color:color-mix(in oklab,var(--info) 70%,transparent)}}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/30{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.bg-muted-foreground\/50{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/50{background-color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.bg-muted-foreground\/70{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/70{background-color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted) 30%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-sidebar{background-color:var(--sidebar)}.bg-success,.bg-success\/5{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.bg-success\/5{background-color:color-mix(in oklab,var(--success) 5%,transparent)}}.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.bg-success\/10{background-color:color-mix(in oklab,var(--success) 10%,transparent)}}.bg-success\/15{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.bg-success\/15{background-color:color-mix(in oklab,var(--success) 15%,transparent)}}.bg-success\/80{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.bg-success\/80{background-color:color-mix(in oklab,var(--success) 80%,transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\/5{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/5{background-color:color-mix(in oklab,var(--warning) 5%,transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/10{background-color:color-mix(in oklab,var(--warning) 10%,transparent)}}.bg-warning\/15{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/15{background-color:color-mix(in oklab,var(--warning) 15%,transparent)}}.bg-warning\/60{background-color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.bg-warning\/60{background-color:color-mix(in oklab,var(--warning) 60%,transparent)}}.p-1{padding:calc(var(--spacing) * 1)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-accent-foreground{color:var(--accent-foreground)}.text-destructive{color:var(--destructive)}.text-foreground{color:var(--foreground)}.text-info,.text-info\/60{color:var(--info)}@supports (color:color-mix(in lab,red,red)){.text-info\/60{color:color-mix(in oklab,var(--info) 60%,transparent)}}.text-muted-foreground,.text-muted-foreground\/30{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/30{color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.text-pink-400{color:var(--color-pink-400)}.text-purple-400{color:var(--color-purple-400)}.text-sidebar-foreground{color:var(--sidebar-foreground)}.text-success,.text-success\/60{color:var(--success)}@supports (color:color-mix(in lab,red,red)){.text-success\/60{color:color-mix(in oklab,var(--success) 60%,transparent)}}.text-warning,.text-warning\/80{color:var(--warning)}@supports (color:color-mix(in lab,red,red)){.text-warning\/80{color:color-mix(in oklab,var(--warning) 80%,transparent)}}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-info\/30{--tw-ring-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.ring-info\/30{--tw-ring-color:color-mix(in oklab, var(--info) 30%, transparent)}}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/50::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-\[5px\]:before{content:var(--tw-content);top:5px}.before\:bottom-\[5px\]:before{content:var(--tw-content);bottom:5px}.before\:left-0:before{content:var(--tw-content);left:calc(var(--spacing) * 0)}.before\:w-\[2px\]:before{content:var(--tw-content);width:2px}.before\:rounded-r:before{content:var(--tw-content);border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.before\:bg-info:before{content:var(--tw-content);background-color:var(--info)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.focus-within\:border-info\/50:focus-within{border-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.focus-within\:border-info\/50:focus-within{border-color:color-mix(in oklab,var(--info) 50%,transparent)}}@media(hover:hover){.hover\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-border\/80:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.hover\:border-border\/80:hover{border-color:color-mix(in oklab,var(--border) 80%,transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.hover\:bg-accent\/30:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/30:hover{background-color:color-mix(in oklab,var(--accent) 30%,transparent)}}.hover\:bg-info\/25:hover{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-info\/25:hover{background-color:color-mix(in oklab,var(--info) 25%,transparent)}}.hover\:bg-muted\/20:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/20:hover{background-color:color-mix(in oklab,var(--muted) 20%,transparent)}}.hover\:bg-muted\/30:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab,var(--muted) 30%,transparent)}}.hover\:bg-muted\/80:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/80:hover{background-color:color-mix(in oklab,var(--muted) 80%,transparent)}}.hover\:bg-success\/20:hover{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-success\/20:hover{background-color:color-mix(in oklab,var(--success) 20%,transparent)}}.hover\:bg-success\/25:hover{background-color:var(--success)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-success\/25:hover{background-color:color-mix(in oklab,var(--success) 25%,transparent)}}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-info\/80:hover{color:var(--info)}@supports (color:color-mix(in lab,red,red)){.hover\:text-info\/80:hover{color:color-mix(in oklab,var(--info) 80%,transparent)}}.hover\:text-sidebar-foreground:hover{color:var(--sidebar-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-info\/50:focus{border-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.focus\:border-info\/50:focus{border-color:color-mix(in oklab,var(--info) 50%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media(min-width:48rem){.md\:table-cell{display:table-cell}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(min-width:64rem){.lg\:table-cell{display:table-cell}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}.dark{--background:oklch(12.5% 0 0);--foreground:oklch(97% 0 0);--card:oklch(17.5% 0 0);--card-foreground:oklch(97% 0 0);--muted:oklch(24% 0 0);--muted-foreground:oklch(55% 0 0);--accent:oklch(20.5% 0 0);--accent-foreground:oklch(97% 0 0);--border:oklch(22.5% 0 0);--destructive:oklch(63.7% .237 25.331);--success:oklch(69.6% .17 162.48);--warning:oklch(79.5% .184 86.047);--info:oklch(58.8% .158 241.966);--sidebar:oklch(14% 0 0);--sidebar-foreground:oklch(92% 0 0);--sidebar-border:oklch(20.5% 0 0)}*{box-sizing:border-box}body{background:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:Inter,system-ui,-apple-system,sans-serif}.mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}::selection{background:#0084c740;background:oklch(58.8% .158 241.966/.25)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#2e2e2e;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#484848}*{scrollbar-width:thin;scrollbar-color:oklch(30% 0 0) transparent}@keyframes pulse-dot{0%,to{opacity:1}50%{opacity:.4}}@keyframes fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.animate-fade-in{animation:.2s fade-in}.animate-slide-in{animation:.15s slide-in}.animate-pulse-dot{animation:1.5s infinite pulse-dot}button{cursor:pointer}button:active{transform:scale(.97)}input:focus{outline:none}.tabular-nums{font-variant-numeric:tabular-nums}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}