import{d as K,u as re,g as U,_ as ye,c as o,a as te,P as X,D as we,f as he,w as qe,b as Ke,e as Ge,h as be,M as ne,i as Qe,j as He,F as ae,k as We,r as Je,o as C,l as A,m as l,n as e,p as j,q as c,t as y,s as J,I as Xe,v as Ie,x as Ye,y as Ze,z as E,A as x,B as et,C as H,E as ee,G as tt,H as nt,S as ke,J as W,K as at,L as ot,N as ge,O as rt,Q as st,R as lt,T as it,U as ut,V as dt}from"./index-9fc801b7.js";import{D as xe,S as L,s as ct,u as pt,a as mt,b as vt,c as ft,d as _t,e as bt,f as kt,g as gt,h as Ct,i as yt,j as wt,t as ht,L as It,R as xt,k as Mt}from"./fullScreenContextMenu-0e7413ba.js";import{F as R,_ as St}from"./index-49e4ebf7.js";import"./index-82db850c.js";/* empty css *//* empty css */import"./db-63f67577.js";import"./_baseIteratee-429a7bd1.js";var Pt=["class","style"],$t=function(){return{prefixCls:String,href:String,separator:X.any,overlay:X.any,onClick:Function}};const q=K({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:$t(),slots:["separator","overlay"],setup:function(a,k){var i=k.slots,d=k.attrs,g=re("breadcrumb",a),_=g.prefixCls,m=function(w,u){var s=U(i,a,"overlay");return s?o(xe,{overlay:s,placement:"bottom"},{default:function(){return[o("span",{class:"".concat(u,"-overlay-link")},[w,o(we,null,null)])]}}):w};return function(){var M,w=(M=U(i,a,"separator"))!==null&&M!==void 0?M:"/",u=U(i,a),s=d.class,v=d.style,f=ye(d,Pt),b;return a.href!==void 0?b=o("a",te({class:"".concat(_.value,"-link"),onClick:a.onClick},f),[u]):b=o("span",te({class:"".concat(_.value,"-link"),onClick:a.onClick},f),[u]),b=m(b,_.value),u?o("span",{class:s,style:v},[b,w&&o("span",{class:"".concat(_.value,"-separator")},[w])]):null}}});var At=function(){return{prefixCls:String,routes:{type:Array},params:X.any,separator:X.any,itemRender:{type:Function}}};function Rt(r,a){if(!r.breadcrumbName)return null;var k=Object.keys(a).join("|"),i=r.breadcrumbName.replace(new RegExp(":(".concat(k,")"),"g"),function(d,g){return a[g]||d});return i}function Ce(r){var a=r.route,k=r.params,i=r.routes,d=r.paths,g=i.indexOf(a)===i.length-1,_=Rt(a,k);return g?o("span",null,[_]):o("a",{href:"#/".concat(d.join("/"))},[_])}const z=K({compatConfig:{MODE:3},name:"ABreadcrumb",props:At(),slots:["separator","itemRender"],setup:function(a,k){var i=k.slots,d=re("breadcrumb",a),g=d.prefixCls,_=d.direction,m=function(s,v){return s=(s||"").replace(/^\//,""),Object.keys(v).forEach(function(f){s=s.replace(":".concat(f),v[f])}),s},M=function(s,v,f){var b=Qe(s),h=m(v||"",f);return h&&b.push(h),b},w=function(s){var v=s.routes,f=v===void 0?[]:v,b=s.params,h=b===void 0?{}:b,O=s.separator,B=s.itemRender,S=B===void 0?Ce:B,N=[];return f.map(function(I){var D=m(I.path,h);D&&N.push(D);var T=[].concat(N),F=null;return I.children&&I.children.length&&(F=o(ne,null,{default:function(){return[I.children.map(function(P){return o(ne.Item,{key:P.path||P.breadcrumbName},{default:function(){return[S({route:P,params:h,routes:f,paths:M(T,P.path,h)})]}})})]}})),o(q,{overlay:F,separator:O,key:D||I.breadcrumbName},{default:function(){return[S({route:I,params:h,routes:f,paths:T})]}})})};return function(){var u,s,v,f=a.routes,b=a.params,h=b===void 0?{}:b,O=he(U(i,a)),B=(u=U(i,a,"separator"))!==null&&u!==void 0?u:"/",S=a.itemRender||i.itemRender||Ce;f&&f.length>0?v=w({routes:f,params:h,separator:B,itemRender:S}):O.length&&(v=O.map(function(I,D){return qe(Ke(I.type)==="object"&&(I.type.__ANT_BREADCRUMB_ITEM||I.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Ge(I,{separator:B,key:D})}));var N=(s={},be(s,g.value,!0),be(s,"".concat(g.value,"-rtl"),_.value==="rtl"),s);return o("div",{class:N},[v])}}});var Bt=["separator","class"],Nt=function(){return{prefixCls:String}};const oe=K({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Nt(),setup:function(a,k){var i=k.slots,d=k.attrs,g=re("breadcrumb",a),_=g.prefixCls;return function(){var m;d.separator;var M=d.class,w=ye(d,Bt),u=he((m=i.default)===null||m===void 0?void 0:m.call(i));return o("span",te({class:["".concat(_.value,"-separator"),M]},w),[u.length>0?u:"/"])}}});z.Item=q;z.Separator=oe;z.install=function(r){return r.component(z.name,z),r.component(q.name,q),r.component(oe.name,oe),r};R.useInjectFormItemContext=He;R.ItemRest=ae;R.install=function(r){return r.component(R.name,R),r.component(R.Item.name,R.Item),r.component(ae.name,ae),r};L.setDefaultIndicator=ct;L.install=function(r){return r.component(L.name,L),r};const Dt=K({__name:"folderNavigator",props:{loc:null},emits:["to"],setup(r,{emit:a}){const k=r,i=We(()=>k.loc),d=Je(!1),g=()=>{d.value=!1,a("to",i.value)};return(_,m)=>{const M=Xe,w=Ie;return C(),A(J,null,[o(w,{visible:d.value,"onUpdate:visible":m[1]||(m[1]=u=>d.value=u),title:_.$t("inputAddressAndPressEnter"),onOk:g},{default:l(()=>[o(M,{onPressEnter:g,value:e(i),"onUpdate:value":m[0]||(m[0]=u=>j(i)?i.value=u:null),style:{width:"100%"},"allow-clear":""},null,8,["value"])]),_:1},8,["visible","title"]),c("a",{onClick:m[2]||(m[2]=u=>d.value=!0)},y(_.$t("go")),1)],64)}}}),Ft={class:"hint"},Et={class:"location-bar"},Ot={class:"breadcrumb"},Tt=["onClick"],jt={class:"actions"},zt=["onClick"],Vt={style:{width:"512px",background:"var(--zp-primary-background)",padding:"16px","border-radius":"4px","box-shadow":"0 0 4px var(--zp-secondary-background)",border:"1px solid var(--zp-secondary-background)"}},Ut={style:{padding:"4px"}},Lt={style:{padding:"4px"}},qt={style:{padding:"4px"}},Kt={style:{padding:"4px"}},Gt={key:0,class:"view"},Qt={key:0,class:"preview-switch"},Ht=K({__name:"stackView",props:{tabIdx:null,paneIdx:null,path:null,walkMode:{type:Boolean},stackKey:null},setup(r){const a=r,k=Ye(),{scroller:i,walkModePath:d,stackViewEl:g,props:_,multiSelectedIdxs:m,spinning:M}=pt().toRefs(),{currLocation:w,currPage:u,refresh:s,copyLocation:v,back:f,openNext:b,stack:h,to:O,quickMoveTo:B,addToSearchScanPathAndQuickMove:S,searchPathInfo:N}=mt(a),{gridItems:I,sortMethodConv:D,moreActionsDropdownShow:T,sortedFiles:F,sortMethod:V,viewMode:P,viewModeMap:Y,itemSize:se,loadNextDir:Me,loadNextDirLoading:Se,canLoadNext:Pe,onScroll:$e}=vt(a),{onDrop:Ae,onFileDragStart:Re}=ft(),{onFileItemClick:Be,onContextMenuClick:le,showGenInfo:G,imageGenInfo:ie,q:Ne}=_t(a,{openNext:b}),{previewIdx:Q,onPreviewVisibleChange:De,previewing:ue,previewImgMove:de,canPreview:ce}=bt(a),{showMenuIdx:Z}=kt();return Ze(()=>a,()=>{_.value=a,a.walkMode&&(d.value=a.path);const p=gt.get(a.stackKey??"");p&&(h.value=p.slice())},{immediate:!0}),(p,t)=>{const Fe=rt,Ee=st,Oe=Ie,pe=q,me=z,Te=lt,je=it,ze=ne,ve=xe,fe=St,Ve=R,Ue=ut,Le=L;return C(),E(Le,{spinning:e(M),size:"large"},{default:l(()=>[o(Fe,{style:{display:"none"}}),c("div",{ref_key:"stackViewEl",ref:g,onDragover:t[18]||(t[18]=x(()=>{},["prevent"])),onDrop:t[19]||(t[19]=x(n=>e(Ae)(n),["prevent"])),class:"container"},[o(Oe,{visible:e(G),"onUpdate:visible":t[1]||(t[1]=n=>j(G)?G.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>G.value=!1)},{cancelText:l(()=>[]),default:l(()=>[o(Ee,{active:"",loading:!e(Ne).isIdle},{default:l(()=>[c("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto","z-index":"9999"},onDblclick:t[0]||(t[0]=n=>e(et)(e(ie)))},[c("div",Ft,y(p.$t("doubleClickToCopy")),1),H(" "+y(e(ie)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),c("div",Et,[c("div",Ot,[a.walkMode?(C(),E(Te,{key:0},{title:l(()=>[H(y(p.$t("walk-mode-move-message")),1)]),default:l(()=>[o(me,{style:{flex:"1"}},{default:l(()=>[(C(!0),A(J,null,ee(e(h),(n,$)=>(C(),E(pe,{key:$},{default:l(()=>[c("span",null,y(n.curr==="/"?p.$t("root"):n.curr.replace(/:\/$/,p.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})):(C(),E(me,{key:1,style:{flex:"1"}},{default:l(()=>[(C(!0),A(J,null,ee(e(h),(n,$)=>(C(),E(pe,{key:$},{default:l(()=>[c("a",{onClick:x(_e=>e(f)($),["prevent"])},y(n.curr==="/"?p.$t("root"):n.curr.replace(/:\/$/,p.$t("drive"))),9,Tt)]),_:2},1024))),128))]),_:1}))]),c("div",jt,[c("a",{class:"opt",onClick:t[3]||(t[3]=x((...n)=>e(s)&&e(s)(...n),["prevent"]))},y(p.$t("refresh")),1),o(ve,null,{overlay:l(()=>[o(ze,null,{default:l(()=>[(C(!0),A(J,null,ee(e(k).quickMovePaths,n=>(C(),E(je,{key:n.dir},{default:l(()=>[c("a",{onClick:x($=>e(B)(n.dir),["prevent"])},y(n.zh),9,zt)]),_:2},1024))),128))]),_:1})]),default:l(()=>[c("a",{class:"opt",onClick:t[4]||(t[4]=x(()=>{},["prevent"]))},[H(y(p.$t("quickMove"))+" ",1),o(e(we))])]),_:1}),o(ve,{trigger:["click"],visible:e(T),"onUpdate:visible":t[14]||(t[14]=n=>j(T)?T.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:l(()=>[c("div",Vt,[o(Ve,tt(nt({labelCol:{span:6},wrapperCol:{span:18}})),{default:l(()=>[o(fe,{label:p.$t("viewMode")},{default:l(()=>[o(e(ke),{value:e(P),"onUpdate:value":t[6]||(t[6]=n=>j(P)?P.value=n:null),onClick:t[7]||(t[7]=x(()=>{},["stop"])),conv:{value:n=>n,text:n=>e(Y)[n]},options:Object.keys(e(Y))},null,8,["value","conv","options"])]),_:1},8,["label"]),o(fe,{label:p.$t("sortingMethod")},{default:l(()=>[o(e(ke),{value:e(V),"onUpdate:value":t[8]||(t[8]=n=>j(V)?V.value=n:null),onClick:t[9]||(t[9]=x(()=>{},["stop"])),conv:e(D),options:Object.keys(e(Ct))},null,8,["value","conv","options"])]),_:1},8,["label"]),c("div",Ut,[c("a",{onClick:t[10]||(t[10]=x((...n)=>e(v)&&e(v)(...n),["prevent"]))},y(p.$t("copyPath")),1)]),c("div",Lt,[o(Dt,{loc:e(w),onTo:e(O)},null,8,["loc","onTo"])]),c("div",qt,[e(N)?e(N).can_delete?(C(),A("a",{key:1,onClick:t[12]||(t[12]=x((...n)=>e(S)&&e(S)(...n),["prevent"]))},y(p.$t("removeFromSearchScanPathAndQuickMove")),1)):W("",!0):(C(),A("a",{key:0,onClick:t[11]||(t[11]=x((...n)=>e(S)&&e(S)(...n),["prevent"]))},y(p.$t("addToSearchScanPathAndQuickMove")),1))]),c("div",Kt,[c("a",{onClick:t[13]||(t[13]=x(n=>e(at)(e(w)+"/"),["prevent"]))},y(p.$t("openWithLocalFileBrowser")),1)])]),_:1},16)])]),default:l(()=>[c("a",{class:"opt",onClick:t[5]||(t[5]=x(()=>{},["prevent"]))},y(p.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(u)?(C(),A("div",Gt,[o(e(yt),{class:"file-list",items:e(F),ref_key:"scroller",ref:i,onScroll:e($e),"item-size":e(se).first,"key-field":"fullpath","item-secondary-size":e(se).second,gridItems:e(I)},ot({default:l(({item:n,index:$})=>[o(wt,{idx:$,file:n,"full-screen-preview-image-url":e(F)[e(Q)]?e(ht)(e(F)[e(Q)]):"","show-menu-idx":e(Z),"onUpdate:showMenuIdx":t[15]||(t[15]=_e=>j(Z)?Z.value=_e:null),selected:e(m).includes($),"view-mode":e(P),onFileItemClick:e(Be),onDragstart:e(Re),onPreviewVisibleChange:e(De),onContextMenuClick:e(le)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","view-mode","onFileItemClick","onDragstart","onPreviewVisibleChange","onContextMenuClick"])]),_:2},[a.walkMode?{name:"after",fn:l(()=>[o(Ue,{onClick:e(Me),loading:e(Se),block:"",type:"primary",disabled:!e(Pe),ghost:""},{default:l(()=>[H(y(p.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(ue)?(C(),A("div",Qt,[o(e(It),{onClick:t[16]||(t[16]=n=>e(de)("prev")),class:ge({disable:!e(ce)("prev")})},null,8,["class"]),o(e(xt),{onClick:t[17]||(t[17]=n=>e(de)("next")),class:ge({disable:!e(ce)("next")})},null,8,["class"])])):W("",!0)])):W("",!0)],544),e(ue)?(C(),E(Mt,{key:0,file:e(F)[e(Q)],idx:e(Q),onContextMenuClick:e(le)},null,8,["file","idx","onContextMenuClick"])):W("",!0)]),_:1},8,["spinning"])}}});const an=dt(Ht,[["__scopeId","data-v-941a17d1"]]);export{an as default};