Files
yakpanel-core/YakPanel/static/vite/js/index-C-H96YRC.js
2026-04-07 02:04:22 +05:30

3 lines
19 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/file-upload-CbaM_-6s.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/useTableColumns-DDeyYvje.js?v=1773287522785","js/index-S15tYq5l.js?v=1773287522785","js/copy-D-wIKr0q.js?v=1773287522785","js/index-DIKmrNCq.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785","js/index-Cg6fMjw6.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785","js/data-BVsViUMm.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785","js/useTableData-BmkIKQ_R.js?v=1773287522785","js/FileIcon-eIHDRaxH.js?v=1773287522785","js/soft-Cjyfamvm.js?v=1773287522785","css/FileIcon-B9hXZxj1.css?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785","js/useSocket-DTHwGZgK.js?v=1773287522785","js/file-CN4ZrtIc.js?v=1773287522785","css/file-upload-Bm7VFiY7.css?v=1773287522785"])))=>i.map(i=>d[i]);
import{_ as Ie}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import{_ as Te}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{_ as Le}from"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import{u as Oe}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as We}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{as as A,a3 as ae,n as je,C as te,p as oe,m as le,h as we,P as Be,i as Me,ap as Ve,l as M,c as Ce}from"./index-BTglIPU2.js?v=1773287522785";import{R as fe,F as Ae}from"./FileIcon-eIHDRaxH.js?v=1773287522785";import{a4 as De,r as R,k as D,R as G,e as re,$ as C,Z as V,a0 as t,a9 as h,_ as w,S as a,x as Ee,n as se,o as ie,K as $e,a8 as W,aa as k,ak as ee,L as _e,F as Pe,P as Re,j as E,ab as me,u as Ue,a3 as qe,a6 as ne,c as I,w as Ke,X as ce,al as he,l as ge,v as ve,ai as Je}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{_ as He}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{a1 as Xe,b as Se,a2 as Ne,k as K,ab as Ze,n as ue,a3 as Ge,a4 as ye,at as Qe,B as de,au as Ye,ai as et,a6 as tt}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{u as ze}from"./useSocket-DTHwGZgK.js?v=1773287522785";import{i as st}from"./file-CN4ZrtIc.js?v=1773287522785";const{t:Q}=ae.global,nt=s=>A.post("/mod/node/node/get_all_node",s);async function at(s,n){try{const{message:e}=await A.post("/mod/node/file_transfer/file_list",s);n&&n(e);let o=fe({type:"dir",list:e.dir,path:e.path}),i=fe({type:"file",list:e.files,path:e.path});return o=o.map((g,l)=>({...g,protected:e.tamper_data.dirs&&e.tamper_data.dirs[l]?Number(e.tamper_data.dirs[l].split(";")[0]):0,protected_rule:e.tamper_data.dirs&&e.tamper_data.dirs[l]?Number(e.tamper_data.dirs[l].split(";")[1]):0})),i=i.map((g,l)=>({...g,protected:e.tamper_data.files&&e.tamper_data.files[l]?Number(e.tamper_data.files[l].split(";")[0]):0,protected_rule:e.tamper_data.files&&e.tamper_data.files[l]?Number(e.tamper_data.files[l].split(";")[1]):0})),[...o,...i]}catch(e){return console.warn(e),[]}}const Qt=s=>A.post("/mod/node/file_transfer/upload_check",s,{requestOptions:{loading:Q("Component.Pay.index_12"),successMessage:!1}}),Yt=(s,n)=>A.post("/mod/node/file_transfer/file_upload",s,{headers:{"Content-Type":"multipart/form-data"},requestOptions:{isOriginalResult:!0},onUploadProgress:e=>{n==null||n(e)}}),ot=s=>A.post("/mod/node/file_transfer/create_dir",s,{requestOptions:{loading:Q("Component.Pay.index_12"),successMessage:!0}}),lt=s=>A.post("/mod/node/file_transfer/create_filetransfer_task",s,{requestOptions:{loading:Q("Component.Pay.index_12"),successMessage:!0}}),rt=s=>A.post("/mod/node/file_transfer/delete_file",s,{requestOptions:{loading:Q("Component.Pay.index_12"),successMessage:!0}});async function it(s){return A.post("/mod/node/file_transfer/dir_size",s)}const J=De("file-transfer",()=>{const s=R("/www/server"),n=R("/www/server"),e=R(null),o=R(null),i=R([]),g=async()=>{const{message:c}=await nt({node_type:"api"});je(c)&&(i.value=c.map(u=>({label:u.remarks,value:u.id})),i.value.some(u=>u.value===e.value)||(e.value=i.value.length?i.value[0].value:null),i.value.some(u=>u.value===o.value)||(i.value.length>1?o.value=i.value[1].value:o.value=null))},l=R(!1),b=R(!1);return{leftPath:s,rightPath:n,leftNodeId:e,rightNodeId:o,nodesList:i,leftRefreshTrigger:l,rightRefreshTrigger:b,getNode:g,refreshLeft:()=>{l.value=!l.value},refreshRight:()=>{b.value=!b.value}}},{persist:!0}),{t:q}=ae.global,ct=[{title:q("File name"),key:"nm"}],ut=s=>({pending:q("Pending"),running:q("Transferring"),complete:q("Completed"),error:q("Failed")})[s]||s,dt=s=>s==="complete"?"text-primary":s==="error"?"text-error":s==="running"?"text-warning":"text-desc",pt={class:"p-20px"},ft={class:"w-280px"},_t=D({__name:"file-create",props:{data:{}},setup(s,{expose:n}){const{t:e}=G(),o=s,{path:i,node_id:g,getList:l}=o.data,b=R(null),f=re({name:""}),v={name:{required:!0,message:e("Security.Conf.Index_28"),trigger:["blur","input"]}};return n({onConfirm:async({hide:x})=>{var u;await((u=b.value)==null?void 0:u.validate());const r={path:i+"/"+f.name,node_id:g};await ot(r),l==null||l(),x()}}),(x,r)=>{const u=Se,d=Xe,P=He;return C(),V("div",pt,[t(P,{ref_key:"formRef",ref:b,model:a(f),rules:v},{default:h(()=>[t(d,{label:x.$t("Site.TableRow.index_2"),path:"name"},{default:h(()=>[w("div",ft,[t(u,{type:"text",value:a(f).name,"onUpdate:value":r[0]||(r[0]=y=>a(f).name=y),placeholder:x.$t("Enter folder name")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}}),mt={class:"font-bold"},ht={class:"h-200px overflow-y-auto"},gt={key:0,class:"text-desc"},vt=D({__name:"transfer-progress",props:{getList:{type:Function}},setup(s){const n=re({progress:0,count_size:0,complete_size:0,file_count:0,file_complete:0,msg:"",status:"pending"}),e=Ee([]),o=R([]),i=(f,v)=>{f&&(o.value[v]=f.$el||f)},g=f=>f.split("/").pop()||f,{send:l,close:b}=ze("/ws_modsoc",{immediate:!0,onMessage:(f,v)=>{var x;const c=JSON.parse(v.data);if(c.task){const r=c.task;n.progress=parseFloat(((x=r.progress)==null?void 0:x.toFixed(2))||0),n.count_size=r.count_size||0,n.complete_size=r.complete_size||0,n.file_count=r.file_count||0,n.file_complete=r.file_complete||0,n.status=r.status,c.msg&&(n.msg=c.msg),(c.file_list&&Array.isArray(c.file_list)||c.file_status_list&&Array.isArray(c.file_status_list))&&(o.value=[],e.value=(c.file_list||[]).concat(c.file_status_list||[]),se(()=>{const u=e.value.findIndex(d=>d.status==="running"||d.progress>0&&d.progress<100||d.status==="pending");u!==-1&&o.value[u]&&o.value[u].scrollIntoView({behavior:"smooth",block:"nearest"})}))}c.type==="end"&&(n.msg=c.msg,s.getList())}});return ie(()=>{l({mod_name:"node",sub_mod_name:"file_transfer",def_name:"transfer_status",callback:"xxxxxxo",data:{}})}),$e(()=>{b()}),(f,v)=>{const c=Ze,x=K,r=Ne,u=ue;return C(),W(x,{class:"p-16px flex-col!"},{default:h(()=>[t(r,{class:"p-16px"},{default:h(()=>[a(n).progress?(C(),W(x,{key:0,class:"flex-col!"},{default:h(()=>[w("span",mt,k(f.$t("Overall Progress")),1),t(c,{type:"line",status:"success",percentage:a(n).progress,height:12,"border-radius":6,processing:a(n).progress<100,"indicator-placement":"inside"},null,8,["percentage","processing"]),t(x,{justify:"space-between"},{default:h(()=>[w("span",null,k(f.$t("Completed"))+": "+k(a(te)(a(n).complete_size))+" / "+k(a(te)(a(n).count_size)),1),w("span",null,k(f.$t("Files"))+": "+k(a(n).file_complete)+" / "+k(a(n).file_count),1)]),_:1})]),_:1})):ee("",!0),a(n).msg?(C(),V("div",{key:1,class:_e({"mt-10px":a(n).progress})},k(a(n).msg),3)):ee("",!0)]),_:1}),t(r,{class:"p-16px"},{default:h(()=>[w("div",ht,[(C(!0),V(Pe,null,Re(a(e),(d,P)=>(C(),W(x,{key:P,ref_for:!0,ref:y=>i(y,P),class:"pb-8px flex-col!"},{default:h(()=>[t(x,{justify:"space-between",class:"mb-1 text-13px"},{default:h(()=>[t(u,{style:{"max-width":"300px"}},{default:h(()=>[E(k(g(d.src_file||d.source_path)),1)]),_:2},1024),w("span",{class:_e(a(dt)(d.status))},k(a(ut)(d.status)),3)]),_:2},1024),t(c,{type:"line",percentage:d.progress,height:8,"show-indicator":!1,processing:d.progress<100,status:d.status==="error"?"error":"success"},null,8,["percentage","processing","status"]),d.log?(C(),V("div",gt,k(d.log),1)):ee("",!0)]),_:2},1024))),128))])]),_:1})]),_:1})}}});function xe(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Ue(s)}const{t:F}=ae.global,Fe=s=>{const n=J();oe({title:F("File transfer result"),width:600,data:{getList:()=>{(!s||s==="left")&&n.refreshLeft(),(!s||s==="right")&&n.refreshRight()}},component:vt})},yt=(s,n,e)=>{oe({title:F("Create folder"),footer:!0,data:{path:s,node_id:n,getList:e},component:_t})},xt=(s,n,e)=>{if(s==="/"){le.error(F("Root directory cannot upload files"));return}wt({path:s,node_id:n,onUploadSuccess:()=>{e()}})},bt=s=>({title:F("file.fileName"),key:"name",width:"60%",minWidth:164,render(e){return t("div",{class:"flex cursor-pointer",onClick:()=>s(e)},[t("div",{class:"flex-1 w-0 flex items-center gap-4px"},[t("div",{class:"flex-1 w-0 flex items-center min-w-0"},[t("div",{class:"flex items-center"},[t(Ae,{ext:e.ext},null)]),t("div",{class:"flex-1 min-w-0 ml-4px"},[t(ue,{tooltip:!0},{default:()=>[t("span",{class:"hover:text-primary cursor-pointer"},[e.lnk?e.nm+e.lnk:e.nm])]})])]),t("div",{class:"flex items-center gap-4px"},[e.isShare?t(me("bt-icon"),{name:"file-share",size:"16"},null):null,e.isFavorite?t(me("bt-icon"),{name:"file-favorite",size:"16"},null):null])])])}}),kt=(s,n)=>{var d,P;const e=J(),{nodesList:o,leftNodeId:i,rightNodeId:g,leftPath:l,rightPath:b}=e,f=n==="left"?i:g,v=n==="left"?g:i,c=n==="left"?b:l,x=(d=o.find(y=>y.value===f))==null?void 0:d.label,r=(P=o.find(y=>y.value===v))==null?void 0:P.label;if(c==="/"){le.error(F("Target node is root directory, cannot transfer files"));return}const u=R("ignore");we({title:F("File transfer"),content:()=>{let y,T;return t(K,{class:"flex-col!"},{default:()=>[t("span",null,[F("Whether to transfer the following files or folders from node [{0}] to node [{1}] in [{2}]?",[x,r,c])]),t("span",null,[F("When encountering duplicate files, please select the processing method")]),t(Ge,{value:u.value,"onUpdate:value":z=>u.value=z},{default:()=>[t(ye,{value:"ignore"},xe(y=F("Skip"))?y:{default:()=>[y]}),t(ye,{value:"cover"},xe(T=F("Cover"))?T:{default:()=>[T]})]}),t(Qe,{maxHeight:200,columns:ct,data:s},null)]})},width:600,onConfirm:async()=>{const y={source_node_id:f,target_node_id:v,source_path_list:JSON.stringify(s.map(z=>({path:z.path,size:z.sz,is_dir:z.type==="dir"}))),target_path:c,default_mode:u.value};await lt(y),Fe(n==="left"?"right":"left")}})},wt=({path:s,node_id:n,confirmText:e,size:o,uploadData:i,onUploadSuccess:g})=>{oe({title:F("Upload files to [{0}]",[s]),width:580,minHeight:436,footer:!0,confirmText:e||F("Public.Btn.Upload"),data:{path:s,node_id:n,size:o,uploadData:i,uploadSuccess:g},component:qe(()=>Be(()=>import("./file-upload-CbaM_-6s.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])))})},Ct={key:1,class:"i-svg-spinners:90-ring-with-bg text-[#36ad6a] text-7"},$t=D({__name:"file-size",props:{path:{},nodeValue:{}},setup(s){const{t:n}=G(),e=s,o=R(-1),i=R(!1);async function g(){if(o.value==-1){i.value=!0;const{message:l}=await it({path:e.path,node_id:e.nodeValue});Me(l)&&(o.value=l.size),i.value=!1}else return}return(l,b)=>{const f=de;return a(i)?(C(),V("i",Ct)):(C(),W(f,{key:0,text:"",type:"primary",onClick:g},{default:h(()=>[E(k(a(o)!==-1?a(o):a(n)("file.tableFooter.calculate")),1)]),_:1}))}}}),Pt={class:"flex-1 my-10px"},be=D({__name:"file-browser",props:{side:{}},setup(s,{expose:n}){const{t:e}=G(),o=s,i=J(),{leftPath:g,rightPath:l,leftNodeId:b,rightNodeId:f}=ne(i),v=I({get:()=>o.side==="left"?g.value:l.value,set:_=>{o.side==="left"?g.value=_:l.value=_}}),c=I(()=>o.side==="left"?b.value:f.value),x=I(()=>o.side==="left"?e("Send to right"):e("Send to left")),r=re({p:1,limit:100,search:""}),{keys:u,table:d,columns:P}=We([{type:"selection",width:40},bt(_=>T(_)),{title:e("file.size"),key:"size",width:100,render(_){return _.type==="dir"?t($t,{path:_.path,nodeValue:c.value},null):t("span",null,[te(_.sz)])}},Oe({title:e("Site.TableRow.index_30"),width:150,options:_=>[{label:x.value,onClick:()=>z([_])},{label:e("Public.Btn.Del"),onClick:()=>{we({title:e("Delete file"),content:e("Are you sure to delete {0} [{1}]?",[_.type==="dir"?e("Folder"):e("File"),_.nm]),width:400,onConfirm:async()=>{await rt({path:_.path,node_id:c.value,is_dir:_.type==="dir"?1:0}),y()}})}}]})]),y=async()=>{if(c.value)try{d.loading=!0,d.data=await at({p:r.p,showRow:r.limit,search:r.search,path:v.value,node_id:c.value},_=>{d.total=Ve(_.page),v.value=_.path})}finally{u.value=[],d.loading=!1}},T=_=>{_.type==="dir"&&(v.value=_.path)},z=_=>{if(!c.value){le.error(e("Please select target node"));return}kt(_,o.side)},j=()=>{const _=d.data.filter($=>u.value.includes($.nm));z(_)},{leftRefreshTrigger:Y,rightRefreshTrigger:U}=ne(i),H=I(()=>o.side==="left"?Y.value:U.value);return Ke([v,c,H],()=>{y()},{immediate:!0}),n({refresh:y}),(_,$)=>{const m=de,p=K,L=Le,O=Te,B=Ie;return C(),W(p,{class:"flex-col! h-full"},{default:h(()=>[t(p,{justify:"space-between"},{default:h(()=>[t(p,null,{default:h(()=>[t(m,{type:"primary",onClick:$[0]||($[0]=N=>a(xt)(a(v),a(c),y))},{default:h(()=>[E(k(_.$t("file.uploadFile")),1)]),_:1}),t(m,{onClick:$[1]||($[1]=N=>a(yt)(a(v),a(c),y))},{default:h(()=>[E(k(_.$t("file.contextMenu.newFolder")),1)]),_:1})]),_:1}),t(L,{value:a(r).search,"onUpdate:value":$[2]||($[2]=N=>a(r).search=N),placeholder:_.$t("Enter file name"),onSearch:y},null,8,["value","placeholder"])]),_:1}),w("div",Pt,[t(O,{"checked-row-keys":a(u),"onUpdate:checkedRowKeys":$[3]||($[3]=N=>ce(u)?u.value=N:null),"row-key":"nm",loading:a(d).loading,data:a(d).data,columns:a(P),"flex-height":"",class:"h-full"},null,8,["checked-row-keys","loading","data","columns"])]),t(p,{class:"justify-between!"},{default:h(()=>[t(p,{class:"items-center"},{default:h(()=>[t(m,{disabled:!a(u).length,type:"primary",onClick:j},{default:h(()=>[E(k(a(x)),1)]),_:1},8,["disabled"]),w("span",null,k(_.$t("Selected {0} files",[a(u).length])),1)]),_:1}),t(B,{page:a(r).p,"onUpdate:page":$[4]||($[4]=N=>a(r).p=N),"page-size":a(r).limit,"onUpdate:pageSize":$[5]||($[5]=N=>a(r).limit=N),"item-count":a(d).total,"store-key":"node-files",onRefresh:y},null,8,["page","page-size","item-count"])]),_:1})]),_:1})}}}),Rt={class:"path-dir"},St={class:"path-arrow reversal"},Nt={class:"path-dir"},zt={class:"path-arrow"},Ft=["onClick"],It={class:"path-dir"},Tt={class:"path-arrow"},Lt=D({__name:"choose-path",props:{currentPath:{type:String,default:"/"}},emits:["pathChange"],setup(s,{expose:n,emit:e}){const o=s,i=e,{t:g}=G(),l=R(""),b=he("pathListRef"),f=R(0),v=I(()=>o.currentPath.split("/").filter(p=>p!=="").map((p,L)=>({name:p,originalIndex:L}))),c=I(()=>{if(!f.value||v.value.length===0)return v.value;const m=80,p=20,L=12,O=150;let B=f.value-m;const N=[...v.value].reverse(),X=[];for(const S of N){const Z=Math.min(S.name.length*8,O)+p+L;if(B>=Z)X.unshift(S),B-=Z;else break}return X}),x=I(()=>c.value.length<v.value.length),r=I(()=>{const m=v.value.length-c.value.length;return v.value.slice(0,m)}),u=I(()=>{const m=r.value.map(p=>({key:p.originalIndex,label:p.name,icon:()=>t(M,{name:"file-dir",size:"16"},null)}));return m.unshift({key:"/",label:g("file.rootDirectory"),icon:()=>t(M,{name:"file-dir",size:"16"},null)}),m}),d=m=>{U(m)},P=R(!0),y=he("inputRef");let T=null;ie(()=>{b.value&&(z(),T=new ResizeObserver(()=>{z()}),T.observe(b.value))}),$e(()=>{T&&T.disconnect()});function z(){b.value&&(f.value=b.value.offsetWidth)}function j(m){P.value=m,P.value?(l.value="",se(()=>{z()})):l.value=o.currentPath}const Y=()=>{j(!1),se(()=>{var m;(m=y.value)==null||m.focus()})};function U(m,p){const L=o.currentPath.split("/").filter(B=>B!=="");let O="";typeof m=="number"&&(L.splice(m+1),O="/"+L.join("/")),m=="/"&&(O="/"),i("pathChange",O),p==null||p.stopPropagation()}async function H(){var m;l.value==o.currentPath||l.value==""?((m=y.value)==null||m.blur(),j(!0)):st(l.value)?(i("pathChange",l.value),j(!0)):j(!1)}n({handleEnterDown:H});function _(){const m=o.currentPath.split("/").filter(p=>p!=="");if(m.length!=0){m.pop();let p="/"+m.join("/");i("pathChange",p)}}function $(){i("pathChange",o.currentPath)}return(m,p)=>{const L=de,O=et,B=ue,N=Se,X=Ye;return C(),W(X,null,{default:h(()=>[t(L,{onClick:_},{default:h(()=>[t(M,{name:"file-back",size:"16"})]),_:1}),a(P)?(C(),V("div",{key:0,ref_key:"pathListRef",ref:b,class:"path-list",onClick:Y},[t(O,{trigger:"click",placement:"bottom-start",options:a(u),onSelect:d},{default:h(()=>[ge(w("div",{class:"path-item",onClick:p[0]||(p[0]=S=>S.stopPropagation())},[w("div",Rt,[t(M,{name:"file-dir",size:"16"})]),w("div",St,[t(M,{name:"base-arrow-right"})])],512),[[ve,a(x)]])]),_:1},8,["options"]),ge(w("div",{class:"path-item",onClick:p[1]||(p[1]=S=>U("/",S))},[w("div",Nt,k(m.$t("file.rootDirectory")),1),w("div",zt,[t(M,{name:"base-arrow-right"})])],512),[[ve,!a(x)]]),(C(!0),V(Pe,null,Re(a(c),(S,pe)=>(C(),V("div",{class:"path-item",key:"".concat(S,"_").concat(pe),onClick:Z=>U(S.originalIndex,Z)},[w("div",It,[t(B,{class:"max-w-150px!"},{default:h(()=>[E(k(S.name),1)]),_:2},1024)]),w("div",Tt,[t(M,{name:"base-arrow-right"})])],8,Ft))),128))],512)):(C(),W(N,{key:1,ref_key:"inputRef",ref:y,value:a(l),"onUpdate:value":p[2]||(p[2]=S=>ce(l)?l.value=S:null),class:"flex-1",placeholder:" ",onFocus:p[3]||(p[3]=S=>j(!1)),onBlur:p[4]||(p[4]=S=>j(!0)),onKeydown:Je(H,["enter"])},null,8,["value"])),t(L,{onClick:$},{default:h(()=>[t(M,{name:"base-refresh",size:"16"})]),_:1})]),_:1})}}}),Ot=Ce(Lt,[["__scopeId","data-v-cfc90488"]]),ke=D({__name:"node-select",props:{side:{}},setup(s){const n=s,e=J(),{leftPath:o,rightPath:i,nodesList:g,leftNodeId:l,rightNodeId:b}=ne(e),f=I({get:()=>n.side==="left"?l.value:b.value,set:r=>{n.side==="left"?l.value=r:b.value=r}}),v=I({get:()=>n.side==="left"?o.value:i.value,set:r=>{n.side==="left"?o.value=r:i.value=r}}),c=r=>{v.value=r,n.side==="left"?e.refreshLeft():e.refreshRight()},x=I(()=>g.value.map(r=>{const u=n.side==="left"?b.value:l.value;return{...r,disabled:r.value===u}}));return(r,u)=>{const d=tt,P=K;return C(),W(P,{class:"mb-16px"},{default:h(()=>[t(d,{class:"w-160px","consistent-menu-width":!1,value:a(f),"onUpdate:value":u[0]||(u[0]=y=>ce(f)?f.value=y:null),options:a(x),placeholder:r.$t("Select node")},null,8,["value","options","placeholder"]),t(Ot,{class:"flex-1","current-path":a(v),onPathChange:c},null,8,["current-path"])]),_:1})}}}),Wt={class:"flex flex-col h-full p-20px"},jt={class:"flex flex-col h-full p-20px"},Bt=D({__name:"index",setup(s){return J().getNode(),ie(()=>{const{send:e,close:o}=ze("/ws_modsoc",{immediate:!0,onMessage:(i,g)=>{try{JSON.parse(g.data).type!=="end"&&Fe(),o()}catch(l){o()}}});e({mod_name:"node",sub_mod_name:"file_transfer",def_name:"transfer_status",callback:"check_status",data:{}})}),(e,o)=>{const i=Ne,g=K;return C(),W(g,{class:"flex-nowrap! box-view"},{default:h(()=>[t(i,null,{default:h(()=>[w("div",Wt,[t(ke,{side:"left"}),t(be,{side:"left"})])]),_:1}),t(i,null,{default:h(()=>[w("div",jt,[t(ke,{side:"right"}),t(be,{side:"right"})])]),_:1})]),_:1})}}}),Mt=Ce(Bt,[["__scopeId","data-v-a14a6f1a"]]),es=Object.freeze(Object.defineProperty({__proto__:null,default:Mt},Symbol.toStringTag,{value:"Module"}));export{Yt as a,es as i,Qt as u};