mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-10 19:47:39 +02:00
4 lines
112 KiB
JavaScript
4 lines
112 KiB
JavaScript
(function(){System.register([`./rolldown-runtime-legacy.js?v=1787646744133`,`./vendor-utils-legacy.js?v=1787646744133`,`./vendor-vue-legacy.js?v=1787646744133`,`./vendor-naive-legacy.js?v=1787646744133`,`./app-legacy.js?v=1787646744133`,`./app-components-legacy.js?v=1787646744133`,`./app-shared-legacy.js?v=1787646744133`,`./vendor-pdf-legacy.js?v=1787646744133`,`./app-base-legacy.js?v=1787646744133`,`./feature-FileEditor-legacy.js?v=1787646744133`,`./app-form-legacy.js?v=1787646744133`,`./app-temp-legacy.js?v=1787646744133`,`./feature-Terminal-legacy.js?v=1787646744133`,`./view-files-legacy.js?v=1787646744133`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,te,D,O,ne,re,ie,ae,oe,se,ce,le,k,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,A,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,j,Dn,On,kn,An,M,N,P,jn,F,Mn,I,Nn,L,Pn,R,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,z,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,B,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,V,bi,xi,H,U,Si,W,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,G,Wi,Gi,K,q,Ki,qi,Ji,J,Yi,Xi,Zi,Qi,$i,ea,Y,ta,na,ra,ia,aa,oa,sa,ca,X,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Z,Ea,Da,Oa;function ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Aa(e){if(Array.isArray(e))return ka(e)}function ja(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){ja(a,r,i,o,s,`next`,e)}function s(e){ja(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Na(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Pa(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ma(e,t,n[t])})}return e}function Ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function La(e,t){return t=t==null?{}:t,Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ia(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Ra(e){return Aa(e)||Na(e)||Ba(e)||Pa()}function $(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if((i=a.trys,!(i=i.length>0&&i[i.length-1]))&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function za(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Ba(e,t){if(e){if(typeof e==`string`)return ka(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ka(e,t)}}function Va(e,t){return Q(function(){var n,r,i,a;return $(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,W.post(`/mod/node/file_transfer/file_list`,e)];case 1:return n=o.sent().message,t&&t(n),r=Zr({type:`dir`,list:n.dir,path:n.path}),i=Zr({type:`file`,list:n.files,path:n.path}),r=r.map(function(e,t){return La(Fa({},e),{protected:n.tamper_data.dirs&&n.tamper_data.dirs[t]?Number(n.tamper_data.dirs[t].split(`;`)[0]):0,protected_rule:n.tamper_data.dirs&&n.tamper_data.dirs[t]?Number(n.tamper_data.dirs[t].split(`;`)[1]):0})}),i=i.map(function(e,t){return La(Fa({},e),{protected:n.tamper_data.files&&n.tamper_data.files[t]?Number(n.tamper_data.files[t].split(`;`)[0]):0,protected_rule:n.tamper_data.files&&n.tamper_data.files[t]?Number(n.tamper_data.files[t].split(`;`)[1]):0})}),[2,Ra(r).concat(Ra(i))];case 2:return a=o.sent(),console.warn(a),[2,[]];case 3:return[2]}})})()}function Ha(e){return Q(function(){return $(this,function(t){return[2,W.post(`/mod/node/file_transfer/dir_size`,e)]})})()}function Ua(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!Xr(e)}function Wa(e,t){var n=wn;return V(),N(n)}function Ga(e){return{handleAction:function(t,n){return Q(function(){var r;return $(this,function(i){switch(i.label){case 0:switch(t){case`visit`:return[3,1];case`manage`:return[3,3];case`edit`:return[3,4];case`delete`:return[3,5];case`restart_panel`:return[3,6];case`restart_service`:return[3,7]}return[3,8];case 1:return[4,Ca({node_id:n.id})];case 2:return r=i.sent().message,qr(r)&&window.open(r.target_panel_url,`_blank`),[3,8];case 3:return e({option:`option`,optionType:`other`},n),[3,8];case 4:return e({option:`option`,optionType:`edit`},n),[3,8];case 5:return oa({title:Wi(`Delete node`),content:Wi(`Are you sure you want to delete the node [{0}]?`,[n.remarks]),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,In({ids:String(n.id)})];case 1:return t.sent(),e({option:`refresh`}),[2]}})})()}}),[3,8];case 6:return oa({title:Wi(`Restart panel`),content:Wi(`Are you sure you want to restart the node [{0}] panel?`,[n.remarks]),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,wi({node_id:n.id})];case 1:return t.sent(),e({option:`refresh`}),[2]}})})()}}),[3,8];case 7:return oa({title:Wi(`Restart service`),content:Wi(`Are you sure you want to restart the node [{0}] service?`,[n.remarks]),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Ti({node_id:n.id})];case 1:return t.sent(),e({option:`refresh`}),[2]}})})()}}),[3,8];case 8:return[2]}})})()}}}function Ka(e,t){var n=Ga(e).handleAction;return{key:`action`,title:G(`Public.Table.Action`),width:130,align:`right`,render:function(r){return L(`div`,{class:`flex justify-end`},[L(ai,{row:r,onRefresh:function(){return e({option:`refresh`})},refreshing:t==null?void 0:t.value.includes(r.id),onSelect:function(t,r){if(t===`refresh_node`){e({option:`refresh_node`},r);return}n(t,r)}},null)])}}}return e({i:void 0,n:void 0,r:void 0,t:void 0}),{setters:[function(e){k=e.r},function(e){_=e.mn,j=e.yn,M=e.bn,N=e.xn,P=e.Sn,F=e.Cn,Mn=e.wn,I=e.En,L=e.Dn,Pn=e.On,R=e.kn,e.fr,e.Pn,e.on,e.Ir,B=e.nn,Hr=e.Fn,Kr=e.C,Jr=e.hr,Xr=e.In,$r=e.Rn,ii=e.zn,mi=e.Yr,gi=e.Gn,_i=e.Kn,V=e.Jn,xi=e.Yn,H=e.vr,U=e.br,Si=e.Xn,Ci=e.Qn,Ii=e.Cr,J=e.ei,Xi=e.wr,Zi=e.Er,Y=e.Or,pa=e.rr,va=e.ar,xa=e.un,wa=e.or,Ta=e.sr,Z=e.cr,Ea=e.lr,Da=e.dn,Oa=e.fn},function(e){Fn=e.f,Ui=e.p,X=e.l,ha=e.o},function(e){n=e.yt,r=e.gt,a=e.mt,o=e.ft,s=e.ut,c=e.K,l=e.W,u=e.B,d=e.q,f=e.Y,p=e.Et,h=e.L,g=e.F,v=e.P,y=e.M,b=e.j,x=e.xt,S=e.A,C=e.St,w=e.Tt,T=e.T,E=e.Q,ee=e.Z,te=e.$,D=e.tt,O=e.y,ne=e.v,re=e.h,ie=e.p,ae=e.d,oe=e.wt,se=e.G,ce=e.a,le=e.i,ya=e.r},function(e){A=e.zf,pn=e.Rf,mn=e.pn,hn=e.wf,Cn=e.ln,ir=e.Zf,z=e.cp,wr=e.up,Ar=e.Bf,Gr=e.gp,qr=e.yp,ei=e.Lf,W=e.Of,ia=e.Zt,oa=e.Nf,la=e.Oa,da=e.Pf,fa=e.Ff,_a=e.Da},function(e){fn=e.Ji,_n=e.Xi,vn=e.Qi,yn=e.Yi,bn=e.Zi,ua=e.ra},function(e){ar=e.md,Wr=e.vl,ui=e.ta,di=e.na,yi=e.wd,ga=e.Cf},function(e){ue=e.n,Vr=e.r},function(e){gn=e.c,Sn=e.l},function(e){Zr=e.l},function(e){xn=e.o},function(e){wn=e.o},function(e){Hi=e.t},function(e){m=e.c}],execute:function(){de=document.createElement(`style`),de.textContent=`.n-upload-dragger[data-v-3ce89840]{height:360px;padding:10px}.n-upload-dragger[data-v-3ce89840]:hover{--n-dragger-border-hover:1px dashed #20a53a}.drag-text[data-v-3ce89840]{margin-top:20px;font-size:16px}.drag-suffix[data-v-3ce89840]{color:#777;margin-top:12px;font-size:14px}.n-data-table[data-v-3ce89840]{--n-th-color-modal:transparent;--n-td-color-modal:transparent;--n-th-color-hover-modal:transparent;--n-td-color-hover-modal:transparent;--n-border-color-modal:transparent}.path-list[data-v-414decf8]{border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border);cursor:text;flex:1;display:flex;overflow:hidden}.path-list .path-item[data-v-414decf8]{white-space:nowrap;cursor:pointer;flex-shrink:0;align-items:center;height:100%;transition:background-color .3s cubic-bezier(.4,0,.2,1);display:flex}.path-list .path-item .path-dir[data-v-414decf8]{height:100%;color:var(--color-text-2);align-items:center;padding:0 6px;display:flex}.path-list .path-item .path-arrow[data-v-414decf8]{border-left:1px solid transparent;border-right:1px solid transparent;align-items:center;height:100%;padding:0 2px;font-size:14px;transition:border-color .3s cubic-bezier(.4,0,.2,1);display:flex}.path-list .path-item .path-arrow.reversal .svg-icon[data-v-414decf8]{transform:rotate(180deg)}.path-list .path-item[data-v-414decf8]:hover{background-color:var(--file-choose-hover-color)}.path-list .path-item:hover .path-arrow[data-v-414decf8]{border-left-color:var(--file-choose-hover-border-color);border-right-color:var(--file-choose-hover-border-color)}.box-view[data-v-195b5304]{height:calc(100vh - 175px)}.ul-style[data-v-60c61306]{justify-content:center;align-items:center;gap:48px;margin:0 auto;font-size:16px;display:flex}.ul-style li[data-v-60c61306]{align-items:center;display:flex}.item[data-v-60c61306]{border-left:3px solid #def2e2}.item li[data-v-60c61306]{cursor:pointer;width:180px;margin-left:-3px;padding:0 20px;font-size:14px;line-height:36px}.item .active[data-v-60c61306]{color:#20a53a;border-left:3px solid #20a53a;font-size:16px;font-weight:700}.node-alarm-channel-row[data-v-83d2c87b]{justify-content:space-between;align-items:center;min-height:26px;display:flex}.node-alert-card[data-v-9aa732b2]{border:1px solid var(--color-border);border-radius:8px;padding:16px}.node-alert-label[data-v-9aa732b2]{white-space:nowrap;color:var(--color-text-3)}.node-alert-slider[data-v-9aa732b2]{width:130px}.node-alert-input[data-v-9aa732b2]{width:60px}.node-alert-select[data-v-9aa732b2]{width:86px}.node-alert-unit[data-v-9aa732b2]{white-space:nowrap;color:var(--color-text-3)}.monitor-select-card[data-v-79166c23]{border:1px solid var(--color-border);cursor:pointer;border-radius:10px;padding:16px;transition:border-color .2s,background-color .2s}.monitor-select-card.active[data-v-79166c23]{border-color:var(--color-primary);background:rgba(24,160,88,.08)}.monitor-select-card[data-v-45212165]{border:1px solid var(--color-border);cursor:pointer;border-radius:10px;padding:16px;transition:border-color .2s,background-color .2s}.monitor-select-card.active[data-v-45212165]{border-color:var(--color-primary);background:rgba(24,160,88,.08)}.service-monitor-row[data-v-11def215]{border-bottom:1px solid var(--color-border);align-items:center;min-height:40px}.service-monitor-row[data-v-11def215]:last-child{border-bottom:0}.monitor-card[data-v-46d44f2a]{transition:box-shadow .2s}.monitor-card.clickable[data-v-46d44f2a]{cursor:pointer}.monitor-card.clickable[data-v-46d44f2a]:hover{box-shadow:0 8px 16px rgba(15,23,42,.08)}.network-box[data-v-46d44f2a]{background:var(--color-bg-1);border-radius:8px;padding:8px}.metrics-content[data-v-46d44f2a]{min-height:160px}.metrics-empty[data-v-46d44f2a]{width:100%}.probe-info-content[data-v-46d44f2a]{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}[data-v-46d44f2a] .service-info-item{align-items:center}.probe-status-dot[data-v-46d44f2a]{--dot-color:var(--color-primary);background-color:var(--dot-color);vertical-align:1px;border-radius:50%;width:6px;height:6px;margin:0 4px;display:inline-block;position:relative}.probe-status-dot[data-v-46d44f2a]:after{border:2px solid var(--dot-color);content:"";opacity:.6;border-radius:50%;width:12px;height:12px;animation:2s infinite probe-status-ripple-46d44f2a;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.probe-status-dot.offline[data-v-46d44f2a]{--dot-color:var(--color-error)}@keyframes probe-status-ripple-46d44f2a{0%{opacity:.8;transform:translate(-50%,-50%)scale(.8)}50%{opacity:.4;transform:translate(-50%,-50%)scale(1.2)}to{opacity:0;transform:translate(-50%,-50%)scale(1.6)}}.node-list-table[data-v-1cccc110] .n-data-table-th{background-color:var(--color-bg-2)}
|
|
/*$vite$:1*/`,document.head.appendChild(de),B(),Xt=Ar.global,qi=Xt.t,_r=function(e){return W.post(`/mod/node/node/get_all_node`,e)},ta=function(e){return W.post(`/mod/node/file_transfer/upload_check`,e,{requestOptions:{loading:qi(`Component.Pay.index_12`),successMessage:!1}})},ra=function(e,t){return W.post(`/mod/node/file_transfer/file_upload`,e,{headers:{"Content-Type":`multipart/form-data`},requestOptions:{isOriginalResult:!0},onUploadProgress:function(e){t==null||t(e)}})},jn=function(e){return W.post(`/mod/node/file_transfer/create_dir`,e,{requestOptions:{loading:qi(`Component.Pay.index_12`),successMessage:!0}})},Nn=function(e){return W.post(`/mod/node/file_transfer/create_filetransfer_task`,e,{requestOptions:{loading:qi(`Component.Pay.index_12`),successMessage:!0}})},zn=function(e){return W.post(`/mod/node/file_transfer/delete_file`,e,{requestOptions:{loading:qi(`Component.Pay.index_12`),successMessage:!0}})},Ce={class:`p-16px`},Qe={class:`flex items-center mb-12px`},_t={key:1,class:`flex-center flex-col h-300px`},Tt={class:`drag-text`},Nt={key:0,class:`drag-suffix`},i=50*1024*1024,nr=R({__name:`file-upload`,props:{path:{default:``},node_id:{},size:{},uploadData:{default:function(){return{multiple:!0}}},uploadSuccess:{},showSuccessMsg:{type:Boolean,default:!0}},emits:[`setConfirm`],setup:function(e,t){var n=t.expose,a=t.emit,o=e,s=a,l=o.path,u=o.node_id,d=X().t,p=ya(),m=j(function(){return Fa({multiple:!0},o.uploadData)}),h=U([]),g=U(new Map),_=j(function(){return(m.value.accept||``).split(`,`).map(function(e){return`'`.concat(e,`'`)}).join(`, `)}),v=function(e){var t,n,r,i=e.file;return((t=(n=i.file)==null?void 0:n.size)==null?0:t)>1024*1024*((r=o.size)==null?1/0:r)?(ei.error(d(`Component.UploadFile.index_7`,[i.name,o.size])),!1):(m.value.multiple||(h.value=[]),!0)},y=function(e){var t=e.id||e.name,n=g.value.get(t);n&&(n.abort(),g.value.delete(t),e.status=`error`,e.percentage=0,ei.info(`Upload Canceled: `.concat(e.name)))},b=U([{key:`name`,title:d(`Component.UploadFile.index_3`),ellipsis:!0},{key:`size`,title:d(`Component.UploadFile.index_4`),width:100,render:function(e){var t;return z((t=e.file)==null?void 0:t.size)}},{key:`status`,title:d(`Component.UploadFile.index_5`),width:140,render:function(e){if(e.status===`pending`)return d(`Component.UploadFile.index_8`);if(e.status===`finished`)return L(`span`,{class:`text-primary`},[d(`Component.UploadFile.index_9`)]);if(e.status===`error`)return L(`span`,{class:`text-error`},[I(`Upload Failed`)]);var t=e.percentage?e.percentage.toFixed(1):0;return L(T,{type:`line`,color:p.value.primaryColor,"indicator-placement":`outside`,processing:!0,percentage:Number(t)},null)}},ia({width:70,options:function(e,t){return[{label:d(`Public.Btn.Del`),type:`error`,show:e.status!==`uploading`,onClick:function(){return h.value.splice(t,1)}},{label:d(`Public.Btn.Cancel`),type:`warning`,show:e.status===`uploading`,onClick:function(){return y(e)}}]}})]),x=function(e,t,n,r){return Q(function(){var i,a,o,s,c,d;return $(this,function(f){switch(f.label){case 0:i=function(i){var o,d,f,p,m,h,g,_,v,y;return $(this,function(b){switch(b.label){case 0:if(r.signal.aborted)throw Error(`Upload Canceled`);o=s,d=Math.min(e.size,o+a),f=e.slice(o,d),p=d-o,m=new FormData,m.append(`f_path`,l),m.append(`f_name`,t),m.append(`f_size`,e.size.toString()),m.append(`f_start`,o.toString()),m.append(`blob`,f),m.append(`node_id`,u),b.label=1;case 1:return b.trys.push([1,3,,11]),[4,ra(m,function(t){if(!r.signal.aborted){var i=(s+(t.progress||0)*p)/e.size*100;n(Math.min(i,99))}})];case 2:return h=b.sent(),g=d,h&&typeof h.message==`number`&&(g=h.message),s=Math.max(s,g),n(Math.min(s/e.size*100,99)),s>=e.size?[2,(c=i,`break`)]:(i=Math.floor(s/a)-1,[3,11]);case 3:b.sent(),_=!1,v=0,b.label=4;case 4:if(!(v<3))return[3,10];if(r.signal.aborted)throw Error(`Upload Canceled`);b.label=5;case 5:return b.trys.push([5,8,,9]),[4,new Promise(function(e){return setTimeout(e,1e3)})];case 6:return b.sent(),[4,ra(m)];case 7:return y=b.sent(),y&&typeof y.message==`number`?(s=y.message,_=!0,[3,10]):[3,9];case 8:return b.sent(),_=!1,[3,9];case 9:return v++,[3,4];case 10:if(!_)throw Error(`Chunk `.concat(i+1,` upload failed`));return[3,11];case 11:return c=i,[2]}})},a=10*1024*1024,o=Math.ceil(e.size/a),s=0,c=0,f.label=1;case 1:return c<o?[5,za(i(c))]:[3,4];case 2:if(d=f.sent(),d===`break`)return[3,4];f.label=3;case 3:return c++,[3,1];case 4:return n(100),[2,!0]}})})()};return n({onConfirm:function(){return Q(function(){var e,t,n,r,a,p,m,_,v,y,b,S,C,w,T,E,ee,te,D;return $(this,function(O){switch(O.label){case 0:return t=h.value.filter(function(e){return e.status===`pending`}),t.length?(n=function(e){var t=e.fullPath||e.name;return(o.path.endsWith(`/`)?o.path:o.path+`/`)+t},[4,ta({files:t.map(function(e){return n(e)}).join(`
|
|
`),node_id:u})]):(ei.error(d(`Component.UploadFile.index_10`)),[2,!1]);case 1:return r=O.sent(),a=r.message,p=t,!Array.isArray(a)||(m=a.filter(function(e){return e.exists}),!(m.length>0))?[3,3]:[4,new Promise(function(e){da({title:d(`file.uploadModal.conflictTitle`),width:600,footer:!0,confirmText:d(`file.uploadModal.conflictOverwrite`),cancelText:d(`file.uploadModal.conflictSkip`),onConfirm:function(){return e(`overwrite`)},onPublicClose:function(){return e(`skip`)},onClose:function(){return e(`cancel`)},content:function(){var e=m.map(function(e){var r,i=t.find(function(t){return n(t)===e.filename});return La(Fa({},e),{localSize:(i==null||(r=i.file)==null?void 0:r.size)||0})});return L(`div`,{class:`p-20px`},[L(`div`,{class:`flex items-center gap-10px mb-16px`},[L(pn,{name:`base-warning`,size:`30`,class:`text-warning`},null),L(`div`,{class:`flex-1 w-0 text-14px`},[d(`file.uploadModal.conflictMessage`)])]),L(c,{"max-height":300,data:e,columns:[{title:d(`file.uploadModal.conflictFileName`),key:`filename`,render:function(e){return L(f,null,{default:function(){return[L(`span`,null,[e.filename.split(`/`).pop()])]}})}},{title:d(`file.uploadModal.conflictFileDifference`),key:`difference`,width:220,render:function(e){return L(`div`,{class:`flex items-center`},[L(`span`,{class:`color-primary`},[z(e.localSize)]),L(`i`,{class:`i-material-symbols:arrow-right-alt-rounded mx-5px text-18px`},null),L(`span`,{class:`color-gray`},[z(e.size)])])}}]},null)])}})})];case 2:if(_=O.sent(),_===`cancel`)return[2,!1];_===`skip`&&(v=new Set(m.map(function(e){return e.filename})),p=t.filter(function(e){return!v.has(n(e))}),t.forEach(function(e){v.has(n(e))&&(e.status=`finished`,e.percentage=100)})),O.label=3;case 3:if(!p.length)return ei.info(d(`All files are skipped`)),[2,!0];s(`setConfirm`,{disabled:!0}),p.forEach(function(e){return e.status=`uploading`}),y=!0,b=!1,S=!0,C=!1,w=void 0,O.label=4;case 4:O.trys.push([4,9,10,11]),T=function(){var e,t,n,r,a;return $(this,function(o){switch(o.label){case 0:if(e=ee.value,t=e.file,!t)return[2,`continue`];n=new AbortController,r=e.id||e.name,g.value.set(r,n),o.label=1;case 1:return o.trys.push([1,6,7,8]),t.size>i?[4,x(t,e.name,function(t){return e.percentage=t},n)]:[3,3];case 2:return!o.sent()||n.signal.aborted?(e.status=`error`,b=!0,[2,`continue`]):[3,5];case 3:return a=new FormData,a.append(`f_path`,l),a.append(`f_name`,e.name),a.append(`f_start`,`0`),a.append(`f_size`,t.size.toString()),a.append(`blob`,t),a.append(`node_id`,u),[4,ra(a,function(t){n.signal.aborted||(e.percentage=(t.progress||0)*100)})];case 4:o.sent(),o.label=5;case 5:return n.signal.aborted?(e.status=`error`,b=!0,[2,`continue`]):(e.status=`finished`,[3,8]);case 6:return o.sent(),e.status=`error`,ei.error(``.concat(e.name,` upload failed}`)),y=!1,[3,8];case 7:return g.value.delete(r),[7];case 8:return[2]}})},E=p[Symbol.iterator](),O.label=5;case 5:return(S=(ee=E.next()).done)?[3,8]:[5,za(T())];case 6:O.sent(),O.label=7;case 7:return S=!0,[3,5];case 8:return[3,11];case 9:return te=O.sent(),C=!0,w=te,[3,11];case 10:try{!S&&E.return!=null&&E.return()}finally{if(C)throw w}return[7];case 11:return y&&!b&&o.showSuccessMsg&&t.filter(function(e){return e.status===`finished`}).length&&ei.success(d(`Component.UploadFile.index_9`)),s(`setConfirm`,{disabled:!1}),D=t.filter(function(e){return e.status===`finished`}),D.length?[4,(e=o.uploadSuccess)==null?void 0:e.call(o,D)]:[3,13];case 12:O.sent(),O.label=13;case 13:return[2,y&&!b]}})})()}}),function(e,t){var n=r,i=le,a=ce;return V(),F(`div`,Ce,[M(`div`,Qe,[L(i,{ref:`upload`,class:`w-auto`,"file-list":Y(h),"onUpdate:fileList":t[0]||(t[0]=function(e){return Jr(h)?h.value=e:null}),accept:Y(m).accept,multiple:Y(m).multiple,"default-upload":!1,"show-file-list":!1,onBeforeUpload:v},{default:Z(function(){return[L(n,{type:`primary`},{default:Z(function(){return[I(J(e.$t(`Component.UploadFile.index_6`)),1)]}),_:1})]}),_:1},8,[`file-list`,`accept`,`multiple`])]),L(i,{ref:`upload`,class:`w-auto`,"file-list":Y(h),"onUpdate:fileList":t[2]||(t[2]=function(e){return Jr(h)?h.value=e:null}),accept:Y(m).accept,multiple:Y(m).multiple,"default-upload":!1,"show-file-list":!1,onBeforeUpload:v},{default:Z(function(){return[L(a,null,{default:Z(function(){return[Y(h).length>0?(V(),N(Y(c),{key:0,"max-height":300,bordered:!1,data:Y(h),columns:Y(b),onClick:t[1]||(t[1]=Oa(function(){},[`stop`]))},null,8,[`data`,`columns`])):(V(),F(`div`,_t,[L(pn,{name:`base-upload`,size:`48`,class:`text-#999`}),M(`div`,Tt,J(e.$t(`Component.UploadFile.index_1`)),1),Y(m).accept?(V(),F(`div`,Nt,J(e.$t(`Component.UploadFile.index_2`,[Y(_)])),1)):P(``,!0)]))]}),_:1})]}),_:1},8,[`file-list`,`accept`,`multiple`])])}}}),tr=k({default:function(){return er}}),er=A(nr,[[`__scopeId`,`data-v-3ce89840`]]),B(),ca=Fn(`file-transfer`,function(){var e=U(`/www/server`),t=U(`/www/server`),n=U(null),r=U(null),i=U([]),a=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,_r({node_type:`api`})];case 1:return e=t.sent().message,Gr(e)&&(i.value=e.map(function(e){return{label:e.remarks,value:e.id}}),i.value.some(function(e){return e.value===n.value})||(n.value=i.value.length?i.value[0].value:null),i.value.some(function(e){return e.value===r.value})||(i.value.length>1?r.value=i.value[1].value:r.value=null)),[2]}})})()},o=U(!1),s=U(!1);return{leftPath:e,rightPath:t,leftNodeId:n,rightNodeId:r,nodesList:i,leftRefreshTrigger:o,rightRefreshTrigger:s,getNode:a,refreshLeft:function(){o.value=!o.value},refreshRight:function(){s.value=!s.value}}},{persist:!0}),Yt=Ar.global,Ki=Yt.t,Qi=[{title:Ki(`File name`),key:`nm`}],Or=function(e){return{pending:Ki(`Pending`),running:Ki(`Transferring`),complete:Ki(`Completed`),error:Ki(`Failed`)}[e]||e},Er=function(e){return e===`complete`?`text-primary`:e===`error`?`text-error`:e===`running`?`text-warning`:`text-desc`},B(),Se={class:`p-20px`},Ze={class:`w-280px`},Xn=R({__name:`file-create`,props:{data:{}},setup:function(e,t){var n=t.expose,r=X().t,i=e.data,a=i.path,o=i.node_id,s=i.getList,c=U(null),l=H({name:``}),u={name:{required:!0,message:r(`Security.Conf.Index_28`),trigger:[`blur`,`input`]}};return n({onConfirm:function(e){var t=e.hide;return Q(function(){var e;return $(this,function(n){switch(n.label){case 0:return[4,(e=c.value)==null?void 0:e.validate()];case 1:return n.sent(),[4,jn({path:a+`/`+l.name,node_id:o})];case 2:return n.sent(),s==null||s(),t(),[2]}})})()}}),function(e,t){var n=C,r=g,i=fn;return V(),F(`div`,Se,[L(i,{ref_key:`formRef`,ref:c,model:Y(l),rules:u},{default:Z(function(){return[L(r,{label:e.$t(`Site.TableRow.index_2`),path:`name`},{default:Z(function(){return[M(`div`,Ze,[L(n,{type:`text`,value:Y(l).name,"onUpdate:value":t[0]||(t[0]=function(e){return Y(l).name=e}),placeholder:e.$t(`Enter folder name`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),Yn=Xn,B(),xe={class:`font-bold`},Xe={class:`h-200px overflow-y-auto`},gt={key:0,class:`text-desc`},ea=R({__name:`transfer-progress`,props:{getList:{type:Function}},setup:function(e){var t=H({progress:0,count_size:0,complete_size:0,file_count:0,file_complete:0,msg:``,status:`pending`}),n=Ii([]),r=U([]),i=function(e,t){e&&(r.value[t]=e.$el||e)},o=function(e){return e.split(`/`).pop()||e},s=ga(`/ws_modsoc`,{immediate:!0,onMessage:function(i,a){var o=JSON.parse(a.data);if(o.task){var s,c=o.task;t.progress=parseFloat(((s=c.progress)==null?void 0:s.toFixed(2))||0),t.count_size=c.count_size||0,t.complete_size=c.complete_size||0,t.file_count=c.file_count||0,t.file_complete=c.file_complete||0,t.status=c.status,o.msg&&(t.msg=o.msg),(o.file_list&&Array.isArray(o.file_list)||o.file_status_list&&Array.isArray(o.file_status_list))&&(r.value=[],n.value=(o.file_list||[]).concat(o.file_status_list||[]),ii(function(){var e=n.value.findIndex(function(e){return e.status===`running`||e.progress>0&&e.progress<100||e.status===`pending`});e!==-1&&r.value[e]&&r.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`})}))}o.type===`end`&&(t.msg=o.msg,e.getList())}}),c=s.send,l=s.close;return gi(function(){c({mod_name:`node`,sub_mod_name:`file_transfer`,def_name:`transfer_status`,callback:`xxxxxxo`,data:{}})}),_i(function(){l()}),function(e,r){var s=T,c=h,l=a,u=f;return V(),N(c,{class:`p-16px flex-col!`},{default:Z(function(){return[L(l,{class:`p-16px`},{default:Z(function(){return[Y(t).progress?(V(),N(c,{key:0,class:`flex-col!`},{default:Z(function(){return[M(`span`,xe,J(e.$t(`Overall Progress`)),1),L(s,{type:`line`,status:`success`,percentage:Y(t).progress,height:12,"border-radius":6,processing:Y(t).progress<100,"indicator-placement":`inside`},null,8,[`percentage`,`processing`]),L(c,{justify:`space-between`},{default:Z(function(){return[M(`span`,null,J(e.$t(`Completed`))+`: `+J(Y(z)(Y(t).complete_size))+` / `+J(Y(z)(Y(t).count_size)),1),M(`span`,null,J(e.$t(`Files`))+`: `+J(Y(t).file_complete)+` / `+J(Y(t).file_count),1)]}),_:1})]}),_:1})):P(``,!0),Y(t).msg?(V(),F(`div`,{key:1,class:mi({"mt-10px":Y(t).progress})},J(Y(t).msg),3)):P(``,!0)]}),_:1}),L(l,{class:`p-16px`},{default:Z(function(){return[M(`div`,Xe,[(V(!0),F(_,null,Si(Y(n),function(e,t){return V(),N(c,{key:t,ref_for:!0,ref:function(e){return i(e,t)},class:`pb-8px flex-col!`},{default:Z(function(){return[L(c,{justify:`space-between`,class:`mb-1 text-13px`},{default:Z(function(){return[L(u,{style:{"max-width":`300px`}},{default:Z(function(){return[I(J(o(e.src_file||e.source_path)),1)]}),_:2},1024),M(`span`,{class:mi(Y(Er)(e.status))},J(Y(Or)(e.status)),3)]}),_:2},1024),L(s,{type:`line`,percentage:e.progress,height:8,"show-indicator":!1,processing:e.progress<100,status:e.status===`error`?`error`:`success`},null,8,[`percentage`,`processing`,`status`]),e.log?(V(),F(`div`,gt,J(e.log),1)):P(``,!0)]}),_:2},1024)}),128))])]}),_:1})]}),_:1})}}}),$i=ea,B(),Vr(),Jt=Ar.global,q=Jt.t,Li=function(e){var t=ca();da({title:q(`File transfer result`),width:600,data:{getList:function(){(!e||e===`left`)&&t.refreshLeft(),(!e||e===`right`)&&t.refreshRight()}},component:$i})},hi=function(e,t,n){da({title:q(`Create folder`),footer:!0,data:{path:e,node_id:t,getList:n},component:Yn})},vi=function(e,t,n){if(e===`/`){ei.error(q(`Root directory cannot upload files`));return}na({path:e,node_id:t,onUploadSuccess:function(){n()}})},sa=function(e){return{title:q(`file.fileName`),key:`name`,width:`60%`,minWidth:164,render:function(t){return L(`div`,{class:`flex cursor-pointer`,onClick:function(){return e(t)}},[L(`div`,{class:`flex-1 w-0 flex items-center gap-4px`},[L(`div`,{class:`flex-1 w-0 flex items-center min-w-0`},[L(`div`,{class:`flex items-center`},[L(m,{ext:t.ext},null)]),L(`div`,{class:`flex-1 min-w-0 ml-4px`},[L(f,{tooltip:!0},{default:function(){return[L(`span`,{class:`hover:text-primary cursor-pointer`},[t.lnk?t.nm+t.lnk:t.nm])]}})])]),L(`div`,{class:`flex items-center gap-4px`},[t.isShare?L(Ci(`bt-icon`),{name:`file-share`,size:`16`},null):null,t.isFavorite?L(Ci(`bt-icon`),{name:`file-favorite`,size:`16`},null):null])])])}}},ba=function(e,t){var n,r,i=ca(),a=i.nodesList,o=i.leftNodeId,s=i.rightNodeId,l=i.leftPath,u=i.rightPath,d=t===`left`?o:s,f=t===`left`?s:o,p=t===`left`?u:l,m=(n=a.find(function(e){return e.value===d}))==null?void 0:n.label,g=(r=a.find(function(e){return e.value===f}))==null?void 0:r.label;if(p===`/`){ei.error(q(`Target node is root directory, cannot transfer files`));return}var _=U(`ignore`);oa({title:q(`File transfer`),content:function(){var t,n;return L(h,{class:`flex-col!`},{default:function(){return[L(`span`,null,[q(`Whether to transfer the following files or folders from node [{0}] to node [{1}] in [{2}]?`,[m,g,p])]),L(`span`,null,[q(`When encountering duplicate files, please select the processing method`)]),L(ee,{value:_.value,"onUpdate:value":function(e){return _.value=e}},{default:function(){return[L(te,{value:`ignore`},Ua(t=q(`Skip`))?t:{default:function(){return[t]}}),L(te,{value:`cover`},Ua(n=q(`Cover`))?n:{default:function(){return[n]}})]}}),L(c,{maxHeight:200,columns:Qi,data:e},null)]}})},width:600,onConfirm:function(){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,Nn({source_node_id:d,target_node_id:f,source_path_list:JSON.stringify(e.map(function(e){return{path:e.path,size:e.sz,is_dir:e.type===`dir`}})),target_path:p,default_mode:_.value})];case 1:return n.sent(),Li(t===`left`?`right`:`left`),[2]}})})()}})},na=function(e){var t=e.path,n=e.node_id,r=e.confirmText,i=e.size,a=e.uploadData,o=e.onUploadSuccess;da({title:q(`Upload files to [{0}]`,[t]),width:580,minHeight:436,footer:!0,confirmText:r||q(`Public.Btn.Upload`),data:{path:t,node_id:n,size:i,uploadData:a,uploadSuccess:o},component:Pn(function(){return ue(function(){return Promise.resolve().then(function(){return tr})},void 0)})})},B(),be={key:1,class:`i-svg-spinners:90-ring-with-bg text-[#36ad6a] text-7`},Qn=R({__name:`file-size`,props:{path:{},nodeValue:{}},setup:function(e){var t=X().t,n=e,i=U(-1),a=U(!1);function o(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return i.value==-1?(a.value=!0,[4,Ha({path:n.path,node_id:n.nodeValue})]):[3,2];case 1:return e=t.sent().message,qr(e)&&(i.value=e.size),a.value=!1,[3,3];case 2:return[2];case 3:return[2]}})})()}return function(e,n){var s=r;return Y(a)?(V(),F(`i`,be)):(V(),N(s,{key:0,text:``,type:`primary`,onClick:o},{default:Z(function(){return[I(J(Y(i)===-1?Y(t)(`file.tableFooter.calculate`):Y(i)),1)]}),_:1}))}}}),Zn=Qn,B(),ye={class:`flex-1 my-10px`},Jn=R({__name:`file-browser`,props:{side:{}},setup:function(e,t){var n=t.expose,i=X().t,a=e,o=ca(),s=Ui(o),c=s.leftPath,l=s.rightPath,u=s.leftNodeId,d=s.rightNodeId,f=j({get:function(){return a.side===`left`?c.value:l.value},set:function(e){a.side===`left`?c.value=e:l.value=e}}),p=j(function(){return a.side===`left`?u.value:d.value}),m=j(function(){return a.side===`left`?i(`Send to right`):i(`Send to left`)}),g=H({p:1,limit:100,search:``}),_=_a([{type:`selection`,width:40},sa(function(e){return S(e)}),{title:i(`file.size`),key:`size`,width:100,render:function(e){return e.type===`dir`?L(Zn,{path:e.path,nodeValue:p.value},null):L(`span`,null,[z(e.sz)])}},ia({title:i(`Site.TableRow.index_30`),width:150,options:function(e){return[{label:m.value,onClick:function(){return C([e])}},{label:i(`Public.Btn.Del`),onClick:function(){oa({title:i(`Delete file`),content:i(`Are you sure to delete {0} [{1}]?`,[e.type===`dir`?i(`Folder`):i(`Logs.Soft.index_3`),e.nm]),width:400,onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,zn({path:e.path,node_id:p.value,is_dir:+(e.type===`dir`)})];case 1:return t.sent(),x(),[2]}})})()}})}}]}})]),v=_.keys,y=_.table,b=_.columns,x=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:if(!p.value)return[2];e.label=1;case 1:return e.trys.push([1,,3,4]),y.loading=!0,[4,Va({p:g.p,showRow:g.limit,search:g.search,path:f.value,node_id:p.value},function(e){y.total=wr(e.page),f.value=e.path})];case 2:return y.data=e.sent(),[3,4];case 3:return v.value=[],y.loading=!1,[7];case 4:return[2]}})})()},S=function(e){e.type===`dir`&&(f.value=e.path)},C=function(e){if(!p.value){ei.error(i(`Please select target node`));return}ba(e,a.side)},w=function(){C(y.data.filter(function(e){return v.value.includes(e.nm)}))},T=Ui(o),E=T.leftRefreshTrigger,ee=T.rightRefreshTrigger;return wa([f,p,j(function(){return a.side===`left`?E.value:ee.value})],function(){x()},{immediate:!0}),n({refresh:x}),function(e,t){var n=r,i=h,a=gn,o=yn,s=bn;return V(),N(i,{class:`flex-col! h-full`},{default:Z(function(){return[L(i,{justify:`space-between`},{default:Z(function(){return[L(i,null,{default:Z(function(){return[L(n,{type:`primary`,onClick:t[0]||(t[0]=function(e){return Y(vi)(Y(f),Y(p),x)})},{default:Z(function(){return[I(J(e.$t(`file.uploadFile`)),1)]}),_:1}),L(n,{onClick:t[1]||(t[1]=function(e){return Y(hi)(Y(f),Y(p),x)})},{default:Z(function(){return[I(J(e.$t(`file.contextMenu.newFolder`)),1)]}),_:1})]}),_:1}),L(a,{value:Y(g).search,"onUpdate:value":t[2]||(t[2]=function(e){return Y(g).search=e}),placeholder:e.$t(`Enter file name`),onSearch:x},null,8,[`value`,`placeholder`])]}),_:1}),M(`div`,ye,[L(o,{"checked-row-keys":Y(v),"onUpdate:checkedRowKeys":t[3]||(t[3]=function(e){return Jr(v)?v.value=e:null}),"row-key":`nm`,loading:Y(y).loading,data:Y(y).data,columns:Y(b),"flex-height":``,class:`h-full`},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]),L(i,{class:`justify-between!`},{default:Z(function(){return[L(i,{class:`items-center`},{default:Z(function(){return[L(n,{disabled:!Y(v).length,type:`primary`,onClick:w},{default:Z(function(){return[I(J(Y(m)),1)]}),_:1},8,[`disabled`]),M(`span`,null,J(e.$t(`Selected {0} files`,[Y(v).length])),1)]}),_:1}),L(s,{page:Y(g).p,"onUpdate:page":t[4]||(t[4]=function(e){return Y(g).p=e}),"page-size":Y(g).limit,"onUpdate:pageSize":t[5]||(t[5]=function(e){return Y(g).limit=e}),"item-count":Y(y).total,"store-key":`node-files`,onRefresh:x},null,8,[`page`,`page-size`,`item-count`])]}),_:1})]}),_:1})}}}),qn=Jn,B(),ve={class:`path-dir`},Ye={class:`path-arrow reversal`},ht={class:`path-dir`},wt={class:`path-arrow`},Mt=[`onClick`],Lt={class:`path-dir`},Vt={class:`path-arrow`},En=R({__name:`choose-path`,props:{currentPath:{type:String,default:`/`}},emits:[`pathChange`],setup:function(e,t){var n=t.expose,i=t.emit,a=e,o=i,s=X().t,c=U(``),l=va(`pathListRef`),u=U(0),p=j(function(){return a.currentPath.split(`/`).filter(function(e){return e!==``}).map(function(e,t){return{name:e,originalIndex:t}})}),m=j(function(){if(!u.value||p.value.length===0)return p.value;var e=80,t=20,n=12,r=150,i=u.value-e,a=Ra(p.value).reverse(),o=[],s=!0,c=!1,l=void 0;try{for(var d=a[Symbol.iterator](),f;!(s=(f=d.next()).done);s=!0){var m=f.value,h=Math.min(m.name.length*8,r)+t+n;if(i>=h)o.unshift(m),i-=h;else break}}catch(e){c=!0,l=e}finally{try{!s&&d.return!=null&&d.return()}finally{if(c)throw l}}return o}),h=j(function(){return m.value.length<p.value.length}),g=j(function(){var e=p.value.length-m.value.length;return p.value.slice(0,e)}),v=j(function(){var e=g.value.map(function(e){return{key:e.originalIndex,label:e.name,icon:function(){return L(pn,{name:`file-dir`,size:`16`},null)}}});return e.unshift({key:`/`,label:s(`file.rootDirectory`),icon:function(){return L(pn,{name:`file-dir`,size:`16`},null)}}),e}),y=function(e){te(e)},b=U(!0),S=va(`inputRef`),w=null;gi(function(){l.value&&(T(),w=new ResizeObserver(function(){T()}),w.observe(l.value))}),_i(function(){w&&w.disconnect()});function T(){l.value&&(u.value=l.value.offsetWidth)}function E(e){b.value=e,b.value?(c.value=``,ii(function(){T()})):c.value=a.currentPath}var ee=function(){E(!1),ii(function(){var e;(e=S.value)==null||e.focus()})};function te(e,t){var n=a.currentPath.split(`/`).filter(function(e){return e!==``}),r=``;typeof e==`number`&&(n.splice(e+1),r=`/`+n.join(`/`)),e==`/`&&(r=`/`),o(`pathChange`,r),t==null||t.stopPropagation()}function D(){return Q(function(){var e;return $(this,function(t){return c.value==a.currentPath||c.value==``?((e=S.value)==null||e.blur(),E(!0)):Wr(c.value)?(o(`pathChange`,c.value),E(!0)):E(!1),[2]})})()}n({handleEnterDown:D});function O(){var e=a.currentPath.split(`/`).filter(function(e){return e!==``});e.length!=0&&(e.pop(),o(`pathChange`,`/`+e.join(`/`)))}function ne(){o(`pathChange`,a.currentPath)}return function(e,t){var n=r,i=d,a=f,o=C,s=x;return V(),N(s,null,{default:Z(function(){return[L(n,{onClick:O},{default:Z(function(){return[L(pn,{name:`file-back`,size:`16`})]}),_:1}),Y(b)?(V(),F(`div`,{key:0,ref_key:`pathListRef`,ref:l,class:`path-list`,onClick:ee},[L(i,{trigger:`click`,placement:`bottom-start`,options:Y(v),onSelect:y},{default:Z(function(){return[Ea(M(`div`,{class:`path-item`,onClick:t[0]||(t[0]=function(e){return e.stopPropagation()})},[M(`div`,ve,[L(pn,{name:`file-dir`,size:`16`})]),M(`div`,Ye,[L(pn,{name:`base-arrow-right`})])],512),[[xa,Y(h)]])]}),_:1},8,[`options`]),Ea(M(`div`,{class:`path-item`,onClick:t[1]||(t[1]=function(e){return te(`/`,e)})},[M(`div`,ht,J(e.$t(`file.rootDirectory`)),1),M(`div`,wt,[L(pn,{name:`base-arrow-right`})])],512),[[xa,!Y(h)]]),(V(!0),F(_,null,Si(Y(m),function(e,t){return V(),F(`div`,{class:`path-item`,key:``.concat(e,`_`,t),onClick:function(t){return te(e.originalIndex,t)}},[M(`div`,Lt,[L(a,{class:`max-w-150px!`},{default:Z(function(){return[I(J(e.name),1)]}),_:2},1024)]),M(`div`,Vt,[L(pn,{name:`base-arrow-right`})])],8,Mt)}),128))],512)):(V(),N(o,{key:1,ref_key:`inputRef`,ref:S,value:Y(c),"onUpdate:value":t[2]||(t[2]=function(e){return Jr(c)?c.value=e:null}),class:`flex-1`,placeholder:` `,onFocus:t[3]||(t[3]=function(e){return E(!1)}),onBlur:t[4]||(t[4]=function(e){return E(!0)}),onKeydown:Da(D,[`enter`])},null,8,[`value`])),L(n,{onClick:ne},{default:Z(function(){return[L(pn,{name:`base-refresh`,size:`16`})]}),_:1})]}),_:1})}}}),Tn=A(En,[[`__scopeId`,`data-v-414decf8`]]),B(),pi=R({__name:`node-select`,props:{side:{}},setup:function(e){var t=e,n=ca(),r=Ui(n),i=r.leftPath,a=r.rightPath,o=r.nodesList,s=r.leftNodeId,c=r.rightNodeId,l=j({get:function(){return t.side===`left`?s.value:c.value},set:function(e){t.side===`left`?s.value=e:c.value=e}}),u=j({get:function(){return t.side===`left`?i.value:a.value},set:function(e){t.side===`left`?i.value=e:a.value=e}}),d=function(e){u.value=e,t.side===`left`?n.refreshLeft():n.refreshRight()},f=j(function(){return o.value.map(function(e){var n=t.side===`left`?c.value:s.value;return La(Fa({},e),{disabled:e.value===n})})});return function(e,t){var n=D,r=h;return V(),N(r,{class:`mb-16px`},{default:Z(function(){return[L(n,{class:`w-160px`,"consistent-menu-width":!1,value:Y(l),"onUpdate:value":t[0]||(t[0]=function(e){return Jr(l)?l.value=e:null}),options:Y(f),placeholder:e.$t(`Select node`)},null,8,[`value`,`options`,`placeholder`]),L(Tn,{class:`flex-1`,"current-path":Y(u),onPathChange:d},null,8,[`current-path`])]}),_:1})}}}),fi=pi,B(),_e={class:`flex flex-col h-full p-20px`},Je={class:`flex flex-col h-full p-20px`},Br=R({__name:`index`,setup:function(e){return ca().getNode(),gi(function(){var e=ga(`/ws_modsoc`,{immediate:!0,onMessage:function(e,t){try{JSON.parse(t.data).type!==`end`&&Li(),n()}catch(e){n()}}}),t=e.send,n=e.close;t({mod_name:`node`,sub_mod_name:`file_transfer`,def_name:`transfer_status`,callback:`check_status`,data:{}})}),function(e,t){var n=a,r=h;return V(),N(r,{class:`flex-nowrap! box-view`},{default:Z(function(){return[L(n,null,{default:Z(function(){return[M(`div`,_e,[L(fi,{side:`left`}),L(qn,{side:`left`})])]}),_:1}),L(n,null,{default:Z(function(){return[M(`div`,Je,[L(fi,{side:`right`}),L(qn,{side:`right`})])]}),_:1})]}),_:1})}}}),e(`i`,k({default:function(){return $n}})),$n=A(Br,[[`__scopeId`,`data-v-195b5304`]]),e(`r`,k({default:function(){return li}})),B(),en={},li=A(en,[[`render`,Wa]]),$t=Ar.global,K=$t.t,gr=function(e){return W.post(`/mod/node/node/get_node_list`,e)},lr=function(){return W.post(`/mod/node/node/get_category_list`)},nn=function(e){return W.post(`/mod/node/node/add_category`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Ln=function(e){return W.post(`/mod/node/node/del_category`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Mi=function(e){return W.post(`/mod/node/node/bind_node_to_category`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},tn=function(e){return W.post(`/mod/node/node/add_node`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Ji=function(e){return W.post(`/mod/node/node/set_ssh_conf`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},In=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return W.post(`/mod/node/node/del_node`,e,{requestOptions:{loading:t?K(`Component.Pay.index_12`):``,successMessage:!0}})},Un=function(e){return W.post(`/mod/node/node/update_node`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},wi=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return W.post(`/mod/node/node/restart_bt_panel`,e,{requestOptions:{loading:t?K(`Component.Pay.index_12`):``,successMessage:!0}})},Ti=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return W.post(`/mod/node/node/server_reboot`,e,{requestOptions:{loading:t?K(`Component.Pay.index_12`):``,successMessage:!0}})},Ca=function(e){return W.post(`/mod/node/node/get_panel_url`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!1}})},Rn=function(e){return W.post(`/mod/node/node/remove_ssh_conf`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},jr=function(){return W.post(`/mod/node/node/set_used_status`,{},{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Ni=function(e){return W.post(`/mod/node/monitor/set_primary_target`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Tr=function(e){return W.post(`/mod/node/monitor/get_service_options`,e)},Di=function(e){return W.post(`/mod/node/monitor/save_service_targets`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},Oi=function(e){return W.post(`/mod/node/monitor/save_setting`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},or=function(e){return W.post(`/mod/node/alert/get_config`,e)},Ei=function(e){return W.post(`/mod/node/alert/save_config`,e,{requestOptions:{loading:K(`Component.Pay.index_12`),successMessage:!0}})},B(),ge={class:`pt-40px pb-40px`},ot={class:`mb-24px text-center text-22px font-bold`},mt={class:`mb-16px`},Ct={class:`ul-style`},jt={class:`ml-4px`},It={class:`ml-4px`},Bt={class:`text-center my-24px`},Wt={class:`flex justify-center`},qt={class:`item`},Pe=[`onClick`],zr=R({__name:`index`,setup:function(e){var t=X().t,n=ha(),i=U(0),o=[t(`Node Manage`),t(`File transfer`)],s=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,jr()];case 1:return e.sent(),n.push(`/node/manage`),[2]}})})()};return function(e,t){var n=r,c=b,l=a;return V(),N(l,null,{default:Z(function(){return[M(`div`,ge,[M(`div`,ot,J(e.$t(`aaPanel Node Manage`)),1),M(`div`,mt,[M(`ul`,Ct,[M(`li`,null,[t[0]||(t[0]=M(`i`,{class:`i-iconamoon:3d-bold text-20px`},null,-1)),M(`span`,jt,J(e.$t(`Multi-node Manage`)),1)]),M(`li`,null,[t[1]||(t[1]=M(`i`,{class:`i-iconamoon:file text-20px`},null,-1)),M(`span`,It,J(e.$t(`File transfer`)),1)])])]),M(`div`,Bt,[L(n,{type:`primary`,class:`h-36px text-14px`,onClick:s},{default:Z(function(){return[I(J(e.$t(`Public.Btn.Install`)),1)]}),_:1})]),M(`div`,Wt,[M(`div`,qt,[M(`ul`,null,[(V(),F(_,null,Si(o,function(e,t){return M(`li`,{class:mi({active:Y(i)==t}),key:t,onClick:function(e){return i.value=t}},J(e),11,Pe)}),64))])]),Ea(L(c,{width:`100%`,src:Y(di)},null,8,[`src`]),[[xa,Y(i)==0]]),Ea(L(c,{width:`100%`,src:Y(ui)},null,8,[`src`]),[[xa,Y(i)==1]])])])]}),_:1})}}}),e(`n`,k({default:function(){return Ur}})),Ur=A(zr,[[`__scopeId`,`data-v-60c61306`]]),B(),he={class:`p-20px`},at={class:`font-bold text-desc`},an=R({__name:`alarm-channel-modal`,props:{selectedIds:{default:function(){return[]}},onSave:{}},setup:function(e,t){var n=t.expose,i=e,a=X().t,o=la(),c=o.loading,l=o.setLoading,u=U(Ra(i.selectedIds)),d=U([]),f=U([{name:`mail`,title:a(`Config.Alarm.index_3`),ps:a(`Config.Alarm.index_36`),help:`https://www.bt.cn/bbs/thread-66183-1-1.html`,list:[]},{name:`dingding`,title:a(`Config.Alarm.index_5`),ps:a(`Config.Alarm.index_37`),help:`https://www.bt.cn/bbs/thread-108081-1-1.html`,list:[]},{name:`weixin`,title:a(`Config.Alarm.index_6`),ps:a(`Config.Alarm.index_38`),help:`https://www.bt.cn/bbs/thread-108116-1-1.html`,list:[]},{name:`feishu`,title:a(`Config.Alarm.index_4`),ps:a(`Config.Alarm.index_39`),help:`https://www.aapanel.com/forum/d/16942-aapanel-how-does-set-lark-or-feishu-notification`,list:[]},{name:`tg`,title:`Telegram`,ps:`Use Telegram to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/telegram-alarm.html`,list:[]},{name:`discord`,title:`Discord`,ps:`Use Discord to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/discord-alarm.html`,list:[]},{name:`webhook`,title:`Webhook`,ps:`Use Webhook to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/webhook-alarm.html`,list:[]}]),p=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),l(!0),[4,ar({refresh:0})];case 1:return e=t.sent().message,d.value=[],Gr(e)&&(f.value.forEach(function(t){t.list=e.filter(function(e){return e.sender_type===t.name})}),f.value.forEach(function(t){var n=e.filter(function(e){return e.used&&e.sender_type===t.name});n.length>0?n.forEach(function(e){d.value.push({label:``.concat(e.data.title,` (`,t.title,`)`),value:e.id})}):d.value.push({label:t.title,value:t.name,disabled:!0,config:t})}),u.value=u.value.filter(function(t){return e.some(function(e){return e.used&&e.id===t})})),[3,3];case 2:return l(!1),[7];case 3:return[2]}})})()},m=function(e){return u.value.includes(e)},g=function(e,t){if(t){u.value.includes(e)||u.value.push(e);return}u.value=u.value.filter(function(t){return t!==e})},v=function(e){yi({row:e,onRefresh:p})};return p(),n({onConfirm:function(){var e;(e=i.onSave)==null||e.call(i,Ra(u.value))}}),function(e,t){var n=s,i=r,a=h,o=ne;return V(),F(`div`,he,[L(o,{show:Y(c)},{default:Z(function(){return[L(a,{vertical:``,size:14},{default:Z(function(){return[M(`span`,at,J(e.$t(`Select an alarm channel`)),1),L(a,{vertical:``,size:18},{default:Z(function(){return[(V(!0),F(_,null,Si(Y(d),function(t){return V(),F(`div`,{key:t.value,class:`node-alarm-channel-row`},[L(n,{checked:m(t.value),disabled:t.disabled,"onUpdate:checked":function(e){return g(t.value,e)}},{default:Z(function(){return[I(J(t.label),1)]}),_:2},1032,[`checked`,`disabled`,`onUpdate:checked`]),t.config?(V(),N(i,{key:0,text:``,type:`primary`,onClick:function(e){return v(t.config)}},{default:Z(function(){return[I(J(e.$t(`Public.Btn.Conf`)),1)]}),_:1},8,[`onClick`])):P(``,!0)])}),128))]}),_:1})]}),_:1})]}),_:1},8,[`show`])])}}}),rn=A(an,[[`__scopeId`,`data-v-83d2c87b`]]),B(),me={class:`node-alert-card`},it={class:`font-bold`},pt={class:`node-alert-label`},St={class:`node-alert-unit`},At={class:`node-alert-unit`},Ft={class:`node-alert-card`},zt={class:`font-bold`},Ut={class:`node-alert-unit`},Kt={class:`font-bold`},Ne={class:`node-alert-label`},Ie={key:1,class:`node-alert-unit`},Re={class:`node-alert-label ml-8px`},cn=R({__name:`alert-notification`,props:{data:{}},setup:function(e,t){var n=t.expose,i=X().t,a=e,o=U(),s=H({scope:`current`,senderIds:[],rateLimit:{enabled:!0,interval:30},silentTime:{enabled:!0,start:0,end:0}}),c=j(function(){return s.senderIds.length>0}),l=fa(i(`Alert channel`)),d=U([]),f=U(),p={offline:`i-mdi:server-outline`,cpu_usage:`i-iconoir:cpu`,mem_usage:`i-material-symbols:memory`,disk_usage:`i-icon-park-outline:disk text-14px`,bandwidth_up:`i-material-symbols:vital-signs-rounded`,bandwidth_down:`i-material-symbols:vital-signs-rounded`,traffic_up:`i-material-symbols:vital-signs-rounded`,traffic_down:`i-material-symbols:vital-signs-rounded`,expire:`i-material-symbols:event-upcoming-outline-rounded`},m=function(e){return e===`traffic_up`||e===`traffic_down`},g=function(e){return e.metric===`offline`?i(`Offline`):e.metric===`expire`?i(`Less than or equal to`):m(e.metric)?i(`Exceeds`):i(`Average`)},v=function(e){var t;return e.threshold_unit===`%`||(t=e.unit_options)!=null&&t.includes(`%`)?100:m(e.metric)?1024:e.metric===`expire`?365:120},y=function(e){return e.metric!==`offline`},b=function(e){return e.metric!==`expire`&&!m(e.metric)},x=function(e){var t=Number(e||0),n=new Date,r=t>=86400?23:Math.floor(t/3600),i=t>=86400?59:Math.floor(t%3600/60);return n.setHours(r,i,0,0),n.getTime()},C=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e)return t?86400:0;var n=new Date(e),r=n.getHours()*3600+n.getMinutes()*60;return t&&r===86340?86400:r},w=function(e){return e===`all`?`global`:`node`},T=function(e){return e===`global`?`all`:`current`},E=function(e){s.scope=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.scope,e&&(s.senderIds=e.sender_ids||[],s.rateLimit.enabled=e.send_interval_enabled===1,s.rateLimit.interval=e.send_interval/60,s.silentTime.enabled=e.time_range_enabled===1,s.silentTime.start=x(e.time_range_start),s.silentTime.end=x(e.time_range_end))},ee=function(){d.value=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(function(e){var t;return{key:e.metric,title:e.label||e.metric,icon:p[e.metric]||`i-material-symbols:notifications-outline-rounded`,enabled:e.enabled===1,prefix:g(e),value:Number((t=e.threshold)==null?1:t),min:0,max:v(e),unit:e.threshold_unit||e.unit||``,unitOptions:e.unit_options||[],duration:Number(e.duration_minutes||1),hasThreshold:y(e),hasDuration:b(e),targetType:e.target_type}})},te=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.scope,t=f.value;if(t){var n=e===`all`;E(n?t.global_setting:t.setting,e),ee(n?t.global_items:t.items)}},oe=function(e){te(e)},ce=function(){l.data={selectedIds:Ra(s.senderIds),onSave:function(e){s.senderIds=e}},l.show=!0};n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=o.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Ei({node_id:s.scope===`current`?a.data.row.id:0,setting:JSON.stringify({scope:w(s.scope),sender_ids:s.senderIds,send_interval_enabled:+!!s.rateLimit.enabled,send_interval:s.rateLimit.interval*60,time_range_enabled:+!!s.silentTime.enabled,time_range_start:C(s.silentTime.start),time_range_end:C(s.silentTime.end,!0)}),items:JSON.stringify(d.value.map(function(e){var t={metric:e.key,enabled:+!!e.enabled};return e.hasThreshold!==!1&&(t.threshold=e.value,t.threshold_unit=e.unit),e.hasDuration!==!1&&(t.duration_minutes=e.duration||1),t}))})];case 2:return r.sent(),(t=(n=a.data).onRefresh)==null||t.call(n),[2]}})})()}});var le=la(),k=le.loading,ue=le.setLoading;return function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return r.trys.push([0,,2,3]),ue(!0),[4,or({node_id:a.data.row.id})];case 1:return t=r.sent().message,n=t,f.value=n,te(T(n.scope||((e=n.setting)==null?void 0:e.scope))),[3,3];case 2:return ue(!1),[7];case 3:return[2]}})})()}(),function(e,t){var n=r,i=h,a=ie,f=ae,p=re,m=O,g=S,v=se,y=u,b=D,x=fn,C=hn,w=ne;return V(),N(w,{show:Y(k)},{default:Z(function(){return[L(x,{ref_key:`formRef`,ref:o,class:`p-20px max-h-620px overflow-y-auto`,model:Y(s)},{default:Z(function(){return[L(i,{vertical:``,size:12},{default:Z(function(){return[L(i,{class:`items-center text-desc`,size:6},{default:Z(function(){return[t[8]||(t[8]=M(`i`,{class:`i-material-symbols:warning-outline-rounded text-warning`},null,-1)),M(`span`,null,J(Y(c)?e.$t(`Alert channel configured`):e.$t(`Currently no alert channel is set,`)),1),L(n,{text:``,type:`primary`,onClick:ce},{default:Z(function(){return[I(J(e.$t(`Please click here to set up alerts`)),1)]}),_:1})]}),_:1}),L(f,{value:Y(s).scope,"onUpdate:value":[t[0]||(t[0]=function(e){return Y(s).scope=e}),oe],type:`segment`,class:`w-250px`},{default:Z(function(){return[L(a,{name:`current`,tab:e.$t(`Current machine`)},null,8,[`tab`]),L(a,{name:`all`,tab:e.$t(`All machines`)},null,8,[`tab`])]}),_:1},8,[`value`]),L(i,{vertical:``},{default:Z(function(){return[M(`div`,me,[L(i,{justify:`space-between`,align:`center`,wrap:!1},{default:Z(function(){return[L(i,{align:`center`},{default:Z(function(){return[t[9]||(t[9]=M(`i`,{class:`i-material-symbols:nest-clock-farsight-analog-outline-rounded text-18px`},null,-1)),M(`span`,it,J(e.$t(`Alert frequency limit`)),1)]}),_:1}),L(p,{value:Y(s).rateLimit.enabled,"onUpdate:value":t[1]||(t[1]=function(e){return Y(s).rateLimit.enabled=e})},null,8,[`value`])]}),_:1}),L(i,{class:`mt-12px`,align:`center`,justify:`space-between`,wrap:!1},{default:Z(function(){return[L(i,{align:`center`,wrap:!1},{default:Z(function(){return[M(`span`,pt,J(e.$t(`Interval per alert`)),1),L(m,{value:Y(s).rateLimit.interval,"onUpdate:value":t[2]||(t[2]=function(e){return Y(s).rateLimit.interval=e}),class:`node-alert-slider`,min:1,max:120},null,8,[`value`]),L(g,{value:Y(s).rateLimit.interval,"onUpdate:value":t[3]||(t[3]=function(e){return Y(s).rateLimit.interval=e}),class:`node-alert-input`,min:1,max:120,"show-button":!1},null,8,[`value`]),M(`span`,St,J(e.$t(`Crontab.arrange.index_44`)),1)]}),_:1}),M(`span`,At,J(e.$t(`Default interval is half an hour`)),1)]}),_:1})]),M(`div`,Ft,[L(i,{justify:`space-between`,align:`center`,wrap:!1},{default:Z(function(){return[L(i,{align:`center`},{default:Z(function(){return[t[10]||(t[10]=M(`i`,{class:`i-material-symbols:timer-outline-rounded text-18px`},null,-1)),M(`span`,zt,J(e.$t(`Allowed alert time`)),1)]}),_:1}),L(p,{value:Y(s).silentTime.enabled,"onUpdate:value":t[4]||(t[4]=function(e){return Y(s).silentTime.enabled=e})},null,8,[`value`])]}),_:1}),L(i,{class:`mt-12px`,align:`center`,justify:`space-between`,wrap:!1},{default:Z(function(){return[L(i,{align:`center`,wrap:!1},{default:Z(function(){return[t[11]||(t[11]=M(`span`,{class:`node-alert-label`},`From`,-1)),L(v,{value:Y(s).silentTime.start,"onUpdate:value":t[5]||(t[5]=function(e){return Y(s).silentTime.start=e}),format:`HH:mm`,clearable:!1},null,8,[`value`]),t[12]||(t[12]=M(`span`,{class:`node-alert-label`},`To`,-1)),L(v,{value:Y(s).silentTime.end,"onUpdate:value":t[6]||(t[6]=function(e){return Y(s).silentTime.end=e}),format:`HH:mm`,clearable:!1},null,8,[`value`])]}),_:1}),M(`span`,Ut,J(e.$t(`Allowed to send alert notifications in this time period`)),1)]}),_:1})]),L(y,{class:`my-16px!`}),(V(!0),F(_,null,Si(Y(d),function(e){return V(),F(`div`,{key:e.key,class:`node-alert-card`},[L(i,{justify:`space-between`,align:`center`,wrap:!1},{default:Z(function(){return[L(i,{align:`center`},{default:Z(function(){return[M(`i`,{class:mi([e.icon,`text-18px`])},null,2),M(`span`,Kt,J(e.title),1)]}),_:2},1024),L(p,{value:e.enabled,"onUpdate:value":function(t){return e.enabled=t}},null,8,[`value`,`onUpdate:value`])]}),_:2},1024),L(i,{class:`mt-12px`,align:`center`,wrap:!1},{default:Z(function(){var n;return[e.hasThreshold===!1?P(``,!0):(V(),F(_,{key:0},[M(`span`,Ne,J(e.prefix),1),L(m,{value:e.value,"onUpdate:value":function(t){return e.value=t},class:`node-alert-slider`,min:e.min,max:e.max},null,8,[`value`,`onUpdate:value`,`min`,`max`]),L(g,{value:e.value,"onUpdate:value":function(t){return e.value=t},class:`node-alert-input`,min:e.min,max:e.max,"show-button":!1},null,8,[`value`,`onUpdate:value`,`min`,`max`]),(n=e.unitOptions)!=null&&n.length&&e.unitOptions.length>1?(V(),N(b,{key:0,value:e.unit,"onUpdate:value":function(t){return e.unit=t},class:`node-alert-select`,options:e.unitOptions.map(function(e){return{label:e,value:e}}),"consistent-menu-width":!1},null,8,[`value`,`onUpdate:value`,`options`])):(V(),F(`span`,Ie,J(e.unit),1))],64)),e.hasDuration===!1?P(``,!0):(V(),F(_,{key:1},[M(`span`,Re,J(e.hasThreshold===!1?e.prefix:`for`),1),L(m,{value:e.duration,"onUpdate:value":function(t){return e.duration=t},class:`node-alert-slider`,min:1,max:60},null,8,[`value`,`onUpdate:value`]),L(g,{value:e.duration,"onUpdate:value":function(t){return e.duration=t},class:`node-alert-input`,min:1,max:60,"show-button":!1},null,8,[`value`,`onUpdate:value`]),t[13]||(t[13]=M(`span`,{class:`node-alert-unit`},`min`,-1))],64))]}),_:2},1024)])}),128))]}),_:1})]}),_:1})]}),_:1},8,[`model`]),L(C,{show:Y(l).show,"onUpdate:show":t[7]||(t[7]=function(e){return Y(l).show=e}),title:Y(l).title,data:Y(l).data,width:520,"min-height":360,footer:!0,component:rn},null,8,[`show`,`title`,`data`])]}),_:1},8,[`show`])}}}),sn=k({default:function(){return on}}),on=A(cn,[[`__scopeId`,`data-v-9aa732b2`]]),B(),An=R({__name:`cost-seting`,props:{data:{}},setup:function(e,t){var n=t.expose,r,i,a,o=X().t,s=e,c=U(),l=H({currency:((r=s.data.row.monitor)==null||(r=r.cost)==null?void 0:r.currency)||`USD`,period:((i=s.data.row.monitor)==null||(i=i.cost)==null?void 0:i.period)||`month`,amount:((a=s.data.row.monitor)==null||(a=a.cost)==null?void 0:a.amount)||128}),u=U({amount:{required:!0,type:`number`,message:o(`Please enter the cost`),trigger:[`input`,`change`,`blur`]}}),d=[{label:`$`,value:`USD`},{label:`€`,value:`EUR`},{label:`£`,value:`GBP`},{label:`¥`,value:`CNY`}],f=[{label:`Month`,value:`month`},{label:`Quarter`,value:`quarter`},{label:`Year`,value:`year`},{label:`Once`,value:`one`}];return n({onConfirm:function(){return Q(function(){var e,t,n,r;return $(this,function(i){switch(i.label){case 0:return[4,(e=c.value)==null?void 0:e.validate()];case 1:return i.sent(),[4,Oi({node_id:s.data.row.id,cost_currency:l.currency,cost_symbol:(t=d.find(function(e){return e.value===l.currency}))==null?void 0:t.label,cost_period:l.period,cost_amount:l.amount})];case 2:return i.sent(),(n=(r=s.data).onRefresh)==null||n.call(r),[2]}})})()}}),function(e,t){var n=D,r=O,i=S,a=h,s=g,p=fn;return V(),N(p,{"label-placement":`top`,ref_key:`formRef`,ref:c,class:`p-20px`,rules:Y(u),model:Y(l)},{default:Z(function(){return[L(s,{label:Y(o)(`Cost Settings`),path:`amount`},{default:Z(function(){return[L(a,{class:`w-full items-center`,wrap:!1},{default:Z(function(){return[L(n,{value:Y(l).currency,"onUpdate:value":t[0]||(t[0]=function(e){return Y(l).currency=e}),class:`w-64px`,options:d},null,8,[`value`]),L(n,{value:Y(l).period,"onUpdate:value":t[1]||(t[1]=function(e){return Y(l).period=e}),class:`w-100px`,options:f},null,8,[`value`]),L(r,{value:Y(l).amount,"onUpdate:value":t[2]||(t[2]=function(e){return Y(l).amount=e}),class:`flex-1`,min:0,max:1e3},null,8,[`value`]),L(i,{value:Y(l).amount,"onUpdate:value":t[3]||(t[3]=function(e){return Y(l).amount=e}),class:`w-86px`,min:0,"show-button":!1},null,8,[`value`])]}),_:1})]}),_:1},8,[`label`])]}),_:1},8,[`rules`,`model`])}}}),kn=k({default:function(){return On}}),On=An,B(),je=[`onClick`],rt={class:`font-bold`},ft={class:`text-desc`},xt={class:`text-desc flex-shrink-0`},kt={class:`text-desc flex-shrink-0`},Hn=R({__name:`disk-monitor`,props:{data:{}},setup:function(e,t){var n=t.expose,r=X().t,i=e,a=U(),o=j(function(){var e;return(((e=i.data.row.monitor)==null||(e=e.targets)==null?void 0:e.disk)||[]).map(function(e){var t=e.extra||{},n=t.path||e.target_key||``;return{label:t.filesystem||e.target_name||n,value:n,mount:n?`(`.concat(n,`)`):``,used:z(Number(t.used||0)),total:z(Number(t.total||0)),percent:Number(t.usage||0),isPrimary:e.is_primary===1}}).filter(function(e){return e.value})}),s=H({disk:``});Ta(function(){var e=o.value.find(function(e){return e.isPrimary})||o.value[0];e&&!o.value.some(function(e){return e.value===s.disk})&&(s.disk=e.value)});var c=U({disk:{required:!0,message:r(`Please select disk`),trigger:[`change`]}});return n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Ni({node_id:i.data.row.id,target_type:`disk`,target_key:s.disk})];case 2:return r.sent(),(t=(n=i.data).onRefresh)==null||t.call(n),[2]}})})()}}),function(e,t){var n=h,r=T,i=oe,l=p,u=g,d=fn;return V(),N(d,{"label-placement":`top`,ref_key:`formRef`,ref:a,class:`p-20px`,rules:Y(c),model:Y(s)},{default:Z(function(){return[L(u,{path:`disk`,"show-label":!1},{default:Z(function(){return[Y(o).length?(V(),N(n,{key:0,vertical:``,class:`w-full`},{default:Z(function(){return[(V(!0),F(_,null,Si(Y(o),function(a){return V(),F(`div`,{key:a.value,class:mi([`monitor-select-card`,{active:Y(s).disk===a.value}]),onClick:function(e){return Y(s).disk=a.value}},[L(n,{class:`items-center justify-between! flex-nowrap!`},{default:Z(function(){return[L(n,{vertical:``},{default:Z(function(){return[L(n,{class:`items-center`},{default:Z(function(){return[t[0]||(t[0]=M(`i`,{class:`i-icon-park-outline:disk text-primary`},null,-1)),M(`span`,rt,J(a.label),1),M(`span`,ft,J(a.mount),1)]}),_:2},1024),L(n,{class:`items-center flex-nowrap!`,size:8},{default:Z(function(){return[M(`span`,xt,J(a.used)+` / `+J(a.total),1),L(r,{class:`w-260px!`,type:`line`,status:`success`,percentage:a.percent,"show-indicator":!1,height:6},null,8,[`percentage`]),M(`span`,kt,J(a.percent)+`%`,1)]}),_:2},1024)]}),_:2},1024),L(i,{round:``,bordered:!1,type:Y(s).disk===a.value?`success`:`default`},{default:Z(function(){return[I(J(Y(s).disk===a.value?e.$t(`Selected`):e.$t(`Click Select`)),1)]}),_:2},1032,[`type`])]}),_:2},1024)],10,je)}),128))]}),_:1})):(V(),N(l,{key:1,class:`h-160px flex items-center justify-center`}))]}),_:1})]}),_:1},8,[`rules`,`model`])}}}),Vn=k({default:function(){return Bn}}),Bn=A(Hn,[[`__scopeId`,`data-v-79166c23`]]),B(),Kn=R({__name:`expired-seting`,props:{data:{}},setup:function(e,t){var n=t.expose,r,i=X().t,a=e,o=H({expireTime:!((r=a.data.row.monitor)==null||(r=r.expire)==null)&&r.expire_at?a.data.row.monitor.expire.expire_at*1e3:null}),s=U(),c=U({expireTime:{required:!0,type:`number`,message:i(`Please select expire time`),trigger:[`change`,`blur`]}}),u=function(e){return Kr(e,new Date().setHours(0,0,0,0))};return n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=s.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Oi({node_id:a.data.row.id,expire_at:(o.expireTime||0)/1e3})];case 2:return r.sent(),(t=(n=a.data).onRefresh)==null||t.call(n),[2]}})})()}}),function(e,t){var n=l,r=g,i=fn;return V(),N(i,{"label-placement":`top`,ref_key:`formRef`,ref:s,class:`p-20px`,rules:Y(c),model:Y(o)},{default:Z(function(){return[L(r,{label:e.$t(`Expired Date`),path:`expireTime`,"label-width":`auto`},{default:Z(function(){return[L(n,{value:Y(o).expireTime,"onUpdate:value":t[0]||(t[0]=function(e){return Y(o).expireTime=e}),class:`w-full`,type:`date`,"is-date-disabled":u},null,8,[`value`])]}),_:1},8,[`label`])]}),_:1},8,[`rules`,`model`])}}}),Gn=k({default:function(){return Wn}}),Wn=Kn,B(),Ae=[`onClick`],nt={class:`font-bold`},dt={class:`text-desc`},bt={class:`text-primary font-bold`},Ot={class:`text-desc font-bold`},ri=R({__name:`network-monitor`,props:{data:{}},setup:function(e,t){var n=t.expose,r=X().t,i=e,a=U(),o=function(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))},s=j(function(){var e,t,n=((t=i.data.row.monitor)==null||(t=t.targets)==null?void 0:t.nic)||[],r=(e=Math).max.apply(e,Ra(n.flatMap(function(e){var t,n;return[Number(((t=e.extra)==null?void 0:t.up_kbs)||0),Number(((n=e.extra)==null?void 0:n.down_kbs)||0)]})).concat([0]));return n.map(function(e){var t=e.extra||{},n=t.name||e.target_key||``,i=Number(t.up_kbs||0),a=Number(t.down_kbs||0);return{label:e.target_name||n,value:n,totalText:``.concat(z(Number(t.up_total||0)),` / `,z(Number(t.down_total||0))),upload:``.concat(z(i*1024),`/s`),uploadPercent:o(i,r),download:``.concat(z(a*1024),`/s`),downloadPercent:o(a,r),isPrimary:e.is_primary===1}}).filter(function(e){return e.value})}),c=H({network:``});Ta(function(){var e=s.value.find(function(e){return e.isPrimary})||s.value[0];e&&!s.value.some(function(e){return e.value===c.network})&&(c.network=e.value)});var l=U({network:{required:!0,message:r(`Please select network card`),trigger:[`change`]}});return n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Ni({node_id:i.data.row.id,target_type:`nic`,target_key:c.network})];case 2:return r.sent(),(t=(n=i.data).onRefresh)==null||t.call(n),[2]}})})()}}),function(e,t){var n=h,r=T,i=oe,o=p,u=g,d=fn;return V(),N(d,{"label-placement":`top`,ref_key:`formRef`,ref:a,class:`p-20px`,rules:Y(l),model:Y(c)},{default:Z(function(){return[L(u,{path:`network`,"show-label":!1},{default:Z(function(){return[Y(s).length?(V(),N(n,{key:0,vertical:``,class:`w-full`},{default:Z(function(){return[(V(!0),F(_,null,Si(Y(s),function(a){return V(),F(`div`,{key:a.value,class:mi([`monitor-select-card`,{active:Y(c).network===a.value}]),onClick:function(e){return Y(c).network=a.value}},[L(n,{class:`items-center justify-between! flex-nowrap!`},{default:Z(function(){return[L(n,{vertical:``},{default:Z(function(){return[L(n,{class:`items-center`},{default:Z(function(){return[t[0]||(t[0]=M(`i`,{class:`i-tabler:network text-primary`},null,-1)),M(`span`,nt,J(a.label),1),M(`span`,dt,J(a.totalText),1)]}),_:2},1024),L(n,{class:`items-center flex-nowrap!`},{default:Z(function(){return[L(n,{class:`items-center flex-shrink-0`,size:4},{default:Z(function(){return[t[1]||(t[1]=M(`i`,{class:`i-material-symbols:arrow-upward-rounded text-primary`},null,-1)),M(`span`,bt,J(a.upload),1)]}),_:2},1024),L(r,{class:`w-100px!`,type:`line`,status:`success`,percentage:a.uploadPercent,"show-indicator":!1,height:6},null,8,[`percentage`]),L(n,{class:`items-center flex-shrink-0`},{default:Z(function(){return[t[2]||(t[2]=M(`i`,{class:`i-material-symbols:arrow-downward-rounded text-desc`},null,-1)),M(`span`,Ot,J(a.download),1)]}),_:2},1024),L(r,{class:`w-100px!`,type:`line`,color:`#7c8ea0`,percentage:a.downloadPercent,"show-indicator":!1,height:6},null,8,[`percentage`])]}),_:2},1024)]}),_:2},1024),L(i,{round:``,bordered:!1,type:Y(c).network===a.value?`success`:`default`},{default:Z(function(){return[I(J(Y(c).network===a.value?e.$t(`Selected`):e.$t(`Click Select`)),1)]}),_:2},1032,[`type`])]}),_:2},1024)],10,Ae)}),128))]}),_:1})):(V(),N(o,{key:1,class:`h-160px flex items-center justify-center`}))]}),_:1})]}),_:1},8,[`rules`,`model`])}}}),ni=k({default:function(){return ti}}),ti=A(ri,[[`__scopeId`,`data-v-45212165`]]),B(),ke={class:`mb-12px font-bold`},tt={class:`font-bold`},ut=[`textContent`],ji=R({__name:`service-monitor`,props:{data:{}},setup:function(e,t){var r=t.expose,i=e,a=U(),o=U(!1),s=H({source:``,service_status:!1,need_upgrade:!1,message:``}),c=H({groups:[]}),l=function(e){return e.services.every(function(e){return e.status===2})},u=function(e){return e.services.find(function(t){return t.target_key===e.selectedKey})||e.services[0]},d=function(e){var t,n=e.type===`version`?u(e):e.services[0];return(t=n==null?void 0:n.status)==null?2:t},f=function(e){return l(e)?`warning`:d(e)===1?`success`:`error`},m=function(e){return e.services.map(function(e){return{label:e.version_name||e.target_name,value:e.target_key,disabled:e.installed!==1}})},g=j(function(){var e;return new Set((((e=i.data.row.monitor)==null?void 0:e.services)||[]).map(function(e){return e.target_key||e.name}).filter(Boolean))}),v=function(e){var t=e.services.find(function(e){return g.value.has(e.target_key)}),n=t||e.services.find(function(e){return e.enabled===1}),r=e.services.find(function(e){return e.status!==2})||e.services[0],i=n||r;return La(Fa({},e),{enabled:!!(t||n),selectedKey:(i==null?void 0:i.target_key)||``})},y=function(){return Q(function(){var e,t,n,r,a,l;return $(this,function(u){switch(u.label){case 0:return u.trys.push([0,,2,3]),o.value=!0,[4,Tr({node_id:i.data.row.id})];case 1:return a=u.sent().message,l=a||{},c.groups=Array.isArray(l.groups)?l.groups.map(v):[],Object.assign(s,{source:((e=l.capability)==null?void 0:e.source)||``,service_status:!!((t=l.capability)!=null&&t.service_status),need_upgrade:!!((n=l.capability)!=null&&n.need_upgrade),message:((r=l.capability)==null?void 0:r.message)||``}),[3,3];case 2:return o.value=!1,[7];case 3:return[2]}})})()},b=function(){return c.groups.filter(function(e){return e.enabled&&!l(e)}).map(function(e){return u(e)}).filter(Boolean).map(function(e){return{target_type:e.target_type,service_family:e.service_family,target_key:e.target_key,target_name:e.target_name,version:e.version,version_name:e.version_name}})};return gi(function(){y()}),r({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Di({node_id:i.data.row.id,services:JSON.stringify(b())})];case 2:return r.sent(),(t=(n=i.data).onRefresh)==null||t.call(n),[2]}})})()}}),function(e,t){var r=n,i=oe,s=D,u=h,g=re,v=p,y=ne,b=fn;return V(),N(b,{"label-placement":`top`,ref_key:`formRef`,ref:a,class:`p-20px`,model:Y(c)},{default:Z(function(){return[M(`div`,ke,J(e.$t(`Service detection and version management`)),1),L(y,{show:Y(o)},{default:Z(function(){return[Y(c).groups.length?(V(),N(u,{key:0,vertical:``},{default:Z(function(){return[(V(!0),F(_,null,Si(Y(c).groups,function(t){return V(),N(u,{key:t.family,class:`service-monitor-row`,justify:`space-between`},{default:Z(function(){return[L(u,{class:`items-center min-w-0`},{default:Z(function(){return[L(r,{type:f(t),dot:``},null,8,[`type`]),M(`span`,tt,J(t.target_name),1),l(t)?(V(),N(i,{key:0,type:`warning`,size:`small`,round:``,bordered:!1},{default:Z(function(){return[M(`span`,{textContent:J(e.$t(`Need update panel`))},null,8,ut)]}),_:1})):d(t)===1?(V(),N(i,{key:1,type:`success`,size:`small`,round:``,bordered:!1},{default:Z(function(){return[I(J(e.$t(`Public.Status.Running`)),1)]}),_:1})):(V(),N(i,{key:2,type:`error`,size:`small`,round:``,bordered:!1},{default:Z(function(){return[I(J(e.$t(`Public.Status.Stopped`)),1)]}),_:1})),t.type===`version`?(V(),N(s,{key:3,value:t.selectedKey,"onUpdate:value":function(e){return t.selectedKey=e},class:`w-110px`,options:m(t),size:`small`,disabled:l(t)},null,8,[`value`,`onUpdate:value`,`options`,`disabled`])):P(``,!0)]}),_:2},1024),L(g,{value:t.enabled,"onUpdate:value":function(e){return t.enabled=e},disabled:l(t)},null,8,[`value`,`onUpdate:value`,`disabled`])]}),_:2},1024)}),128))]}),_:1})):(V(),N(v,{key:1,class:`h-180px flex items-center justify-center`}))]}),_:1},8,[`show`])]}),_:1},8,[`model`])}}}),Ai=k({default:function(){return ki}}),ki=A(ji,[[`__scopeId`,`data-v-11def215`]]),B(),ma=Fn(`node-manage`,function(){return{categoryList:U([]),nodeRow:U({}),nodeType:U(`2`)}},{persist:{pick:[`nodeType`]}}),B(),Zt=Ar.global,Gi=Zt.t,sr=function(e){var t;return((t=Ui(ma()).categoryList.value.find(function(t){return t.value===e}))==null?void 0:t.label)||`--`},Dr=function(e){return[Gi(`Online`),Gi(`Unknown`),Gi(`Offline`),Gi(`Abnormal`),Gi(`Restarting`)][e]},Sa=function(e){return!e||/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)||/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/.test(e)},Yr=function(e){return e.api_key===``&&e.app_key===``&&e.ssh_conf&&Object.keys(e.ssh_conf).length},B(),Oe={class:`p-20px`},et=[`textContent`],Rr=R({__name:`index`,props:{row:{type:Object,default:function(){return{}}},onRefresh:{type:Function,default:function(){}}},setup:function(e,t){var n=t.expose,i=Ui(ma()).categoryList,a=j(function(){return i.value.filter(function(e){return e.value!==``})}),o=X().t,s=e,c=U(null),l=H({name:``,type:`api`,group_id:0,url:``,key:``,host:``,port:22,ssh_type:`password`,password:``,private_key:``,private_key_password:``}),u={name:{required:!0,message:o(`Enter node name`),trigger:`blur`},url:[{required:!0,message:o(`Panel address cannot be empty`),trigger:[`blur`,`input`]},{validator:function(e,t){return t?(l.url=l.url.trim(),/^(https?):\/\/(?:(?:[\w-]+\.)+[a-zA-Z]{2,}|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:\[(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,6}|:(?::[0-9a-fA-F]{1,4}){1,7}|:(?::[0-9a-fA-F]{1,4}){1,6}:|(?:[0-9a-fA-F]{1,4}:){1,6}:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\])(?::\d{1,5})?(?:\/.*)?$/.test(l.url)?(l.url=new URL(l.url).origin,!0):Error(o(`Invalid panel address format`))):!0},trigger:`blur`}],key:{required:!0,message:o(`Enter API key`),trigger:`blur`},host:{required:!0,trigger:`blur`,validator:function(e,t){return!t||Sa(t)?!0:Error(o(`Invalid IP address format`))}},port:{required:!0,message:o(`Enter SSH port`),trigger:`blur`,type:`number`},password:{required:!0,message:o(`Enter SSH password`),trigger:`blur`},private_key:{required:!0,message:o(`Enter SSH key`),trigger:`blur`}},d=la(),f=d.loading,p=d.setLoading,m=function(){return{host:l.host,port:l.port,test_case:1,pkey:l.ssh_type===`key`?l.private_key:``,pkey_passwd:l.ssh_type===`key`?l.private_key_password:``,password:l.ssh_type===`password`?l.password:``}},v=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,3,4]),p(!0),[4,(e=c.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,Ji(m())];case 2:return t.sent(),[3,4];case 3:return p(!1),[7];case 4:return[2]}})})()},y=function(){return l.type===`api`?{remarks:l.name,address:l.url,api_key:l.key,category_id:l.group_id||0}:{remarks:l.name,ssh_conf:l.ssh_type===`password`?JSON.stringify({host:l.host,port:l.port,password:l.password}):JSON.stringify({host:l.host,port:l.port,pkey:l.private_key,pkey_passwd:l.private_key_password}),category_id:l.group_id||0}};return n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=c.value)==null?void 0:e.validate()];case 1:return t.sent(),s.row&&s.row.id?[4,Un(Fa({id:s.row.id},y()))]:[3,3];case 2:return t.sent(),[3,5];case 3:return[4,tn(y())];case 4:t.sent(),t.label=5;case 5:return s.onRefresh(),[2]}})})()}}),function(){s.row&&s.row.id&&(l.name=s.row.remarks,l.type=Object.keys(s.row.ssh_conf).length>0?`ssh`:`api`,l.group_id=s.row.category_id,l.url=s.row.address,l.key=s.row.api_key,l.host=s.row.ssh_conf.host,l.port=s.row.ssh_conf.port,l.ssh_type=s.row.ssh_conf.password?`password`:`key`,l.password=s.row.ssh_conf.password,l.private_key=s.row.ssh_conf.pkey,l.private_key_password=s.row.ssh_conf.pkey_passwd)}(),function(e,t){var n=C,i=g,o=E,s=ee,d=S,p=h,m=r,y=D,b=fn,x=Cn;return V(),F(`div`,Oe,[L(b,{ref_key:`formRef`,ref:c,model:Y(l),rules:u},{default:Z(function(){return[L(i,{label:e.$t(`Node Name`),path:`name`},{default:Z(function(){return[L(n,{class:`w-350px!`,value:Y(l).name,"onUpdate:value":t[0]||(t[0]=function(e){return Y(l).name=e}),placeholder:e.$t(`Enter node name`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`]),L(i,{label:e.$t(`Verification Type`),path:`type`},{default:Z(function(){return[L(s,{value:Y(l).type,"onUpdate:value":t[1]||(t[1]=function(e){return Y(l).type=e}),type:`button`},{default:Z(function(){return[L(o,{value:`api`},{default:Z(function(){return[I(J(e.$t(`API Key`)),1)]}),_:1}),L(o,{value:`ssh`},{default:Z(function(){return Ra(t[11]||(t[11]=[I(`SSH`,-1)]))}),_:1})]}),_:1},8,[`value`])]}),_:1},8,[`label`]),Y(l).type===`api`?(V(),F(_,{key:0},[L(i,{label:e.$t(`Panel Address`),path:`url`},{default:Z(function(){return[L(n,{class:`w-350px!`,value:Y(l).url,"onUpdate:value":t[2]||(t[2]=function(e){return Y(l).url=e}),placeholder:`Example: http://192.168.1.1:88 or https://domain.com:88`},null,8,[`value`])]}),_:1},8,[`label`]),L(i,{label:e.$t(`API Key`),path:`key`},{default:Z(function(){return[L(n,{class:`w-350px!`,value:Y(l).key,"onUpdate:value":t[3]||(t[3]=function(e){return Y(l).key=e}),placeholder:e.$t(`Enter API key`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`])],64)):P(``,!0),Y(l).type===`ssh`?(V(),F(_,{key:1},[L(p,{class:`flex-nowrap!`},{default:Z(function(){return[L(i,{label:e.$t(`Node IP`),path:`host`},{default:Z(function(){return[L(n,{class:`w-240px!`,value:Y(l).host,"onUpdate:value":t[4]||(t[4]=function(e){return Y(l).host=e}),placeholder:e.$t(`Example:192.168.1.1`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`]),L(i,{label:e.$t(`SSH port`),path:`port`},{default:Z(function(){return[L(d,{class:`w-98px!`,value:Y(l).port,"onUpdate:value":t[5]||(t[5]=function(e){return Y(l).port=e}),"show-button":!1,placeholder:e.$t(`SSH port`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`])]}),_:1}),L(i,{label:e.$t(`Authentication`),path:`ssh_type`},{default:Z(function(){return[L(s,{value:Y(l).ssh_type,"onUpdate:value":t[6]||(t[6]=function(e){return Y(l).ssh_type=e}),type:`button`},{default:Z(function(){return[L(o,{value:`password`},{default:Z(function(){return[I(J(e.$t(`Login.index_2`)),1)]}),_:1}),L(o,{value:`key`},{default:Z(function(){return[I(J(e.$t(`Key`)),1)]}),_:1})]}),_:1},8,[`value`])]}),_:1},8,[`label`]),Y(l).ssh_type===`password`?(V(),N(i,{key:0,label:e.$t(`SSH Password`),path:`password`},{default:Z(function(){return[L(p,{class:`flex-nowrap! items-center`},{default:Z(function(){return[L(n,{class:`w-220px!`,value:Y(l).password,"onUpdate:value":t[7]||(t[7]=function(e){return Y(l).password=e}),type:`password`,"show-password-on":`click`,placeholder:e.$t(`Example:123456`)},null,8,[`value`,`placeholder`]),L(m,{onClick:v,loading:Y(f)},{default:Z(function(){return[I(J(e.$t(`Test connection`)),1)]}),_:1},8,[`loading`])]}),_:1})]}),_:1},8,[`label`])):P(``,!0),Y(l).ssh_type===`key`?(V(),F(_,{key:1},[L(i,{label:e.$t(`SSH Key`),path:`private_key`},{default:Z(function(){return[L(p,{class:`flex-nowrap! items-center`},{default:Z(function(){return[L(n,{class:`w-220px!`,value:Y(l).private_key,"onUpdate:value":t[8]||(t[8]=function(e){return Y(l).private_key=e}),type:`textarea`,placeholder:e.$t(`Enter private key content`)},null,8,[`value`,`placeholder`]),L(m,{onClick:v,loading:Y(f)},{default:Z(function(){return[I(J(e.$t(`Test connection`)),1)]}),_:1},8,[`loading`])]}),_:1})]}),_:1},8,[`label`]),L(i,{label:e.$t(`SSH Key Password`)},{default:Z(function(){return[L(p,{class:`flex-nowrap! items-center`},{default:Z(function(){return[L(n,{class:`w-350px!`,value:Y(l).private_key_password,"onUpdate:value":t[9]||(t[9]=function(e){return Y(l).private_key_password=e}),type:`password`,"show-password-on":`click`,placeholder:e.$t(`Please leave blank if no password is provided`)},null,8,[`value`,`placeholder`])]}),_:1})]}),_:1},8,[`label`])],64)):P(``,!0)],64)):P(``,!0),L(i,{label:e.$t(`Category`),path:`group_id`},{default:Z(function(){return[L(y,{class:`w-350px!`,value:Y(l).group_id,"onUpdate:value":t[10]||(t[10]=function(e){return Y(l).group_id=e}),options:Y(a),placeholder:e.$t(`Select Category`)},null,8,[`value`,`options`,`placeholder`])]}),_:1},8,[`label`])]}),_:1},8,[`model`]),L(x,null,{default:Z(function(){return[Y(l).type===`api`?(V(),F(_,{key:0},[t[12]||(t[12]=M(`li`,null,`Step 1: Fill in the panel URL address, example: https://192.168.1.2:8888`,-1)),t[13]||(t[13]=M(`li`,null,`Step 2: Open the panel, go to the [Panel Settings] page, click [Advanced Features]`,-1)),t[14]||(t[14]=M(`li`,{class:`color-error`},`Step 3: Configure the [IP Whitelist]. Enter your computer's public fixed IP. If you don't have a fixed IP, please fill in an asterisk (*) `,-1)),M(`li`,null,J(e.$t(`Step 4: Copy [API secret key] in the [API Configuration] window`)),1),M(`li`,null,J(e.$t(`Step 5: Back to the node management window, paste it into the [API Key] input box`)),1)],64)):P(``,!0),Y(l).type===`ssh`?(V(),F(_,{key:1},[M(`li`,null,J(e.$t(`Enter root account information`)),1),M(`li`,{class:`color-warning`,textContent:J(e.$t(`The current authentication method does not support file transfer functionality`))},null,8,et)],64)):P(``,!0)]}),_:1})])}}}),si=k({default:function(){return oi}}),oi=Rr,B(),De={class:`p-20px`},$e={class:`w-150px`},dn=R({__name:`batch`,props:{data:{}},setup:function(e,t){var n=t.expose,r=e,i=ma().categoryList,a=X().t,o=r.data,s=o.rows,c=o.onRefresh,l=j(function(){return i.filter(function(e){return e.value!==``})}),u=U(l.value[0].value),d=function(){return{category_id:u.value,ids:JSON.stringify(s.map(function(e){return e.id})),node_list:JSON.stringify(s.map(function(e){return{id:e.id}}))}};return n({onConfirm:function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return u.value?[4,Mi(d())]:(ei.error(a(`Please select category`)),[2]);case 1:return e.sent(),c(),[2]}})})()}}),function(e,t){var n=D,r=g,i=fn;return V(),F(`div`,De,[L(i,null,{default:Z(function(){return[L(r,{label:e.$t(`Node category`),"show-feedback":!1},{default:Z(function(){return[M(`div`,$e,[L(n,{value:Y(u),"onUpdate:value":t[0]||(t[0]=function(e){return Jr(u)?u.value=e:null}),options:Y(l)},null,8,[`value`,`options`])])]}),_:1},8,[`label`])]}),_:1})])}}}),un=k({default:function(){return ln}}),ln=dn,B(),Ee={class:`p-20px`},qe={class:`flex-1`},lt={class:`mt-12px`},yt={class:`px-20px pt-24px pb-8px`},Dt={class:`w-150px`},Fi=R({__name:`set`,props:{data:{}},setup:function(e){var t=X().t,n=e.data.setOptions,i=U(``),a=function(){return Q(function(){var e;return $(this,function(r){switch(r.label){case 0:return e=i.value.trim(),e===``?(ei.error(t(`Site.PHP.index_46`)),[2]):[4,nn({name:e})];case 1:return r.sent(),i.value=``,[4,v()];case 2:return r.sent(),n(),[2]}})})()},o=fa(),s=U(null),l=H({id:-1,name:``}),u={name:{required:!0,message:t(`Site.PHP.index_46`),trigger:[`blur`,`change`]}},d=function(e){l.id=e.id,l.name=e.name,o.title=``.concat(t(`Site.PHP.index_48`),` [`,e.name,`]`),o.show=!0},f=function(e){var t=e.hide;return Q(function(){var e;return $(this,function(r){switch(r.label){case 0:return[4,(e=s.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,nn(Xi(l))];case 2:return r.sent(),[4,v()];case 3:return r.sent(),n(),t(),[2]}})})()},p=_a([{key:`name`,title:`Name`},ia({width:120,options:function(e){return[{label:t(`Public.Btn.Edit`),show:!1,onClick:function(){d(e)}},{label:t(`Public.Btn.Delete`),onClick:function(){oa({title:``.concat(t(`Site.PHP.index_49`),` [`,e.name,`]`),content:t(`Site.PHP.index_50`),onConfirm:function(t){var r=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Ln({id:e.id})];case 1:return t.sent(),[4,v()];case 2:return t.sent(),n(e.id),r(),[2]}})})()}})}}]}})]),m=p.table,_=p.columns,v=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,lr()];case 1:return e=t.sent().message,m.data=Gr(e)?e:[],[2]}})})()};return v(),function(e,t){var n=C,d=r,p=h,v=c,y=g,b=fn,x=hn;return V(),F(`div`,Ee,[L(p,null,{default:Z(function(){return[M(`div`,qe,[L(n,{value:Y(i),"onUpdate:value":t[0]||(t[0]=function(e){return Jr(i)?i.value=e:null}),placeholder:e.$t(`Site.PHP.index_46`)},null,8,[`value`,`placeholder`])]),M(`div`,null,[L(d,{type:`primary`,onClick:a},{default:Z(function(){return[I(J(e.$t(`Site.Cert.index_62`)),1)]}),_:1})])]}),_:1}),M(`div`,lt,[L(v,{"max-height":300,data:Y(m).data,columns:Y(_)},null,8,[`data`,`columns`])]),L(x,{show:Y(o).show,"onUpdate:show":t[2]||(t[2]=function(e){return Y(o).show=e}),title:Y(o).title,width:350,footer:!0,onConfirm:f},{default:Z(function(){return[M(`div`,yt,[L(b,{ref_key:`formRef`,ref:s,model:Y(l),rules:u},{default:Z(function(){return[L(y,{label:e.$t(`Site.PHP.index_47`),path:`name`},{default:Z(function(){return[M(`div`,Dt,[L(n,{value:Y(l).name,"onUpdate:value":t[1]||(t[1]=function(e){return Y(l).name=e}),placeholder:``},null,8,[`value`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])]}),_:1},8,[`show`,`title`])])}}}),Pi=Fi,B(),Te={class:`w-160px`},Lr=R({__name:`index`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e,t){var n=t.expose,i=pa(e,`value`),a=X().t,o=la(),s=o.loading,c=o.setLoading,l=Ui(ma()).categoryList,u=fa(a(`Site.PHP.index_44`),{setOptions:function(e){f(),i.value===e&&(i.value=``)}}),d=function(){u.show=!0},f=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),c(!0),[4,lr()];case 1:return e=t.sent().message,Gr(e)&&(l.value=e.map(function(e){return{label:e.name,value:e.id}})),[3,3];case 2:return l.value.unshift({label:a(`Default category`),value:0}),l.value.unshift({label:a(`Site.PHP.index_45`),value:``}),c(!1),[7];case 3:return[2]}})})()};return n({getList:f}),function(e,t){var n=r,a=D,o=hn;return V(),F(`div`,Te,[L(a,$r(e.$attrs,{value:i.value,"onUpdate:value":t[0]||(t[0]=function(e){return i.value=e}),loading:Y(s),options:Y(l)}),{action:Z(function(){return[L(n,{block:``,onClick:d},{default:Z(function(){return[I(J(e.$t(`Site.PHP.index_43`)),1)]}),_:1})]}),_:1},16,[`value`,`loading`,`options`]),L(o,{show:Y(u).show,"onUpdate:show":t[1]||(t[1]=function(e){return Y(u).show=e}),width:350,title:Y(u).title,data:Y(u).data,component:Pi},null,8,[`show`,`title`,`data`])])}}}),Ri=Lr,B(),Vr(),Ir=R({__name:`index`,props:{row:{type:Object,required:!0},onRefresh:{type:Function,default:void 0},refreshing:{type:Boolean,default:!1}},emits:[`select`],setup:function(e,t){var n=t.emit,i=X().t,a=e,o=n,s=j(function(){return[{label:i(`Visit`),key:`visit`,show:!Yr(a.row)},{label:i(`Manage`),key:`manage`},{label:i(`Edit`),key:`edit`},{label:i(`Restart panel`),key:`restart_panel`,show:!Yr(a.row)},{label:i(`Restart service`),key:`restart_service`,show:!Yr(a.row)},{type:`divider`,key:`divider_more`},{label:i(`Service status monitoring`),key:`service_monitor`},{label:i(`Expired Date`),key:`expired`},{label:i(`Cost Settings`),key:`cost`},{type:`divider`,key:`divider`},{label:i(`Disk monitoring`),key:`disk_monitor`},{label:i(`Network monitoring`),key:`network_monitor`}]}),c=function(e,t,n){da({title:``.concat(a.row.remarks||`--`,` — `,e),width:t,minHeight:72,footer:!0,data:{row:a.row,onRefresh:a.onRefresh},component:n})},l=function(e){if(e===`alert`){c(i(`Alert Notification`),700,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return sn})},void 0)}));return}if(e===`service_monitor`){c(i(`Service status monitoring`),520,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return Ai})},void 0)}));return}if(e===`expired`){c(i(`Expired Date`),520,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return Gn})},void 0)}));return}if(e===`cost`){c(i(`Cost Settings`),520,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return kn})},void 0)}));return}if(e===`disk_monitor`){c(i(`Disk monitoring`),590,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return Vn})},void 0)}));return}if(e===`network_monitor`){c(i(`Network monitoring`),590,Pn(function(){return ue(function(){return Promise.resolve().then(function(){return ni})},void 0)}));return}o(`select`,e,a.row)};return function(t,n){var i=r,a=w,c=d,u=h;return e.row.api_key===`local`?P(``,!0):(V(),N(u,{key:0,size:8,wrap:!1,onClick:n[3]||(n[3]=Oa(function(){},[`stop`]))},{default:Z(function(){return[L(a,null,{trigger:Z(function(){return[L(i,{text:``,class:`text-desc hover:color-primary!`,disabled:e.refreshing,onClick:n[0]||(n[0]=function(t){return o(`select`,`refresh_node`,e.row)})},{default:Z(function(){return[M(`i`,{class:mi([`i-ic:round-refresh text-18px`,{"animate-spin text-primary":e.refreshing}])},null,2)]}),_:1},8,[`disabled`])]}),default:Z(function(){return[M(`span`,null,J(t.$t(`Refresh`)),1)]}),_:1}),L(c,{trigger:`hover`,placement:`bottom`,options:Y(s),onSelect:l},{default:Z(function(){return[L(i,{text:``,class:`text-desc hover:color-primary!`},{default:Z(function(){return Ra(n[4]||(n[4]=[M(`i`,{class:`i-material-symbols:settings-outline-rounded text-18px`},null,-1)]))}),_:1})]}),_:1},8,[`options`]),L(a,null,{trigger:Z(function(){return[L(i,{text:``,class:`text-desc hover:color-primary!`,onClick:n[1]||(n[1]=function(e){return l(`alert`)})},{default:Z(function(){return Ra(n[5]||(n[5]=[M(`i`,{class:`i-material-symbols:notifications-outline text-18px`},null,-1)]))}),_:1})]}),default:Z(function(){return[M(`span`,null,J(t.$t(`Alert Notification`)),1)]}),_:1}),L(i,{text:``,class:`text-desc hover:color-error!`,onClick:n[2]||(n[2]=function(t){return o(`select`,`delete`,e.row)})},{default:Z(function(){return Ra(n[6]||(n[6]=[M(`i`,{class:`i-material-symbols:delete-outline-rounded text-18px`},null,-1)]))}),_:1})]}),_:1}))}}}),ai=Ir,Qt=Ar.global,Wi=Qt.t,B(),Vr(),G=Ar.global.t,aa=function(e,t){return[{key:`category`,label:G(`Crontab.Planned.index_19`),onBatch:function(e){da({title:G(`Site.Batch.index_22`),width:350,minHeight:72,footer:!0,data:{rows:e,onRefresh:t},component:Pn(function(){return ue(function(){return Promise.resolve().then(function(){return un})},void 0)})})}},{key:`restart_panel`,type:`confirm`,label:G(`Restart panel`),confirm:{title:G(`Restart panel`),desc:G(`Are you sure you want to restart the selected node?`),columns:[e.value[1]],api:function(e){return wi({node_id:e.id},!1)},done:function(){t()}}},{key:`restart_service`,type:`confirm`,label:G(`Restart service`),confirm:{title:G(`Restart service`),desc:G(`Are you sure you want to restart the selected node?`),columns:[e.value[1]],api:function(e){return Ti({node_id:e.id},!1)},done:function(){t()}}},{key:`delete`,type:`confirm`,label:G(`Delete node`),confirm:{title:G(`Delete node`),desc:G(`Are you sure you want to delete the selected node?`),columns:[e.value[1]],api:function(e){return In({ids:String(e.id)},!1)},done:function(){t()}}}]},Yi=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=Number(e);return Number.isFinite(n)?n:t},rr=function(e){var t=Yi(e);return Number.isInteger(t)?String(t):t.toFixed(2).replace(/\.?0+$/,``)},cr=function(e){var t;return(t=e.monitor)==null?void 0:t.latest},kr=function(e){var t;return(t=e.monitor)==null?void 0:t.summary},Dn={month:`Month`,quarter:`Quarter`,year:`Year`,one:`One`},Sr=function(e){var t,n,r,i,a;if(((t=e.data)==null?void 0:t.status)!==void 0&&e.data.status!==null)return e.data.status;var o=(n=(r=(i=cr(e))==null?void 0:i.status)==null?(a=kr(e))==null?void 0:a.status:r)==null?e.status:n;return o===1?0:o===0?2:o==null?1:o},dr=function(e){var t,n,r,i,a,o,s;return Yi((t=(n=(r=(i=kr(e))==null?void 0:i.cpu_usage)==null?(a=cr(e))==null?void 0:a.cpu_usage:r)==null?(o=e.data)==null?void 0:o.cpu:n)==null?(s=e.data)==null?void 0:s.cpu_usage:t)},yr=function(e){var t,n,r,i,a;return Yi((t=(n=(r=kr(e))==null?void 0:r.mem_usage)==null?(i=cr(e))==null?void 0:i.mem_usage:n)==null?(a=e.data)==null?void 0:a.memory:t)},vr=function(e){var t,n,r,i=kr(e),a=cr(e),o=(t=i==null?void 0:i.mem_used)==null?a==null?void 0:a.mem_used:t,s=(n=i==null?void 0:i.mem_total)==null?a==null?void 0:a.mem_total:n,c=yr(e);return o!==void 0&&s!==void 0?``.concat(z(o),` / `,z(s)):(r=e.data)!=null&&r.memNewTotal?e.data.memNewTotal:``.concat(rr(c),`%`)},fr=function(e){var t,n,r;return(t=(n=e.monitor)==null?void 0:n.selected_disk)==null?(r=e.monitor)==null||(r=r.disks)==null?void 0:r[0]:t},mr=function(e){var t;return Yi((t=fr(e))==null?void 0:t.usage)},pr=function(e){var t=fr(e);if(!t)return`--`;var n=rr(t.usage);return t.used!==void 0&&t.total!==void 0?``.concat(z(t.used),` / `,z(t.total)):``.concat(n,`%`)},br=function(e){var t,n,r;return(t=(n=e.monitor)==null?void 0:n.selected_nic)==null?(r=e.monitor)==null||(r=r.nics)==null?void 0:r[0]:t},Cr=function(e){var t=br(e),n=Yi(t==null?void 0:t.up_kbs),r=Yi(t==null?void 0:t.down_kbs);return{upSpeed:``.concat(z(n*1024),`/s`),downSpeed:``.concat(z(r*1024),`/s`),upTotal:z(Yi(t==null?void 0:t.up_total)),downTotal:z(Yi(t==null?void 0:t.down_total))}},xr=function(e){var t,n;return(t=(n=e.monitor)==null?void 0:n.services)==null?[]:t},ur=function(e){var t,n=(t=e.monitor)==null?void 0:t.cost;if(!n||n.amount===void 0||n.amount===null||Yi(n.amount)===0)return``;var r=n.symbol||n.currency||``,i=n.period?`/`.concat(Dn[n.period]||n.period):``;return``.concat(r,n.amount,i)},hr=function(e){var t,n=(t=e.monitor)==null||(t=t.expire)==null?void 0:t.expire_at;return n?ir(n,`yyyy-MM-dd`):``},B(),we=[`title`],Ke=[`title`],ct={key:0,class:`text-primary font-bold`},vt={class:`text-desc`},Et={class:`metrics-content flex items-center justify-center`},Pt={class:`text-desc whitespace-nowrap font-500`},Rt={class:`text-desc whitespace-nowrap font-500`},Ht={class:`text-desc whitespace-nowrap font-500`},Gt={class:`mt-10px`},Me={class:`text-desc`},Fe={class:`font-600`},Le={class:`text-desc`},ze={class:`font-600`},Be={class:`text-desc`},Ve={class:`font-600`},He={class:`text-desc`},Ue={class:`font-600`},We={class:`flex w-full items-center min-h-18px`},Ge={key:1,class:`text-desc px-5px`},st={class:`font-bold`},Fr=R({__name:`index`,props:{list:{type:Array,default:function(){return[]}},loading:{type:Boolean,default:!1},refreshingNodeIds:{type:Array,default:function(){return[]}}},emits:[`action`],setup:function(e,t){var r=t.emit,i=e,s=r,c=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,n=[],r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},l=function(e){var t=[];return c(xr(e)).forEach(function(e,n){t.push({type:`services`,key:`services-`.concat(n),services:e})}),hr(e)&&t.push({type:`expire`,key:`expire`}),t},d=Ga(function(e,t){s(`action`,e,t)}).handleAction,f=function(e,t){if(e===`refresh_node`){s(`action`,{option:`refresh_node`},t);return}d(e,t)},m=function(){s(`action`,{option:`refresh`})},g=function(e){return i.refreshingNodeIds.includes(e)};return function(t,r){var i=h,s=oe,c=T,d=v,b=y,x=p,S=u,C=n,w=o,E=a,ee=ne;return V(),N(ee,{show:e.loading},{default:Z(function(){return[e.list.length?(V(),N(b,{key:0,cols:`1 s:1 m:2 l:3 xl:4 2xl:5`,responsive:`screen`,"x-gap":20,"y-gap":20},{default:Z(function(){return[(V(!0),F(_,null,Si(e.list,function(e){return V(),N(d,{key:e.id,class:`select-none`},{default:Z(function(){return[L(E,{class:`monitor-card p-16px`},{default:Z(function(){return[L(i,{class:`justify-between! items-center flex-nowrap!`},{default:Z(function(){return[L(i,{vertical:``,class:`min-w-0 flex-1`},{default:Z(function(){return[M(`span`,{class:`text-16px font-bold truncate`,title:e.remarks},J(e.remarks),9,we),M(`span`,{class:`text-desc truncate`,title:e.address},J(e.address),9,Ke)]}),_:2},1024),L(i,{class:`items-center`},{default:Z(function(){return[Y(ur)(e)?(V(),F(`span`,ct,J(Y(ur)(e)),1)):P(``,!0),L(s,{type:Y(Sr)(e)===0?`success`:`error`,size:`small`,round:``,bordered:!1},{default:Z(function(){return[M(`span`,{class:mi([`probe-status-dot`,{offline:Y(Sr)(e)!==0}])},null,2),I(` `+J(Y(Dr)(Y(Sr)(e))),1)]}),_:2},1032,[`type`])]}),_:2},1024)]}),_:2},1024),L(i,{class:`justify-between! items-center my-10px`},{default:Z(function(){return[M(`span`,null,J(t.$t(`Category`)),1),M(`span`,vt,J(Y(sr)(e.category_id)),1)]}),_:2},1024),M(`div`,Et,[Y(Sr)(e)===0?(V(),N(i,{key:0,vertical:``,class:`flex-1`},{default:Z(function(){return[L(i,{class:`justify-between! items-center flex-nowrap!`},{default:Z(function(){return[r[1]||(r[1]=M(`span`,{class:`w-30px flex-shrink-0 font-bold text-[var(--color-text-4)]`},`CPU`,-1)),L(c,{type:`line`,status:`success`,percentage:Y(dr)(e),"show-indicator":!1,height:6},null,8,[`percentage`]),M(`span`,Pt,J(Y(dr)(e))+`%`,1)]}),_:2},1024),L(i,{class:`justify-between! items-center flex-nowrap!`},{default:Z(function(){return[r[2]||(r[2]=M(`span`,{class:`w-30px flex-shrink-0 font-bold text-[var(--color-text-4)]`},`Mem`,-1)),L(c,{type:`line`,status:`success`,percentage:Y(yr)(e),"show-indicator":!1,height:6},null,8,[`percentage`]),M(`span`,Rt,J(Y(vr)(e)),1)]}),_:2},1024),L(i,{class:`justify-between! items-center flex-nowrap!`},{default:Z(function(){return[r[3]||(r[3]=M(`span`,{class:`w-30px flex-shrink-0 font-bold text-[var(--color-text-4)]`},`Disk`,-1)),L(c,{type:`line`,status:`success`,percentage:Y(mr)(e),"show-indicator":!1,height:6},null,8,[`percentage`]),M(`span`,Ht,J(Y(pr)(e)),1)]}),_:2},1024),M(`div`,Gt,[L(b,{cols:`2`,"x-gap":8,"y-gap":8},{default:Z(function(){return[L(d,{class:`network-box`},{default:Z(function(){return[L(i,{size:5,wrap:!1},{default:Z(function(){return[r[4]||(r[4]=M(`i`,{class:`i-material-symbols:arrow-upward-rounded text-desc text-18px`},null,-1)),M(`span`,Me,J(t.$t(`Public.Btn.Upload`)),1),M(`span`,Fe,J(Y(Cr)(e).upSpeed),1)]}),_:2},1024)]}),_:2},1024),L(d,{class:`network-box`},{default:Z(function(){return[L(i,{size:5,wrap:!1},{default:Z(function(){return[r[5]||(r[5]=M(`i`,{class:`i-material-symbols:arrow-downward-rounded text-desc text-18px`},null,-1)),M(`span`,Le,J(t.$t(`Public.Btn.Download`)),1),M(`span`,ze,J(Y(Cr)(e).downSpeed),1)]}),_:2},1024)]}),_:2},1024),L(d,{class:`network-box`},{default:Z(function(){return[L(i,{size:5,wrap:!1},{default:Z(function(){return[r[6]||(r[6]=M(`i`,{class:`i-material-symbols:arrow-upward-rounded text-desc text-18px`},null,-1)),M(`span`,Be,J(t.$t(`Traffic`)),1),M(`span`,Ve,J(Y(Cr)(e).upTotal),1)]}),_:2},1024)]}),_:2},1024),L(d,{class:`network-box`},{default:Z(function(){return[L(i,{size:5,wrap:!1},{default:Z(function(){return[r[7]||(r[7]=M(`i`,{class:`i-material-symbols:arrow-downward-rounded text-desc text-18px`},null,-1)),M(`span`,He,J(t.$t(`Traffic`)),1),M(`span`,Ue,J(Y(Cr)(e).downTotal),1)]}),_:2},1024)]}),_:2},1024)]}),_:2},1024)])]}),_:2},1024)):(V(),N(x,{key:1,class:`metrics-empty`,description:t.$t(`Node is offline, no metrics`)},null,8,[`description`]))]),L(S,{class:`my-10px!`}),M(`div`,We,[l(e).length?(V(),N(w,{key:0,autoplay:``,"show-dots":!1,draggable:``},{default:Z(function(){return[(V(!0),F(_,null,Si(l(e),function(n){return V(),F(`div`,{key:n.key,class:`probe-info-content`},[n.type===`services`?(V(!0),F(_,{key:0},Si(n.services,function(e){return V(),N(i,{class:`items-center px-5px`,size:3,wrap:!1,key:e.target_key||e.name},{default:Z(function(){return[L(C,{type:e.running?`success`:`error`,dot:``},null,8,[`type`]),M(`span`,null,J(e.target_name||e.name),1)]}),_:2},1024)}),128)):n.type===`expire`?(V(),F(`div`,Ge,[I(J(t.$t(`Expire`))+`: `,1),M(`span`,st,J(Y(hr)(e)),1)])):P(``,!0)])}),128))]}),_:2},1024)):P(``,!0),M(`div`,{class:`ml-auto flex flex-shrink-0 justify-end`,onClick:r[0]||(r[0]=Oa(function(){},[`stop`]))},[L(ai,{row:e,"on-refresh":m,refreshing:g(e.id),onSelect:f},null,8,[`row`,`refreshing`])])])]}),_:2},1024)]}),_:2},1024)}),128))]}),_:1})):(V(),N(x,{key:1,class:`h-200px flex items-center justify-center`}))]}),_:1},8,[`show`])}}}),bi=A(Fr,[[`__scopeId`,`data-v-46d44f2a`]]),B(),pe={class:`p-20px`},Vi=R({__name:`ssh-form`,props:{row:{type:Object,default:function(){return{}}},onRefresh:{type:Function,default:function(){}}},setup:function(e,t){var n=t.expose,i=X().t,a=e,o=ma(),s=U(null),c=H({port:22,ssh_type:`password`,password:``,private_key:``,passphrase:``}),l={port:{required:!0,message:i(`Enter port`),trigger:`blur`,type:`number`},password:{required:!0,message:i(`Enter password`),trigger:`blur`},private_key:{required:!0,message:i(`Enter key`),trigger:`blur`}},u=la(),d=u.loading,f=u.setLoading,p=function(e){var t,n=((t=a.row.ssh_conf)==null?void 0:t.host)||a.row.server_ip;return{node_id:a.row.id,host:n,port:c.port,test_case:e,pkey:c.ssh_type===`key`?c.private_key:null,pkey_passwd:c.ssh_type===`key`?c.passphrase:null,password:c.ssh_type===`password`?c.password:null}},m=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,3,4]),f(!0),[4,(e=s.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,Ji(p(1))];case 2:return t.sent(),[3,4];case 3:return f(!1),[7];case 4:return[2]}})})()};return n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=s.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,Ji(p(0))];case 2:return t.sent(),o.nodeRow&&(o.nodeRow.ssh_conf||(o.nodeRow.ssh_conf={}),o.nodeRow.ssh_conf.port=c.port,c.ssh_type===`password`?(o.nodeRow.ssh_conf.password=c.password,o.nodeRow.ssh_conf.pkey=``,o.nodeRow.ssh_conf.pkey_passwd=``):(o.nodeRow.ssh_conf.password=``,o.nodeRow.ssh_conf.pkey=c.private_key,o.nodeRow.ssh_conf.pkey_passwd=c.passphrase)),a.onRefresh(),[2]}})})()}}),function(){a.row.ssh_conf&&(c.port=a.row.ssh_conf.port||22,c.ssh_type=a.row.ssh_conf.pkey?`key`:`password`,c.password=a.row.ssh_conf.password||``,c.private_key=a.row.ssh_conf.pkey||a.row.ssh_conf.private_key||``,c.passphrase=a.row.ssh_conf.pkey_passwd||a.row.ssh_conf.private_key_password||``)}(),function(e,t){var n=S,i=g,a=te,o=h,u=ee,f=C,p=r,v=fn;return V(),F(`div`,pe,[L(v,{ref_key:`formRef`,ref:s,model:Y(c),rules:l},{default:Z(function(){return[L(i,{label:e.$t(`Port`),path:`port`},{default:Z(function(){return[L(n,{class:`w-120px!`,value:Y(c).port,"onUpdate:value":t[0]||(t[0]=function(e){return Y(c).port=e}),"show-button":!1,placeholder:`22`},null,8,[`value`])]}),_:1},8,[`label`]),L(i,{label:e.$t(`Authentication`),path:`ssh_type`},{default:Z(function(){return[L(u,{value:Y(c).ssh_type,"onUpdate:value":t[1]||(t[1]=function(e){return Y(c).ssh_type=e})},{default:Z(function(){return[L(o,null,{default:Z(function(){return[L(a,{value:`password`},{default:Z(function(){return[I(J(e.$t(`Site.Label.index_27`)),1)]}),_:1}),L(a,{value:`key`},{default:Z(function(){return Ra(t[5]||(t[5]=[I(`Key`,-1)]))}),_:1})]}),_:1})]}),_:1},8,[`value`])]}),_:1},8,[`label`]),Y(c).ssh_type===`password`?(V(),N(i,{key:0,label:e.$t(`Site.Label.index_27`),path:`password`},{default:Z(function(){return[L(o,{class:`items-center`},{default:Z(function(){return[L(f,{class:`w-250px!`,value:Y(c).password,"onUpdate:value":t[2]||(t[2]=function(e){return Y(c).password=e}),type:`password`,"show-password-on":`click`,placeholder:e.$t(`Enter SSH password`)},null,8,[`value`,`placeholder`]),L(p,{onClick:m,loading:Y(d)},{default:Z(function(){return[I(J(e.$t(`Test connection`)),1)]}),_:1},8,[`loading`])]}),_:1})]}),_:1},8,[`label`])):P(``,!0),Y(c).ssh_type===`key`?(V(),F(_,{key:1},[L(i,{label:`Key`,path:`private_key`},{default:Z(function(){return[L(o,{class:`items-end`},{default:Z(function(){return[L(f,{class:`w-250px!`,value:Y(c).private_key,"onUpdate:value":t[3]||(t[3]=function(e){return Y(c).private_key=e}),type:`textarea`,placeholder:e.$t(`Enter SSH key`)},null,8,[`value`,`placeholder`]),L(p,{onClick:m,loading:Y(d)},{default:Z(function(){return[I(J(e.$t(`Test connection`)),1)]}),_:1},8,[`loading`])]}),_:1})]}),_:1}),L(i,{label:e.$t(`Key password`),path:`passphrase`},{default:Z(function(){return[L(f,{class:`w-250px!`,value:Y(c).passphrase,"onUpdate:value":t[4]||(t[4]=function(e){return Y(c).passphrase=e}),type:`password`,"show-password-on":`click`,placeholder:e.$t(`Enter SSH key password`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`])],64)):P(``,!0)]}),_:1},8,[`model`])])}}}),Bi=Vi,B(),Pr=R({__name:`index`,setup:function(e){var t,n=X().t,i=Ui(ma()).nodeRow,a=Hr(`onRefresh`),o=U(!1),s=U(null),c=U(!!(!((t=i.value)==null||(t=t.ssh_conf)==null)&&t.host)),l=fa(n(`Edit connection`),{row:i.value,ssh_type:s.value,onRefresh:function(){c.value=!0,o.value=!1}}),u=j(function(){return[{label:n(`file.terminal`),key:`terminal`,show:c.value,onClick:function(){o.value=!0}},{label:n(`Edit`),key:`edit`,onClick:function(){l.show=!0}},{label:n(`Delete`),key:`delete`,show:c.value,onClick:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,Rn({node_id:(e=i.value)==null?void 0:e.id})];case 1:return t.sent(),c.value=!1,a==null||a(),[2]}})})()}}]}),d=j(function(){var e,t,n,r,a,o;return{id:`nodeTerminal`,host:((e=i.value)==null||(e=e.ssh_conf)==null?void 0:e.host)||((t=i.value)==null?void 0:t.server_ip),port:((n=i.value)==null||(n=n.ssh_conf)==null?void 0:n.port)||22,username:`root`,password:(r=i.value)==null||(r=r.ssh_conf)==null?void 0:r.password,pkey:(a=i.value)==null||(a=a.ssh_conf)==null?void 0:a.pkey,pkey_passwd:(o=i.value)==null||(o=o.ssh_conf)==null?void 0:o.pkey_passwd}});return function(e,t){var n=oe,i=r,a=h,s=mn,f=Cn,p=hn,m=ne;return V(),N(m,{show:!1},{default:Z(function(){return[L(a,{class:`justify-between!`},{default:Z(function(){return[L(a,{class:`items-center`},{default:Z(function(){return[M(`span`,null,J(e.$t(`Root password`)),1),L(n,{round:``,type:Y(c)?`success`:`error`},{default:Z(function(){return[I(J(Y(c)?e.$t(`Set`):e.$t(`Not set`)),1)]}),_:1},8,[`type`]),Y(c)?P(``,!0):(V(),N(i,{key:0,onClick:t[0]||(t[0]=function(e){return Y(l).show=!0})},{default:Z(function(){return[I(J(e.$t(`Set`)),1)]}),_:1}))]}),_:1}),L(s,{options:Y(u)},null,8,[`options`])]}),_:1}),L(f,{class:`my-16px`},{default:Z(function(){return[M(`li`,null,J(e.$t(`Save root password for terminal or node function calls`)),1)]}),_:1}),Y(o)?(V(),N(Hi,{key:0,class:`h-480px`,url:`/webssh`,data:Y(d)},null,8,[`data`])):P(``,!0),L(p,{show:Y(l).show,"onUpdate:show":t[1]||(t[1]=function(e){return Y(l).show=e}),title:Y(l).title,data:Y(l).data,width:550,"min-height":200,footer:!0,component:Bi},null,8,[`show`,`title`,`data`])]}),_:1})}}}),zi=Pr,B(),fe={class:`h-600px!`},Nr=R({__name:`index`,props:{row:{},menuType:{default:`ssh`},onRefresh:{}},setup:function(e){var t=e,n=Zi(t).menuType,r=ma();r.nodeRow=t.row,xi(`onRefresh`,function(){var e;return(e=t.onRefresh)==null?void 0:e.call(t)});var i=U(n.value),a=[{key:`ssh`,label:`SSH`,component:zi}];return function(e,t){var n=Sn;return V(),F(`div`,fe,[L(n,{value:Y(i),"onUpdate:value":t[0]||(t[0]=function(e){return Jr(i)?i.value=e:null}),data:a},null,8,[`value`])])}}}),ci=Nr,B(),Vr(),Mr=R({__name:`index`,setup:function(e){var t=Pn(function(){return ue(function(){return Promise.resolve().then(function(){return si})},void 0)}),i=X().t,o=fa(i(`Add node`),{onRefresh:function(){O()}}),s=fa(i(`Node management`),{onRefresh:function(){O()}}),c=function(e,t){s.data.row=e,s.title=i(`Node management`)+` [`.concat(e.address,`]`),s.data.menuType=t,s.show=!0},l=function(){o.title=i(`Add node`),o.data.row=null,o.show=!0},u=function(e,t){var n=e.option,r=e.optionType;n===`option`?r===`edit`?(o.title=i(`Edit node`),o.data.row=t,o.show=!0):r===`other`&&c(t):n===`refresh`?O():n===`refresh_node`&&t&&O(!1,t.id)},d=U(),f=ma(),p=U(!1),m=U([]),g=H({p:1,limit:20,search:``,category_id:``,node_type:f.nodeType});wa(function(){return g.node_type},function(e){f.nodeType=e});var _=function(e){return Number.isInteger(e)?``.concat(e,`%`):``.concat(e.toFixed(2).replace(/\.?0+$/,``),`%`)},v=function(e){return Sr(e)===0},y=_a([{type:`selection`,width:40},{title:i(`Node name`),key:`remarks`,render:function(e){return L(h,{class:`items-center flex-nowrap!`,size:4},{default:function(){return[L(n,{type:Sr(e)===0?`success`:`error`,dot:!0},null),L(`span`,null,[e.remarks])]}})}},{title:i(`Address`),key:`address`,width:`15%`,ellipsis:{tooltip:!0}},{title:`CPU`,key:`cpu`,width:`10%`,render:function(e){var t=v(e),n=t?dr(e):0;return L(`div`,{class:`grid w-full grid-cols-[minmax(0,1fr)_44px] items-center gap-8px`},[L(T,{type:`line`,status:`success`,percentage:n,height:6,showIndicator:!1},null),L(`span`,{class:`overflow-hidden text-left text-ellipsis whitespace-nowrap`},[t?``.concat(n,`%`):`--`])])}},{title:`Mem`,key:`memory`,width:`10%`,render:function(e){var t=v(e),n=t?yr(e):0;return L(`div`,{class:`grid w-full grid-cols-[minmax(0,1fr)_44px] items-center gap-8px`},[L(T,{type:`line`,status:`success`,percentage:n,height:6,showIndicator:!1},null),L(`span`,{class:`overflow-hidden text-left text-ellipsis whitespace-nowrap`},[t?_(n):`--`])])}},{title:`Disk`,key:`disk`,width:`10%`,render:function(e){var t=v(e),n=t?mr(e):0;return L(`div`,{class:`grid w-full grid-cols-[minmax(0,1fr)_44px] items-center gap-8px`},[L(T,{type:`line`,status:`success`,percentage:n,height:6,showIndicator:!1},null),L(`span`,{class:`overflow-hidden text-left text-ellipsis whitespace-nowrap`},[t?_(n):`--`])])}},{title:i(`Traffic`),key:`traffic`,width:`10%`,render:function(e){var t=v(e),n=t?Cr(e):null;return L(`div`,{class:`grid grid-cols-2 items-center gap-16px`},[L(`div`,{class:`flex min-w-0 items-center`},[L(`i`,{class:`i-material-symbols:arrow-upward-rounded text-desc text-18px flex-shrink-0`},null),L(`span`,{class:`whitespace-nowrap`},[t?n==null?void 0:n.upSpeed:`--`])]),L(`div`,{class:`flex min-w-0 items-center`},[L(`i`,{class:`i-material-symbols:arrow-downward-rounded text-desc text-18px flex-shrink-0`},null),L(`span`,{class:`whitespace-nowrap`},[t?n==null?void 0:n.downSpeed:`--`])])])}},{title:i(`Category`),key:`category_id`,width:`10%`,render:function(e){return L(`span`,null,[sr(e.category_id)])}},Ka(u,m)]),b=y.keys,x=y.table,S=y.columns,C=aa(S,function(){O()}),te=function(){g.p=1,O()},D=function(){return{p:g.p,limit:g.limit,search:g.search,category_id:g.category_id===``?null:g.category_id}},O=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return Q(function(){var r,i;return $(this,function(a){switch(a.label){case 0:r=n||t!==void 0,a.label=1;case 1:return a.trys.push([1,,3,4]),x.loading=e,p.value=r&&t===void 0,m.value=t===void 0?r?x.data.map(function(e){return e.id}):[]:[t],[4,gr(Fa({},D(),r?{refresh:1}:{},t===void 0?{}:{refresh_node_ids:String(t)}))];case 2:return i=a.sent().message,qr(i)&&(x.data=i.data,x.total=wr(i.page)),[3,4];case 3:return x.loading=!1,p.value=!1,m.value=[],[7];case 4:return[2]}})})()},ne=function(){return O(!1,void 0,!0)};gi(function(){return Q(function(){var e;return $(this,function(t){return(e=d.value)==null||e.getList(),O(),[2]})})()});var re=ua(function(){return O(!1)},10).loop;return re(),function(e,n){var c=r,f=w,_=E,v=ee,y=gn,T=xn,D=yn,re=_n,ie=bn,ae=vn,oe=hn,se=a;return V(),N(se,{class:`p-16px`},{default:Z(function(){return[L(ae,null,Mn({toolsLeft:Z(function(){return[L(c,{type:`primary`,onClick:l},{default:Z(function(){return[I(J(Y(i)(`Add node`)),1)]}),_:1})]}),toolsRight:Z(function(){return[L(f,null,{trigger:Z(function(){return[L(c,{loading:Y(p),onClick:ne},{icon:Z(function(){return Ra(n[12]||(n[12]=[M(`i`,{class:`i-material-symbols:refresh-rounded`},null,-1)]))}),_:1},8,[`loading`])]}),default:Z(function(){return[M(`span`,null,J(Y(i)(`Refresh`)),1)]}),_:1}),L(v,{value:Y(g).node_type,"onUpdate:value":n[0]||(n[0]=function(e){return Y(g).node_type=e})},{default:Z(function(){return[L(_,{value:`2`},{default:Z(function(){return[L(Y(h),{class:`items-center`,size:3},{default:Z(function(){return[n[13]||(n[13]=M(`i`,{class:`i-material-symbols:grid-view-outline-rounded text-16px`},null,-1)),M(`span`,null,J(Y(i)(`Grid`)),1)]}),_:1})]}),_:1}),L(_,{value:`1`},{default:Z(function(){return[L(Y(h),{class:`items-center`,size:3},{default:Z(function(){return[n[14]||(n[14]=M(`i`,{class:`i-material-symbols:format-list-bulleted-rounded text-16px`},null,-1)),M(`span`,null,J(Y(i)(`List`)),1)]}),_:1})]}),_:1})]}),_:1},8,[`value`]),L(Ri,{ref_key:`siteCategoryRef`,ref:d,value:Y(g).category_id,"onUpdate:value":[n[1]||(n[1]=function(e){return Y(g).category_id=e}),n[2]||(n[2]=function(e){return O(!0)})]},null,8,[`value`]),L(y,{value:Y(g).search,"onUpdate:value":n[3]||(n[3]=function(e){return Y(g).search=e}),placeholder:`Enter node name`,onSearch:te},null,8,[`value`]),L(T,{"store-key":`node-manage-columns`,value:Y(S),"onUpdate:value":n[4]||(n[4]=function(e){return Jr(S)?S.value=e:null}),"disabled-keys":[`remarks`],"hide-keys":[`address`]},null,8,[`value`])]}),table:Z(function(){return[Y(g).node_type===`1`?(V(),N(D,{key:0,class:`node-list-table`,"checked-row-keys":Y(b),"onUpdate:checkedRowKeys":n[5]||(n[5]=function(e){return Jr(b)?b.value=e:null}),"row-key":`id`,loading:Y(x).loading,data:Y(x).data,columns:Y(S),bordered:!1},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])):Y(g).node_type===`2`?(V(),N(bi,{key:1,list:Y(x).data,loading:Y(x).loading,"refreshing-node-ids":Y(m),onAction:u},null,8,[`list`,`loading`,`refreshing-node-ids`])):P(``,!0)]}),pageRight:Z(function(){return[L(ie,{page:Y(g).p,"onUpdate:page":n[7]||(n[7]=function(e){return Y(g).p=e}),"page-size":Y(g).limit,"onUpdate:pageSize":n[8]||(n[8]=function(e){return Y(g).limit=e}),"item-count":Y(x).total,"store-key":`node-manage`,onRefresh:n[9]||(n[9]=function(e){return O(!0)})},null,8,[`page`,`page-size`,`item-count`])]}),_:2},[Y(g).node_type===`1`?{name:`pageLeft`,fn:Z(function(){return[L(re,{"checked-row-keys":Y(b),"onUpdate:checkedRowKeys":n[6]||(n[6]=function(e){return Jr(b)?b.value=e:null}),data:Y(x).data,options:Y(C)},null,8,[`checked-row-keys`,`data`,`options`])]}),key:`0`}:void 0]),1024),L(oe,{show:Y(o).show,"onUpdate:show":n[10]||(n[10]=function(e){return Y(o).show=e}),title:Y(o).title,data:Y(o).data,width:600,"min-height":380,footer:!0,component:Y(t)},null,8,[`show`,`title`,`data`,`component`]),L(oe,{show:Y(s).show,"onUpdate:show":n[11]||(n[11]=function(e){return Y(s).show=e}),title:Y(s).title,data:Y(s).data,width:900,component:ci},null,8,[`show`,`title`,`data`])]}),_:1})}}}),e(`t`,k({default:function(){return Qr}})),Qr=A(Mr,[[`__scopeId`,`data-v-1cccc110`]])}}})})(); |