openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
5 lines • 3.69 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./debug-overlay-content-CTD_dTDJ.js","./gateway-runtime-Cr51Pi7N.js","./session-snapshot-database-BurLa_ut.js","./control-ui-boot-shared-DJkUdZmL.js","./control-ui-boot-shared-Dfs-gZII.js","./control-ui-boot-shared-umGE-sEP.js","./control-ui-boot-shared-Sj2zqjOr.js","./control-ui-boot-shared-em9-jnbz.js","./plugin-contracts-runtime-CNCaYops.js","./control-ui-boot-shared-D4XEBdOG.js","./config-runtime-BecGLziM.js","./markdown-runtime-ORQpioyT.js","./control-ui-boot-shared-xfDhIVun.js","./control-ui-boot-shared-D3oo_6Fq.js","./control-ui-boot-shared-styles-BaQ2sAfZ.js","./sidebar-update-runtime-DonYLwN5.js","./gateway-vitals-DuGt95EC.js","./en-debug-x_0vhb2F.js","./sparkline-tile-DioVokoS.js","./lane-table-DnTeYTFe.js","./control-ui-core-yIvVj14Y.css","./control-ui-boot-shared-styles-DKyMAG_6.css","./control-ui-boot-shared-CXHNz0Bh.css","./sidebar-update-runtime-ah7rgQE7.css","./sparkline-tile-CaHeaFDQ.css","./lane-table-CSTpz4OW.css"])))=>i.map(i=>d[i]);
import{n as e}from"./rolldown-runtime-8BhlS34s.js";import{C as t,Cu as n,Eu as r,Tu as i,b as a,ju as o,v as s,x as c}from"./control-ui-core-BncvAZjR.js";import{Hi as l,I as u,Ii as d,L as f,Li as p,Pi as m,R as h,Ri as g,Ti as _,Xr as v,ai as y,oi as b,si as x,wi as S,z as C}from"./control-ui-core-9qYjK5B2.js";import{$ as w,X as T,Y as E,ct as D,d as O,nt as k,u as A}from"./lit-runtime-B8uOr6OX.js";import{Xr as j,Zr as M,ii as N,oa as P,sa as F}from"./ui-DuRgK6kL.js";var I,L;function R(){return(R=e((()=>{M(),E(),k(),A(),_(),d(),f(),g(),b(),y(),r(),i(),s(),F(),I={tagName:`openclaw-debug-overlay-content`,get label(){return o(`debug.overlay.title`)},loadModule:()=>P(()=>import(`./debug-overlay-content-CTD_dTDJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url)},L=class extends n{constructor(...e){super(...e),this.mode=`closed`,this.contentKey=0,this.recoveryActionPending=!1,this.content=new m(this,void 0,e=>l({canReload:()=>e()?(this.recoveryActionPending=h({eventType:v}),this.recoveryActionPending):!1})),this.handleKeydown=e=>{t(e,this.mode,this)&&(e.preventDefault(),this.close())},this.close=()=>{this.mode=`closed`,document.removeEventListener(`keydown`,this.handleKeydown,!0),this.content.close(),this.clearRecoveryAction()}}disconnectedCallback(){this.close(),super.disconnectedCallback()}toggle(){if(this.mode===`minimized`){this.mode=`expanded`;return}if(this.mode===`expanded`){this.close();return}this.open(`expanded`)}open(e){if(this.mode!==`closed`){this.mode=e;return}this.mode=e,this.contentKey+=1,document.addEventListener(`keydown`,this.handleKeydown,!0),p(I)||(this.recoveryActionPending=h({eventType:v}),this.content.request(I,()=>this.clearRecoveryAction()))}clearRecoveryAction(){this.recoveryActionPending&&=(C()?.eventType===`openclaw:debug-overlay-request`&&u(),!1)}renderContent(){let e=this.content.visibleState;return e?.status===`error`?x({actionLabel:o(`common.retry`),error:e.error,stale:e.stale,subtitle:e.element.label,onRetry:()=>this.content.retry()}):p(I)?O(this.contentKey,w`<openclaw-debug-overlay-content
.context=${this.context}
.minimized=${this.mode===`minimized`}
></openclaw-debug-overlay-content>`):c(this.mode)}render(){return this.mode===`closed`?T:a({mode:this.mode,body:this.renderContent(),onToggleMode:()=>{this.mode=this.mode===`minimized`?`expanded`:`minimized`},onClose:this.close})}},N([j({context:S,subscribe:!0})],L.prototype,`context`,void 0),N([D()],L.prototype,`mode`,void 0),customElements.get(`openclaw-debug-overlay`)||customElements.define(`openclaw-debug-overlay`,L)})))()}R();export{L as DebugOverlay};