import{r as T,a3 as A,U as V,w as R,f as D}from"./vendor-ui-CGT0cG1n.js";import{z as G,F as P,u as F}from"./index-D88CvPWT.js";/* empty css                *//* empty css                 */import{_ as K}from"./index.vue_vue_type_script_setup_true_lang-CgaIiyg6.js";import{v as k,ab as r,l as u,i as p,q as c,g as z,aA as C,r as o,ax as t,aO as i,ap as l,k as w,a7 as q,aj as Q,F as x,j as E,ah as W,af as J}from"./vendor-core-BKehvho7.js";import{_ as Y}from"./CanvasAnimation.vue_vue_type_script_setup_true_lang-CDdsQZ0-.js";import{H as N}from"./core-CcVTMiBP.js";function Z(e){const s=e.regex,n={},d={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},d]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},m=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(f);const _={match:/\\"/},b={className:"string",begin:/'/,end:/'/},S={match:/\\'/},v={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),H={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},L=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],U=["true","false"],B={match:/(\/[a-z._-]+)+/},I=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],$=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],M=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:L,literal:U,built_in:[...I,...$,"set","shopt",...O,...M]},contains:[g,e.SHEBANG(),H,v,m,h,B,f,_,b,S,n]}}const X={class:"code-container"},j={class:"hljs"},ee=["innerHTML"],te=k({__name:"CodeHighlight",props:{code:{},language:{}},setup(e){N.registerLanguage("bash",Z);const s=e,n=z(()=>s.code?N.highlight(`${s.code}`,{language:s.language}).value:"");return(d,a)=>(r(),u("div",X,[p("pre",j,[a[0]||(a[0]=c("      ",-1)),p("code",{innerHTML:n.value},null,8,ee),a[1]||(a[1]=c(`
    `,-1))])]))}}),se={class:"flex items-center gap-[5px]"},ne={key:0},ae={class:"text-sm whitespace-pre-line leading-5"},oe=k({__name:"UpgradeItem",props:{version:{type:String,default:""},desc:{type:String,default:""},latestVersion:{type:String,default:""}},setup(e){const{t:s}=C(),n=e,d=z(()=>n.latestVersion===n.version.replace(/^[^0-9]+/,""));return(a,m)=>(r(),u("div",null,[o(t(T),{"content-position":"center"},{default:i(()=>[p("div",se,[o(t(A),{type:d.value?"primary":"info",round:"",size:"small"},{default:i(()=>[d.value?(r(),u("span",ne,l(t(s)("upgrade.current")),1)):w("",!0),c(" "+l(e.version),1)]),_:1},8,["type"])])]),_:1}),p("p",ae,l(e.desc),1)]))}}),re={class:"relative"},ie={class:"flex items-center gap-[5px]"},ce={key:0,class:"flex items-center justify-center"},le={class:"mb-[10px]"},de=`
    # 全局安装最新版本
    npm install comp-hub@latest -g
`,Se=k({__name:"index",setup(e){const{t:s}=C(),n=J([]),d=G(),a=P();return q(async()=>{const m=await F.v1Upgrade.upgradecontrollerLogs();n.value=m.data.rows??[]}),(m,h)=>{const f=Q("router-link"),_=A,b=R,S=T,v=V,y=D;return r(),u("div",re,[o(t(Y)),o(y,{"body-class":"!p-0",class:"absolute inset-0 max-w-[1200px] mx-auto overflow-hidden"},{default:i(()=>[o(v,{"wrap-class":"p-[20px]"},{default:i(()=>[p("div",ie,[o(f,{to:"/"},{default:i(()=>[o(K)]),_:1}),o(_,{disableTransitions:"",type:"info",round:"",size:"small"},{default:i(()=>[c(l(t(d).compHubVersion),1)]),_:1})]),t(a).hasUpgrade?w("",!0):(r(),u("div",ce,[o(b,{description:t(s)("upgrade.noUpdate")},null,8,["description"])])),t(a).isUpgrade?(r(),u(x,{key:1},[o(S,{"content-position":"center"},{default:i(()=>[c(l(t(s)("upgrade.updateMethod")),1)]),_:1}),p("div",le,[c(l(t(s)("upgrade.title"))+" ",1),h[0]||(h[0]=p("span",{class:"font-bold"},"comp-hub",-1)),c(" "+l(t(s)("upgrade.openTerminalAndRun")),1)]),t(a).isForceUpgrade?(r(),E(_,{key:0,disableTransitions:"",type:"danger",round:"",size:"small"},{default:i(()=>[c(l(t(s)("upgrade.cannotIgnoreUpdate")),1)]),_:1})):(r(),E(_,{key:1,disableTransitions:"",type:"primary",round:"",size:"small"},{default:i(()=>[c(l(t(s)("upgrade.hasUpdate")),1)]),_:1})),o(t(te),{code:de,language:"bash",class:"mt-1"})],64)):w("",!0),p("div",null,[(r(!0),u(x,null,W(n.value,g=>(r(),E(t(oe),{key:g.version,version:g.version,desc:g.desc,latestVersion:t(a).latestVersion},null,8,["version","desc","latestVersion"]))),128))])]),_:1})]),_:1})])}}});export{Se as default};
