UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

91 lines 7.36 kB
import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{R as t,Zn as n,bn as r,wr as i,z as ee}from"./control-ui-foundation-Cydpkyqa.js";import{Bn as te,Sc as a,bc as o,cn as s,k as c,w as ne,zn as re}from"./control-ui-core-Rwzhj6nO.js";import{$ as l,K as u,X as d,at as f,q as p}from"./lit-runtime-CV_MH99K.js";import{_ as m,_n as ie,g as h,jn as ae}from"./control-ui-core-YphAl4aM.js";import{Gt as oe,Ht as se,Qt as g,St as _,Tt as v,Wt as y,Yt as b,en as x}from"./control-ui-core-vvcQQV2m.js";import{C as S,Cr as C,E as w,S as T,Sr as E,T as D,b as O,w as k,xr as A}from"./control-ui-boot-shared-DfZ39Yj9.js";import{J as j,K as M,L as N,X as P,tt as F}from"./control-ui-boot-chat-_QSl8fbH.js";import{Jo as I,Yo as L}from"./control-ui-boot-shared-CXVvK2AW.js";import{n as R,t as z}from"./settings-workspace-Bseic8Tf.js";import{n as B,t as V}from"./brand-icons-Cz7DOxB_.js";function H(e,t){if(!e)return null;let n=new Date(e);return Number.isNaN(n.getTime())?null:new Intl.DateTimeFormat(t,{dateStyle:`medium`,timeZone:`UTC`}).format(n)}function U(e){return x(e===`copying`?`aboutPage.copyingCommit`:e===`copied`?`aboutPage.copiedCommit`:e===`error`?`aboutPage.copyCommitFailed`:`aboutPage.copyCommit`)}function W(e){return e===`copied`?x(`aboutPage.copiedCommit`):e===`error`?x(`aboutPage.copyCommitFailed`):``}function G(){return d`<span class="muted">${x(`aboutPage.unavailable`)}</span>`}function K(e){if(!e)return p;let t=Date.parse(e);if(!Number.isFinite(t))return p;let n=new Intl.DateTimeFormat(g.getLocale(),{dateStyle:`medium`,timeStyle:`short`}).format(new Date(t));return d` <time class="about-commit__age" dir="auto" datetime=${e} title=${n} >${ne(t,{fallback:``})}</time > `}function ce(e){let t=e.buildInfo.commit;if(!t)return G();let n=U(e.copyState);return d` <span class="about-commit"> <code dir="ltr" title=${t}>${t.slice(0,q)}</code> ${K(e.buildInfo.commitAt)} <openclaw-tooltip .content=${n}> <button type="button" class="about-commit__copy" aria-label=${n} aria-busy=${e.copyState===`copying`?`true`:p} ?disabled=${e.copyState===`copying`} @click=${e.onCopyCommit} > <span aria-hidden="true">${e.copyState===`copied`?y.check:y.copy}</span> </button> </openclaw-tooltip> <span class="sr-only" role="status" aria-live="polite">${W(e.copyState)}</span> </span> `}function le(e){let t=D.find(e=>e.id===`crimson`)??n(D[0],`about lobster palette`),r=O(t);return d` <section class="about-hero"> <button type="button" class="about-hero__clawd ${e.clawdWaving?`about-hero__clawd--wave`:``}" style=${S(r)} aria-label=${x(`aboutPage.waveHello`)} @click=${e.onPokeClawd} > ${k(r)} </button> <h2 class="about-hero__name">${x(`aboutPage.productName`)}</h2> <p class="about-hero__tagline">${x(`aboutPage.tagline`)}</p> ${e.buildInfo.version?d`<code class="about-hero__version" dir="ltr">v${e.buildInfo.version}</code>`:p} <nav class="about-hero__links" aria-label=${x(`aboutPage.linksLabel`)}> ${J.map(e=>d` <a class="about-hero__link" href=${e.href} target=${A} rel=${E()} > <span class="about-hero__link-icon" aria-hidden="true">${e.icon}</span> <span>${e.label()}</span> </a> `)} </nav> </section> `}function ue(e){let t=H(e.buildInfo.builtAt,g.getLocale()),n=d` <dl class="settings-kv about-build-grid" role="group" aria-label=${x(`aboutPage.artifactDetails`)} > <dt>${x(`aboutPage.version`)}</dt> <dd> ${e.buildInfo.version?d`<code dir="ltr" title=${e.buildInfo.version} >${e.buildInfo.version}</code >`:G()} </dd> <dt>${x(`aboutPage.commit`)}</dt> <dd>${ce(e)}</dd> ${e.buildInfo.branch?d` <dt>${x(`aboutPage.branch`)}</dt> <dd> <code dir="ltr" title=${e.buildInfo.branch} >${e.buildInfo.branch}${e.buildInfo.dirty===!0?`*`:``}</code > </dd> `:p} <dt>${x(`aboutPage.built`)}</dt> <dd> ${t&&e.buildInfo.builtAt?d`<time dir="auto" datetime=${e.buildInfo.builtAt} title=${e.buildInfo.builtAt} >${t}</time >`:G()} </dd> </dl> `;return M([le(e),P({title:x(`aboutPage.artifactTitle`),description:x(`aboutPage.artifactSubtitle`)},n),P({},j({title:x(`aboutPage.gatewayVersion`),description:x(`aboutPage.gatewayVersionHint`),control:e.gatewayVersion?F(d`<code dir="ltr" title=${e.gatewayVersion}>${e.gatewayVersion}</code>`,{mono:!0}):F(x(`aboutPage.unavailable`))})),d`<p class="about-footer">${x(`aboutPage.license`)}</p>`])}var q,J;function Y(){return(Y=e((()=>{r(),u(),oe(),T(),w(),N(),se(),b(),C(),c(),L(),B(),q=12,J=[{href:`https://openclaw.ai`,icon:y.globe,label:()=>x(`aboutPage.linkWebsite`)},{href:`https://docs.openclaw.ai`,icon:y.book,label:()=>x(`aboutPage.linkDocs`)},{href:`https://github.com/openclaw/openclaw`,icon:V.github,label:()=>x(`aboutPage.linkGitHub`)},{href:I,icon:V.discord,label:()=>x(`aboutPage.linkDiscord`)},{href:`https://x.com/openclaw`,icon:V.x,label:()=>x(`aboutPage.linkX`)},{href:`https://docs.openclaw.ai/releases`,icon:y.scrollText,label:()=>x(`aboutPage.linkChangelog`)}]})))()}var X,Z,Q;function $(){return($=e((()=>{ee(),u(),l(),ie(),m(),v(),z(),a(),te(),Y(),X=1800,Z=1400,Q=class extends o{constructor(...e){super(...e),this.copyState=`idle`,this.clawdWaving=!1,this.copyResetTimer=null,this.waveResetTimer=null,this.subscriptions=new re(this).watch(()=>this.context?.gateway,(e,t)=>e.subscribe(t))}disconnectedCallback(){this.subscriptions.clear(),this.copyResetTimer!==null&&(globalThis.clearTimeout(this.copyResetTimer),this.copyResetTimer=null),this.waveResetTimer!==null&&(globalThis.clearTimeout(this.waveResetTimer),this.waveResetTimer=null),super.disconnectedCallback()}pokeClawd(){this.clawdWaving||(this.clawdWaving=!0,this.waveResetTimer=globalThis.setTimeout(()=>{this.waveResetTimer=null,this.clawdWaving=!1},Z))}async copyCommit(){let e=_.commit;if(!e||this.copyState===`copying`)return;this.copyState=`copying`;let t=await s(e);this.isConnected&&(this.copyState=t?`copied`:`error`,this.copyResetTimer!==null&&globalThis.clearTimeout(this.copyResetTimer),this.copyResetTimer=globalThis.setTimeout(()=>{this.copyResetTimer=null,this.copyState=`idle`},X))}render(){let e=this.context.gateway.snapshot,t=e.phase===`connected`&&e.hello?.server?.version?.trim()||null,n=ue({buildInfo:_,gatewayVersion:t,copyState:this.copyState,onCopyCommit:()=>void this.copyCommit(),clawdWaving:this.clawdWaving,onPokeClawd:()=>this.pokeClawd()});return d` <section class="content-header"> <div> <div class="page-title">${ae(`about`)}</div> </div> </section> ${R(n)} `}},i([t({context:h,subscribe:!0})],Q.prototype,`context`,void 0),i([f()],Q.prototype,`copyState`,void 0),i([f()],Q.prototype,`clawdWaving`,void 0),customElements.get(`openclaw-about-page`)||customElements.define(`openclaw-about-page`,Q)})))()}$(); //# sourceMappingURL=about-page-ClHXfPlB.js.map