UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 3.02 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{GN as t,JN as n,dT as r,dx as i,fN as a,fT as o,pN as s,sx as c}from"./_2_____________________________.js";import{I as l,O as u,Rt as d,U as f,d as p,f as m,g as h,gt as g,j as _,l as v,s as y,u as b,x,yt as S}from"./_6____________________.js";import{n as C,t as w}from"./connect-command-BZS_TVWX.js";function T(e){let[t,i]=l(!1),o=S(function*(e){e.isCurrent()&&i(!0),yield Promise.race([e.completion,e.retired])});g(()=>e.subscribeRequests(e=>{g(()=>{o(e).catch(e.reportError)})}));let s=()=>t()||e.loading,f=()=>e.setup?.expiresAtMs?c(e.setup.expiresAtMs,{hour:`numeric`,minute:`2-digit`},``):``;return[(()=>{var t=E(),i=t.firstChild,a=i.nextSibling,o=a.nextSibling;return p(t,(()=>{var t=m(()=>!(!s()||e.setup?.command));return()=>t()?(()=>{var e=O();return p(e,()=>n(`newSession.connectMachineGenerating`)),e})():void 0})(),i),p(t,(()=>{var t=m(()=>!!e.error);return()=>t()?_(r,{tone:`danger`,role:`alert`,get children(){return[(()=>{var e=k();return p(e,()=>n(`newSession.connectMachineFailed`)),e})(),(()=>{var t=k();return p(t,()=>e.error),t})()]}}):void 0})(),a),p(t,_(u,{get when(){return e.setup},children:e=>[_(w,{get command(){return e().command}}),(()=>{var e=A();return p(e,()=>n(`newSession.connectMachineTeamHint`)),e})(),(()=>{var t=j(),r=t.firstChild,i=r.nextSibling;return p(t,()=>n(`newSession.connectMachineInstalled`),r),p(i,()=>e().installedCommand),t})(),(()=>{var t=A();return p(t,()=>e().versionNote),v(()=>!e().versionNote,e=>{h(t,`hidden`,e)}),t})(),(()=>{var t=M(),r=t.firstChild;return p(r,()=>n(`newSession.connectMachineCommandOnly`)),p(t,_(w,{get command(){return e().serviceCommand}}),null),t})(),(()=>{var e=A();return p(e,(()=>{var e=m(()=>!!f());return()=>e()?n(`newSession.connectMachineSingleUseExpires`,{time:f()}):n(`newSession.connectMachineSingleUse`)})()),e})()]}),o),t})(),(()=>{var t=D(),r=t.firstChild;return t._$owner=d(),p(t,(()=>{var t=m(()=>!!(e.setup?.command||e.error));return()=>t()?(()=>{var t=N(),r=t.firstChild,i=r.nextSibling;return t._$$click=()=>e.onRefresh(),p(t,_(a,{name:`refresh`}),r),p(t,(()=>{var e=m(()=>!!s());return()=>e()?n(`newSession.connectMachineRefreshing`):n(`newSession.connectMachineFreshCode`)})(),i),v(()=>s(),e=>{h(t,`disabled`,e)}),t})():void 0})(),r),r._$$click=()=>e.onManageDevices(),p(r,()=>n(`newSession.connectMachineManageDevices`)),t})()]}var E,D,O,k,A,j,M,N;function P(){return(P=e((()=>{b(),f(),C(),s(),o(),i(),t(),E=x(`<div class="oc-dialog__body connect-machine-dialog__body"><!><!><!>`),D=x(`<openclaw-modal-actions class="oc-dialog__footer connect-machine-dialog__actions"><button class="btn btn--ghost"type=button>`,1),O=x(`<p class=connect-machine-dialog__status role=status>`),k=x(`<p>`),A=x(`<p class=connect-machine-dialog__hint>`),j=x(`<p class=connect-machine-dialog__hint> <code translate=no style=overflow-wrap:anywhere>`),M=x(`<details><summary>`),N=x(`<button class=btn type=button><!><!>`),y([`click`])})))()}P();export{T as ConnectMachineDialogContent};