sd-webui-infinite-image-bro.../vue/dist/assets/stackView-19ccd67f.js

2 lines
22 KiB
JavaScript

import{d as de,u as je,g as le,_ as it,c as l,a as Oe,P as be,D as Be,f as ut,w as xt,b as Ot,e as Bt,h as Ze,M as Le,i as Lt,j as Rt,F as Re,A as ct,r as ie,k as Ne,l as et,o as Nt,m as Pe,n as dt,p as Et,q as zt,s as tt,t as Tt,v as Ae,x as Y,y as at,z as jt,B as $e,C as Fe,E as Ee,G as Vt,H as Ut,I as De,J as Wt,K as Gt,L as qt,N as D,O as j,Q as y,R as Z,S as P,T as ze,U as G,V as pt,W as Ht,X as U,Y as b,Z as e,$ as S,a0 as W,a1 as Kt,a2 as nt,a3 as Qt,a4 as Jt,a5 as Xt,a6 as Yt,a7 as Zt,a8 as ea,a9 as ta,aa as st,ab as aa,ac as na,ad as sa,ae as oa,af as ra,ag as la}from"./index-333f4d92.js";import{S as ue,s as ia}from"./index-b9551320.js";import{F as q,N as ua,_ as ca,a as da}from"./numInput-ead57125.js";/* empty css */import{D as ft}from"./index-267d1f4e.js";/* empty css *//* empty css */import{u as Ve,N as pa,g as M,s as vt,a as fa,b as va,c as ma,d as ga,F as ha}from"./FileItem-064f25fa.js";import{u as ka,a as ba,b as ya,c as Ca,M as _a,L as wa,R as Ia,f as Sa}from"./MultiSelectKeep-0aedd2f1.js";import{g as ke,l as Me,o as Pa}from"./functionalCallableComp-dc2cf08d.js";import"./shortcut-0854cd7e.js";import"./Checkbox-2cca96a3.js";var Aa=["class","style"],$a=function(){return{prefixCls:String,href:String,separator:be.any,overlay:be.any,onClick:Function}};const ce=de({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:$a(),slots:["separator","overlay"],setup:function(t,c){var r=c.slots,v=c.attrs,m=je("breadcrumb",t),A=m.prefixCls,x=function(i,d){var f=le(r,t,"overlay");return f?l(ft,{overlay:f,placement:"bottom"},{default:function(){return[l("span",{class:"".concat(d,"-overlay-link")},[i,l(Be,null,null)])]}}):i};return function(){var _,i=(_=le(r,t,"separator"))!==null&&_!==void 0?_:"/",d=le(r,t),f=v.class,g=v.style,C=it(v,Aa),h;return t.href!==void 0?h=l("a",Oe({class:"".concat(A.value,"-link"),onClick:t.onClick},C),[d]):h=l("span",Oe({class:"".concat(A.value,"-link"),onClick:t.onClick},C),[d]),h=x(h,A.value),d?l("span",{class:f,style:g},[h,i&&l("span",{class:"".concat(A.value,"-separator")},[i])]):null}}});var Fa=function(){return{prefixCls:String,routes:{type:Array},params:be.any,separator:be.any,itemRender:{type:Function}}};function Da(s,t){if(!s.breadcrumbName)return null;var c=Object.keys(t).join("|"),r=s.breadcrumbName.replace(new RegExp(":(".concat(c,")"),"g"),function(v,m){return t[m]||v});return r}function ot(s){var t=s.route,c=s.params,r=s.routes,v=s.paths,m=r.indexOf(t)===r.length-1,A=Da(t,c);return m?l("span",null,[A]):l("a",{href:"#/".concat(v.join("/"))},[A])}const ae=de({compatConfig:{MODE:3},name:"ABreadcrumb",props:Fa(),slots:["separator","itemRender"],setup:function(t,c){var r=c.slots,v=je("breadcrumb",t),m=v.prefixCls,A=v.direction,x=function(f,g){return f=(f||"").replace(/^\//,""),Object.keys(g).forEach(function(C){f=f.replace(":".concat(C),g[C])}),f},_=function(f,g,C){var h=Lt(f),O=x(g||"",C);return O&&h.push(O),h},i=function(f){var g=f.routes,C=g===void 0?[]:g,h=f.params,O=h===void 0?{}:h,w=f.separator,L=f.itemRender,B=L===void 0?ot:L,N=[];return C.map(function(I){var T=x(I.path,O);T&&N.push(T);var H=[].concat(N),K=null;return I.children&&I.children.length&&(K=l(Le,null,{default:function(){return[I.children.map(function(z){return l(Le.Item,{key:z.path||z.breadcrumbName},{default:function(){return[B({route:z,params:O,routes:C,paths:_(H,z.path,O)})]}})})]}})),l(ce,{overlay:K,separator:w,key:T||I.breadcrumbName},{default:function(){return[B({route:I,params:O,routes:C,paths:H})]}})})};return function(){var d,f,g,C=t.routes,h=t.params,O=h===void 0?{}:h,w=ut(le(r,t)),L=(d=le(r,t,"separator"))!==null&&d!==void 0?d:"/",B=t.itemRender||r.itemRender||ot;C&&C.length>0?g=i({routes:C,params:O,separator:L,itemRender:B}):w.length&&(g=w.map(function(I,T){return xt(Ot(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"),Bt(I,{separator:L,key:T})}));var N=(f={},Ze(f,m.value,!0),Ze(f,"".concat(m.value,"-rtl"),A.value==="rtl"),f);return l("div",{class:N},[g])}}});var Ma=["separator","class"],xa=function(){return{prefixCls:String}};const Te=de({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:xa(),setup:function(t,c){var r=c.slots,v=c.attrs,m=je("breadcrumb",t),A=m.prefixCls;return function(){var x;v.separator;var _=v.class,i=it(v,Ma),d=ut((x=r.default)===null||x===void 0?void 0:x.call(r));return l("span",Oe({class:["".concat(A.value,"-separator"),_]},i),[d.length>0?d:"/"])}}});ae.Item=ce;ae.Separator=Te;ae.install=function(s){return s.component(ae.name,ae),s.component(ce.name,ce),s.component(Te.name,Te),s};q.useInjectFormItemContext=Rt;q.ItemRest=Re;q.install=function(s){return s.component(q.name,q),s.component(q.Item.name,q.Item),s.component(Re.name,Re),s};ue.setDefaultIndicator=ia;ue.install=function(s){return s.component(ue.name,ue),s};var Oa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const Ba=Oa;function rt(s){for(var t=1;t<arguments.length;t++){var c=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(c).filter(function(v){return Object.getOwnPropertyDescriptor(c,v).enumerable}))),r.forEach(function(v){La(s,v,c[v])})}return s}function La(s,t,c){return t in s?Object.defineProperty(s,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[t]=c,s}var Ue=function(t,c){var r=rt({},t,c.attrs);return l(ct,rt({},r,{icon:Ba}),null)};Ue.displayName="ArrowLeftOutlined";Ue.inheritAttrs=!1;const Ra=Ue;var Na={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const Ea=Na;function lt(s){for(var t=1;t<arguments.length;t++){var c=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(c).filter(function(v){return Object.getOwnPropertyDescriptor(c,v).enumerable}))),r.forEach(function(v){za(s,v,c[v])})}return s}function za(s,t,c){return t in s?Object.defineProperty(s,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[t]=c,s}var We=function(t,c){var r=lt({},t,c.attrs);return l(ct,lt({},r,{icon:Ea}),null)};We.displayName="DatabaseOutlined";We.inheritAttrs=!1;const Ta=We;function ja(){const s=ie(),{scroller:t,stackViewEl:c,stack:r,currPage:v,currLocation:m,useEventListen:A,eventEmitter:x,getPane:_,props:i,deletedFiles:d,walker:f,sortedFiles:g}=Ve().toRefs();Ne(()=>r.value.length,et((a,u)=>{var p;a!==u&&((p=t.value)==null||p.scrollToItem(0))},300)),Nt(async()=>{var a;if(!r.value.length)if(i.value.mode==="scanned-fixed"||i.value.mode==="walk")r.value=[{files:[],curr:i.value.path??""}];else{const u=await ke("/");r.value.push({files:u.files,curr:"/"})}s.value=new pa,s.value.configure({parent:c.value}),i.value.path&&i.value.path!=="/"?await B(i.value.path):(a=M.conf)!=null&&a.home&&B(M.conf.home)}),Ne(m,et(a=>{const u=_.value();if(!u)return;u.path=a;const p=u.path.split("/").pop()??"",F=(()=>{const E={walk:"Walk","scanned-fixed":"Fixed",scanned:null}[i.value.mode??"scanned"],R=V=>E?`${E}: ${V}`:V,X=Fe(a);for(const[V,oe]of Object.entries(M.pathAliasMap))if(X.startsWith(oe))return R(X.replace(oe,V));return R(p)})();u.name=Pe("div",{style:"display:flex;align-items:center"},[Pe(Ta),Pe("span",{class:"line-clamp-1",style:"max-width: 256px"},F)]),u.nameFallbackStr=F,M.recent=M.recent.filter(E=>E.key!==u.key),M.recent.unshift({path:a,key:u.key}),M.recent.length>20&&(M.recent=M.recent.slice(0,20))},300));const C=()=>Ee(m.value),h=async a=>{var u,p;if(a.type==="dir")try{(u=s.value)==null||u.start();const{files:$}=await ke(a.fullpath);i.value.mode=="scanned-fixed"?r.value=[{files:$,curr:a.fullpath}]:r.value.push({files:$,curr:a.name})}finally{(p=s.value)==null||p.done()}},O=a=>{if(i.value.mode!="walk")for(;a<r.value.length-1;)r.value.pop()},w=()=>{B(Vt(m.value))},L=(a,u)=>(Ut(M.conf,"global.conf load failed"),M.conf.is_win?a.toLowerCase()==u.toLowerCase():a==u),B=async a=>{i.value.mode==="walk"?_.value().path=a:i.value.mode==="scanned-fixed"?await h({fullpath:a,name:a,type:"dir"}):await N(a),dt(500).then(()=>x.value.emit("viewableAreaFilesChange"))},N=async a=>{var p,$;const u=r.value.slice();try{Et(a)||(a=zt(((p=M.conf)==null?void 0:p.sd_cwd)??"/",a));const F=tt(a),E=r.value.map(R=>R.curr);for(E.shift();E[0]&&F[0]&&L(E[0],F[0]);)E.shift(),F.shift();for(let R=0;R<E.length;R++)r.value.pop();if(!F.length)return I();for(const R of F){const X=($=v.value)==null?void 0:$.files.find(V=>L(V.name,R));if(!X)throw console.error({frags:F,frag:R,stack:Tt(r.value)}),new Error(`${R} not found`);await h(X)}}catch(F){throw Ae.error(Y("moveFailedCheckPath")+(F instanceof Error?F.message:"")),console.error(a,tt(a),v.value),r.value=u,F}},I=at(async()=>{var a,u,p;try{if((a=s.value)==null||a.start(),f.value)await f.value.reset(),x.value.emit("loadNextDir");else{const{files:$}=await ke(m.value);Me(r.value).files=$}d.value.clear(),(u=t.value)==null||u.scrollToItem(0),Ae.success(Y("refreshCompleted"))}finally{(p=s.value)==null||p.done()}});jt("returnToIIB",at(async()=>{var a,u;if(i.value.mode!=="walk")try{(a=s.value)==null||a.start();const{files:p}=await ke(m.value);Me(r.value).files.map(F=>F.date).join()!==p.map(F=>F.date).join()&&(Me(r.value).files=p,Ae.success(Y("autoUpdate")))}finally{(u=s.value)==null||u.done()}})),A.value("refresh",I);const T=a=>{B(a)},H=$e(()=>M.quickMovePaths.map(a=>({...a,path:Fe(a.dir)}))),K=$e(()=>{const a=Fe(m.value);return H.value.find(p=>p.path===a)}),ee=async()=>{const a=M.tabList[i.value.tabIdx],u={type:"empty",name:Y("emptyStartPage"),key:Date.now()+De(),popAddPathModal:{path:m.value,type:"scanned"}};a.panes.push(u),a.key=u.key},z=ie(!1),Q=ie(m.value),pe=()=>{z.value=!0,Q.value=m.value},ye=async()=>{await B(Q.value),z.value=!1};ka("click",a=>{var u,p,$;($=(p=(u=a.target)==null?void 0:u.className)==null?void 0:p.includes)!=null&&$.call(p,"ant-input")||(z.value=!1)});const Ce=()=>{const a=parent.location,u=a.href.substring(0,a.href.length-a.search.length),p=new URLSearchParams(a.search);p.set("action","open"),p.set("path",m.value),p.set("mode",i.value.mode??"scanned");const $=`${u}?${p.toString()}`;Ee($,Y("copyLocationUrlSuccessMsg"))},ne=(a="tag-search")=>{const u=M.tabList[i.value.tabIdx],p={type:a,key:De(),searchScope:m.value,name:Y(a==="tag-search"?"imgSearch":"fuzzy-search")};u.panes.push(p),u.key=p.key},J=()=>x.value.emit("selectAll"),se=async()=>{await Pa(m.value),await I()},fe=()=>{const a=m.value;vt.set(a,r.value);const u=M.tabList[i.value.tabIdx],p={type:"local",key:De(),path:a,name:Y("local"),stackKey:a,mode:"walk"};u.panes.push(p),u.key=p.key},_e=$e(()=>!f.value&&g.value.some(a=>a.type==="dir"));return{locInputValue:Q,isLocationEditing:z,onLocEditEnter:ye,onEditBtnClick:pe,addToSearchScanPathAndQuickMove:ee,searchPathInfo:K,refresh:I,copyLocation:C,back:O,openNext:h,currPage:v,currLocation:m,stack:r,scroller:t,share:Ce,selectAll:J,quickMoveTo:T,onCreateFloderBtnClick:se,onWalkBtnClick:fe,showWalkButton:_e,searchInCurrentDir:ne,backToLastUseTo:w}}const xe=new Map,Va=()=>{const{useEventListen:s,sortedFiles:t,getViewableAreaFiles:c}=Ve().toRefs(),r=ie(M.defaultChangeIndchecked),v=ie(M.defaultSeedChangeChecked),m=async()=>{if(await dt(100),!r.value)return;const _=c.value().filter(d=>Wt(d.fullpath)&&!d.gen_info_obj);if(!_.length)return;const i=await Gt(_.map(d=>d.fullpath).filter(d=>!xe.has(d)));_.forEach(d=>{const f=i[d.fullpath]||xe.get(d.fullpath)||"";xe.set(d.fullpath,f),d.gen_info_obj=qt(f),d.gen_info_raw=f})};s.value("viewableAreaFilesChange",m);const A=_=>{const i=t.value;return[_,v.value,i[_-1],i[_],i[_+1]]};function x(_,i,d,f){const g={diff:{},empty:!0,ownFile:"",otherFile:""};if(i+d<0||i+d>=t.value.length||t.value[i]==null||!("gen_info_obj"in t.value[i])||!("gen_info_obj"in t.value[i+d]))return g;const C=_,h=t.value[i+d].gen_info_obj;if(h==null)return g;const O=["hashes","resources"];g.diff={},g.ownFile=f.name,g.otherFile=t.value[i+d].name,g.empty=!1,v.value||O.push("seed");for(const w in C)if(!O.includes(w)){if(!(w in h)){g.diff[w]="+";continue}if(C[w]!=h[w])if(w.includes("rompt")&&C[w]!=""&&h[w]!=""){const L=C[w].split(","),B=h[w].split(",");let N=0;for(const I in L)L[I]!=B[I]&&N++;g.diff[w]=N}else g.diff[w]=[C[w],h[w]]}return g}return{getGenDiff:x,changeIndchecked:r,seedChangeChecked:v,getRawGenParams:()=>m(),getGenDiffWatchDep:A}};const Ua={class:"base-info"},Wa=de({__name:"BaseFileListInfo",props:{fileNum:{},selectedFileNum:{}},setup(s){return(t,c)=>(D(),j("div",Ua,[y("span",null,[Z(P(t.$t("items",[t.fileNum]))+" ",1),t.selectedFileNum?(D(),j(ze,{key:0},[Z(", "+P(t.$t("selectedItems",[t.selectedFileNum])),1)],64)):G("",!0)])]))}});const Ga=pt(Wa,[["__scopeId","data-v-afd25667"]]),qa={class:"hint"},Ha={class:"location-bar"},Ka=["onClick"],Qa={key:3,class:"location-act"},Ja={class:"actions"},Xa=["onClick"],Ya={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)"}},Za={style:{padding:"4px"}},en={style:{padding:"4px"}},tn={style:{padding:"4px"}},an={key:0,class:"view"},nn={style:{padding:"16px 0 512px"}},sn={key:0,class:"preview-switch"},on=de({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},mode:{},stackKey:{}},setup(s){const t=s,c=Ht(),{scroller:r,stackViewEl:v,props:m,multiSelectedIdxs:A,spinning:x}=Ve().toRefs(),{currLocation:_,currPage:i,refresh:d,copyLocation:f,back:g,openNext:C,stack:h,quickMoveTo:O,addToSearchScanPathAndQuickMove:w,locInputValue:L,isLocationEditing:B,onLocEditEnter:N,onEditBtnClick:I,share:T,selectAll:H,onCreateFloderBtnClick:K,onWalkBtnClick:ee,showWalkButton:z,searchInCurrentDir:Q,backToLastUseTo:pe}=ja(),{gridItems:ye,sortMethodConv:Ce,moreActionsDropdownShow:ne,sortedFiles:J,sortMethod:se,itemSize:fe,loadNextDir:_e,loadNextDirLoading:a,canLoadNext:u,onScroll:p,cellWidth:$,dirCoverCache:F}=fa(),{onDrop:E,onFileDragStart:R,onFileDragEnd:X}=ba(),{onFileItemClick:V,onContextMenuClick:oe,showGenInfo:ve,imageGenInfo:Ge,q:mt}=ya({openNext:C}),{previewIdx:me,onPreviewVisibleChange:gt,previewing:qe,previewImgMove:He,canPreview:Ke}=Ca(),{showMenuIdx:we}=va(),{onClearAllSelected:ht,onReverseSelect:kt,onSelectAll:bt}=ma(),{getGenDiff:yt,changeIndchecked:re,seedChangeChecked:ge,getRawGenParams:Ct,getGenDiffWatchDep:_t}=Va();return Ne(()=>t,()=>{m.value=t;const k=vt.get(t.stackKey??"");k&&(h.value=k.slice())},{immediate:!0}),(k,n)=>{const wt=aa,It=na,St=sa,Pt=oa,At=ce,$t=ae,Qe=ra,Ie=la,Je=Le,Se=ft,Ft=ua,he=ca,Xe=da,Dt=q,Mt=ue;return D(),U(Mt,{spinning:e(x),size:"large"},{default:b(()=>[l(_a,{show:e(c).keepMultiSelect||!!e(A).length,onClearAllSelected:e(ht),onSelectAll:e(bt),onReverseSelect:e(kt)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),l(wt,{style:{display:"none"}}),y("div",{ref_key:"stackViewEl",ref:v,onDragover:n[30]||(n[30]=S(()=>{},["prevent"])),onDrop:n[31]||(n[31]=S(o=>e(E)(o),["prevent"])),class:"container"},[l(St,{visible:e(ve),"onUpdate:visible":n[1]||(n[1]=o=>W(ve)?ve.value=o:null),width:"70vw","mask-closable":"",onOk:n[2]||(n[2]=o=>ve.value=!1)},{cancelText:b(()=>[]),default:b(()=>[l(It,{active:"",loading:!e(mt).isIdle},{default:b(()=>[y("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto","z-index":"9999"},onDblclick:n[0]||(n[0]=o=>e(Ee)(e(Ge)))},[y("div",qa,P(k.$t("doubleClickToCopy")),1),Z(" "+P(e(Ge)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),y("div",Ha,[y("div",{class:"breadcrumb",style:Kt({flex:e(B)?1:""})},[e(B)?(D(),U(Pt,{key:0,style:{flex:"1"},value:e(L),"onUpdate:value":n[3]||(n[3]=o=>W(L)?L.value=o:null),onClick:n[4]||(n[4]=S(()=>{},["stop"])),onKeydown:n[5]||(n[5]=S(()=>{},["stop"])),onPressEnter:e(N),"allow-clear":""},null,8,["value","onPressEnter"])):(D(),U($t,{key:1,style:{flex:"1"}},{default:b(()=>[(D(!0),j(ze,null,nt(e(h),(o,te)=>(D(),U(At,{key:te},{default:b(()=>[y("a",{onClick:S(Ye=>e(g)(te),["prevent"])},P(o.curr==="/"?k.$t("root"):o.curr.replace(/:\/$/,k.$t("drive"))),9,Ka)]),_:2},1024))),128))]),_:1})),e(B)?(D(),U(Qe,{key:2,size:"small",onClick:e(N),type:"primary"},{default:b(()=>[Z(P(k.$t("go")),1)]),_:1},8,["onClick"])):(D(),j("div",Qa,[k.mode==="scanned-fixed"?(D(),j("a",{key:0,onClick:n[6]||(n[6]=S((...o)=>e(pe)&&e(pe)(...o),["prevent"])),style:{margin:"0 8px 16px 0"}},[l(e(Ra))])):G("",!0),y("a",{onClick:n[7]||(n[7]=S((...o)=>e(f)&&e(f)(...o),["prevent"])),class:"copy"},P(k.$t("copy")),1),y("a",{onClick:n[8]||(n[8]=S((...o)=>e(I)&&e(I)(...o),["prevent","stop"]))},P(k.$t("edit")),1)]))],4),y("div",Ja,[y("a",{class:"opt",onClick:n[9]||(n[9]=S((...o)=>e(d)&&e(d)(...o),["prevent"]))},P(k.$t("refresh")),1),l(Se,null,{overlay:b(()=>[l(Je,null,{default:b(()=>[l(Ie,{key:"tag-search"},{default:b(()=>[y("a",{onClick:n[11]||(n[11]=S(o=>e(Q)("tag-search"),["prevent"]))},P(k.$t("imgSearch")),1)]),_:1}),l(Ie,{key:"tag-search"},{default:b(()=>[y("a",{onClick:n[12]||(n[12]=S(o=>e(Q)("fuzzy-search"),["prevent"]))},P(k.$t("fuzzy-search")),1)]),_:1})]),_:1})]),default:b(()=>[y("a",{class:"opt",onClick:n[10]||(n[10]=S(()=>{},["prevent"]))},[Z(P(k.$t("search"))+" ",1),l(e(Be))])]),_:1}),e(z)?(D(),j("a",{key:0,class:"opt",onClick:n[13]||(n[13]=S((...o)=>e(ee)&&e(ee)(...o),["prevent"]))}," Walk ")):G("",!0),y("a",{class:"opt",onClick:n[14]||(n[14]=S((...o)=>e(H)&&e(H)(...o),["prevent","stop"]))},P(k.$t("selectAll")),1),e(Qt)?G("",!0):(D(),j("a",{key:1,class:"opt",onClick:n[15]||(n[15]=S((...o)=>e(T)&&e(T)(...o),["prevent"]))},P(k.$t("share")),1)),l(Se,null,{overlay:b(()=>[l(Je,null,{default:b(()=>[(D(!0),j(ze,null,nt(e(c).quickMovePaths,o=>(D(),U(Ie,{key:o.dir},{default:b(()=>[y("a",{onClick:S(te=>e(O)(o.dir),["prevent"])},P(o.zh),9,Xa)]),_:2},1024))),128))]),_:1})]),default:b(()=>[y("a",{class:"opt",onClick:n[16]||(n[16]=S(()=>{},["prevent"]))},[Z(P(k.$t("quickMove"))+" ",1),l(e(Be))])]),_:1}),l(Se,{trigger:["click"],visible:e(ne),"onUpdate:visible":n[26]||(n[26]=o=>W(ne)?ne.value=o:null),placement:"bottomLeft",getPopupContainer:o=>o.parentNode},{overlay:b(()=>[y("div",Ya,[l(Dt,Jt(Xt({labelCol:{span:10},wrapperCol:{span:14}})),{default:b(()=>[l(he,{label:k.$t("gridCellWidth")},{default:b(()=>[l(Ft,{modelValue:e($),"onUpdate:modelValue":n[18]||(n[18]=o=>W($)?$.value=o:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),l(he,{label:k.$t("sortingMethod")},{default:b(()=>[l(e(Yt),{value:e(se),"onUpdate:value":n[19]||(n[19]=o=>W(se)?se.value=o:null),onClick:n[20]||(n[20]=S(()=>{},["stop"])),conv:e(Ce),options:e(Zt)},null,8,["value","conv","options"])]),_:1},8,["label"]),l(he,{label:k.$t("showChangeIndicators")},{default:b(()=>[l(Xe,{checked:e(re),"onUpdate:checked":n[21]||(n[21]=o=>W(re)?re.value=o:null),onClick:e(Ct)},null,8,["checked","onClick"])]),_:1},8,["label"]),l(he,{label:k.$t("seedAsChange")},{default:b(()=>[l(Xe,{checked:e(ge),"onUpdate:checked":n[22]||(n[22]=o=>W(ge)?ge.value=o:null),disabled:!e(re)},null,8,["checked","disabled"])]),_:1},8,["label"]),y("div",Za,[y("a",{onClick:n[23]||(n[23]=S((...o)=>e(w)&&e(w)(...o),["prevent"]))},P(k.$t("addToSearchScanPathAndQuickMove")),1)]),y("div",en,[y("a",{onClick:n[24]||(n[24]=S(o=>e(ea)(e(_)+"/"),["prevent"]))},P(k.$t("openWithLocalFileBrowser")),1)]),y("div",tn,[y("a",{onClick:n[25]||(n[25]=S((...o)=>e(K)&&e(K)(...o),["prevent"]))},P(k.$t("createFolder")),1)])]),_:1},16)])]),default:b(()=>[y("a",{class:"opt",onClick:n[17]||(n[17]=S(()=>{},["prevent"]))},P(k.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(i)?(D(),j("div",an,[l(e(ga),{class:"file-list",items:e(J),ref_key:"scroller",ref:r,onScroll:e(p),"item-size":e(fe).first,"key-field":"fullpath","item-secondary-size":e(fe).second,gridItems:e(ye)},{default:b(({item:o,index:te})=>[l(ha,{idx:parseInt(te),file:o,"full-screen-preview-image-url":e(J)[e(me)]?e(ta)(e(J)[e(me)]):"","show-menu-idx":e(we),"onUpdate:showMenuIdx":n[27]||(n[27]=Ye=>W(we)?we.value=Ye:null),selected:e(A).includes(te),"cell-width":e($),onFileItemClick:e(V),onDragstart:e(R),onDragend:e(X),onPreviewVisibleChange:e(gt),onContextMenuClick:e(oe),"is-selected-mutil-files":e(A).length>1,"enable-change-indicator":e(re),"seed-change-checked":e(ge),"get-gen-diff":e(yt),"get-gen-diff-watch-dep":e(_t),"cover-files":e(F).get(o.fullpath)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep","cover-files"])]),after:b(()=>[y("div",nn,[t.mode==="walk"?(D(),U(Qe,{key:0,onClick:e(_e),loading:e(a),block:"",type:"primary",disabled:!e(u),ghost:""},{default:b(()=>[Z(P(k.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])):G("",!0)])]),_:1},8,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(qe)?(D(),j("div",sn,[l(e(wa),{onClick:n[28]||(n[28]=o=>e(He)("prev")),class:st({disable:!e(Ke)("prev")})},null,8,["class"]),l(e(Ia),{onClick:n[29]||(n[29]=o=>e(He)("next")),class:st({disable:!e(Ke)("next")})},null,8,["class"])])):G("",!0)])):G("",!0)],544),e(qe)?(D(),U(Sa,{key:0,file:e(J)[e(me)],idx:e(me),onContextMenuClick:e(oe)},null,8,["file","idx","onContextMenuClick"])):G("",!0),l(Ga,{"file-num":e(J).length,"selected-file-num":e(A).length},null,8,["file-num","selected-file-num"])]),_:1},8,["spinning"])}}});const bn=pt(on,[["__scopeId","data-v-817f474b"]]);export{bn as default};