System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./file-legacy-Bt6Hxu9s.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(e,l){"use strict";var a,t,n,i,s,o,c,d,u,r,p,v,f,m,h,x,y,g,k,_,b,C,w,j,P,S,$;return{setters:[e=>{a=e._},e=>{t=e.l,n=e.i,i=e.w,s=e.c},e=>{o=e.e},e=>{c=e.u},e=>{d=e.u},e=>{u=e.al,r=e.n,p=e.g,v=e.B,f=e.k,m=e.b6},e=>{h=e.k,x=e.R,y=e.r,g=e.a0,k=e.$,_=e.Z,b=e.a9,C=e.j,w=e.aa,j=e._,P=e.S,S=e.F,$=e.P},null,null],execute:function(){var l=document.createElement("style");l.textContent=".disk-item[data-v-b9968102]:hover{background-color:var(--bt-input-path-hover-bg)}\n/*$vite$:1*/",document.head.appendChild(l);const z={class:"flex flex-col h-full"},D={class:"flex-1 w-0 truncate"},I={class:"flex flex-1 overflow-hidden"},E={class:"w-160px py-12px overflow-auto"},L=["onClick"],T={class:"flex-1 ml-8px"},F={class:"flex-1","b-l":"1 solid #aaa"},R=h({__name:"index",props:{data:{}},setup(e,{expose:l}){const{t:s}=x(),h=e,{path:R,checkedType:A,callback:B}=h.data,H=y([]),K=y([]),O=y(R||"/"),{table:U,columns:Z}=c([{key:"checkbox",title:"",width:36,render:e=>A.includes(e.type)?g("div",{onClick:e=>{e.stopPropagation()}},[g(u,{checked:e.filename===K.value[0],onUpdateChecked:l=>{K.value=l?[e.filename]:[]}},null)]):""},{key:"filename",title:s("Component.SelectPath.index_3"),render:e=>g("div",{class:"flex"},[g("div",{class:"flex items-center flex-1 cursor-pointer",onClick:l=>{"dir"===e.type&&(l.preventDefault(),O.value+=`${"/"===O.value?"":"/"}${e.filename}`,N(),l.stopPropagation())}},[g("div",null,["dir"===e.type?g(t,{name:"base-dir",size:"16"},null):"","file"===e.type?g(t,{name:"base-file",size:"16",color:"#666"},null):""]),g("div",{class:"ml-6px flex-1 w-0"},[g(r,null,{default:()=>[e.filename]})])])])},{key:"time",title:s("Component.SelectPath.index_4"),width:146},{key:"permission",title:s("Component.SelectPath.index_5"),width:86},{key:"owner",title:s("Component.SelectPath.index_6"),width:72}]),q=e=>({onClick:()=>{if(A.includes(e.type)){const l=m(K.value,(l=>l===e.filename));K.value=-1!==l?[]:[e.filename]}},onDblclick:()=>{A.includes(e.type)&&(O.value+=`${"/"===O.value?"":"/"}${e.filename}`,N())}}),G=()=>{const e=O.value.substring(0,O.value.lastIndexOf("/"));O.value=""===e?"/":e,N()},{loading:J,setLoading:M}=d(),N=async()=>{try{M(!0),U.data=[],K.value=[];const{message:e}=await o({path:O.value});if(n(e)){const l=[],a=p(e,"DIR",[]),t=p(e,"FILES",[]);a.forEach((e=>{l.push(Q(e,"dir"))})),t.forEach((e=>{l.push(Q(e,"file"))})),O.value=e.PATH,U.data=l,H.value=p(e,"DISK",[])}}finally{M(!1)}},Q=(e,l)=>{const a=e.split(";"),t=a[0],n=i(a[2]),s=a[3],o=a[4];return{path:("/"!==O.value?O.value+"/":"")+t,filename:t,time:n,permission:s,owner:o,type:l}};return N(),l({onConfirm:({hide:e})=>{const l=K.value.length>0?K.value[0]:"",a=("/"!==O.value?O.value+"/":"")+l,t=U.data.find((e=>e.filename===l));B?.(a,t),e()}}),(e,l)=>{const n=v,i=f,s=a;return k(),_("div",z,[g(i,{class:"items-center h-50px px-12px","b-b":"1 solid #aaa"},{default:b((()=>[g(n,{onClick:G},{default:b((()=>[C(w(e.$t("Component.SelectPath.index_1")),1)])),_:1}),j("div",D,w(e.$t("Component.SelectPath.index_2"))+": "+w(P(O)),1)])),_:1}),j("div",I,[j("div",E,[(k(!0),_(S,null,$(P(H),(e=>(k(),_("div",{key:e.path,class:"flex items-center p-8px pl-16px hover:bg-#ececec cursor-pointer transition-colors disk-item",onClick:l=>{return a=e.path,O.value=a,void N();var a}},[g(t,{name:"file-disk",size:"18",color:"#666"}),j("div",T,w(e.path)+" "+w(e.size[2]?`(${e.size[2]})`:""),1)],8,L)))),128))]),j("div",F,[g(s,{loading:P(J),"loading-num":10,bordered:!1,"virtual-scroll":!0,"max-height":456,data:P(U).data,columns:P(Z),"row-props":q},null,8,["loading","data","columns"])])])])}}});e("default",s(R,[["__scopeId","data-v-b9968102"]]))}}}));
