System.register(["./public-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./file-legacy2.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(e,l){"use strict";var a,t,n,i,s,o,c,d,u,r,p,f,v,m,x,h,y,g,k,b,_,C,w,P,j,S;return{setters:[e=>{a=e.b,t=e.c,n=e.f},e=>{i=e._,s=e.c,o=e.X},e=>{c=e.a},e=>{d=e._,u=e.b$,r=e.bT,p=e.d2,f=e.ay,v=e.bY},e=>{m=e.k,x=e.P,h=e.r,y=e.Q,g=e.U,k=e.V,b=e.a2,_=e.j,C=e.a3,w=e.W,P=e.X,j=e.F,S=e.O},null,null],execute:function(){const l={class:"flex flex-col h-full"},$={class:"flex-1 w-0 truncate"},z={class:"flex flex-1 overflow-hidden"},D={class:"w-160px py-12px overflow-auto"},I=["onClick"],E={class:"flex-1 ml-8px"},T={class:"flex-1","b-l":"1 solid #aaa"};e("default",m({__name:"index",props:{data:{}},setup(e,{expose:m}){const{t:F}=x(),H=e,{path:L,checkedType:O,callback:U}=H.data,X=h([]),A=h([]),K=h(L||"/"),{table:Q,columns:R}=a([{key:"checkbox",title:"",width:36,render:e=>O.includes(e.type)?y("div",{onClick:e=>{e.stopPropagation()}},[y(d,{checked:e.filename===A.value[0],onUpdateChecked:l=>{A.value=l?[e.filename]:[]}},null)]):""},{key:"filename",title:F("Component.SelectPath.index_3"),render:e=>y("div",{class:"flex"},[y("div",{class:"flex items-center flex-1 cursor-pointer",onClick:l=>{"dir"===e.type&&(l.preventDefault(),K.value+=`${"/"===K.value?"":"/"}${e.filename}`,B(),l.stopPropagation())}},[y("div",null,["dir"===e.type?y(i,{name:"base-dir",size:"16"},null):"","file"===e.type?y(i,{name:"base-file",size:"16",color:"#666"},null):""]),y("div",{class:"ml-6px flex-1 w-0"},[y(u,null,{default:()=>[e.filename]})])])])},{key:"time",title:F("Component.SelectPath.index_4"),width:146},{key:"permission",title:F("Component.SelectPath.index_5"),width:86},{key:"owner",title:F("Component.SelectPath.index_6"),width:72}]),V=e=>({onClick:()=>{if(O.includes(e.type)){const l=p(A.value,(l=>l===e.filename));A.value=-1!==l?[]:[e.filename]}},onDblclick:()=>{O.includes(e.type)&&(K.value+=`${"/"===K.value?"":"/"}${e.filename}`,B())}}),W=()=>{const e=K.value.substring(0,K.value.lastIndexOf("/"));K.value=""===e?"/":e,B()},{loading:Y,setLoading:q}=t(),B=async()=>{try{q(!0),Q.data=[],A.value=[];const{message:e}=await c({path:K.value});if(s(e)){const l=[],a=r(e,"DIR",[]),t=r(e,"FILES",[]);a.forEach((e=>{l.push(G(e,"dir"))})),t.forEach((e=>{l.push(G(e,"file"))})),K.value=e.PATH,Q.data=l,X.value=r(e,"DISK",[])}}finally{q(!1)}},G=(e,l)=>{const a=e.split(";"),t=a[0],n=o(a[2]),i=a[3],s=a[4];return{path:("/"!==K.value?K.value+"/":"")+t,filename:t,time:n,permission:i,owner:s,type:l}};return B(),m({onConfirm:({hide:e})=>{const l=A.value.length>0?A.value[0]:"",a=("/"!==K.value?K.value+"/":"")+l,t=Q.data.find((e=>e.filename===l));U?.(a,t),e()}}),(e,a)=>{const t=f,s=v,o=n;return g(),k("div",l,[y(s,{class:"items-center h-50px px-12px","b-b":"1 solid #aaa"},{default:b((()=>[y(t,{onClick:W},{default:b((()=>[_(C(e.$t("Component.SelectPath.index_1")),1)])),_:1}),w("div",$,C(e.$t("Component.SelectPath.index_2"))+": "+C(P(K)),1)])),_:1}),w("div",z,[w("div",D,[(g(!0),k(j,null,S(P(X),(e=>(g(),k("div",{key:e.path,class:"flex items-center p-8px pl-16px hover:bg-#ececec cursor-pointer transition-colors",onClick:l=>{return a=e.path,K.value=a,void B();var a}},[y(i,{name:"file-disk",size:"18",color:"#666"}),w("div",E,C(e.path)+" "+C(e.size[2]?`(${e.size[2]})`:""),1)],8,I)))),128))]),w("div",T,[y(o,{loading:P(Y),"loading-num":10,bordered:!1,"virtual-scroll":!0,"max-height":456,data:P(Q).data,columns:P(R),"row-props":V},null,8,["loading","data","columns"])])])])}}}))}}}));
