UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

5 lines • 3.96 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./debug-overlay-content-CKLwcphq.js","./gateway-runtime-5YzSCmfV.js","./control-ui-boot-shared-DoKu-5Ju.js","./control-ui-boot-shared-JlZTSJEC.js","./control-ui-boot-shared-3SP_aL-Y.js","./control-ui-boot-shared-90V688bk.js","./control-ui-boot-shared-DBJri5ri.js","./control-ui-boot-shared-BykNRHBP.js","./control-ui-boot-shared-Rs4iS2kF.js","./plugin-contracts-runtime-CsJ0WpAd.js","./markdown-runtime-Hc-lvqnn.js","./config-runtime-CgOgfOrG.js","./control-ui-boot-shared-CG9HtEG-.js","./control-ui-boot-shared-73R4ErOy.js","./control-ui-boot-shared-CcmBeh0v.js","./control-ui-boot-shared-BR12heUA.js","./control-ui-boot-shared-CApmg5ot.js","./css-chat-Ckz95ikh.js","./chat-transcript-layout-w3EszKw8.js","./css-chat-custodian-new-session-B_euK-Vu.js","./sidebar-update-runtime-B0vYzX3D.js","./system-info-CjVJMFLU.js","./gateway-vitals-DDvGDrbo.js","./en-debug-CmOVvDOZ.js","./sparkline-tile-Cq3j8Hqq.js","./lane-table-BvMbqjBH.js","./control-ui-core-D-VUH4Gq.css","./control-ui-boot-shared-BJ_QKfFn.css","./css-chat-DCHf01mf.css","./css-chat-custodian-new-session-CEndYuO5.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{Bi as t,Br as n,qr as r,zi as i,zr as a}from"./control-ui-foundation-ZY_Flbbd.js";import{_ as o,f as s,h as c,hu as l,lu as u,m as d,su as f,uu as p}from"./control-ui-core-3P365fbR.js";import{$r as m,Ai as h,F as g,Gr as _,I as v,Ii as y,L as b,Mi as x,Oi as S,R as C,ei as w,ji as T,ti as E,vi as D,yi as O}from"./control-ui-core-CFW9Qtjn.js";import{$ as k,X as A,Y as j,ct as M,m as N,nt as P,p as F}from"./lit-runtime-P5vbNq6b.js";var I,L;function R(){return(R=e((()=>{n(),j(),P(),F(),O(),h(),v(),x(),w(),m(),p(),u(),s(),t(),I={tagName:`openclaw-debug-overlay-content`,get label(){return l(`debug.overlay.title`)},loadModule:()=>i(()=>import(`./debug-overlay-content-CKLwcphq.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,26,27,28,29,30,31,32]),import.meta.url)},L=class extends f{constructor(...e){super(...e),this.mode=`closed`,this.contentKey=0,this.recoveryActionPending=!1,this.content=new S(this,void 0,e=>y({canReload:()=>e()?(this.recoveryActionPending=b({eventType:_}),this.recoveryActionPending):!1})),this.handleKeydown=e=>{o(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),T(I)||(this.recoveryActionPending=b({eventType:_}),this.content.request(I,()=>this.clearRecoveryAction()))}clearRecoveryAction(){this.recoveryActionPending&&=(C()?.eventType===`openclaw:debug-overlay-request`&&g(),!1)}renderContent(){let e=this.content.visibleState;return e?.status===`error`?E({actionLabel:l(`common.retry`),error:e.error,stale:e.stale,subtitle:e.element.label,onRetry:()=>this.content.retry()}):T(I)?N(this.contentKey,k`<openclaw-debug-overlay-content .context=${this.context} .minimized=${this.mode===`minimized`} ></openclaw-debug-overlay-content>`):c(this.mode)}render(){return this.mode===`closed`?A:d({mode:this.mode,body:this.renderContent(),onToggleMode:()=>{this.mode=this.mode===`minimized`?`expanded`:`minimized`},onClose:this.close})}},r([a({context:D,subscribe:!0})],L.prototype,`context`,void 0),r([M()],L.prototype,`mode`,void 0),customElements.get(`openclaw-debug-overlay`)||customElements.define(`openclaw-debug-overlay`,L)})))()}R();export{L as DebugOverlay};