import{d as Y,u as ce,g as U,_ as Me,c as a,a as se,P as X,D as le,f as Ae,w as Ye,b as Ze,e as et,h as $e,M as ie,i as tt,j as nt,F as ue,k as at,l as rt,o as p,m as F,n as s,p as u,q as d,r as e,s as z,t as ot,v as c,x as T,y as w,z as re,A as oe,B as st,C as V,E as lt,G as it,H as ut,S as dt,I as ct,J as pt,K as mt,L as vt,N as xe,O as ft,Q as kt,R as Ct,T as bt,U as gt,V as yt,W as _t,X as ht}from"./index-7c0f3f3a.js";import{S as W,s as wt,L as It,R as St,f as $t}from"./fullScreenContextMenu-780774ab.js";import{F as N,N as xt,_ as Pt}from"./numInput-eb174668.js";/* empty css */import{D as Re}from"./index-00c5caf5.js";/* empty css *//* empty css */import{u as Mt,a as At,b as Rt,c as Bt,d as Dt,e as Ft,f as Nt,s as Et,g as zt,F as Tt}from"./FileItem-39204ab7.js";import"./functionalCallableComp-6d05295c.js";import"./db-90de1b1b.js";var Vt=["class","style"],Ot=function(){return{prefixCls:String,href:String,separator:X.any,overlay:X.any,onClick:Function}};const q=Y({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:Ot(),slots:["separator","overlay"],setup:function(o,_){var f=_.slots,C=_.attrs,h=ce("breadcrumb",o),g=h.prefixCls,$=function(I,m){var i=U(f,o,"overlay");return i?a(Re,{overlay:i,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(m,"-overlay-link")},[I,a(le,null,null)])]}}):I};return function(){var x,I=(x=U(f,o,"separator"))!==null&&x!==void 0?x:"/",m=U(f,o),i=C.class,b=C.style,k=Me(C,Vt),v;return o.href!==void 0?v=a("a",se({class:"".concat(g.value,"-link"),onClick:o.onClick},k),[m]):v=a("span",se({class:"".concat(g.value,"-link"),onClick:o.onClick},k),[m]),v=$(v,g.value),m?a("span",{class:i,style:b},[v,I&&a("span",{class:"".concat(g.value,"-separator")},[I])]):null}}});var jt=function(){return{prefixCls:String,routes:{type:Array},params:X.any,separator:X.any,itemRender:{type:Function}}};function Lt(r,o){if(!r.breadcrumbName)return null;var _=Object.keys(o).join("|"),f=r.breadcrumbName.replace(new RegExp(":(".concat(_,")"),"g"),function(C,h){return o[h]||C});return f}function Pe(r){var o=r.route,_=r.params,f=r.routes,C=r.paths,h=f.indexOf(o)===f.length-1,g=Lt(o,_);return h?a("span",null,[g]):a("a",{href:"#/".concat(C.join("/"))},[g])}const O=Y({compatConfig:{MODE:3},name:"ABreadcrumb",props:jt(),slots:["separator","itemRender"],setup:function(o,_){var f=_.slots,C=ce("breadcrumb",o),h=C.prefixCls,g=C.direction,$=function(i,b){return i=(i||"").replace(/^\//,""),Object.keys(b).forEach(function(k){i=i.replace(":".concat(k),b[k])}),i},x=function(i,b,k){var v=tt(i),S=$(b||"",k);return S&&v.push(S),v},I=function(i){var b=i.routes,k=b===void 0?[]:b,v=i.params,S=v===void 0?{}:v,P=i.separator,M=i.itemRender,A=M===void 0?Pe:M,R=[];return k.map(function(y){var B=$(y.path,S);B&&R.push(B);var j=[].concat(R),L=null;return y.children&&y.children.length&&(L=a(ie,null,{default:function(){return[y.children.map(function(E){return a(ie.Item,{key:E.path||E.breadcrumbName},{default:function(){return[A({route:E,params:S,routes:k,paths:x(j,E.path,S)})]}})})]}})),a(q,{overlay:L,separator:P,key:B||y.breadcrumbName},{default:function(){return[A({route:y,params:S,routes:k,paths:j})]}})})};return function(){var m,i,b,k=o.routes,v=o.params,S=v===void 0?{}:v,P=Ae(U(f,o)),M=(m=U(f,o,"separator"))!==null&&m!==void 0?m:"/",A=o.itemRender||f.itemRender||Pe;k&&k.length>0?b=I({routes:k,params:S,separator:M,itemRender:A}):P.length&&(b=P.map(function(y,B){return Ye(Ze(y.type)==="object"&&(y.type.__ANT_BREADCRUMB_ITEM||y.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),et(y,{separator:M,key:B})}));var R=(i={},$e(i,h.value,!0),$e(i,"".concat(h.value,"-rtl"),g.value==="rtl"),i);return a("div",{class:R},[b])}}});var Ut=["separator","class"],Wt=function(){return{prefixCls:String}};const de=Y({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Wt(),setup:function(o,_){var f=_.slots,C=_.attrs,h=ce("breadcrumb",o),g=h.prefixCls;return function(){var $;C.separator;var x=C.class,I=Me(C,Ut),m=Ae(($=f.default)===null||$===void 0?void 0:$.call(f));return a("span",se({class:["".concat(g.value,"-separator"),x]},I),[m.length>0?m:"/"])}}});O.Item=q;O.Separator=de;O.install=function(r){return r.component(O.name,O),r.component(q.name,q),r.component(de.name,de),r};N.useInjectFormItemContext=nt;N.ItemRest=ue;N.install=function(r){return r.component(N.name,N),r.component(N.Item.name,N.Item),r.component(ue.name,ue),r};W.setDefaultIndicator=wt;W.install=function(r){return r.component(W.name,W),r};const qt={class:"hint"},Kt={class:"location-bar"},Gt={key:0,class:"breadcrumb"},Qt=["onClick"],Ht={key:3,class:"location-act"},Jt={class:"actions"},Xt=["onClick"],Yt={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)"}},Zt={style:{padding:"4px"}},en={style:{padding:"4px"}},tn={style:{padding:"4px"}},nn={key:0,class:"view"},an={style:{padding:"16px 0 32px"}},rn={key:0,class:"preview-switch"},on=Y({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},walkModePath:{},stackKey:{}},setup(r){const o=r,_=at(),{scroller:f,stackViewEl:C,props:h,multiSelectedIdxs:g,spinning:$}=Mt().toRefs(),{currLocation:x,currPage:I,refresh:m,copyLocation:i,back:b,openNext:k,stack:v,quickMoveTo:S,addToSearchScanPathAndQuickMove:P,searchPathInfo:M,locInputValue:A,isLocationEditing:R,onLocEditEnter:y,onEditBtnClick:B,share:j,selectAll:L,onCreateFloderBtnClick:K,onWalkBtnClick:E,showWalkButton:pe,searchInCurrentDir:me}=At(),{gridItems:Be,sortMethodConv:De,moreActionsDropdownShow:Z,sortedFiles:G,sortMethod:ee,itemSize:ve,loadNextDir:Fe,loadNextDirLoading:Ne,canLoadNext:Ee,onScroll:ze,cellWidth:Q}=Rt(),{onDrop:Te,onFileDragStart:Ve,onFileDragEnd:Oe}=Bt(),{onFileItemClick:je,onContextMenuClick:fe,showGenInfo:H,imageGenInfo:ke,q:Le}=Dt({openNext:k}),{previewIdx:J,onPreviewVisibleChange:Ue,previewing:Ce,previewImgMove:be,canPreview:ge}=Ft(),{showMenuIdx:te}=Nt();return rt(()=>o,()=>{h.value=o;const l=Et.get(o.stackKey??"");l&&(v.value=l.slice())},{immediate:!0}),(l,t)=>{const We=ft,qe=kt,Ke=Ct,ye=q,_e=O,Ge=bt,Qe=gt,he=yt,ne=_t,we=ie,ae=Re,He=xt,Ie=Pt,Je=N,Xe=W;return p(),F(Xe,{spinning:e($),size:"large"},{default:s(()=>[a(We,{style:{display:"none"}}),u("div",{ref_key:"stackViewEl",ref:C,onDragover:t[28]||(t[28]=d(()=>{},["prevent"])),onDrop:t[29]||(t[29]=d(n=>e(Te)(n),["prevent"])),class:"container"},[a(Ke,{visible:e(H),"onUpdate:visible":t[1]||(t[1]=n=>z(H)?H.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>H.value=!1)},{cancelText:s(()=>[]),default:s(()=>[a(qe,{active:"",loading:!e(Le).isIdle},{default:s(()=>[u("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(ot)(e(ke)))},[u("div",qt,c(l.$t("doubleClickToCopy")),1),T(" "+c(e(ke)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),u("div",Kt,[o.walkModePath?(p(),w("div",Gt,[a(Ge,null,{title:s(()=>[T(c(l.$t("walk-mode-move-message")),1)]),default:s(()=>[a(_e,{style:{flex:"1"}},{default:s(()=>[(p(!0),w(re,null,oe(e(v),(n,D)=>(p(),F(ye,{key:D},{default:s(()=>[u("span",null,c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})])):(p(),w("div",{key:1,class:"breadcrumb",style:st({flex:e(R)?1:""})},[e(R)?(p(),F(Qe,{key:0,style:{flex:"1"},value:e(A),"onUpdate:value":t[3]||(t[3]=n=>z(A)?A.value=n:null),onClick:t[4]||(t[4]=d(()=>{},["stop"])),onKeydown:t[5]||(t[5]=d(()=>{},["stop"])),onPressEnter:e(y),"allow-clear":""},null,8,["value","onPressEnter"])):(p(),F(_e,{key:1,style:{flex:"1"}},{default:s(()=>[(p(!0),w(re,null,oe(e(v),(n,D)=>(p(),F(ye,{key:D},{default:s(()=>[u("a",{onClick:d(Se=>e(b)(D),["prevent"])},c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Qt)]),_:2},1024))),128))]),_:1})),e(R)?(p(),F(he,{key:2,size:"small",onClick:e(y),type:"primary"},{default:s(()=>[T(c(l.$t("go")),1)]),_:1},8,["onClick"])):(p(),w("div",Ht,[u("a",{onClick:t[6]||(t[6]=d((...n)=>e(i)&&e(i)(...n),["prevent"])),class:"copy"},c(l.$t("copy")),1),u("a",{onClick:t[7]||(t[7]=d((...n)=>e(B)&&e(B)(...n),["prevent","stop"]))},c(l.$t("edit")),1)]))],4)),u("div",Jt,[u("a",{class:"opt",onClick:t[8]||(t[8]=d((...n)=>e(m)&&e(m)(...n),["prevent"]))},c(l.$t("refresh")),1),a(ae,null,{overlay:s(()=>[a(we,null,{default:s(()=>[a(ne,{key:"tag-search"},{default:s(()=>[u("a",{onClick:t[10]||(t[10]=d(n=>e(me)("tag-search"),["prevent"]))},c(l.$t("imgSearch")),1)]),_:1}),a(ne,{key:"tag-search"},{default:s(()=>[u("a",{onClick:t[11]||(t[11]=d(n=>e(me)("fuzzy-search"),["prevent"]))},c(l.$t("fuzzy-search")),1)]),_:1})]),_:1})]),default:s(()=>[u("a",{class:"opt",onClick:t[9]||(t[9]=d(()=>{},["prevent"]))},[T(c(l.$t("search"))+" ",1),a(e(le))])]),_:1}),e(pe)?(p(),w("a",{key:0,class:"opt",onClick:t[12]||(t[12]=d((...n)=>e(E)&&e(E)(...n),["prevent"]))}," Walk ")):V("",!0),u("a",{class:"opt",onClick:t[13]||(t[13]=d((...n)=>e(L)&&e(L)(...n),["prevent","stop"]))},c(l.$t("selectAll")),1),e(lt)?V("",!0):(p(),w("a",{key:1,class:"opt",onClick:t[14]||(t[14]=d((...n)=>e(j)&&e(j)(...n),["prevent"]))},c(l.$t("share")),1)),a(ae,null,{overlay:s(()=>[a(we,null,{default:s(()=>[(p(!0),w(re,null,oe(e(_).quickMovePaths,n=>(p(),F(ne,{key:n.dir},{default:s(()=>[u("a",{onClick:d(D=>e(S)(n.dir),["prevent"])},c(n.zh),9,Xt)]),_:2},1024))),128))]),_:1})]),default:s(()=>[u("a",{class:"opt",onClick:t[15]||(t[15]=d(()=>{},["prevent"]))},[T(c(l.$t("quickMove"))+" ",1),a(e(le))])]),_:1}),a(ae,{trigger:["click"],visible:e(Z),"onUpdate:visible":t[24]||(t[24]=n=>z(Z)?Z.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:s(()=>[u("div",Yt,[a(Je,it(ut({labelCol:{span:6},wrapperCol:{span:18}})),{default:s(()=>[a(Ie,{label:l.$t("gridCellWidth")},{default:s(()=>[a(He,{modelValue:e(Q),"onUpdate:modelValue":t[17]||(t[17]=n=>z(Q)?Q.value=n:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),a(Ie,{label:l.$t("sortingMethod")},{default:s(()=>[a(e(dt),{value:e(ee),"onUpdate:value":t[18]||(t[18]=n=>z(ee)?ee.value=n:null),onClick:t[19]||(t[19]=d(()=>{},["stop"])),conv:e(De),options:e(ct)},null,8,["value","conv","options"])]),_:1},8,["label"]),u("div",Zt,[e(M)?e(M).can_delete?(p(),w("a",{key:1,onClick:t[21]||(t[21]=d((...n)=>e(P)&&e(P)(...n),["prevent"]))},c(l.$t("removeFromSearchScanPathAndQuickMove")),1)):V("",!0):(p(),w("a",{key:0,onClick:t[20]||(t[20]=d((...n)=>e(P)&&e(P)(...n),["prevent"]))},c(l.$t("addToSearchScanPathAndQuickMove")),1))]),u("div",en,[u("a",{onClick:t[22]||(t[22]=d(n=>e(pt)(e(x)+"/"),["prevent"]))},c(l.$t("openWithLocalFileBrowser")),1)]),u("div",tn,[u("a",{onClick:t[23]||(t[23]=d((...n)=>e(K)&&e(K)(...n),["prevent"]))},c(l.$t("createFolder")),1)])]),_:1},16)])]),default:s(()=>[u("a",{class:"opt",onClick:t[16]||(t[16]=d(()=>{},["prevent"]))},c(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(I)?(p(),w("div",nn,[a(e(zt),{class:"file-list",items:e(G),ref_key:"scroller",ref:f,onScroll:e(ze),"item-size":e(ve).first,"key-field":"fullpath","item-secondary-size":e(ve).second,gridItems:e(Be)},mt({default:s(({item:n,index:D})=>[a(Tt,{idx:parseInt(D),file:n,"full-screen-preview-image-url":e(G)[e(J)]?e(vt)(e(G)[e(J)]):"","show-menu-idx":e(te),"onUpdate:showMenuIdx":t[25]||(t[25]=Se=>z(te)?te.value=Se:null),selected:e(g).includes(D),"cell-width":e(Q),onFileItemClick:e(je),onDragstart:e(Ve),onDragend:e(Oe),onPreviewVisibleChange:e(Ue),onContextMenuClick:e(fe),"is-selected-mutil-files":e(g).length>1},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick","is-selected-mutil-files"])]),_:2},[o.walkModePath?{name:"after",fn:s(()=>[u("div",an,[a(he,{onClick:e(Fe),loading:e(Ne),block:"",type:"primary",disabled:!e(Ee),ghost:""},{default:s(()=>[T(c(l.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(Ce)?(p(),w("div",rn,[a(e(It),{onClick:t[26]||(t[26]=n=>e(be)("prev")),class:xe({disable:!e(ge)("prev")})},null,8,["class"]),a(e(St),{onClick:t[27]||(t[27]=n=>e(be)("next")),class:xe({disable:!e(ge)("next")})},null,8,["class"])])):V("",!0)])):V("",!0)],544),e(Ce)?(p(),F($t,{key:0,file:e(G)[e(J)],idx:e(J),onContextMenuClick:e(fe)},null,8,["file","idx","onContextMenuClick"])):V("",!0)]),_:1},8,["spinning"])}}});const Cn=ht(on,[["__scopeId","data-v-d7fbc0ca"]]);export{Cn as default};