import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{Gt as t,er as n,kn as r}from"./control-ui-foundation-CeFMP1Ly.js";import{b as ee,dr as i,fl as a,fr as o,lr as s,ml as c,pr as te,vr as l,w as u,yr as d}from"./control-ui-core-pH6nakZ-.js";import{G as f,J as p,W as m,Z as h,rt as g}from"./lit-runtime-BEtFSUCp.js";import{Cn as ne,ln as re,m as ie,p as ae}from"./control-ui-core-DGVkFhVB.js";import{Ft as oe,Gt as _,Ht as v,Lt as y,Rt as b,ht as x,qt as S,vt as C}from"./control-ui-core-Br5DB0Zj.js";import{In as w,Ln as T}from"./control-ui-boot-wpHCbPL9.js";import{Cn as E,Fr as D,Ir as O,Lr as k,Nr as A,Pr as j,gn as M,jr as se,mn as N,on as P,vn as F}from"./control-ui-boot-Cdpgu1Gm.js";import{n as I,t as L}from"./settings-workspace-Bo4nqRhI.js";import{n as R,t as z}from"./brand-icons-CYcF0sbL.js";function B(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 V(e){return S(e===`copying`?`aboutPage.copyingCommit`:e===`copied`?`aboutPage.copiedCommit`:e===`error`?`aboutPage.copyCommitFailed`:`aboutPage.copyCommit`)}function H(e){return e===`copied`?S(`aboutPage.copiedCommit`):e===`error`?S(`aboutPage.copyCommitFailed`):``}function U(){return p`${S(`aboutPage.unavailable`)}`}function W(e){if(!e)return f;let t=Date.parse(e);if(!Number.isFinite(t))return f;let n=new Intl.DateTimeFormat(_.getLocale(),{dateStyle:`medium`,timeStyle:`short`}).format(new Date(t));return p`
`}function G(e){let t=e.buildInfo.commit;if(!t)return U();let n=V(e.copyState);return p`
${S(`aboutPage.tagline`)}${t.slice(0,q)}
${W(e.buildInfo.commitAt)}
${S(`aboutPage.productName`)}
v${e.buildInfo.version}`:f}
${e.buildInfo.version}`:U()}
${e.buildInfo.branch}${e.buildInfo.dirty===!0?`*`:``}
${e.gatewayVersion}`,{mono:!0}):E(S(`aboutPage.unavailable`))})),p``])}var q,J;function Y(){return(Y=e((()=>{t(),m(),b(),A(),k(),P(),oe(),v(),te(),u(),R(),q=12,J=[{href:`https://openclaw.ai`,icon:y.globe,label:()=>S(`aboutPage.linkWebsite`)},{href:`https://docs.openclaw.ai`,icon:y.book,label:()=>S(`aboutPage.linkDocs`)},{href:`https://github.com/openclaw/openclaw`,icon:z.github,label:()=>S(`aboutPage.linkGitHub`)},{href:`https://discord.gg/clawd`,icon:z.discord,label:()=>S(`aboutPage.linkDiscord`)},{href:`https://x.com/openclaw`,icon:z.x,label:()=>S(`aboutPage.linkX`)},{href:`https://docs.openclaw.ai/releases`,icon:y.scrollText,label:()=>S(`aboutPage.linkChangelog`)}]})))()}var X,Z,Q;function $(){return($=e((()=>{T(),m(),h(),re(),ie(),C(),L(),c(),d(),Y(),X=1800,Z=1400,Q=class extends a{constructor(...e){super(...e),this.copyState=`idle`,this.clawdWaving=!1,this.copyResetTimer=null,this.waveResetTimer=null,this.subscriptions=new l(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=x.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=ce({buildInfo:x,gatewayVersion:t,copyState:this.copyState,onCopyCommit:()=>void this.copyCommit(),clawdWaving:this.clawdWaving,onPokeClawd:()=>this.pokeClawd()});return p`