UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 7.27 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{GN as t,JN as n,WN as r,qN as i}from"./_2_____________________________.js";import{a,o}from"./update-run-report-vAIYUOHn.js";import{C as s,F as c,O as l,P as u,Rt as d,U as f,d as p,f as m,g as h,ht as g,j as _,l as v,m as y,o as b,r as x,u as S,x as C}from"./_6____________________.js";import{n as w,t as T}from"./en-update-actions-DQoZlnG9.js";import{n as E,r as D,t as O}from"./update-run-projection-29zDwPjz.js";function k(e){let t=!0,n;g(()=>{n!==void 0&&cancelAnimationFrame(n.id)});function r(r,i=!1){let a=t||n?.atBottom===!0;n!==void 0&&cancelAnimationFrame(n.id),n={id:requestAnimationFrame(()=>{n=void 0;let o=e.container();o?.isConnected&&e.identity()===r&&(!i&&(!e.enabled()||!a&&o.scrollHeight-o.scrollTop-o.clientHeight>=120)||(e.scrollToEnd?e.scrollToEnd():o.scrollTop=o.scrollHeight,t=!0))}),atBottom:a}}return e.content&&u(()=>[e.content?.(),e.identity()],([,e],t)=>r(e,e!==t?.[1])),{reset(){t=!0},schedule(t=!1){r(e.identity(),t)},handleScroll:()=>{let n=e.container();n&&(t=n.scrollHeight-n.scrollTop-n.clientHeight<120)}}}function A(){return(A=e((()=>{f()})))()}function j(e){let t=D(e);if(a.some(e=>e===t))return n(`updates.run.phase.${t}`);let r=X[t],i=r?n(`updates.run.stepLabel.${r}`):t.replace(/[-_:]+/gu,` `).replace(/^./u,e=>e.toUpperCase());return e.startsWith(`warning:`)?n(`updates.run.stepWarning`,{step:i}):i}function M(e){let t=()=>e.headline.indexOf(` `);return[(()=>{var n=F();return p(n,()=>e.headline.slice(0,t())),n})(),m(()=>e.headline.slice(t()))]}function N(e){let t=()=>e.label??j(e.step.step),r=()=>n(`updates.run.step.${e.step.status}`);var i=L(),a=i.firstChild,o=a.nextSibling;return p(a,()=>Z[e.step.status]),p(i,_(l,{get when(){return e.step.detail},get fallback(){var e=R();return p(e,t),e},get children(){var n=I(),r=n.firstChild,i=r.nextSibling;return p(r,t),p(i,()=>e.step.detail),v(()=>t(),e=>{h(i,`aria-label`,e)}),n}}),o),p(o,r),v(()=>({e:[`update-run-view__step`,`update-run-view__step--${e.step.status}`],t:e.step.step,a:e.step.status,o:e.step.step,i:`${t()}: ${r()}`}),({e,t,a:n,o:r,i:a},o)=>{b(i,e,o?.e),t!==o?.t&&h(i,`data-step`,t),n!==o?.a&&h(i,`data-status`,n),r!==o?.o&&h(i,`title`,r),a!==o?.i&&h(i,`aria-label`,a)}),i}function P(e){let t,i,a=()=>e.run?.runId,o=k({container:()=>t,content:()=>e.run,identity:a,enabled:()=>!0}),u=k({container:()=>i,content:()=>e.run,identity:a,enabled:()=>!!i?.parentElement?.hasAttribute(`open`)}),f=c(()=>(r(),e.run?E(e.run,e.connected,e.serving):null));var g=z();return g._$owner=d(),p(g,_(l,{get when(){return f()},children:r=>(()=>{var a=K(),c=a.firstChild,d=c.firstChild,f=c.nextSibling,g=f.nextSibling,S=g.nextSibling,C=S.firstChild,w=C.firstChild,T=w.nextSibling,E=C.nextSibling,D=S.nextSibling,O=D.nextSibling;return p(d,_(l,{get when(){return r().terminal},get fallback(){return r().headline},get children(){return _(M,{get headline(){return r().headline}})}})),p(c,_(l,{get when(){return r().compactLabel},get children(){var e=B();return p(e,()=>r().compactLabel),e}}),null),p(a,_(l,{get when(){return m(()=>!e.connected)()&&!r().terminal},get children(){var e=V();return p(e,()=>n(`updates.run.reconnecting`)),e}}),f),p(a,_(l,{get when(){return r().phases.length},get children(){var e=H();return p(e,_(s,{get each(){return r().phases},keyed:!1,children:e=>_(N,{get step(){return e()},get label(){return e().label}})})),v(()=>n(`updates.run.phases`),t=>{h(e,`aria-label`,t)}),e}}),g),p(a,_(l,{get when(){return r().steps.length},get children(){var e=U(),t=e.firstChild,a=t.nextSibling;return e.addEventListener(`toggle`,e=>e.currentTarget.open&&u.schedule(!0)),p(t,()=>n(`updates.run.steps`)),x(a,`scroll`,u.handleScroll),y(()=>e=>i=e,a),p(a,_(s,{get each(){return r().steps},keyed:!1,children:e=>_(N,{get step(){return e()}})})),v(()=>n(`updates.run.steps`),e=>{h(a,`aria-label`,e)}),e}}),S),S.addEventListener(`toggle`,e=>e.currentTarget.open&&o.schedule(!0)),p(C,()=>n(`updates.run.details`),w),p(C,_(l,{get when(){return r().detailStep},children:e=>(()=>{var t=R();return p(t,()=>j(e())),v(()=>e(),e=>{h(t,`title`,e)}),t})()}),T),x(E,`scroll`,o.handleScroll),y(()=>e=>t=e,E),p(E,()=>r().details||n(r().detailStep===`updater-runtime-retention`?`updates.run.prepareUpdaterDetails`:`updates.run.noDetails`)),p(a,_(l,{get when(){return r().oracles.length},get children(){return[_(l,{get when(){return r().historicalVerificationLabel},children:e=>(()=>{var t=q();return p(t,e),t})()}),(()=>{var e=W();return p(e,_(s,{get each(){return r().oracles},children:e=>(()=>{var t=J(),r=t.firstChild,i=r.nextSibling,a=i.nextSibling;return p(r,()=>Q[e.state]),p(i,()=>n(`updates.run.oracle.${e.name}`)),p(a,()=>n(`updates.run.oracleState.${e.state}`)),v(()=>({e:e.name,t:e.state,a:[`update-run-view__oracle`,`update-run-view__oracle--${e.state}`]}),({e,t:n,a:r},i)=>{e!==i?.e&&h(t,`data-oracle`,e),n!==i?.t&&h(t,`data-state`,n),b(t,r,i?.a)}),t})()})),v(()=>r().historicalVerificationLabel??n(`updates.run.verification`),t=>{h(e,`aria-label`,t)}),e})()]}}),D),p(a,_(l,{get when(){return r().terminal},get children(){var e=G(),t=e.firstChild,i=t.nextSibling;return p(t,_(M,{get headline(){return r().report.headline}})),p(i,_(s,{get each(){return r().report.lines},children:e=>(()=>{var t=Y();return p(t,e),t})()})),v(()=>n(`updates.run.report`),t=>{h(e,`aria-label`,t)}),e}}),O),v(()=>({e:e.run?.runId,t:e.run?.status,a:n(`updates.run.title`),o:n(`updates.run.details`)}),({e,t,a:n,o:r},i)=>{e!==i?.e&&h(a,`data-run-id`,e),t!==i?.t&&h(a,`data-run-status`,t),n!==i?.a&&h(a,`aria-label`,n),r!==i?.o&&h(E,`aria-label`,r)}),a})()})),g}var F,I,L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q;function $(){return($=e((()=>{S(),f(),o(),O(),T(),t(),A(),F=C(`<span class=update-run-view__headline-mark>`),I=C(`<details class=update-run-view__step-detail><summary></summary><pre class=update-run-view__step-output tabindex=0>`),L=C(`<li><span class=update-run-view__mark aria-hidden=true></span><span class=update-run-view__step-status>`),R=C(`<span>`),z=C(`<openclaw-update-run-view>`,1),B=C(`<span class=update-run-view__progress>`),V=C(`<p class=update-run-view__connection>`),H=C(`<ol class=update-run-view__phases>`),U=C(`<details class=update-run-view__step-list><summary></summary><ol class=update-run-view__step-scroll tabindex=0>`),W=C(`<ul class=update-run-view__oracles>`),G=C(`<section class=update-run-view__report><h4></h4><div class=update-run-view__report-body tabindex=0>`),K=C(`<section class=update-run-view><header class=update-run-view__heading><h3 role=status aria-live=polite></h3></header><!><!><details class=update-run-view__diagnostics open><summary> <!></summary><pre class=update-run-view__details tabindex=0></pre></details><!><!>`),q=C(`<strong>`),J=C(`<li><span aria-hidden=true></span><span></span><small>`),Y=C(`<p>`),i(w),X={"snapshot-space-preflight":`snapshotSpace`,"updater-runtime-retention":`prepareUpdater`,"candidate-snapshot":`snapshot`,"git fetch":`fetch`,"git fetch tags":`fetch`,"git fetch target tag":`fetch`,"global update":`update`,"global update (omit optional)":`update`,install:`install`,build:`build`,"ui:build":`buildUi`,doctor:`doctor`},Z={completed:`✓`,in_progress:`◌`,pending:`○`,failed:`×`,skipped:`−`},Q={pass:`✓`,warn:`!`,fail:`×`,pending:`○`}})))()}export{$ as n,P as t};