BREAK ');continue}const $t=De[et];Fe||(Fe=$t.includes("("));const Ht=["tag"];Fe&&Ht.push("has-parentheses"),$t.length<32&&Ht.push("short-tag"),Me.push(`${$t} `),Fe&&(Fe=!$t.includes(")"))}return Me.join(i.showCommaInInfoPanel?",":" ")}const ee=()=>{const fe=(c.indexOf(l.value)+1)%c.length;l.value=c[fe],W(),At.success(ve("autoPlayStatus",{mode:f.value[l.value]}))},Q=(re=!1)=>{C.value||!n.hasPrev||($(),C.value=!0,O.value=0,b.value=100,setTimeout(()=>{n.prev(),U(),b.value=0,setTimeout(()=>{C.value=!1},d(re))},200))},ue=(re=!1)=>{C.value||!n.hasNext||($(),C.value=!0,O.value=0,b.value=-100,setTimeout(()=>{n.next(),U(),b.value=0,setTimeout(()=>{C.value=!1},d(re))},200))},le=(re=!1)=>{C.value||($(),C.value=!0,O.value=0,b.value=100,setTimeout(()=>{n.currentIndex=0,U(),b.value=0,setTimeout(()=>{C.value=!1},d(re))},200))},oe=re=>{if(C.value){re.preventDefault();return}$(),_.value=re.touches[0].clientY,x.value=re.touches[0].clientY,T.value=!0,O.value=0,b.value!==0&&(b.value=0)},ae=re=>{if(C.value){re.preventDefault();return}if(!T.value)return;x.value=re.touches[0].clientY;const fe=x.value-_.value,De=window.innerHeight,Me=fe/De*100;O.value=Me,re.preventDefault()},X=()=>{if(!T.value)return;const re=x.value-_.value,fe=window.innerHeight,De=re/fe*100;if(T.value=!1,C.value){O.value=0;return}Math.abs(De)>30?De>0&&n.hasPrev?Q(!0):De<0&&n.hasNext?ue(!0):pe():pe()},te=()=>{T.value&&(T.value=!1,C.value||pe())},pe=()=>{C.value||(C.value=!0,O.value=0,b.value=0,setTimeout(()=>{C.value=!1,W()},300))},se=GH(re=>{C.value||(re.preventDefault(),$(),re.deltaY>0&&n.hasNext?ue():re.deltaY<0&&n.hasPrev&&Q())},500),ye=re=>{if(!(!n.visible||C.value))switch(re.key){case"ArrowUp":re.preventDefault(),n.hasPrev&&Q();break;case"ArrowDown":re.preventDefault(),n.hasNext&&ue();break;case"Escape":re.preventDefault(),n.closeView();break}},Te=async()=>{n.isFullscreen?await Ne():await Pe()},Pe=async()=>{if(v.value&&!document.fullscreenElement)try{await v.value.requestFullscreen(),n.isFullscreen=!0}catch(re){console.warn("无法进入全屏模式:",re)}},Ne=async()=>{if(document.fullscreenElement)try{await document.exitFullscreen(),n.isFullscreen=!1}catch(re){console.warn("无法退出全屏模式:",re)}},st=()=>{s.value=!s.value;const re=h.value[1];re&&(re.muted=s.value);const fe=y.value[1];fe&&(fe.muted=s.value)},Yt=()=>{n.isFullscreen=!!document.fullscreenElement},nn=z([]),Nt=z([]),Wt=re=>{re&&(re.pause(),re.src="",re.muted=!0,re.load(),re.parentNode&&re.parentNode.removeChild(re))},bt=re=>{re&&(re.pause(),re.src="",re.muted=!0,re.load(),re.parentNode&&re.parentNode.removeChild(re))};me(nn,re=>{for(;re.length>5;){const fe=re.shift();fe&&Wt(fe)}},{deep:!0}),me(Nt,re=>{for(;re.length>5;){const fe=re.shift();fe&&bt(fe)}},{deep:!0}),me(()=>n.visible===!1||n.mediaList.length===0,re=>{re||(nn.value.forEach(Wt),nn.value=[],Nt.value.forEach(bt),Nt.value=[],l.value="off")},{immediate:!0});const Jt=()=>{w.value.forEach(re=>{if(re)if(qo(re.url)){const fe=document.createElement("video");fe.preload="metadata",fe.src=re.url,nn.value.push(fe)}else if(au(re.url)){const fe=document.createElement("audio");fe.preload="metadata",fe.src=re.url,Nt.value.push(fe)}else{const fe=new Image;fe.src=re.url}})},fr=async()=>{const re=n.currentItem;if(!re)return;const fe=(re==null?void 0:re.fullpath)||re.id;fe&&await r.fetchImageTags([fe])},Aa=async()=>{const re=n.currentItem;if(!re){D.value="";return}const fe=re.name||re.url;if(qo(fe)||au(fe)){D.value="";return}const De=(re==null?void 0:re.fullpath)||re.id;if(!De){D.value="";return}const Me=++R;F.value=!0;try{const Fe=await Pv(De);if(Me!==R)return;D.value=Fe}catch(Fe){if(console.error("Load prompt error:",Fe),Me!==R)return;D.value=""}finally{Me===R&&(F.value=!1)}},Xt=()=>{var re,fe;return((re=k.value)==null?void 0:re.fullpath)||((fe=k.value)==null?void 0:fe.id)||""},gi=()=>{var re;return((re=k.value)==null?void 0:re.name)||Xt().split(/[/\\]/).pop()||""},mi=()=>{const re=n.currentIndex;if(!(re<0||re>=n.mediaList.length)){if(n.mediaList.splice(re,1),n.mediaList.length===0){n.closeView();return}re>=n.mediaList.length&&(n.currentIndex=n.mediaList.length-1)}},Ia=async()=>{const re=Xt();re&&await new Promise(fe=>{xt.confirm({title:ve("confirmDelete"),maskClosable:!0,content:gi(),async onOk(){const{events:De}=await wn(()=>import("./index-0d856f16.js").then(Me=>Me.l),["assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js"]);await aJ([re]),At.success(ve("deleteSuccess")),De.emit("removeFiles",{paths:[re],loc:yP(re)}),mi(),N.value=!1,fe()},onCancel(){fe()}})})},rt=async()=>{const re=Xt();re&&await bq(re)},ht=async()=>{const re=Xt();re&&await wq(re)},nt=()=>{const re=Xt();re&&q1(re)},Tt=()=>{var De,Me;const re=(De=k.value)==null?void 0:De.originalFile,fe=re?Zr(re):(Me=k.value)==null?void 0:Me.url;fe&&q1(fe)};return LG(m,L,{delay:500}),He(()=>{document.addEventListener("keydown",ye),document.addEventListener("fullscreenchange",Yt),U()}),gn(()=>{document.removeEventListener("keydown",ye),document.removeEventListener("fullscreenchange",Yt),$(),h.value.forEach(re=>{Wt(re)}),y.value.forEach(re=>{bt(re)}),nn.value.forEach(Wt),nn.value=[],Nt.value.forEach(bt),Nt.value=[]}),me(()=>n.currentIndex,()=>{N.value=!1,U(),qe(()=>{Jt(),fr(),Aa()})},{immediate:!0}),me(()=>n.mediaList,()=>{U(),qe(()=>{fr(),Aa()})},{deep:!0}),me(()=>n.visible,re=>{re?(j.value=!0,qe(()=>{U()})):(N.value=!1,D.value="",F.value=!1,R++,h.value.forEach(fe=>{fe&&(fe.pause(),fe.src="",fe.load())}),h.value=[null,null,null],y.value.forEach(fe=>{fe&&(fe.pause(),fe.src="",fe.load())}),y.value=[null,null,null],w.value=[null,null,null],$(),document.fullscreenElement&&Ne())}),me(()=>s.value,re=>{h.value.forEach(fe=>{fe&&(fe.muted=re)}),y.value.forEach(fe=>{fe&&(fe.muted=re)})}),me(()=>l.value,()=>{W()}),(re,fe)=>{var De;return xe(),gt(rc,{to:"body"},[ce(n).visible?(xe(),ke("div",{key:0,ref_key:"containerRef",ref:v,class:on(P.value),onTouchstart:oe,onTouchmove:ae,onTouchend:X,onTouchcancel:te,onWheel:fe[12]||(fe[12]=(...Me)=>ce(se)&&ce(se)(...Me))},[ce(!1)?(xe(),ke("div",yJ,[(xe(!0),ke(Ie,null,Ir(o.value,(Me,Fe)=>(xe(),ke("div",{key:Fe,class:"debug-item"},[Se("span",bJ,Ae(Fe)+":",1),Se("span",{class:on(["debug-value",{"is-true":Me===!0,"is-false":Me===!1}])},Ae(Me),3)]))),128))])):tt("",!0),Se("div",{ref_key:"viewportRef",ref:m,class:"tiktok-viewport"},[(xe(!0),ke(Ie,null,Ir(w.value,(Me,Fe)=>(xe(),ke("div",{key:(Me==null?void 0:Me.id)||`empty-${Fe}`,class:"tiktok-media-item",style:Fn(I(Fe))},[Me?(xe(),ke("div",wJ,[ce(qo)(Me.url)&&ce(n).visible?(xe(),ke("video",{class:"tiktok-media tiktok-video",src:Me.url,controls:Fe===1,loop:Fe===1&&l.value==="off",playsinline:"",preload:"metadata",key:Me.url,ref_for:!0,ref:et=>{et&&(h.value[Fe]=et)}},null,8,CJ)):ce(au)(Me.url)&&ce(n).visible?(xe(),ke("div",SJ,[_J,Se("div",xJ,Ae(Me.name||Me.url.split("/").pop()),1),(xe(),ke("audio",{class:"tiktok-audio",src:Me.url,controls:Fe===1,loop:Fe===1&&l.value==="off",preload:"metadata",key:Me.url,ref_for:!0,ref:et=>{et&&(y.value[Fe]=et)}},null,8,OJ))])):(xe(),ke("img",{key:2,class:"tiktok-media",src:Me.url},null,8,TJ))])):tt("",!0)],4))),128))],512),fn(Se("div",PJ,[Se("button",{class:"control-btn close-btn",onClick:fe[0]||(fe[0]=(...Me)=>ce(n).closeView&&ce(n).closeView(...Me)),title:re.$t("close")},[S(ce(br))],8,EJ),Se("button",{class:"control-btn fullscreen-btn",onClick:Te,title:ce(n).isFullscreen?re.$t("exitFullscreen"):re.$t("fullscreen")},[ce(n).isFullscreen?(xe(),gt(ce(aY),{key:0})):(xe(),gt(ce(lY),{key:1}))],8,kJ),Se("button",{class:"control-btn sound-btn",onClick:st,title:ce(s)?re.$t("soundOn"):re.$t("soundOff")},[ce(s)?(xe(),gt(ce(MY),{key:1})):(xe(),gt(ce(EY),{key:0}))],8,AJ),ne.value?(xe(),ke("button",{key:0,class:on(["control-btn like-btn",{"like-active":ie.value}]),onClick:be,title:ie.value?re.$t("unlike"):re.$t("like")},[ie.value?(xe(),gt(ce(dY),{key:0})):(xe(),gt(ce(gY),{key:1}))],10,IJ)):tt("",!0),Se("button",{class:on(["control-btn autoplay-btn",{"autoplay-active":l.value!=="off"}]),onClick:ee,title:re.$t("autoPlayTooltip",{mode:f.value[l.value]})},[S(ce(xY)),Se("span",NJ,Ae(f.value[l.value]),1)],10,MJ),Se("button",{class:"control-btn tags-btn",onClick:fe[1]||(fe[1]=Me=>N.value=!N.value),title:re.$t("info")},[S(ce(xs))],8,$J)],512),[[hr,j.value]]),ce(a).showTiktokNavigator?fn((xe(),ke("div",FJ,[ce(n).hasPrev?(xe(),ke("div",{key:0,class:"nav-indicator nav-prev",onTouchstart:fe[2]||(fe[2]=sn(Me=>Q(!1),["prevent"])),onClick:fe[3]||(fe[3]=Me=>Q(!1))},[S(ce(SO))],32)):tt("",!0),ce(n).hasNext?(xe(),ke("div",{key:1,class:"nav-indicator nav-next",onTouchstart:fe[4]||(fe[4]=sn(Me=>ue(!1),["prevent"])),onClick:fe[5]||(fe[5]=Me=>ue(!1))},[S(ce(Yp))],32)):tt("",!0)],512)),[[hr,j.value]]):tt("",!0),fn(Se("div",RJ,[(De=k.value)!=null&&De.name?(xe(),ke("div",DJ,Ae(k.value.name),1)):tt("",!0)],512),[[hr,j.value]]),fn(Se("div",LJ,[Se("div",zJ,[Se("div",BJ,[Se("div",{class:"progress-fill",style:Fn({width:`${(ce(n).currentIndex+1)/ce(n).mediaList.length*100}%`})},null,4)]),Se("span",jJ,Ae(ce(n).currentIndex+1)+" / "+Ae(ce(n).mediaList.length),1)])],512),[[hr,j.value]]),S(An,{name:"fade"},{default:Be(()=>[N.value?(xe(),ke("div",{key:0,class:"tiktok-panel-backdrop",onClick:fe[6]||(fe[6]=Me=>N.value=!1)})):tt("",!0)]),_:1}),S(An,{name:"slide-up"},{default:Be(()=>{var Me;return[N.value?(xe(),ke("div",{key:0,class:"tiktok-tags-panel",onClick:fe[11]||(fe[11]=sn(()=>{},["stop"]))},[Se("div",VJ,[Se("div",WJ,[S(ce(xs)),Se("span",null,Ae(re.$t("details")),1)]),Se("button",{onClick:fe[7]||(fe[7]=Fe=>N.value=!1),class:"close-tags"},[S(ce(br))])]),Se("div",{class:"panel-body",onWheel:fe[9]||(fe[9]=sn(()=>{},["stop"])),onTouchmove:fe[10]||(fe[10]=sn(()=>{},["stop"]))},[Se("div",HJ,[Se("button",{class:"panel-action-btn danger",onClick:Ia,title:re.$t("deleteSelected")},[S(ce(C9))],8,UJ),Se("button",{class:"panel-action-btn",onClick:rt,title:re.$t("openWithLocalFileBrowser")},[S(ce(m9))],8,KJ),Se("button",{class:"panel-action-btn",onClick:ht,title:re.$t("openWithDefaultApp")},[S(ce(Kq))],8,GJ),Se("button",{class:"panel-action-btn",onClick:nt,title:re.$t("copyFilePath")},[S(ce(O9))],8,qJ),Se("button",{class:"panel-action-btn",onClick:Tt,title:re.$t("copySourceFilePreviewLink")},[S(ce(wY))],8,YJ)]),Se("div",JJ,[Se("div",XJ,[S(ce(RY)),vt(),Se("span",null,Ae(re.$t("tags")),1)]),Se("div",ZJ,[Se("div",{onClick:fe[8]||(fe[8]=(...Fe)=>ce(Bu)&&ce(Bu)(...Fe)),style:Fn({background:"rgba(255, 255, 255, 0.05)",color:"var(--zp-luminous)",border:"1px solid var(--zp-luminous)",...Ce})},Ae(re.$t("addNewCustomTag")),5),(xe(!0),ke(Ie,null,Ir(((Me=ce(i).conf)==null?void 0:Me.all_custom_tags)||[],Fe=>(xe(),ke("div",{key:Fe.id,onClick:et=>he(Fe.id),style:Fn({background:K(Fe.id)?ce(r).getColor(Fe):"rgba(255, 255, 255, 0.05)",color:K(Fe.id)?"white":ce(r).getColor(Fe),border:`1px solid ${ce(r).getColor(Fe)}`,...Ce})},Ae(Fe.name),13,QJ))),128))])]),Se("div",eX,[Se("div",tX,[S(ce(eY)),vt(),nX]),Se("div",rX,[F.value?(xe(),ke("div",aX,"...")):(xe(),ke(Ie,{key:1},[V.value.prompt?(xe(),ke("div",iX,[oX,Se("code",{innerHTML:Y(V.value.prompt??"")},null,8,sX)])):tt("",!0),V.value.negativePrompt?(xe(),ke("div",lX,[uX,Se("code",{innerHTML:Y(V.value.negativePrompt??"")},null,8,cX)])):tt("",!0),!V.value.prompt&&!V.value.negativePrompt?(xe(),ke("div",fX,"—")):tt("",!0)],64))])])],32)])):tt("",!0)]}),_:1})],34)):tt("",!0)])}}});const vX=ia(dX,[["__scopeId","data-v-6485d9e7"]]),pX={class:"container"},hX=["src"],gX=de({__name:"ImgSliSide",props:{side:{},containerWidth:{},img:{},maxEdge:{},percent:{}},setup(t){const e=t,n=xv(async()=>uP(await Tv(Zr(e.img)),"width","height")),r=B(()=>{let a="";const o=e.containerWidth;if(e.side==="left"?a=`calc(50% - ${(e.percent-50)/100*o}px)`:a=`calc(-50% - ${(e.percent-50)/100*o+4}px)`,e.maxEdge==="height")return`height:100%;transform: translate(${a}, -50%)`;{const s=n.value;return s?`height:${o/s.width*s.height}px;transform: translate(${a}, -50%)`:void 0}});return(a,i)=>(xe(),ke("div",pX,[Se("img",{class:on(["img",[a.side]]),style:Fn(r.value),src:ce(Zr)(a.img),onDragstart:i[0]||(i[0]=sn(()=>{},["prevent","stop"]))},null,46,hX)]))}});const mw=ia(gX,[["__scopeId","data-v-c9b1d83c"]]),mX=de({__name:"PromptCompare",props:{lImg:{},rImg:{}},setup(t){const e=t,n=cP(),r=cn(),a=z(""),i=z("");function o(s){var c;let l="",u=TP(s);l+=`--- PROMPT --- \r
`,l+=((c=u.prompt)==null?void 0:c.replace(/\r\n/g,""))+`\r
\r
`,l+=`--- NEGATIVE PROMPT --- \r
@@ -299,7 +299,7 @@ Note that this is not an issue if running this frontend on a browser instead of
\r
`,l+=`--- PARAMS ---\r
`;for(const[f,p]of Object.entries(u))f=="prompt"||f=="negativePrompt"||(l+=f+": "+p+`\r
-`);return l}return me(()=>{var s;return(s=e==null?void 0:e.lImg)==null?void 0:s.fullpath},async s=>{s&&(n.tasks.forEach(l=>l.cancel()),n.pushAction(()=>Pv(s)).res.then(l=>{a.value=o(l)}),n.pushAction(()=>Pv(e.rImg.fullpath)).res.then(l=>{i.value=o(l)}))},{immediate:!0}),(s,l)=>{const u=Ks("VueDiff");return xe(),gt(u,{class:"diff",mode:"split",theme:ce(r).computedTheme,language:"plaintext",prev:a.value,current:i.value},null,8,["theme","prev","current"])}}});const yX={key:0,class:"hint"},bX={class:"hint-inline"},wX=de({__name:"ImgSliComparePane",props:{left:{},right:{},container:{}},setup(t,{expose:e}){const n=t,r=z(50),a=([{size:c}])=>{r.value=c},i=z(),{width:o}=nq(i);e({requestFullScreen:()=>{var c;(c=i.value)==null||c.requestFullscreen()}});const l=xv(async()=>{if(!n.left||!n.right)return{width:0,height:0};const[c,f]=await Promise.all([Tv(Zr(n.left)),Tv(Zr(n.right))]);return{width:Math.max(c.width,f.width),height:Math.max(f.height,c.height)}}),u=xv(async()=>{const c=l.value;if(!c)return"width";const{height:f,width:p}=c,g=p/f,d=document.body.clientWidth/document.body.clientHeight;return g>d?"width":"height"});return(c,f)=>(xe(),ke(Ie,null,[Se("div",{ref_key:"wrapperEl",ref:i,style:{height:"100%"}},[S(ce(SP),{class:"default-theme",onResize:a},{default:Be(()=>[c.left?(xe(),gt(ce(Av),{key:0},{default:Be(()=>[S(mw,{side:"left","max-edge":ce(u),"container-width":ce(o),percent:r.value,img:c.left},null,8,["max-edge","container-width","percent","img"])]),_:1})):tt("",!0),c.right?(xe(),gt(ce(Av),{key:1},{default:Be(()=>[S(mw,{"max-edge":ce(u),percent:r.value,img:c.right,side:"right","container-width":ce(o)},null,8,["max-edge","percent","img","container-width"])]),_:1})):tt("",!0)]),_:1})],512),c.container!=="drawer"?(xe(),ke("div",yX,[Se("div",bX,[S(ce(Jq)),vt(" "+Ae(c.$t("scrollDownToComparePrompt")),1)])])):tt("",!0),S(mX,{lImg:c.left,rImg:c.right},null,8,["lImg","rImg"])],64))}});const CX={class:"actions"},SX=de({__name:"ImgSliDrawer",setup(t){const e=_P(),n=z();return(r,a)=>{const i=Gt,o=j4,s=yB;return xe(),ke(Ie,null,[S(s,{width:"100vw",visible:ce(e).drawerVisible,"onUpdate:visible":a[2]||(a[2]=l=>ce(e).drawerVisible=l),"destroy-on-close":"",class:"img-sli","close-icon":null},{footer:Be(()=>[Se("div",CX,[S(i,{onClick:a[0]||(a[0]=l=>ce(e).drawerVisible=!1)},{default:Be(()=>[vt(Ae(r.$t("close")),1)]),_:1}),S(i,{onClick:a[1]||(a[1]=l=>{var u;return(u=n.value)==null?void 0:u.requestFullScreen()})},{default:Be(()=>[vt(Ae(r.$t("fullscreenview")),1)]),_:1}),S(o,{banner:"",style:{height:"32px"},message:"👇 "+r.$t("scrollDownToComparePrompt"),type:"info","show-icon":""},null,8,["message"])])]),default:Be(()=>[ce(e).left&&ce(e).right?(xe(),gt(wX,{key:0,ref_key:"splitpane",ref:n,container:"drawer",left:ce(e).left,right:ce(e).right},null,8,["left","right"])):tt("",!0)]),_:1},8,["visible"]),S(qY),S(vX)],64)}}});const _X=ia(SX,[["__scopeId","data-v-d6c97117"]]),xX=de({__name:"SplitViewTab",setup(t){const e=cn(),n={local:zn(()=>wn(()=>import("./stackView-19fe464d.js"),["assets/stackView-19fe464d.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/index-c80754a2.js","assets/_isIterateeCall-16c5cf9c.js","assets/FileItem-aa47825a.js","assets/FileItem-0881fad3.css","assets/MultiSelectKeep-56b94e1f.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/stackView-714f932f.css","assets/index-23c8b8a7.css"])),empty:zn(()=>wn(()=>import("./emptyStartup-35a5d062.js"),["assets/emptyStartup-35a5d062.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/emptyStartup-2ab553ed.css"])),"global-setting":zn(()=>wn(()=>import("./globalSetting-bdaa1c5e.js"),["assets/globalSetting-bdaa1c5e.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/globalSetting-e0e78319.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"tag-search-matched-image-grid":zn(()=>wn(()=>import("./MatchedImageGrid-30230c17.js"),["assets/MatchedImageGrid-30230c17.js","assets/MultiSelectKeep-56b94e1f.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-aa47825a.js","assets/FileItem-0881fad3.css","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-e2eaf999.js","assets/MatchedImageGrid-c716d973.css"])),"topic-search-matched-image-grid":zn(()=>wn(()=>import("./MatchedImageGrid-e17e54d4.js"),["assets/MatchedImageGrid-e17e54d4.js","assets/MultiSelectKeep-56b94e1f.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-aa47825a.js","assets/FileItem-0881fad3.css","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-e2eaf999.js","assets/MatchedImageGrid-e9e22234.css"])),"tag-search":zn(()=>wn(()=>import("./TagSearch-818f8831.js"),["assets/TagSearch-818f8831.js","assets/TipsCarousel-4f02731b.js","assets/TipsCarousel-23a4bc9c.css","assets/_isIterateeCall-16c5cf9c.js","assets/TagSearch-936bbb36.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"fuzzy-search":zn(()=>wn(()=>import("./SubstrSearch-1b7f0fea.js"),["assets/SubstrSearch-1b7f0fea.js","assets/FileItem-aa47825a.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-0881fad3.css","assets/MultiSelectKeep-56b94e1f.js","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-e2eaf999.js","assets/TipsCarousel-4f02731b.js","assets/TipsCarousel-23a4bc9c.css","assets/SubstrSearch-7eea79b7.css","assets/index-23c8b8a7.css"])),"topic-search":zn(()=>wn(()=>import("./TopicSearch-05f7b29c.js"),["assets/TopicSearch-05f7b29c.js","assets/TopicSearch-43737bca.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"img-sli":zn(()=>wn(()=>import("./ImgSliPagePane-dfc4a469.js"),["assets/ImgSliPagePane-dfc4a469.js","assets/ImgSliPagePane-868b21f8.css"])),"batch-download":zn(()=>wn(()=>import("./batchDownload-e250ee26.js"),["assets/batchDownload-e250ee26.js","assets/FileItem-aa47825a.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-0881fad3.css","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/batchDownload-57f1d54b.css"])),"grid-view":zn(()=>wn(()=>import("./gridView-ddcc92b5.js"),["assets/gridView-ddcc92b5.js","assets/FileItem-aa47825a.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-0881fad3.css","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/gridView-eef9ac55.css"])),"workspace-snapshot":zn(()=>wn(()=>import("./index-8565d02c.js"),["assets/index-8565d02c.js","assets/index-bd568ec0.css"])),"random-image":zn(()=>wn(()=>import("./randomImage-e636ca3e.js"),["assets/randomImage-e636ca3e.js","assets/FileItem-aa47825a.js","assets/index-e1a70e12.js","assets/index-80432a0c.css","assets/FileItem-0881fad3.css","assets/index-c80754a2.js","assets/shortcut-3129f75b.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-16c5cf9c.js","assets/MultiSelectKeep-56b94e1f.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/randomImage-4d1c5076.css"]))},r=(o,s,l)=>{var c,f;const u=e.tabList[o];if(l==="add"){const p={type:"empty",key:Rn(),name:ve("emptyStartPage")};u.panes.push(p),u.key=p.key}else{const p=u.panes.findIndex(g=>g.key===s);if(u.key===s&&(u.key=((c=u.panes[p-1])==null?void 0:c.key)??((f=u.panes[1])==null?void 0:f.key)),u.panes.splice(p,1),u.panes.length===0&&e.tabList.splice(o,1),e.tabList.length===0){const g=e.createEmptyPane();e.tabList.push({panes:[g],key:g.key,id:Rn()})}}};Ov("closeTabPane",(o,s)=>r(o,s,"del"));const a=z();me(()=>e.tabList,async()=>{var o;await qe(),e.saveRecord(),Array.from(((o=a.value)==null?void 0:o.querySelectorAll(".splitpanes__pane"))??[]).forEach((s,l)=>{Array.from(s.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,c)=>{const f=u;f.setAttribute("draggable","true"),f.setAttribute("tabIdx",l.toString()),f.setAttribute("paneIdx",c.toString()),f.ondragend=()=>{e.dragingTab=void 0},f.ondragstart=p=>{e.dragingTab={tabIdx:l,paneIdx:c},p.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:l,paneIdx:c,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const i=ri(()=>lo.emit("returnToIIB"),100);return SG(async()=>{const o=window.parent;if(!await fq(()=>o==null?void 0:o.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}o.onUiTabChange(()=>{const s=o.get_uiCurrentTabContent();s!=null&&s.id.includes("infinite-image-browsing")&&i()})}),me(XG(),o=>o&&i()),(o,s)=>{const l=Au,u=ns;return xe(),ke("div",{ref_key:"container",ref:a},[S(ce(SP),{class:"default-theme"},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(ce(e).tabList,(c,f)=>(xe(),gt(ce(Av),{key:c.id},{default:Be(()=>[S(Vq,{tabIdx:f},{default:Be(()=>[S(u,{type:"editable-card",activeKey:c.key,"onUpdate:activeKey":p=>c.key=p,onEdit:(p,g)=>r(f,p,g)},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(c.panes,(p,g)=>(xe(),gt(l,{key:p.key,tab:p.name,class:"pane"},{default:Be(()=>[(xe(),gt(Ek(n[p.type]),rp({tabIdx:f,paneKey:p.key,paneIdx:g},p),null,16,["tabIdx","paneKey","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1}),S(_X)],512)}}});const OX=ia(xX,[["__scopeId","data-v-76f3eb81"]]);const PP=t=>(fo("data-v-0a74f0db"),t=t(),vo(),t),TX={class:"organize-jobs-wrapper"},PX=PP(()=>Se("span",{class:"fab-icon"},"📁",-1)),EX={key:1,class:"organize-jobs-panel"},kX={class:"panel-header"},AX={class:"panel-title"},IX={class:"panel-header-right"},MX={class:"job-header"},NX=PP(()=>Se("span",{class:"job-icon"},"📁",-1)),$X={class:"job-folders"},FX={class:"job-progress"},RX={class:"stage-label"},DX={class:"preview-ready-hint"},LX={class:"stage-label"},zX={key:0,class:"current-file"},BX={class:"result-summary success"},jX={class:"result-summary error"},VX=de({__name:"OrganizeJobsPanel",emits:["open-preview"],setup(t,{emit:e}){const n=cn(),r=p=>!p||p.length===0?"":p.length===1?p[0].split(/[/\\]/).pop()||p[0]:`${p.length} ${ve("folders")}`,a=p=>({queued:"default",running:"processing",preview_ready:"warning",moving:"processing",done:"success",error:"error"})[p]||"default",i=p=>({queued:ve("queued"),running:ve("analyzing"),preview_ready:ve("waitingConfirm"),moving:ve("moving"),done:ve("completed"),error:ve("error")})[p]||p,o=p=>p?{embedding:ve("generatingEmbeddings"),clustering:ve("clusteringAnalysis"),titling:ve("generatingTitles"),preview_ready:ve("previewReady"),moving:ve("movingFiles"),done:ve("completed")}[p]||p:"",s=p=>{var g;return["queued","running"].includes(p.status)&&["embedding","clustering","titling"].includes(((g=p.progress)==null?void 0:g.stage)||"")},l=p=>{if(!p)return 0;const{stage:g,embedded_done:d,to_embed:v,clusters_done:m,clusters_total:h}=p;return g==="embedding"&&v>0?Math.round(d/v*40):g==="clustering"?50:g==="titling"&&h>0?60+Math.round(m/h*40):0},u=p=>{if(!p)return 0;const{moved_done:g,moved_total:d}=p;return d>0?Math.round(g/d*100):0},c=p=>{const g=JSON.parse(JSON.stringify(p));console.log("openPreview called","job_id:",g.job_id,"status:",g.status,"preview:",g.preview?`has preview (${g.preview.total_files} files)`:"no preview"),e("open-preview",g)},f=p=>{n.removeOrganizeJob(p)};return(p,g)=>{const d=Yl,v=Gt,m=tO,h=X7;return xe(),ke("div",TX,[ce(n).activeOrganizeJobs.length&&!ce(n).showOrganizePanel?(xe(),ke("div",{key:0,class:"organize-jobs-fab",onClick:g[0]||(g[0]=y=>ce(n).showOrganizePanel=!0)},[PX,S(d,{count:ce(n).activeOrganizeJobs.length,offset:[-2,2]},null,8,["count"])])):tt("",!0),ce(n).activeOrganizeJobs.length&&ce(n).showOrganizePanel?(xe(),ke("div",EX,[Se("div",kX,[Se("span",AX,Ae(ce(ve)("organizeJobs")),1),Se("div",IX,[S(d,{count:ce(n).activeOrganizeJobs.length},null,8,["count"]),S(v,{type:"text",size:"small",class:"close-btn",onClick:g[1]||(g[1]=y=>ce(n).showOrganizePanel=!1)},{default:Be(()=>[vt("✕")]),_:1})])]),(xe(!0),ke(Ie,null,Ir(ce(n).activeOrganizeJobs,y=>{var w,b,C,_,x,T,O,N;return xe(),ke("div",{key:y.job_id,class:"job-item"},[Se("div",MX,[NX,Se("span",$X,Ae(r(y.folder_paths)),1),S(m,{color:a(y.status)},{default:Be(()=>[vt(Ae(i(y.status)),1)]),_:2},1032,["color"])]),Se("div",FX,[s(y)?(xe(),ke(Ie,{key:0},[Se("div",RX,Ae(o((w=y.progress)==null?void 0:w.stage)),1),S(h,{percent:l(y.progress),status:y.status==="error"?"exception":"active",size:"small"},null,8,["percent","status"])],64)):tt("",!0),y.status==="preview_ready"?(xe(),ke(Ie,{key:1},[Se("div",DX,Ae(ce(ve)("organizePreviewReady",{files:((b=y.preview)==null?void 0:b.total_files)??0,clusters:((_=(C=y.preview)==null?void 0:C.clusters)==null?void 0:_.length)??0})),1),S(v,{type:"primary",size:"small",onClick:D=>c(y)},{default:Be(()=>[vt(Ae(ce(ve)("viewPreview")),1)]),_:2},1032,["onClick"])],64)):tt("",!0),((x=y.progress)==null?void 0:x.stage)==="moving"?(xe(),ke(Ie,{key:2},[Se("div",LX,Ae(ce(ve)("movingFiles")),1),S(h,{percent:u(y.progress),size:"small",status:"active"},null,8,["percent"]),y.progress.current_file?(xe(),ke("div",zX,Ae(y.progress.current_file),1)):tt("",!0)],64)):tt("",!0),y.status==="done"?(xe(),ke(Ie,{key:3},[Se("div",BX,Ae(ce(ve)("organizeComplete",{moved:((T=y.progress)==null?void 0:T.moved_done)??0,folders:((N=(O=y.progress)==null?void 0:O.created_folders)==null?void 0:N.length)??0})),1),S(v,{size:"small",onClick:D=>f(y.job_id)},{default:Be(()=>[vt(Ae(ce(ve)("close")),1)]),_:2},1032,["onClick"])],64)):tt("",!0),y.status==="error"?(xe(),ke(Ie,{key:4},[Se("div",jX,Ae(ce(ve)("organizeFailed")),1),S(v,{size:"small",onClick:D=>f(y.job_id)},{default:Be(()=>[vt(Ae(ce(ve)("close")),1)]),_:2},1032,["onClick"])],64)):tt("",!0)])])}),128))])):tt("",!0)])}}});const WX=ia(VX,[["__scopeId","data-v-0a74f0db"]]);const HX=async t=>(await ze.value.post("/db/organize_files_start",t)).data,EP=async t=>(await ze.value.get("/db/organize_files_status",{params:{job_id:t}})).data,UX=async t=>(await ze.value.post("/db/organize_files_confirm",t)).data,kP=t=>(fo("data-v-b7f18d8d"),t=t(),vo(),t),KX={class:"organize-preview"},GX=["src"],qX={class:"preview-header"},YX={class:"summary"},JX={class:"dest-folder"},XX={class:"cluster-header"},ZX=kP(()=>Se("span",{class:"folder-icon"},"📁",-1)),QX={key:0,class:"folder-name"},eZ={class:"file-count"},tZ={class:"file-mappings"},nZ=["onMouseenter"],rZ=kP(()=>Se("span",{class:"arrow"},"→",-1)),aZ=["title"],iZ=["onClick"],oZ={class:"preview-actions"},sZ={class:"action-summary"},lZ={key:0},uZ=de({__name:"OrganizePreview",props:{preview:{}},emits:["cancel","confirmed"],setup(t,{emit:e}){const n=t,r=z([]),a=lt(new Set),i=lt(new Map),o=lt(new Set),s=z(null),l=z(""),u=z(!1),c=z(""),f=lt({x:0,y:0});let p=null;const g=B(()=>{const F=[...n.preview.clusters];return n.preview.noise.size>0&&F.push(n.preview.noise),F}),d=F=>i.get(F.cluster_id)||F.suggested_folder_name,v=F=>F.split(/[/\\]/).pop()||F,m=F=>`${pi.value}/image-thumbnail?path=${encodeURIComponent(F)}&t=${Date.now()}&size=512x512`,h=(F,R)=>{var k;const j=((k=R.split(".").pop())==null?void 0:k.toLowerCase())||"";["jpg","jpeg","png","gif","webp","bmp","ico","svg"].includes(j)&&(p&&clearTimeout(p),p=setTimeout(()=>{c.value=m(R),w(F)},300))},y=()=>{p&&(clearTimeout(p),p=null),c.value=""},w=F=>{f.x=F.clientX+20,f.y=F.clientY-100,f.y<10&&(f.y=10)},b=F=>o.has(F.cluster_id)?F.file_mappings:F.file_mappings.slice(0,10),C=B(()=>g.value.filter(F=>!a.has(F.cluster_id)).reduce((F,R)=>F+R.file_mappings.filter(j=>j.dest_path!==j.src_path).length,0)),_=B(()=>g.value.filter(F=>a.has(F.cluster_id)).reduce((F,R)=>F+R.size,0)),x=F=>{s.value=F.cluster_id,l.value=d(F)},T=()=>{s.value&&l.value.trim()&&i.set(s.value,l.value.trim()),s.value=null,l.value=""},O=F=>{a.has(F)?a.delete(F):a.add(F)},N=()=>{e("cancel")},D=async()=>{u.value=!0;try{const F=[];i.forEach((R,j)=>{F.push({cluster_id:j,new_folder_name:R})}),await UX({job_id:n.preview.job_id,folder_edits:F.length>0?F:void 0,skip_cluster_ids:a.size>0?Array.from(a):void 0}),At.success(ve("startMovingFiles")),e("confirmed")}catch(F){At.error(`${ve("confirmFailed")}: ${F.message||F}`)}finally{u.value=!1}};return(F,R)=>{const j=Ft,L=tO,k=Gt,P=u9,I=Iu,$=rs;return xe(),ke("div",KX,[c.value?(xe(),ke("div",{key:0,class:"image-preview-tooltip",style:Fn({top:f.y+"px",left:f.x+"px"})},[Se("img",{src:c.value,onError:R[0]||(R[0]=W=>c.value="")},null,40,GX)],4)):tt("",!0),Se("div",qX,[Se("h3",null,Ae(ce(ve)("smartOrganizePreview")),1),Se("div",YX,Ae(ce(ve)("organizePreviewSummary",{files:F.preview.total_files,folders:F.preview.clusters.length+(F.preview.noise.size>0?1:0)})),1),Se("div",JX,[vt(Ae(ce(ve)("destFolder"))+": ",1),Se("code",null,Ae(F.preview.dest_folder),1)])]),S($,{activeKey:r.value,"onUpdate:activeKey":R[5]||(R[5]=W=>r.value=W),class:"cluster-list"},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(g.value,W=>(xe(),gt(I,{key:W.cluster_id,class:on({skipped:a.has(W.cluster_id)})},{header:Be(()=>[Se("div",XX,[ZX,s.value!==W.cluster_id?(xe(),ke("span",QX,Ae(d(W)),1)):(xe(),gt(j,{key:1,value:l.value,"onUpdate:value":R[1]||(R[1]=G=>l.value=G),size:"small",style:{width:"200px"},onPressEnter:T,onBlur:T,onClick:R[2]||(R[2]=sn(()=>{},["stop"]))},null,8,["value"])),Se("span",eZ,"("+Ae(W.size)+" "+Ae(ce(ve)("files"))+")",1),W.cluster_id==="__noise__"?(xe(),gt(L,{key:2,color:"orange"},{default:Be(()=>[vt(Ae(ce(ve)("unsorted")),1)]),_:1})):tt("",!0)])]),extra:Be(()=>[S(P,{onClick:R[3]||(R[3]=sn(()=>{},["stop"]))},{default:Be(()=>[S(k,{size:"small",onClick:G=>x(W)},{default:Be(()=>[vt(Ae(ce(ve)("rename")),1)]),_:2},1032,["onClick"]),S(k,{size:"small",type:a.has(W.cluster_id)?"primary":"default",onClick:G=>O(W.cluster_id)},{default:Be(()=>[vt(Ae(a.has(W.cluster_id)?ce(ve)("cancelSkip"):ce(ve)("skip")),1)]),_:2},1032,["type","onClick"])]),_:2},1024)]),default:Be(()=>[Se("div",tZ,[(xe(!0),ke(Ie,null,Ir(b(W),G=>(xe(),ke("div",{key:G.src_path,class:"file-mapping"},[Se("span",{class:"src-path",onMouseenter:q=>h(q,G.src_path),onMouseleave:y,onMousemove:R[4]||(R[4]=q=>w(q))},Ae(v(G.src_path)),41,nZ),rZ,Se("span",{class:"dest-path",title:G.dest_path},Ae(d(W))+"/"+Ae(v(G.src_path)),9,aZ)]))),128)),W.file_mappings.length>10&&!o.has(W.cluster_id)?(xe(),ke("div",{key:0,class:"show-more",onClick:G=>o.add(W.cluster_id)},Ae(ce(ve)("showMore",{count:W.file_mappings.length-10})),9,iZ)):tt("",!0)])]),_:2},1032,["class"]))),128))]),_:1},8,["activeKey"]),Se("div",oZ,[Se("div",sZ,[vt(Ae(ce(ve)("willMove",{count:C.value}))+" ",1),a.size?(xe(),ke("span",lZ,"("+Ae(ce(ve)("skipped",{count:_.value}))+")",1)):tt("",!0)]),S(P,null,{default:Be(()=>[S(k,{onClick:N},{default:Be(()=>[vt(Ae(ce(ve)("cancel")),1)]),_:1}),S(k,{type:"primary",loading:u.value,onClick:D},{default:Be(()=>[vt(Ae(ce(ve)("confirmOrganize")),1)]),_:1},8,["loading"])]),_:1})])])}}});const cZ=ia(uZ,[["__scopeId","data-v-b7f18d8d"]]);function Rne(t){const e=cn();e.smartOrganizeConfigPath=t,e.showSmartOrganizeConfig=!0}async function fZ(t,e){const n=cn();try{const r={folder_paths:t,lang:n.lang,dest_folder:e.destFolder||void 0,min_cluster_size:e.minClusterSize,action:e.action,recursive:e.recursive},{job_id:a}=await HX(r);return n.addOrganizeJob({job_id:a,status:"queued",progress:{stage:"embedding",embedded_done:0,to_embed:0,clusters_done:0,clusters_total:0,moved_done:0,moved_total:0,current_file:"",created_folders:[],errors:[]},startedAt:Date.now(),folder_paths:t}),At.success(ve("organizeJobStarted")),dZ(a,t),a}catch(r){throw At.error(`${ve("error")}: ${r.message||r}`),r}}async function dZ(t,e){const n=cn(),r=2e3,a=async()=>{var i,o;try{const s=await EP(t);console.log("Poll response:","status:",s.status,"stage:",(i=s.progress)==null?void 0:i.stage,"preview:",s.preview?`yes (${s.preview.total_files} files, ${(o=s.preview.clusters)==null?void 0:o.length} clusters)`:"no");const l={status:s.status,progress:s.progress};s.preview&&(l.preview=s.preview,console.log("Preview data received from API:",s.preview.total_files,"files")),n.updateOrganizeJob(t,l),["done","error","preview_ready"].includes(s.status)?(console.log("Poll stopped at status:",s.status),s.status==="error"?console.error("Organize job failed:",s.error):s.status==="preview_ready"?console.log("Preview ready - user can now view and confirm"):s.status==="done"&&(console.log("Organize done, emitting refresh event"),lo.emit("refreshFileView",{paths:e}))):setTimeout(a,r)}catch(s){console.error("Poll organize status error:",s),setTimeout(a,r*2)}};a()}const AP=t=>(fo("data-v-5d792d0e"),t=t(),vo(),t),vZ={class:"info-panel"},pZ={class:"info-row"},hZ={class:"info-label"},gZ={class:"info-path"},mZ={class:"info-tips"},yZ=AP(()=>Se("span",{class:"separator"},"|",-1)),bZ=AP(()=>Se("span",{class:"separator"},"|",-1)),wZ={class:"form-item-hint"},CZ={class:"form-item-hint"},SZ={class:"form-item-hint"},_Z={key:0,class:"loading-status"},xZ={style:{"margin-left":"8px"}},OZ=de({__name:"SmartOrganizeConfigModal",setup(t){const e=cn(),n=z(!1),r=z(""),a=lt({destFolder:"",recursive:!1,minClusterSize:3,action:"move"});me(()=>e.showSmartOrganizeConfig,s=>{s&&(a.destFolder="",a.recursive=!1,a.minClusterSize=3,a.action="move",n.value=!1,r.value="")});const i=async()=>{const s=e.smartOrganizeConfigPath;try{n.value=!0,r.value=ve("updatingIndex"),await nJ({folder:s,recursive:a.recursive}),r.value=ve("startingOrganizeJob"),await fZ([s],{...a,destFolder:a.destFolder||s}),e.showSmartOrganizeConfig=!1}catch(l){console.error("Smart organize failed:",l)}finally{n.value=!1,r.value=""}},o=()=>{n.value||(e.showSmartOrganizeConfig=!1)};return(s,l)=>{const u=Ft,c=Xx,f=v9,p=Bj,g=Hn,d=hx,v=pa,m=Hi,h=Gt,y=xt;return xe(),gt(y,{visible:ce(e).showSmartOrganizeConfig,"onUpdate:visible":l[4]||(l[4]=w=>ce(e).showSmartOrganizeConfig=w),title:ce(ve)("smartOrganizeConfig"),width:"70vw",onOk:i,onCancel:o,confirmLoading:n.value},{footer:Be(()=>[S(h,{onClick:o,disabled:n.value},{default:Be(()=>[vt(Ae(ce(ve)("organizeCancel")),1)]),_:1},8,["disabled"]),S(h,{type:"primary",onClick:i,loading:n.value},{default:Be(()=>[vt(Ae(ce(ve)("organizeStartTask")),1)]),_:1},8,["loading"])]),default:Be(()=>[Se("div",vZ,[Se("div",pZ,[Se("span",hZ,Ae(ce(ve)("organizeSourceFolder"))+":",1),Se("code",gZ,Ae(ce(e).smartOrganizeConfigPath),1)]),Se("div",mZ,[Se("span",null,Ae(ce(ve)("smartOrganizeNotice")),1),yZ,Se("span",null,Ae(ce(ve)("topicSearchRequirementsOpenai")),1),bZ,Se("span",null,Ae(ce(ve)("topicSearchRequirementsDepsPython")),1)])]),S(v,{"label-col":{span:8},"wrapper-col":{span:16}},{default:Be(()=>[S(c,{label:ce(ve)("organizeTargetFolder")},{default:Be(()=>[S(u,{value:a.destFolder,"onUpdate:value":l[0]||(l[0]=w=>a.destFolder=w),placeholder:ce(e).smartOrganizeConfigPath,disabled:n.value},null,8,["value","placeholder","disabled"]),Se("div",wZ,Ae(ce(ve)("organizeTargetFolderDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeRecursive")},{default:Be(()=>[S(f,{checked:a.recursive,"onUpdate:checked":l[1]||(l[1]=w=>a.recursive=w),disabled:n.value},null,8,["checked","disabled"]),Se("div",CZ,Ae(ce(ve)("organizeRecursiveDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeMinClusterSize")},{default:Be(()=>[S(p,{value:a.minClusterSize,"onUpdate:value":l[2]||(l[2]=w=>a.minClusterSize=w),min:2,max:20,style:{width:"100px"},disabled:n.value},null,8,["value","disabled"]),Se("div",SZ,Ae(ce(ve)("organizeMinClusterSizeDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeAction")},{default:Be(()=>[S(d,{value:a.action,"onUpdate:value":l[3]||(l[3]=w=>a.action=w),disabled:n.value},{default:Be(()=>[S(g,{value:"move"},{default:Be(()=>[vt(Ae(ce(ve)("organizeActionMove")),1)]),_:1}),S(g,{value:"copy"},{default:Be(()=>[vt(Ae(ce(ve)("organizeActionCopy")),1)]),_:1})]),_:1},8,["value","disabled"])]),_:1},8,["label"])]),_:1}),n.value?(xe(),ke("div",_Z,[S(m,{size:"small"}),Se("span",xZ,Ae(r.value),1)])):tt("",!0)]),_:1},8,["visible","title","confirmLoading"])}}});const TZ=ia(OZ,[["__scopeId","data-v-5d792d0e"]]),PZ=(t,e)=>{const n={key:Rn(),name:e.name??""};switch(t){case"local":return{...n,type:t,path:e.path,mode:e.mode,stackKey:e.stackKey,targetFile:e.targetFile,openPreview:e.openPreview};case"tag-search":return{...n,type:t,searchScope:e.searchScope};case"fuzzy-search":return{...n,type:t,searchScope:e.searchScope,initialSubstr:e.substr,initialIsRegex:e.isRegex,initialPathOnly:e.pathOnly,initialMediaType:e.mediaType,autoSearch:e.autoSearch};case"tag-search-matched-image-grid":return{...n,type:t,selectedTagIds:e.selectedTagIds,id:e.id??Rn()};case"topic-search-matched-image-grid":return{...n,type:t,id:e.id??Rn(),title:e.title??"",paths:e.paths??[]};case"grid-view":return{...n,type:t,files:e.files??[],removable:e.removable,allowDragAndDrop:e.allowDragAndDrop};case"img-sli":return{...n,type:t,left:e.left,right:e.right};case"random-image":return{...n,type:t};case"topic-search":case"batch-download":case"workspace-snapshot":case"global-setting":return{...n,type:t};default:return null}},EZ=async t=>{var a;const e=(a=t.conf)==null?void 0:a.global_setting,n=new URLSearchParams(parent.location.search);switch(n.get("action")){case"view":{let i=n.get("path");if(!i){console.error("[IIB] view action requires path parameter");return}i=si(i);const o=yP(i),s=Nq(i),l=t.tabList[0],u={type:"local",path:o,key:Rn(),name:s,mode:"scanned-fixed",targetFile:i,openPreview:!0};l.panes.unshift(u),l.key=u.key,iu(),Gf(["action","path"]);break}case"open":{let i=n.get("path");if(!i||!e)return;const o={extra:e.outdir_extras_samples,save:e.outdir_save,txt2img:e.outdir_txt2img_samples,img2img:e.outdir_img2img_samples};o[i]&&(i=o[i]);const s=t.tabList[0],l=n.get("mode"),u={type:"local",path:i,key:Rn(),name:"",mode:["scanned","walk","scanned-fixed"].includes(l||"scanned")?l:"scanned"};s.panes.unshift(u),s.key=u.key,iu(),Gf(["action","path","mode"]);break}case"pane":{const i=n.get("type"),o=n.get("props");if(!i||!["local","tag-search","fuzzy-search","tag-search-matched-image-grid","topic-search-matched-image-grid","grid-view","img-sli","random-image","topic-search","batch-download","workspace-snapshot","global-setting","empty"].includes(i)){console.error("[IIB] Invalid or missing pane type:",i);return}let l={};try{o&&(l=JSON.parse(decodeURIComponent(o)))}catch(c){console.error("[IIB] Failed to parse pane props:",c);return}const u=PZ(i,l);if(u){const c=t.tabList[0];c.panes.unshift(u),c.key=u.key,iu()}Gf(["action","type","props"]);break}}};function yw(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!sr(t)}const IP="app.conf.json",vs=z(),MP=()=>zs.writeFile(IP,JSON.stringify(Ve(vs.value),null,4)),kZ=de({setup(){const t=async()=>{const e=await YT({directory:!0});if(typeof e=="string"){if(!await zs.exists(`${e}/config.json`))return At.error(ve("tauriLaunchConfMessages.configNotFound"));if(!await zs.exists(`${e}/extensions/sd-webui-infinite-image-browsing`))return At.error(ve("tauriLaunchConfMessages.folderNotFound"));vs.value.sdwebui_dir=e,At.info(ve("tauriLaunchConfMessages.configCompletedMessage")),await MP(),await Vc("shutdown_api_server_command"),await ai(1500),await KT()}};return()=>{let e,n;return S("div",{style:{padding:"32px 0"}},[S("div",{style:{padding:"16px 0"}},[S("h2",null,[ve("tauriLaunchConf.readSdWebuiConfigTitle")]),S("p",null,[ve("tauriLaunchConf.readSdWebuiConfigDescription")]),S(Gt,{onClick:t,type:"primary"},yw(e=ve("tauriLaunchConf.selectSdWebuiFolder"))?e:{default:()=>[e]})]),S("div",{style:{padding:"16px 0"}},[S("h2",null,[ve("tauriLaunchConf.skipThisConfigTitle")]),S("p",null,[ve("tauriLaunchConf.skipThisConfigDescription")]),S(Gt,{type:"primary",onClick:xt.destroyAll},yw(n=ve("tauriLaunchConf.skipButton"))?n:{default:()=>[n]})])])}}}),AZ=async()=>{try{vs.value=JSON.parse(await zs.readTextFile(IP))}catch{}vs.value||(vs.value={sdwebui_dir:""},await MP(),xt.info({title:ve("tauriLaunchConfMessages.firstTimeUserTitle"),content:S(kZ,null,null),width:"80vw",okText:ve("tauriLaunchConf.skipButton"),okButtonProps:{onClick:xt.destroyAll}}))},IZ=async t=>{var i;if(!((i=t.conf)!=null&&i.export_fe_fn))return;const e=Kc();a({insertTabPane:({tabIdx:o=0,paneIdx:s=0,pane:l})=>{const u=t.tabList[o];return l.key||(l.key=Rn()),u.panes.splice(s,0,l),u.key=l.key,{key:l.key,ref:r(l.key)}},getTabList:()=>t.tabList,getPageRef:r,switch2IIB:iu,openIIBInNewTab:()=>window.parent.open("/infinite_image_browsing"),setTagColor(o,s){e.colorCache.set(o,s)},setTags(o,s){e.set(o,s)},getTags(o){return e.tagMap.get(o)},createGridViewFile(o,s){return{name:o.split(/[/\\]/).pop()??"",size:"-",bytes:0,type:"file",created_time:"",date:"",fullpath:o,tags:s==null?void 0:s.map(l=>({name:l})),is_under_scanned_path:!0}}});function r(o){return new Proxy({},{get(s,l,u){var c;if(l==="close"){const f=t.tabList.findIndex(p=>p.panes.some(g=>g.key===o));return()=>lo.emit("closeTabPane",f,o)}return(c=t.pageFuncExportMap.get(o))==null?void 0:c[l]}})}function a(o){const s=window;for(const l in o)s[l]=(...u)=>o[l](...u)}},MZ={key:0,class:"moving-files-overlay"},NZ={class:"moving-files-content"},$Z={class:"moving-text"},FZ={class:"moving-progress"},RZ=de({__name:"App",setup(t){const e=cn(),n=Rq(),r=cP(),a=z(!1),i=z(null),o=z(!1),s=z({moved:0,total:0}),l=v=>{console.log("handleOpenOrganizePreview received:","job_id:",v.job_id,"status:",v.status,"preview:",v.preview?`yes (${v.preview.total_files} files)`:"no"),v.preview?(i.value=v.preview,a.value=!0,console.log("Modal opened with preview data")):console.warn("No preview data in job - job keys:",Object.keys(v))},u=async()=>{var y,w;a.value=!1;const v=(y=i.value)==null?void 0:y.job_id,m=((w=e.getOrganizeJob(v||""))==null?void 0:w.folder_paths)||[];if(i.value=null,!v)return;o.value=!0,s.value={moved:0,total:0};const h=async()=>{var b,C;try{const _=await EP(v);_.status==="moving"?(s.value={moved:((b=_.progress)==null?void 0:b.moved_done)||0,total:((C=_.progress)==null?void 0:C.moved_total)||0},setTimeout(h,500)):_.status==="done"?(o.value=!1,e.removeOrganizeJob(v),At.success(ve("organizeComplete")),lo.emit("refreshFileView",{paths:m})):_.status==="error"?(o.value=!1,At.error(`${ve("organizeFailed")}: ${_.error}`)):setTimeout(h,500)}catch(_){console.error("Poll moving status error:",_),setTimeout(h,1e3)}};h()},c=()=>{a.value=!1,i.value=null},f=CP.filter(v=>!["tabListHistoryRecord","recent"].includes(v));let p=null;const g=N1(async()=>{e.$subscribe(ri(async()=>{var m;if(((m=e.conf)==null?void 0:m.is_readonly)===!0)return;const v={};f.forEach(h=>{v[h]=rr(e[h])}),JSON.stringify(v)!==JSON.stringify(p)&&(console.log("save global setting",v),await dP("global",v),p=rr(v))},500))}),d=N1(async()=>{var m,h;await ai(100);const v=e.defaultInitinalPage;if(v!=="empty")if(v==="last-workspace-state"){const y=(m=e.tabListHistoryRecord)==null?void 0:m[1];if(!(y!=null&&y.tabs))return;e.tabList=rr(y.tabs),At.success(ve("restoreLastWorkspaceStateSuccess"))}else{const y=(h=v.split("_"))==null?void 0:h[2],w=n.snapshots.find(b=>b.id===y);if(!(w!=null&&w.tabs))return;e.tabList=rr(w.tabs),At.success(ve("restoreWorkspaceSnapshotSuccess"))}});return Ov("updateGlobalSetting",async()=>{var y,w;await hG(),console.log(Lu.value);const v=await mq();e.conf=v;const m=await nw(v);e.quickMovePaths=m.filter(b=>{var C,_;return(_=(C=b==null?void 0:b.dir)==null?void 0:C.trim)==null?void 0:_.call(C)});const h=(w=(y=e==null?void 0:e.conf)==null?void 0:y.app_fe_setting)==null?void 0:w.global;h&&(console.log("restoreFeGlobalSetting",h),p=rr(h),f.forEach(b=>{const C=h[b];C!==void 0&&(e[b]=C)})),g(),d(),IZ(e),EZ(e)}),Ov("returnToIIB",async()=>{const v=e.conf;if(!v)return;const m=v.global_setting;if(!m.outdir_txt2img_samples&&!m.outdir_img2img_samples)return;const h=new Set(e.quickMovePaths.map(w=>w.key));if(h.has("outdir_txt2img_samples")&&h.has("outdir_img2img_samples"))return;const y=await nw(v);e.quickMovePaths=y.filter(w=>{var b,C;return(C=(b=w==null?void 0:w.dir)==null?void 0:b.trim)==null?void 0:C.call(b)})}),me(()=>e.computedTheme==="dark",async v=>{await ai();const m=document.getElementsByTagName("html")[0];if(v){document.body.classList.add("dark");const h=document.createElement("style"),{default:y}=await wn(()=>import("./antd.dark-35e9b327.js"),[]);h.innerHTML=y,h.setAttribute("antd-dark",""),m.appendChild(h)}else document.body.classList.remove("dark"),Array.from(m.querySelectorAll("style[antd-dark]")).forEach(h=>h.remove())},{immediate:!0}),me(()=>e.previewBgOpacity,v=>{document.documentElement.style.setProperty("--iib-preview-mask-bg",`rgba(0, 0, 0, ${v})`)},{immediate:!0}),He(async()=>{iP&&AZ(),lo.emit("updateGlobalSetting")}),(v,m)=>{const h=$n,y=xt,w=Hi;return xe(),ke(Ie,null,[S(h,{loading:!ce(r).isIdle},{default:Be(()=>[S(OX)]),_:1},8,["loading"]),S(WX,{onOpenPreview:l}),S(y,{visible:a.value,"onUpdate:visible":m[0]||(m[0]=b=>a.value=b),title:ce(ve)("smartOrganizePreview"),footer:null,width:800,destroyOnClose:!0,zIndex:2e3},{default:Be(()=>[i.value?(xe(),gt(cZ,{key:0,preview:i.value,onCancel:c,onConfirmed:u},null,8,["preview"])):tt("",!0)]),_:1},8,["visible","title"]),S(TZ),o.value?(xe(),ke("div",MZ,[Se("div",NZ,[S(w,{size:"large"}),Se("div",$Z,Ae(ce(ve)("movingFiles")),1),Se("div",FZ,Ae(s.value.moved)+" / "+Ae(s.value.total),1)])])):tt("",!0)],64)}}});function DZ(t){return typeof t=="object"&&t!==null}function bw(t,e){return t=DZ(t)?t:Object.create(null),new Proxy(t,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(e,r,a)}})}function LZ(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function zZ(t,e,n){return e.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},t)[e[e.length-1]]=n,t}function BZ(t,e){return e.reduce((n,r)=>{const a=r.split(".");return zZ(n,a,LZ(t,a))},{})}function ww(t,{storage:e,serializer:n,key:r,debug:a}){try{const i=e==null?void 0:e.getItem(r);i&&t.$patch(n==null?void 0:n.deserialize(i))}catch(i){a&&console.error(i)}}function Cw(t,{storage:e,serializer:n,key:r,paths:a,debug:i}){try{const o=Array.isArray(a)?BZ(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function jZ(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:r=n},store:a}=e;if(!r)return;const i=(Array.isArray(r)?r.map(o=>bw(o,t)):[bw(r,t)]).map(({storage:o=localStorage,beforeRestore:s=null,afterRestore:l=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:c=a.$id,paths:f=null,debug:p=!1})=>{var g;return{storage:o,beforeRestore:s,afterRestore:l,serializer:u,key:((g=t.key)!=null?g:d=>d)(c),paths:f,debug:p}});a.$persist=()=>{i.forEach(o=>{Cw(a.$state,o)})},a.$hydrate=({runHooks:o=!0}={})=>{i.forEach(s=>{const{beforeRestore:l,afterRestore:u}=s;o&&(l==null||l(e)),ww(a,s),o&&(u==null||u(e))})},i.forEach(o=>{const{beforeRestore:s,afterRestore:l}=o;s==null||s(e),ww(a,o),l==null||l(e),a.$subscribe((u,c)=>{Cw(c,o)},{detached:!0})})}}var VZ=jZ(),WZ=Object.defineProperty,HZ=Object.defineProperties,UZ=Object.getOwnPropertyDescriptors,Sw=Object.getOwnPropertySymbols,KZ=Object.prototype.hasOwnProperty,GZ=Object.prototype.propertyIsEnumerable,_w=(t,e,n)=>e in t?WZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iv=(t,e)=>{for(var n in e||(e={}))KZ.call(e,n)&&_w(t,n,e[n]);if(Sw)for(var n of Sw(e))GZ.call(e,n)&&_w(t,n,e[n]);return t},qZ=(t,e)=>HZ(t,UZ(e));function YZ(t){return qu()?(zv(t),!0):!1}const NP=typeof window<"u";function $P(t,e){function n(...r){t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})}return n}const JZ=t=>t();function XZ(t,e={}){let n,r;return i=>{const o=ce(t),s=ce(e.maxWait);if(n&&clearTimeout(n),o<=0||s!==void 0&&s<=0)return r&&(clearTimeout(r),r=null),i();s&&!r&&(r=setTimeout(()=>{n&&clearTimeout(n),r=null,i()},s)),n=setTimeout(()=>{r&&clearTimeout(r),r=null,i()},o)}}function ZZ(t,e=!0,n=!0){let r=0,a,i=!n;const o=()=>{a&&(clearTimeout(a),a=void 0)};return l=>{const u=ce(t),c=Date.now()-r;if(o(),u<=0)return r=Date.now(),l();c>u&&(r=Date.now(),i?i=!1:l()),e&&(a=setTimeout(()=>{r=Date.now(),n||(i=!0),o(),l()},u)),!n&&!a&&(a=setTimeout(()=>i=!0,u))}}function Yo(t,e=200,n=!0,r=!0){return $P(ZZ(e,n,r),t)}var xw=Object.getOwnPropertySymbols,QZ=Object.prototype.hasOwnProperty,eQ=Object.prototype.propertyIsEnumerable,tQ=(t,e)=>{var n={};for(var r in t)QZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&xw)for(var r of xw(t))e.indexOf(r)<0&&eQ.call(t,r)&&(n[r]=t[r]);return n};function nQ(t,e,n={}){const r=n,{eventFilter:a=JZ}=r,i=tQ(r,["eventFilter"]);return me(t,$P(a,e),i)}var rQ=Object.defineProperty,aQ=Object.defineProperties,iQ=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertySymbols,FP=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,Ow=(t,e,n)=>e in t?rQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oQ=(t,e)=>{for(var n in e||(e={}))FP.call(e,n)&&Ow(t,n,e[n]);if(ju)for(var n of ju(e))RP.call(e,n)&&Ow(t,n,e[n]);return t},sQ=(t,e)=>aQ(t,iQ(e)),lQ=(t,e)=>{var n={};for(var r in t)FP.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ju)for(var r of ju(t))e.indexOf(r)<0&&RP.call(t,r)&&(n[r]=t[r]);return n};function DP(t,e,n={}){const r=n,{debounce:a=0}=r,i=lQ(r,["debounce"]);return nQ(t,e,sQ(oQ({},i),{eventFilter:XZ(a)}))}function uQ(t){var e;const n=ce(t);return(e=n==null?void 0:n.$el)!=null?e:n}const cQ=NP?window:void 0,Tw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pw="__vueuse_ssr_handlers__";Tw[Pw]=Tw[Pw]||{};var Ew=Object.getOwnPropertySymbols,fQ=Object.prototype.hasOwnProperty,dQ=Object.prototype.propertyIsEnumerable,vQ=(t,e)=>{var n={};for(var r in t)fQ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ew)for(var r of Ew(t))e.indexOf(r)<0&&dQ.call(t,r)&&(n[r]=t[r]);return n};function pQ(t,e,n={}){const r=n,{window:a=cQ}=r,i=vQ(r,["window"]);let o;const s=a&&"ResizeObserver"in a,l=()=>{o&&(o.disconnect(),o=void 0)},u=me(()=>uQ(t),f=>{l(),s&&a&&f&&(o=new ResizeObserver(e),o.observe(f,i))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return YZ(c),{isSupported:s,stop:c}}var kw,Aw;NP&&(window!=null&&window.navigator)&&((kw=window==null?void 0:window.navigator)!=null&&kw.platform)&&/iP(ad|hone|od)/.test((Aw=window==null?void 0:window.navigator)==null?void 0:Aw.platform);var mg={exports:{}};(function(t){var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,a=0;e.Diff=function(i,o){return[i,o]},e.prototype.diff_main=function(i,o,s,l){typeof l>"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+1e3*this.Diff_Timeout);var u=l;if(i==null||o==null)throw new Error("Null input. (diff_main)");if(i==o)return i?[new e.Diff(a,i)]:[];typeof s>"u"&&(s=!0);var c=s,f=this.diff_commonPrefix(i,o),p=i.substring(0,f);i=i.substring(f),o=o.substring(f),f=this.diff_commonSuffix(i,o);var g=i.substring(i.length-f);i=i.substring(0,i.length-f),o=o.substring(0,o.length-f);var d=this.diff_compute_(i,o,c,u);return p&&d.unshift(new e.Diff(a,p)),g&&d.push(new e.Diff(a,g)),this.diff_cleanupMerge(d),d},e.prototype.diff_compute_=function(i,o,s,l){var u;if(!i)return[new e.Diff(r,o)];if(!o)return[new e.Diff(n,i)];var c=i.length>o.length?i:o,f=i.length>o.length?o:i,p=c.indexOf(f);if(p!=-1)return u=[new e.Diff(r,c.substring(0,p)),new e.Diff(a,f),new e.Diff(r,c.substring(p+f.length))],i.length>o.length&&(u[0][0]=u[2][0]=n),u;if(f.length==1)return[new e.Diff(n,i),new e.Diff(r,o)];var g=this.diff_halfMatch_(i,o);if(g){var d=g[0],v=g[1],m=g[2],h=g[3],y=g[4],w=this.diff_main(d,m,s,l),b=this.diff_main(v,h,s,l);return w.concat([new e.Diff(a,y)],b)}return s&&i.length>100&&o.length>100?this.diff_lineMode_(i,o,l):this.diff_bisect_(i,o,l)},e.prototype.diff_lineMode_=function(i,o,s){var l=this.diff_linesToChars_(i,o);i=l.chars1,o=l.chars2;var u=l.lineArray,c=this.diff_main(i,o,!1,s);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(a,""));for(var f=0,p=0,g=0,d="",v="";f=1&&g>=1){c.splice(f-p-g,p+g),f=f-p-g;for(var m=this.diff_main(d,v,!1,s),h=m.length-1;h>=0;h--)c.splice(f,0,m[h]);f+=m.length}g=0,p=0,d="",v="";break}f++}return c.pop(),c},e.prototype.diff_bisect_=function(i,o,s){for(var l=i.length,u=o.length,c=Math.ceil((l+u)/2),f=c,p=2*c,g=new Array(p),d=new Array(p),v=0;vs);_++){for(var x=-_+y;x<=_-w;x+=2){var T=f+x,O;x==-_||x!=_&&g[T-1]l)w+=2;else if(N>u)y+=2;else if(h){var D=f+m-x;if(D>=0&&D=F)return this.diff_bisectSplit_(i,o,O,N,s)}}}for(var R=-_+b;R<=_-C;R+=2){var D=f+R,F;R==-_||R!=_&&d[D-1]l)C+=2;else if(j>u)b+=2;else if(!h){var T=f+m-R;if(T>=0&&T=F)return this.diff_bisectSplit_(i,o,O,N,s)}}}}return[new e.Diff(n,i),new e.Diff(r,o)]},e.prototype.diff_bisectSplit_=function(i,o,s,l,u){var c=i.substring(0,s),f=o.substring(0,l),p=i.substring(s),g=o.substring(l),d=this.diff_main(c,f,!1,u),v=this.diff_main(p,g,!1,u);return d.concat(v)},e.prototype.diff_linesToChars_=function(i,o){var s=[],l={};s[0]="";function u(g){for(var d="",v=0,m=-1,h=s.length;m{var s;return(s=e==null?void 0:e.lImg)==null?void 0:s.fullpath},async s=>{s&&(n.tasks.forEach(l=>l.cancel()),n.pushAction(()=>Pv(s)).res.then(l=>{a.value=o(l)}),n.pushAction(()=>Pv(e.rImg.fullpath)).res.then(l=>{i.value=o(l)}))},{immediate:!0}),(s,l)=>{const u=Ks("VueDiff");return xe(),gt(u,{class:"diff",mode:"split",theme:ce(r).computedTheme,language:"plaintext",prev:a.value,current:i.value},null,8,["theme","prev","current"])}}});const yX={key:0,class:"hint"},bX={class:"hint-inline"},wX=de({__name:"ImgSliComparePane",props:{left:{},right:{},container:{}},setup(t,{expose:e}){const n=t,r=z(50),a=([{size:c}])=>{r.value=c},i=z(),{width:o}=nq(i);e({requestFullScreen:()=>{var c;(c=i.value)==null||c.requestFullscreen()}});const l=xv(async()=>{if(!n.left||!n.right)return{width:0,height:0};const[c,f]=await Promise.all([Tv(Zr(n.left)),Tv(Zr(n.right))]);return{width:Math.max(c.width,f.width),height:Math.max(f.height,c.height)}}),u=xv(async()=>{const c=l.value;if(!c)return"width";const{height:f,width:p}=c,g=p/f,d=document.body.clientWidth/document.body.clientHeight;return g>d?"width":"height"});return(c,f)=>(xe(),ke(Ie,null,[Se("div",{ref_key:"wrapperEl",ref:i,style:{height:"100%"}},[S(ce(SP),{class:"default-theme",onResize:a},{default:Be(()=>[c.left?(xe(),gt(ce(Av),{key:0},{default:Be(()=>[S(mw,{side:"left","max-edge":ce(u),"container-width":ce(o),percent:r.value,img:c.left},null,8,["max-edge","container-width","percent","img"])]),_:1})):tt("",!0),c.right?(xe(),gt(ce(Av),{key:1},{default:Be(()=>[S(mw,{"max-edge":ce(u),percent:r.value,img:c.right,side:"right","container-width":ce(o)},null,8,["max-edge","percent","img","container-width"])]),_:1})):tt("",!0)]),_:1})],512),c.container!=="drawer"?(xe(),ke("div",yX,[Se("div",bX,[S(ce(Jq)),vt(" "+Ae(c.$t("scrollDownToComparePrompt")),1)])])):tt("",!0),S(mX,{lImg:c.left,rImg:c.right},null,8,["lImg","rImg"])],64))}});const CX={class:"actions"},SX=de({__name:"ImgSliDrawer",setup(t){const e=_P(),n=z();return(r,a)=>{const i=Gt,o=j4,s=yB;return xe(),ke(Ie,null,[S(s,{width:"100vw",visible:ce(e).drawerVisible,"onUpdate:visible":a[2]||(a[2]=l=>ce(e).drawerVisible=l),"destroy-on-close":"",class:"img-sli","close-icon":null},{footer:Be(()=>[Se("div",CX,[S(i,{onClick:a[0]||(a[0]=l=>ce(e).drawerVisible=!1)},{default:Be(()=>[vt(Ae(r.$t("close")),1)]),_:1}),S(i,{onClick:a[1]||(a[1]=l=>{var u;return(u=n.value)==null?void 0:u.requestFullScreen()})},{default:Be(()=>[vt(Ae(r.$t("fullscreenview")),1)]),_:1}),S(o,{banner:"",style:{height:"32px"},message:"👇 "+r.$t("scrollDownToComparePrompt"),type:"info","show-icon":""},null,8,["message"])])]),default:Be(()=>[ce(e).left&&ce(e).right?(xe(),gt(wX,{key:0,ref_key:"splitpane",ref:n,container:"drawer",left:ce(e).left,right:ce(e).right},null,8,["left","right"])):tt("",!0)]),_:1},8,["visible"]),S(qY),S(vX)],64)}}});const _X=ia(SX,[["__scopeId","data-v-d6c97117"]]),xX=de({__name:"SplitViewTab",setup(t){const e=cn(),n={local:zn(()=>wn(()=>import("./stackView-e80f96dd.js"),["assets/stackView-e80f96dd.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/index-0d856f16.js","assets/_isIterateeCall-dd643bcf.js","assets/FileItem-72718f68.js","assets/FileItem-b2f0fcbe.css","assets/MultiSelectKeep-a11efe88.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/stackView-714f932f.css","assets/index-23c8b8a7.css"])),empty:zn(()=>wn(()=>import("./emptyStartup-3c6ca91e.js"),["assets/emptyStartup-3c6ca91e.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/emptyStartup-2ab553ed.css"])),"global-setting":zn(()=>wn(()=>import("./globalSetting-85de293a.js"),["assets/globalSetting-85de293a.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/globalSetting-e0e78319.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"tag-search-matched-image-grid":zn(()=>wn(()=>import("./MatchedImageGrid-ece0b4a5.js"),["assets/MatchedImageGrid-ece0b4a5.js","assets/MultiSelectKeep-a11efe88.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-72718f68.js","assets/FileItem-b2f0fcbe.css","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-ed129d88.js","assets/MatchedImageGrid-c716d973.css"])),"topic-search-matched-image-grid":zn(()=>wn(()=>import("./MatchedImageGrid-d03e7cb5.js"),["assets/MatchedImageGrid-d03e7cb5.js","assets/MultiSelectKeep-a11efe88.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-72718f68.js","assets/FileItem-b2f0fcbe.css","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-ed129d88.js","assets/MatchedImageGrid-e9e22234.css"])),"tag-search":zn(()=>wn(()=>import("./TagSearch-cc17ff40.js"),["assets/TagSearch-cc17ff40.js","assets/TipsCarousel-ef6a594c.js","assets/TipsCarousel-23a4bc9c.css","assets/_isIterateeCall-dd643bcf.js","assets/TagSearch-936bbb36.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"fuzzy-search":zn(()=>wn(()=>import("./SubstrSearch-7b723b85.js"),["assets/SubstrSearch-7b723b85.js","assets/FileItem-72718f68.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-b2f0fcbe.css","assets/MultiSelectKeep-a11efe88.js","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/hook-ed129d88.js","assets/TipsCarousel-ef6a594c.js","assets/TipsCarousel-23a4bc9c.css","assets/SubstrSearch-7eea79b7.css","assets/index-23c8b8a7.css"])),"topic-search":zn(()=>wn(()=>import("./TopicSearch-3f42ac1b.js"),["assets/TopicSearch-3f42ac1b.js","assets/TopicSearch-43737bca.css","assets/index-23c8b8a7.css","assets/index-3603af3c.css"])),"img-sli":zn(()=>wn(()=>import("./ImgSliPagePane-df5d7e31.js"),["assets/ImgSliPagePane-df5d7e31.js","assets/ImgSliPagePane-868b21f8.css"])),"batch-download":zn(()=>wn(()=>import("./batchDownload-4953de76.js"),["assets/batchDownload-4953de76.js","assets/FileItem-72718f68.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-b2f0fcbe.css","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/batchDownload-57f1d54b.css"])),"grid-view":zn(()=>wn(()=>import("./gridView-ecfae338.js"),["assets/gridView-ecfae338.js","assets/FileItem-72718f68.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-b2f0fcbe.css","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/gridView-eef9ac55.css"])),"workspace-snapshot":zn(()=>wn(()=>import("./index-f0058dfb.js"),["assets/index-f0058dfb.js","assets/index-bd568ec0.css"])),"random-image":zn(()=>wn(()=>import("./randomImage-4f4bfa2d.js"),["assets/randomImage-4f4bfa2d.js","assets/FileItem-72718f68.js","assets/index-29e38a15.js","assets/index-80432a0c.css","assets/FileItem-b2f0fcbe.css","assets/index-0d856f16.js","assets/shortcut-869fab50.js","assets/shortcut-2acaf603.css","assets/_isIterateeCall-dd643bcf.js","assets/MultiSelectKeep-a11efe88.js","assets/MultiSelectKeep-5059400f.css","assets/index-3603af3c.css","assets/randomImage-4d1c5076.css"]))},r=(o,s,l)=>{var c,f;const u=e.tabList[o];if(l==="add"){const p={type:"empty",key:Rn(),name:ve("emptyStartPage")};u.panes.push(p),u.key=p.key}else{const p=u.panes.findIndex(g=>g.key===s);if(u.key===s&&(u.key=((c=u.panes[p-1])==null?void 0:c.key)??((f=u.panes[1])==null?void 0:f.key)),u.panes.splice(p,1),u.panes.length===0&&e.tabList.splice(o,1),e.tabList.length===0){const g=e.createEmptyPane();e.tabList.push({panes:[g],key:g.key,id:Rn()})}}};Ov("closeTabPane",(o,s)=>r(o,s,"del"));const a=z();me(()=>e.tabList,async()=>{var o;await qe(),e.saveRecord(),Array.from(((o=a.value)==null?void 0:o.querySelectorAll(".splitpanes__pane"))??[]).forEach((s,l)=>{Array.from(s.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,c)=>{const f=u;f.setAttribute("draggable","true"),f.setAttribute("tabIdx",l.toString()),f.setAttribute("paneIdx",c.toString()),f.ondragend=()=>{e.dragingTab=void 0},f.ondragstart=p=>{e.dragingTab={tabIdx:l,paneIdx:c},p.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:l,paneIdx:c,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const i=ri(()=>lo.emit("returnToIIB"),100);return SG(async()=>{const o=window.parent;if(!await fq(()=>o==null?void 0:o.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}o.onUiTabChange(()=>{const s=o.get_uiCurrentTabContent();s!=null&&s.id.includes("infinite-image-browsing")&&i()})}),me(XG(),o=>o&&i()),(o,s)=>{const l=Au,u=ns;return xe(),ke("div",{ref_key:"container",ref:a},[S(ce(SP),{class:"default-theme"},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(ce(e).tabList,(c,f)=>(xe(),gt(ce(Av),{key:c.id},{default:Be(()=>[S(Vq,{tabIdx:f},{default:Be(()=>[S(u,{type:"editable-card",activeKey:c.key,"onUpdate:activeKey":p=>c.key=p,onEdit:(p,g)=>r(f,p,g)},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(c.panes,(p,g)=>(xe(),gt(l,{key:p.key,tab:p.name,class:"pane"},{default:Be(()=>[(xe(),gt(Ek(n[p.type]),rp({tabIdx:f,paneKey:p.key,paneIdx:g},p),null,16,["tabIdx","paneKey","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1}),S(_X)],512)}}});const OX=ia(xX,[["__scopeId","data-v-76f3eb81"]]);const PP=t=>(fo("data-v-0a74f0db"),t=t(),vo(),t),TX={class:"organize-jobs-wrapper"},PX=PP(()=>Se("span",{class:"fab-icon"},"📁",-1)),EX={key:1,class:"organize-jobs-panel"},kX={class:"panel-header"},AX={class:"panel-title"},IX={class:"panel-header-right"},MX={class:"job-header"},NX=PP(()=>Se("span",{class:"job-icon"},"📁",-1)),$X={class:"job-folders"},FX={class:"job-progress"},RX={class:"stage-label"},DX={class:"preview-ready-hint"},LX={class:"stage-label"},zX={key:0,class:"current-file"},BX={class:"result-summary success"},jX={class:"result-summary error"},VX=de({__name:"OrganizeJobsPanel",emits:["open-preview"],setup(t,{emit:e}){const n=cn(),r=p=>!p||p.length===0?"":p.length===1?p[0].split(/[/\\]/).pop()||p[0]:`${p.length} ${ve("folders")}`,a=p=>({queued:"default",running:"processing",preview_ready:"warning",moving:"processing",done:"success",error:"error"})[p]||"default",i=p=>({queued:ve("queued"),running:ve("analyzing"),preview_ready:ve("waitingConfirm"),moving:ve("moving"),done:ve("completed"),error:ve("error")})[p]||p,o=p=>p?{embedding:ve("generatingEmbeddings"),clustering:ve("clusteringAnalysis"),titling:ve("generatingTitles"),preview_ready:ve("previewReady"),moving:ve("movingFiles"),done:ve("completed")}[p]||p:"",s=p=>{var g;return["queued","running"].includes(p.status)&&["embedding","clustering","titling"].includes(((g=p.progress)==null?void 0:g.stage)||"")},l=p=>{if(!p)return 0;const{stage:g,embedded_done:d,to_embed:v,clusters_done:m,clusters_total:h}=p;return g==="embedding"&&v>0?Math.round(d/v*40):g==="clustering"?50:g==="titling"&&h>0?60+Math.round(m/h*40):0},u=p=>{if(!p)return 0;const{moved_done:g,moved_total:d}=p;return d>0?Math.round(g/d*100):0},c=p=>{const g=JSON.parse(JSON.stringify(p));console.log("openPreview called","job_id:",g.job_id,"status:",g.status,"preview:",g.preview?`has preview (${g.preview.total_files} files)`:"no preview"),e("open-preview",g)},f=p=>{n.removeOrganizeJob(p)};return(p,g)=>{const d=Yl,v=Gt,m=tO,h=X7;return xe(),ke("div",TX,[ce(n).activeOrganizeJobs.length&&!ce(n).showOrganizePanel?(xe(),ke("div",{key:0,class:"organize-jobs-fab",onClick:g[0]||(g[0]=y=>ce(n).showOrganizePanel=!0)},[PX,S(d,{count:ce(n).activeOrganizeJobs.length,offset:[-2,2]},null,8,["count"])])):tt("",!0),ce(n).activeOrganizeJobs.length&&ce(n).showOrganizePanel?(xe(),ke("div",EX,[Se("div",kX,[Se("span",AX,Ae(ce(ve)("organizeJobs")),1),Se("div",IX,[S(d,{count:ce(n).activeOrganizeJobs.length},null,8,["count"]),S(v,{type:"text",size:"small",class:"close-btn",onClick:g[1]||(g[1]=y=>ce(n).showOrganizePanel=!1)},{default:Be(()=>[vt("✕")]),_:1})])]),(xe(!0),ke(Ie,null,Ir(ce(n).activeOrganizeJobs,y=>{var w,b,C,_,x,T,O,N;return xe(),ke("div",{key:y.job_id,class:"job-item"},[Se("div",MX,[NX,Se("span",$X,Ae(r(y.folder_paths)),1),S(m,{color:a(y.status)},{default:Be(()=>[vt(Ae(i(y.status)),1)]),_:2},1032,["color"])]),Se("div",FX,[s(y)?(xe(),ke(Ie,{key:0},[Se("div",RX,Ae(o((w=y.progress)==null?void 0:w.stage)),1),S(h,{percent:l(y.progress),status:y.status==="error"?"exception":"active",size:"small"},null,8,["percent","status"])],64)):tt("",!0),y.status==="preview_ready"?(xe(),ke(Ie,{key:1},[Se("div",DX,Ae(ce(ve)("organizePreviewReady",{files:((b=y.preview)==null?void 0:b.total_files)??0,clusters:((_=(C=y.preview)==null?void 0:C.clusters)==null?void 0:_.length)??0})),1),S(v,{type:"primary",size:"small",onClick:D=>c(y)},{default:Be(()=>[vt(Ae(ce(ve)("viewPreview")),1)]),_:2},1032,["onClick"])],64)):tt("",!0),((x=y.progress)==null?void 0:x.stage)==="moving"?(xe(),ke(Ie,{key:2},[Se("div",LX,Ae(ce(ve)("movingFiles")),1),S(h,{percent:u(y.progress),size:"small",status:"active"},null,8,["percent"]),y.progress.current_file?(xe(),ke("div",zX,Ae(y.progress.current_file),1)):tt("",!0)],64)):tt("",!0),y.status==="done"?(xe(),ke(Ie,{key:3},[Se("div",BX,Ae(ce(ve)("organizeComplete",{moved:((T=y.progress)==null?void 0:T.moved_done)??0,folders:((N=(O=y.progress)==null?void 0:O.created_folders)==null?void 0:N.length)??0})),1),S(v,{size:"small",onClick:D=>f(y.job_id)},{default:Be(()=>[vt(Ae(ce(ve)("close")),1)]),_:2},1032,["onClick"])],64)):tt("",!0),y.status==="error"?(xe(),ke(Ie,{key:4},[Se("div",jX,Ae(ce(ve)("organizeFailed")),1),S(v,{size:"small",onClick:D=>f(y.job_id)},{default:Be(()=>[vt(Ae(ce(ve)("close")),1)]),_:2},1032,["onClick"])],64)):tt("",!0)])])}),128))])):tt("",!0)])}}});const WX=ia(VX,[["__scopeId","data-v-0a74f0db"]]);const HX=async t=>(await ze.value.post("/db/organize_files_start",t)).data,EP=async t=>(await ze.value.get("/db/organize_files_status",{params:{job_id:t}})).data,UX=async t=>(await ze.value.post("/db/organize_files_confirm",t)).data,kP=t=>(fo("data-v-b7f18d8d"),t=t(),vo(),t),KX={class:"organize-preview"},GX=["src"],qX={class:"preview-header"},YX={class:"summary"},JX={class:"dest-folder"},XX={class:"cluster-header"},ZX=kP(()=>Se("span",{class:"folder-icon"},"📁",-1)),QX={key:0,class:"folder-name"},eZ={class:"file-count"},tZ={class:"file-mappings"},nZ=["onMouseenter"],rZ=kP(()=>Se("span",{class:"arrow"},"→",-1)),aZ=["title"],iZ=["onClick"],oZ={class:"preview-actions"},sZ={class:"action-summary"},lZ={key:0},uZ=de({__name:"OrganizePreview",props:{preview:{}},emits:["cancel","confirmed"],setup(t,{emit:e}){const n=t,r=z([]),a=lt(new Set),i=lt(new Map),o=lt(new Set),s=z(null),l=z(""),u=z(!1),c=z(""),f=lt({x:0,y:0});let p=null;const g=B(()=>{const F=[...n.preview.clusters];return n.preview.noise.size>0&&F.push(n.preview.noise),F}),d=F=>i.get(F.cluster_id)||F.suggested_folder_name,v=F=>F.split(/[/\\]/).pop()||F,m=F=>`${pi.value}/image-thumbnail?path=${encodeURIComponent(F)}&t=${Date.now()}&size=512x512`,h=(F,R)=>{var k;const j=((k=R.split(".").pop())==null?void 0:k.toLowerCase())||"";["jpg","jpeg","png","gif","webp","bmp","ico","svg"].includes(j)&&(p&&clearTimeout(p),p=setTimeout(()=>{c.value=m(R),w(F)},300))},y=()=>{p&&(clearTimeout(p),p=null),c.value=""},w=F=>{f.x=F.clientX+20,f.y=F.clientY-100,f.y<10&&(f.y=10)},b=F=>o.has(F.cluster_id)?F.file_mappings:F.file_mappings.slice(0,10),C=B(()=>g.value.filter(F=>!a.has(F.cluster_id)).reduce((F,R)=>F+R.file_mappings.filter(j=>j.dest_path!==j.src_path).length,0)),_=B(()=>g.value.filter(F=>a.has(F.cluster_id)).reduce((F,R)=>F+R.size,0)),x=F=>{s.value=F.cluster_id,l.value=d(F)},T=()=>{s.value&&l.value.trim()&&i.set(s.value,l.value.trim()),s.value=null,l.value=""},O=F=>{a.has(F)?a.delete(F):a.add(F)},N=()=>{e("cancel")},D=async()=>{u.value=!0;try{const F=[];i.forEach((R,j)=>{F.push({cluster_id:j,new_folder_name:R})}),await UX({job_id:n.preview.job_id,folder_edits:F.length>0?F:void 0,skip_cluster_ids:a.size>0?Array.from(a):void 0}),At.success(ve("startMovingFiles")),e("confirmed")}catch(F){At.error(`${ve("confirmFailed")}: ${F.message||F}`)}finally{u.value=!1}};return(F,R)=>{const j=Ft,L=tO,k=Gt,P=u9,I=Iu,$=rs;return xe(),ke("div",KX,[c.value?(xe(),ke("div",{key:0,class:"image-preview-tooltip",style:Fn({top:f.y+"px",left:f.x+"px"})},[Se("img",{src:c.value,onError:R[0]||(R[0]=W=>c.value="")},null,40,GX)],4)):tt("",!0),Se("div",qX,[Se("h3",null,Ae(ce(ve)("smartOrganizePreview")),1),Se("div",YX,Ae(ce(ve)("organizePreviewSummary",{files:F.preview.total_files,folders:F.preview.clusters.length+(F.preview.noise.size>0?1:0)})),1),Se("div",JX,[vt(Ae(ce(ve)("destFolder"))+": ",1),Se("code",null,Ae(F.preview.dest_folder),1)])]),S($,{activeKey:r.value,"onUpdate:activeKey":R[5]||(R[5]=W=>r.value=W),class:"cluster-list"},{default:Be(()=>[(xe(!0),ke(Ie,null,Ir(g.value,W=>(xe(),gt(I,{key:W.cluster_id,class:on({skipped:a.has(W.cluster_id)})},{header:Be(()=>[Se("div",XX,[ZX,s.value!==W.cluster_id?(xe(),ke("span",QX,Ae(d(W)),1)):(xe(),gt(j,{key:1,value:l.value,"onUpdate:value":R[1]||(R[1]=G=>l.value=G),size:"small",style:{width:"200px"},onPressEnter:T,onBlur:T,onClick:R[2]||(R[2]=sn(()=>{},["stop"]))},null,8,["value"])),Se("span",eZ,"("+Ae(W.size)+" "+Ae(ce(ve)("files"))+")",1),W.cluster_id==="__noise__"?(xe(),gt(L,{key:2,color:"orange"},{default:Be(()=>[vt(Ae(ce(ve)("unsorted")),1)]),_:1})):tt("",!0)])]),extra:Be(()=>[S(P,{onClick:R[3]||(R[3]=sn(()=>{},["stop"]))},{default:Be(()=>[S(k,{size:"small",onClick:G=>x(W)},{default:Be(()=>[vt(Ae(ce(ve)("rename")),1)]),_:2},1032,["onClick"]),S(k,{size:"small",type:a.has(W.cluster_id)?"primary":"default",onClick:G=>O(W.cluster_id)},{default:Be(()=>[vt(Ae(a.has(W.cluster_id)?ce(ve)("cancelSkip"):ce(ve)("skip")),1)]),_:2},1032,["type","onClick"])]),_:2},1024)]),default:Be(()=>[Se("div",tZ,[(xe(!0),ke(Ie,null,Ir(b(W),G=>(xe(),ke("div",{key:G.src_path,class:"file-mapping"},[Se("span",{class:"src-path",onMouseenter:q=>h(q,G.src_path),onMouseleave:y,onMousemove:R[4]||(R[4]=q=>w(q))},Ae(v(G.src_path)),41,nZ),rZ,Se("span",{class:"dest-path",title:G.dest_path},Ae(d(W))+"/"+Ae(v(G.src_path)),9,aZ)]))),128)),W.file_mappings.length>10&&!o.has(W.cluster_id)?(xe(),ke("div",{key:0,class:"show-more",onClick:G=>o.add(W.cluster_id)},Ae(ce(ve)("showMore",{count:W.file_mappings.length-10})),9,iZ)):tt("",!0)])]),_:2},1032,["class"]))),128))]),_:1},8,["activeKey"]),Se("div",oZ,[Se("div",sZ,[vt(Ae(ce(ve)("willMove",{count:C.value}))+" ",1),a.size?(xe(),ke("span",lZ,"("+Ae(ce(ve)("skipped",{count:_.value}))+")",1)):tt("",!0)]),S(P,null,{default:Be(()=>[S(k,{onClick:N},{default:Be(()=>[vt(Ae(ce(ve)("cancel")),1)]),_:1}),S(k,{type:"primary",loading:u.value,onClick:D},{default:Be(()=>[vt(Ae(ce(ve)("confirmOrganize")),1)]),_:1},8,["loading"])]),_:1})])])}}});const cZ=ia(uZ,[["__scopeId","data-v-b7f18d8d"]]);function Rne(t){const e=cn();e.smartOrganizeConfigPath=t,e.showSmartOrganizeConfig=!0}async function fZ(t,e){const n=cn();try{const r={folder_paths:t,lang:n.lang,dest_folder:e.destFolder||void 0,min_cluster_size:e.minClusterSize,action:e.action,recursive:e.recursive},{job_id:a}=await HX(r);return n.addOrganizeJob({job_id:a,status:"queued",progress:{stage:"embedding",embedded_done:0,to_embed:0,clusters_done:0,clusters_total:0,moved_done:0,moved_total:0,current_file:"",created_folders:[],errors:[]},startedAt:Date.now(),folder_paths:t}),At.success(ve("organizeJobStarted")),dZ(a,t),a}catch(r){throw At.error(`${ve("error")}: ${r.message||r}`),r}}async function dZ(t,e){const n=cn(),r=2e3,a=async()=>{var i,o;try{const s=await EP(t);console.log("Poll response:","status:",s.status,"stage:",(i=s.progress)==null?void 0:i.stage,"preview:",s.preview?`yes (${s.preview.total_files} files, ${(o=s.preview.clusters)==null?void 0:o.length} clusters)`:"no");const l={status:s.status,progress:s.progress};s.preview&&(l.preview=s.preview,console.log("Preview data received from API:",s.preview.total_files,"files")),n.updateOrganizeJob(t,l),["done","error","preview_ready"].includes(s.status)?(console.log("Poll stopped at status:",s.status),s.status==="error"?console.error("Organize job failed:",s.error):s.status==="preview_ready"?console.log("Preview ready - user can now view and confirm"):s.status==="done"&&(console.log("Organize done, emitting refresh event"),lo.emit("refreshFileView",{paths:e}))):setTimeout(a,r)}catch(s){console.error("Poll organize status error:",s),setTimeout(a,r*2)}};a()}const AP=t=>(fo("data-v-5d792d0e"),t=t(),vo(),t),vZ={class:"info-panel"},pZ={class:"info-row"},hZ={class:"info-label"},gZ={class:"info-path"},mZ={class:"info-tips"},yZ=AP(()=>Se("span",{class:"separator"},"|",-1)),bZ=AP(()=>Se("span",{class:"separator"},"|",-1)),wZ={class:"form-item-hint"},CZ={class:"form-item-hint"},SZ={class:"form-item-hint"},_Z={key:0,class:"loading-status"},xZ={style:{"margin-left":"8px"}},OZ=de({__name:"SmartOrganizeConfigModal",setup(t){const e=cn(),n=z(!1),r=z(""),a=lt({destFolder:"",recursive:!1,minClusterSize:3,action:"move"});me(()=>e.showSmartOrganizeConfig,s=>{s&&(a.destFolder="",a.recursive=!1,a.minClusterSize=3,a.action="move",n.value=!1,r.value="")});const i=async()=>{const s=e.smartOrganizeConfigPath;try{n.value=!0,r.value=ve("updatingIndex"),await nJ({folder:s,recursive:a.recursive}),r.value=ve("startingOrganizeJob"),await fZ([s],{...a,destFolder:a.destFolder||s}),e.showSmartOrganizeConfig=!1}catch(l){console.error("Smart organize failed:",l)}finally{n.value=!1,r.value=""}},o=()=>{n.value||(e.showSmartOrganizeConfig=!1)};return(s,l)=>{const u=Ft,c=Xx,f=v9,p=Bj,g=Hn,d=hx,v=pa,m=Hi,h=Gt,y=xt;return xe(),gt(y,{visible:ce(e).showSmartOrganizeConfig,"onUpdate:visible":l[4]||(l[4]=w=>ce(e).showSmartOrganizeConfig=w),title:ce(ve)("smartOrganizeConfig"),width:"70vw",onOk:i,onCancel:o,confirmLoading:n.value},{footer:Be(()=>[S(h,{onClick:o,disabled:n.value},{default:Be(()=>[vt(Ae(ce(ve)("organizeCancel")),1)]),_:1},8,["disabled"]),S(h,{type:"primary",onClick:i,loading:n.value},{default:Be(()=>[vt(Ae(ce(ve)("organizeStartTask")),1)]),_:1},8,["loading"])]),default:Be(()=>[Se("div",vZ,[Se("div",pZ,[Se("span",hZ,Ae(ce(ve)("organizeSourceFolder"))+":",1),Se("code",gZ,Ae(ce(e).smartOrganizeConfigPath),1)]),Se("div",mZ,[Se("span",null,Ae(ce(ve)("smartOrganizeNotice")),1),yZ,Se("span",null,Ae(ce(ve)("topicSearchRequirementsOpenai")),1),bZ,Se("span",null,Ae(ce(ve)("topicSearchRequirementsDepsPython")),1)])]),S(v,{"label-col":{span:8},"wrapper-col":{span:16}},{default:Be(()=>[S(c,{label:ce(ve)("organizeTargetFolder")},{default:Be(()=>[S(u,{value:a.destFolder,"onUpdate:value":l[0]||(l[0]=w=>a.destFolder=w),placeholder:ce(e).smartOrganizeConfigPath,disabled:n.value},null,8,["value","placeholder","disabled"]),Se("div",wZ,Ae(ce(ve)("organizeTargetFolderDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeRecursive")},{default:Be(()=>[S(f,{checked:a.recursive,"onUpdate:checked":l[1]||(l[1]=w=>a.recursive=w),disabled:n.value},null,8,["checked","disabled"]),Se("div",CZ,Ae(ce(ve)("organizeRecursiveDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeMinClusterSize")},{default:Be(()=>[S(p,{value:a.minClusterSize,"onUpdate:value":l[2]||(l[2]=w=>a.minClusterSize=w),min:2,max:20,style:{width:"100px"},disabled:n.value},null,8,["value","disabled"]),Se("div",SZ,Ae(ce(ve)("organizeMinClusterSizeDesc")),1)]),_:1},8,["label"]),S(c,{label:ce(ve)("organizeAction")},{default:Be(()=>[S(d,{value:a.action,"onUpdate:value":l[3]||(l[3]=w=>a.action=w),disabled:n.value},{default:Be(()=>[S(g,{value:"move"},{default:Be(()=>[vt(Ae(ce(ve)("organizeActionMove")),1)]),_:1}),S(g,{value:"copy"},{default:Be(()=>[vt(Ae(ce(ve)("organizeActionCopy")),1)]),_:1})]),_:1},8,["value","disabled"])]),_:1},8,["label"])]),_:1}),n.value?(xe(),ke("div",_Z,[S(m,{size:"small"}),Se("span",xZ,Ae(r.value),1)])):tt("",!0)]),_:1},8,["visible","title","confirmLoading"])}}});const TZ=ia(OZ,[["__scopeId","data-v-5d792d0e"]]),PZ=(t,e)=>{const n={key:Rn(),name:e.name??""};switch(t){case"local":return{...n,type:t,path:e.path,mode:e.mode,stackKey:e.stackKey,targetFile:e.targetFile,openPreview:e.openPreview};case"tag-search":return{...n,type:t,searchScope:e.searchScope};case"fuzzy-search":return{...n,type:t,searchScope:e.searchScope,initialSubstr:e.substr,initialIsRegex:e.isRegex,initialPathOnly:e.pathOnly,initialMediaType:e.mediaType,autoSearch:e.autoSearch};case"tag-search-matched-image-grid":return{...n,type:t,selectedTagIds:e.selectedTagIds,id:e.id??Rn()};case"topic-search-matched-image-grid":return{...n,type:t,id:e.id??Rn(),title:e.title??"",paths:e.paths??[]};case"grid-view":return{...n,type:t,files:e.files??[],removable:e.removable,allowDragAndDrop:e.allowDragAndDrop};case"img-sli":return{...n,type:t,left:e.left,right:e.right};case"random-image":return{...n,type:t};case"topic-search":case"batch-download":case"workspace-snapshot":case"global-setting":return{...n,type:t};default:return null}},EZ=async t=>{var a;const e=(a=t.conf)==null?void 0:a.global_setting,n=new URLSearchParams(parent.location.search);switch(n.get("action")){case"view":{let i=n.get("path");if(!i){console.error("[IIB] view action requires path parameter");return}i=si(i);const o=yP(i),s=Nq(i),l=t.tabList[0],u={type:"local",path:o,key:Rn(),name:s,mode:"scanned-fixed",targetFile:i,openPreview:!0};l.panes.unshift(u),l.key=u.key,iu(),Gf(["action","path"]);break}case"open":{let i=n.get("path");if(!i||!e)return;const o={extra:e.outdir_extras_samples,save:e.outdir_save,txt2img:e.outdir_txt2img_samples,img2img:e.outdir_img2img_samples};o[i]&&(i=o[i]);const s=t.tabList[0],l=n.get("mode"),u={type:"local",path:i,key:Rn(),name:"",mode:["scanned","walk","scanned-fixed"].includes(l||"scanned")?l:"scanned"};s.panes.unshift(u),s.key=u.key,iu(),Gf(["action","path","mode"]);break}case"pane":{const i=n.get("type"),o=n.get("props");if(!i||!["local","tag-search","fuzzy-search","tag-search-matched-image-grid","topic-search-matched-image-grid","grid-view","img-sli","random-image","topic-search","batch-download","workspace-snapshot","global-setting","empty"].includes(i)){console.error("[IIB] Invalid or missing pane type:",i);return}let l={};try{o&&(l=JSON.parse(decodeURIComponent(o)))}catch(c){console.error("[IIB] Failed to parse pane props:",c);return}const u=PZ(i,l);if(u){const c=t.tabList[0];c.panes.unshift(u),c.key=u.key,iu()}Gf(["action","type","props"]);break}}};function yw(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!sr(t)}const IP="app.conf.json",vs=z(),MP=()=>zs.writeFile(IP,JSON.stringify(Ve(vs.value),null,4)),kZ=de({setup(){const t=async()=>{const e=await YT({directory:!0});if(typeof e=="string"){if(!await zs.exists(`${e}/config.json`))return At.error(ve("tauriLaunchConfMessages.configNotFound"));if(!await zs.exists(`${e}/extensions/sd-webui-infinite-image-browsing`))return At.error(ve("tauriLaunchConfMessages.folderNotFound"));vs.value.sdwebui_dir=e,At.info(ve("tauriLaunchConfMessages.configCompletedMessage")),await MP(),await Vc("shutdown_api_server_command"),await ai(1500),await KT()}};return()=>{let e,n;return S("div",{style:{padding:"32px 0"}},[S("div",{style:{padding:"16px 0"}},[S("h2",null,[ve("tauriLaunchConf.readSdWebuiConfigTitle")]),S("p",null,[ve("tauriLaunchConf.readSdWebuiConfigDescription")]),S(Gt,{onClick:t,type:"primary"},yw(e=ve("tauriLaunchConf.selectSdWebuiFolder"))?e:{default:()=>[e]})]),S("div",{style:{padding:"16px 0"}},[S("h2",null,[ve("tauriLaunchConf.skipThisConfigTitle")]),S("p",null,[ve("tauriLaunchConf.skipThisConfigDescription")]),S(Gt,{type:"primary",onClick:xt.destroyAll},yw(n=ve("tauriLaunchConf.skipButton"))?n:{default:()=>[n]})])])}}}),AZ=async()=>{try{vs.value=JSON.parse(await zs.readTextFile(IP))}catch{}vs.value||(vs.value={sdwebui_dir:""},await MP(),xt.info({title:ve("tauriLaunchConfMessages.firstTimeUserTitle"),content:S(kZ,null,null),width:"80vw",okText:ve("tauriLaunchConf.skipButton"),okButtonProps:{onClick:xt.destroyAll}}))},IZ=async t=>{var i;if(!((i=t.conf)!=null&&i.export_fe_fn))return;const e=Kc();a({insertTabPane:({tabIdx:o=0,paneIdx:s=0,pane:l})=>{const u=t.tabList[o];return l.key||(l.key=Rn()),u.panes.splice(s,0,l),u.key=l.key,{key:l.key,ref:r(l.key)}},getTabList:()=>t.tabList,getPageRef:r,switch2IIB:iu,openIIBInNewTab:()=>window.parent.open("/infinite_image_browsing"),setTagColor(o,s){e.colorCache.set(o,s)},setTags(o,s){e.set(o,s)},getTags(o){return e.tagMap.get(o)},createGridViewFile(o,s){return{name:o.split(/[/\\]/).pop()??"",size:"-",bytes:0,type:"file",created_time:"",date:"",fullpath:o,tags:s==null?void 0:s.map(l=>({name:l})),is_under_scanned_path:!0}}});function r(o){return new Proxy({},{get(s,l,u){var c;if(l==="close"){const f=t.tabList.findIndex(p=>p.panes.some(g=>g.key===o));return()=>lo.emit("closeTabPane",f,o)}return(c=t.pageFuncExportMap.get(o))==null?void 0:c[l]}})}function a(o){const s=window;for(const l in o)s[l]=(...u)=>o[l](...u)}},MZ={key:0,class:"moving-files-overlay"},NZ={class:"moving-files-content"},$Z={class:"moving-text"},FZ={class:"moving-progress"},RZ=de({__name:"App",setup(t){const e=cn(),n=Rq(),r=cP(),a=z(!1),i=z(null),o=z(!1),s=z({moved:0,total:0}),l=v=>{console.log("handleOpenOrganizePreview received:","job_id:",v.job_id,"status:",v.status,"preview:",v.preview?`yes (${v.preview.total_files} files)`:"no"),v.preview?(i.value=v.preview,a.value=!0,console.log("Modal opened with preview data")):console.warn("No preview data in job - job keys:",Object.keys(v))},u=async()=>{var y,w;a.value=!1;const v=(y=i.value)==null?void 0:y.job_id,m=((w=e.getOrganizeJob(v||""))==null?void 0:w.folder_paths)||[];if(i.value=null,!v)return;o.value=!0,s.value={moved:0,total:0};const h=async()=>{var b,C;try{const _=await EP(v);_.status==="moving"?(s.value={moved:((b=_.progress)==null?void 0:b.moved_done)||0,total:((C=_.progress)==null?void 0:C.moved_total)||0},setTimeout(h,500)):_.status==="done"?(o.value=!1,e.removeOrganizeJob(v),At.success(ve("organizeComplete")),lo.emit("refreshFileView",{paths:m})):_.status==="error"?(o.value=!1,At.error(`${ve("organizeFailed")}: ${_.error}`)):setTimeout(h,500)}catch(_){console.error("Poll moving status error:",_),setTimeout(h,1e3)}};h()},c=()=>{a.value=!1,i.value=null},f=CP.filter(v=>!["tabListHistoryRecord","recent"].includes(v));let p=null;const g=N1(async()=>{e.$subscribe(ri(async()=>{var m;if(((m=e.conf)==null?void 0:m.is_readonly)===!0)return;const v={};f.forEach(h=>{v[h]=rr(e[h])}),JSON.stringify(v)!==JSON.stringify(p)&&(console.log("save global setting",v),await dP("global",v),p=rr(v))},500))}),d=N1(async()=>{var m,h;await ai(100);const v=e.defaultInitinalPage;if(v!=="empty")if(v==="last-workspace-state"){const y=(m=e.tabListHistoryRecord)==null?void 0:m[1];if(!(y!=null&&y.tabs))return;e.tabList=rr(y.tabs),At.success(ve("restoreLastWorkspaceStateSuccess"))}else{const y=(h=v.split("_"))==null?void 0:h[2],w=n.snapshots.find(b=>b.id===y);if(!(w!=null&&w.tabs))return;e.tabList=rr(w.tabs),At.success(ve("restoreWorkspaceSnapshotSuccess"))}});return Ov("updateGlobalSetting",async()=>{var y,w;await hG(),console.log(Lu.value);const v=await mq();e.conf=v;const m=await nw(v);e.quickMovePaths=m.filter(b=>{var C,_;return(_=(C=b==null?void 0:b.dir)==null?void 0:C.trim)==null?void 0:_.call(C)});const h=(w=(y=e==null?void 0:e.conf)==null?void 0:y.app_fe_setting)==null?void 0:w.global;h&&(console.log("restoreFeGlobalSetting",h),p=rr(h),f.forEach(b=>{const C=h[b];C!==void 0&&(e[b]=C)})),g(),d(),IZ(e),EZ(e)}),Ov("returnToIIB",async()=>{const v=e.conf;if(!v)return;const m=v.global_setting;if(!m.outdir_txt2img_samples&&!m.outdir_img2img_samples)return;const h=new Set(e.quickMovePaths.map(w=>w.key));if(h.has("outdir_txt2img_samples")&&h.has("outdir_img2img_samples"))return;const y=await nw(v);e.quickMovePaths=y.filter(w=>{var b,C;return(C=(b=w==null?void 0:w.dir)==null?void 0:b.trim)==null?void 0:C.call(b)})}),me(()=>e.computedTheme==="dark",async v=>{await ai();const m=document.getElementsByTagName("html")[0];if(v){document.body.classList.add("dark");const h=document.createElement("style"),{default:y}=await wn(()=>import("./antd.dark-35e9b327.js"),[]);h.innerHTML=y,h.setAttribute("antd-dark",""),m.appendChild(h)}else document.body.classList.remove("dark"),Array.from(m.querySelectorAll("style[antd-dark]")).forEach(h=>h.remove())},{immediate:!0}),me(()=>e.previewBgOpacity,v=>{document.documentElement.style.setProperty("--iib-preview-mask-bg",`rgba(0, 0, 0, ${v})`)},{immediate:!0}),He(async()=>{iP&&AZ(),lo.emit("updateGlobalSetting")}),(v,m)=>{const h=$n,y=xt,w=Hi;return xe(),ke(Ie,null,[S(h,{loading:!ce(r).isIdle},{default:Be(()=>[S(OX)]),_:1},8,["loading"]),S(WX,{onOpenPreview:l}),S(y,{visible:a.value,"onUpdate:visible":m[0]||(m[0]=b=>a.value=b),title:ce(ve)("smartOrganizePreview"),footer:null,width:800,destroyOnClose:!0,zIndex:2e3},{default:Be(()=>[i.value?(xe(),gt(cZ,{key:0,preview:i.value,onCancel:c,onConfirmed:u},null,8,["preview"])):tt("",!0)]),_:1},8,["visible","title"]),S(TZ),o.value?(xe(),ke("div",MZ,[Se("div",NZ,[S(w,{size:"large"}),Se("div",$Z,Ae(ce(ve)("movingFiles")),1),Se("div",FZ,Ae(s.value.moved)+" / "+Ae(s.value.total),1)])])):tt("",!0)],64)}}});function DZ(t){return typeof t=="object"&&t!==null}function bw(t,e){return t=DZ(t)?t:Object.create(null),new Proxy(t,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(e,r,a)}})}function LZ(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function zZ(t,e,n){return e.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},t)[e[e.length-1]]=n,t}function BZ(t,e){return e.reduce((n,r)=>{const a=r.split(".");return zZ(n,a,LZ(t,a))},{})}function ww(t,{storage:e,serializer:n,key:r,debug:a}){try{const i=e==null?void 0:e.getItem(r);i&&t.$patch(n==null?void 0:n.deserialize(i))}catch(i){a&&console.error(i)}}function Cw(t,{storage:e,serializer:n,key:r,paths:a,debug:i}){try{const o=Array.isArray(a)?BZ(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function jZ(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:r=n},store:a}=e;if(!r)return;const i=(Array.isArray(r)?r.map(o=>bw(o,t)):[bw(r,t)]).map(({storage:o=localStorage,beforeRestore:s=null,afterRestore:l=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:c=a.$id,paths:f=null,debug:p=!1})=>{var g;return{storage:o,beforeRestore:s,afterRestore:l,serializer:u,key:((g=t.key)!=null?g:d=>d)(c),paths:f,debug:p}});a.$persist=()=>{i.forEach(o=>{Cw(a.$state,o)})},a.$hydrate=({runHooks:o=!0}={})=>{i.forEach(s=>{const{beforeRestore:l,afterRestore:u}=s;o&&(l==null||l(e)),ww(a,s),o&&(u==null||u(e))})},i.forEach(o=>{const{beforeRestore:s,afterRestore:l}=o;s==null||s(e),ww(a,o),l==null||l(e),a.$subscribe((u,c)=>{Cw(c,o)},{detached:!0})})}}var VZ=jZ(),WZ=Object.defineProperty,HZ=Object.defineProperties,UZ=Object.getOwnPropertyDescriptors,Sw=Object.getOwnPropertySymbols,KZ=Object.prototype.hasOwnProperty,GZ=Object.prototype.propertyIsEnumerable,_w=(t,e,n)=>e in t?WZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iv=(t,e)=>{for(var n in e||(e={}))KZ.call(e,n)&&_w(t,n,e[n]);if(Sw)for(var n of Sw(e))GZ.call(e,n)&&_w(t,n,e[n]);return t},qZ=(t,e)=>HZ(t,UZ(e));function YZ(t){return qu()?(zv(t),!0):!1}const NP=typeof window<"u";function $P(t,e){function n(...r){t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})}return n}const JZ=t=>t();function XZ(t,e={}){let n,r;return i=>{const o=ce(t),s=ce(e.maxWait);if(n&&clearTimeout(n),o<=0||s!==void 0&&s<=0)return r&&(clearTimeout(r),r=null),i();s&&!r&&(r=setTimeout(()=>{n&&clearTimeout(n),r=null,i()},s)),n=setTimeout(()=>{r&&clearTimeout(r),r=null,i()},o)}}function ZZ(t,e=!0,n=!0){let r=0,a,i=!n;const o=()=>{a&&(clearTimeout(a),a=void 0)};return l=>{const u=ce(t),c=Date.now()-r;if(o(),u<=0)return r=Date.now(),l();c>u&&(r=Date.now(),i?i=!1:l()),e&&(a=setTimeout(()=>{r=Date.now(),n||(i=!0),o(),l()},u)),!n&&!a&&(a=setTimeout(()=>i=!0,u))}}function Yo(t,e=200,n=!0,r=!0){return $P(ZZ(e,n,r),t)}var xw=Object.getOwnPropertySymbols,QZ=Object.prototype.hasOwnProperty,eQ=Object.prototype.propertyIsEnumerable,tQ=(t,e)=>{var n={};for(var r in t)QZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&xw)for(var r of xw(t))e.indexOf(r)<0&&eQ.call(t,r)&&(n[r]=t[r]);return n};function nQ(t,e,n={}){const r=n,{eventFilter:a=JZ}=r,i=tQ(r,["eventFilter"]);return me(t,$P(a,e),i)}var rQ=Object.defineProperty,aQ=Object.defineProperties,iQ=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertySymbols,FP=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,Ow=(t,e,n)=>e in t?rQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oQ=(t,e)=>{for(var n in e||(e={}))FP.call(e,n)&&Ow(t,n,e[n]);if(ju)for(var n of ju(e))RP.call(e,n)&&Ow(t,n,e[n]);return t},sQ=(t,e)=>aQ(t,iQ(e)),lQ=(t,e)=>{var n={};for(var r in t)FP.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ju)for(var r of ju(t))e.indexOf(r)<0&&RP.call(t,r)&&(n[r]=t[r]);return n};function DP(t,e,n={}){const r=n,{debounce:a=0}=r,i=lQ(r,["debounce"]);return nQ(t,e,sQ(oQ({},i),{eventFilter:XZ(a)}))}function uQ(t){var e;const n=ce(t);return(e=n==null?void 0:n.$el)!=null?e:n}const cQ=NP?window:void 0,Tw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pw="__vueuse_ssr_handlers__";Tw[Pw]=Tw[Pw]||{};var Ew=Object.getOwnPropertySymbols,fQ=Object.prototype.hasOwnProperty,dQ=Object.prototype.propertyIsEnumerable,vQ=(t,e)=>{var n={};for(var r in t)fQ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ew)for(var r of Ew(t))e.indexOf(r)<0&&dQ.call(t,r)&&(n[r]=t[r]);return n};function pQ(t,e,n={}){const r=n,{window:a=cQ}=r,i=vQ(r,["window"]);let o;const s=a&&"ResizeObserver"in a,l=()=>{o&&(o.disconnect(),o=void 0)},u=me(()=>uQ(t),f=>{l(),s&&a&&f&&(o=new ResizeObserver(e),o.observe(f,i))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return YZ(c),{isSupported:s,stop:c}}var kw,Aw;NP&&(window!=null&&window.navigator)&&((kw=window==null?void 0:window.navigator)!=null&&kw.platform)&&/iP(ad|hone|od)/.test((Aw=window==null?void 0:window.navigator)==null?void 0:Aw.platform);var mg={exports:{}};(function(t){var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,a=0;e.Diff=function(i,o){return[i,o]},e.prototype.diff_main=function(i,o,s,l){typeof l>"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+1e3*this.Diff_Timeout);var u=l;if(i==null||o==null)throw new Error("Null input. (diff_main)");if(i==o)return i?[new e.Diff(a,i)]:[];typeof s>"u"&&(s=!0);var c=s,f=this.diff_commonPrefix(i,o),p=i.substring(0,f);i=i.substring(f),o=o.substring(f),f=this.diff_commonSuffix(i,o);var g=i.substring(i.length-f);i=i.substring(0,i.length-f),o=o.substring(0,o.length-f);var d=this.diff_compute_(i,o,c,u);return p&&d.unshift(new e.Diff(a,p)),g&&d.push(new e.Diff(a,g)),this.diff_cleanupMerge(d),d},e.prototype.diff_compute_=function(i,o,s,l){var u;if(!i)return[new e.Diff(r,o)];if(!o)return[new e.Diff(n,i)];var c=i.length>o.length?i:o,f=i.length>o.length?o:i,p=c.indexOf(f);if(p!=-1)return u=[new e.Diff(r,c.substring(0,p)),new e.Diff(a,f),new e.Diff(r,c.substring(p+f.length))],i.length>o.length&&(u[0][0]=u[2][0]=n),u;if(f.length==1)return[new e.Diff(n,i),new e.Diff(r,o)];var g=this.diff_halfMatch_(i,o);if(g){var d=g[0],v=g[1],m=g[2],h=g[3],y=g[4],w=this.diff_main(d,m,s,l),b=this.diff_main(v,h,s,l);return w.concat([new e.Diff(a,y)],b)}return s&&i.length>100&&o.length>100?this.diff_lineMode_(i,o,l):this.diff_bisect_(i,o,l)},e.prototype.diff_lineMode_=function(i,o,s){var l=this.diff_linesToChars_(i,o);i=l.chars1,o=l.chars2;var u=l.lineArray,c=this.diff_main(i,o,!1,s);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(a,""));for(var f=0,p=0,g=0,d="",v="";f=1&&g>=1){c.splice(f-p-g,p+g),f=f-p-g;for(var m=this.diff_main(d,v,!1,s),h=m.length-1;h>=0;h--)c.splice(f,0,m[h]);f+=m.length}g=0,p=0,d="",v="";break}f++}return c.pop(),c},e.prototype.diff_bisect_=function(i,o,s){for(var l=i.length,u=o.length,c=Math.ceil((l+u)/2),f=c,p=2*c,g=new Array(p),d=new Array(p),v=0;vs);_++){for(var x=-_+y;x<=_-w;x+=2){var T=f+x,O;x==-_||x!=_&&g[T-1]l)w+=2;else if(N>u)y+=2;else if(h){var D=f+m-x;if(D>=0&&D=F)return this.diff_bisectSplit_(i,o,O,N,s)}}}for(var R=-_+b;R<=_-C;R+=2){var D=f+R,F;R==-_||R!=_&&d[D-1]l)C+=2;else if(j>u)b+=2;else if(!h){var T=f+m-R;if(T>=0&&T=F)return this.diff_bisectSplit_(i,o,O,N,s)}}}}return[new e.Diff(n,i),new e.Diff(r,o)]},e.prototype.diff_bisectSplit_=function(i,o,s,l,u){var c=i.substring(0,s),f=o.substring(0,l),p=i.substring(s),g=o.substring(l),d=this.diff_main(c,f,!1,u),v=this.diff_main(p,g,!1,u);return d.concat(v)},e.prototype.diff_linesToChars_=function(i,o){var s=[],l={};s[0]="";function u(g){for(var d="",v=0,m=-1,h=s.length;ml?i=i.substring(s-l):so.length?i:o,l=i.length>o.length?o:i;if(s.length<4||2*l.length=w.length?[O,N,D,F,T]:null}var f=c(s,l,Math.ceil(s.length/4)),p=c(s,l,Math.ceil(s.length/2)),g;if(!f&&!p)return null;p?f?g=f[4].length>p[4].length?f:p:g=p:g=f;var d,v,m,h;i.length>o.length?(d=g[0],v=g[1],m=g[2],h=g[3]):(m=g[0],h=g[1],d=g[2],v=g[3]);var y=g[4];return[d,v,m,h,y]},e.prototype.diff_cleanupSemantic=function(i){for(var o=!1,s=[],l=0,u=null,c=0,f=0,p=0,g=0,d=0;c0?s[l-1]:-1,f=0,p=0,g=0,d=0,u=null,o=!0)),c++;for(o&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),c=1;c=y?(h>=v.length/2||h>=m.length/2)&&(i.splice(c,0,new e.Diff(a,m.substring(0,h))),i[c-1][1]=v.substring(0,v.length-h),i[c+1][1]=m.substring(h),c++):(y>=v.length/2||y>=m.length/2)&&(i.splice(c,0,new e.Diff(a,v.substring(0,y))),i[c-1][0]=r,i[c-1][1]=m.substring(0,m.length-y),i[c+1][0]=n,i[c+1][1]=v.substring(y),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(i){function o(y,w){if(!y||!w)return 6;var b=y.charAt(y.length-1),C=w.charAt(0),_=b.match(e.nonAlphaNumericRegex_),x=C.match(e.nonAlphaNumericRegex_),T=_&&b.match(e.whitespaceRegex_),O=x&&C.match(e.whitespaceRegex_),N=T&&b.match(e.linebreakRegex_),D=O&&C.match(e.linebreakRegex_),F=N&&y.match(e.blanklineEndRegex_),R=D&&w.match(e.blanklineStartRegex_);return F||R?5:N||D?4:_&&!T&&O?3:T||O?2:_||x?1:0}for(var s=1;s=m&&(m=h,g=l,d=u,v=c)}i[s-1][1]!=g&&(g?i[s-1][1]=g:(i.splice(s-1,1),s--),i[s][1]=d,v?i[s+1][1]=v:(i.splice(s+1,1),s--))}s++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var o=!1,s=[],l=0,u=null,c=0,f=!1,p=!1,g=!1,d=!1;c0?s[l-1]:-1,g=d=!1),o=!0)),c++;o&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(a,""));for(var o=0,s=0,l=0,u="",c="",f;o1?(s!==0&&l!==0&&(f=this.diff_commonPrefix(c,u),f!==0&&(o-s-l>0&&i[o-s-l-1][0]==a?i[o-s-l-1][1]+=c.substring(0,f):(i.splice(0,0,new e.Diff(a,c.substring(0,f))),o++),c=c.substring(f),u=u.substring(f)),f=this.diff_commonSuffix(c,u),f!==0&&(i[o][1]=c.substring(c.length-f)+i[o][1],c=c.substring(0,c.length-f),u=u.substring(0,u.length-f))),o-=s+l,i.splice(o,s+l),u.length&&(i.splice(o,0,new e.Diff(n,u)),o++),c.length&&(i.splice(o,0,new e.Diff(r,c)),o++),o++):o!==0&&i[o-1][0]==a?(i[o-1][1]+=i[o][1],i.splice(o,1)):o++,l=0,s=0,u="",c="";break}i[i.length-1][1]===""&&i.pop();var p=!1;for(o=1;oo));f++)u=s,c=l;return i.length!=f&&i[f][0]===n?c:c+(o-u)},e.prototype.diff_prettyHtml=function(i){for(var o=[],s=/&/g,l=/
/g,c=/\n/g,f=0;f");switch(p){case r:o[f]=''+d+" ";break;case n:o[f]=''+d+"";break;case a:o[f]=""+d+" ";break}}return o.join("")},e.prototype.diff_text1=function(i){for(var o=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var l=this.match_alphabet_(o),u=this;function c(O,N){var D=O/o.length,F=Math.abs(s-N);return u.Match_Distance?D+F/u.Match_Distance:F?1:D}var f=this.Match_Threshold,p=i.indexOf(o,s);p!=-1&&(f=Math.min(c(0,p),f),p=i.lastIndexOf(o,s+o.length),p!=-1&&(f=Math.min(c(0,p),f)));var g=1<=w;_--){var x=l[i.charAt(_-1)];if(y===0?C[_]=(C[_+1]<<1|1)&x:C[_]=(C[_+1]<<1|1)&x|((h[_+1]|h[_])<<1|1)|h[_+1],C[_]&g){var T=c(y,_-1);if(T<=f)if(f=T,p=_-1,p>s)w=Math.max(1,2*s-p);else break}}if(c(y+1,s)>f)break;h=C}return p},e.prototype.match_alphabet_=function(i){for(var o={},s=0;s"u")l=i,u=this.diff_main(l,o,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof o>"u"&&typeof s>"u")u=i,l=this.diff_text1(u);else if(typeof i=="string"&&o&&typeof o=="object"&&typeof s>"u")l=i,u=o;else if(typeof i=="string"&&typeof o=="string"&&s&&typeof s=="object")l=i,u=s;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],f=new e.patch_obj,p=0,g=0,d=0,v=l,m=l,h=0;h=2*this.Patch_Margin&&p&&(this.patch_addContext_(f,v),c.push(f),f=new e.patch_obj,p=0,v=m,g=d);break}y!==r&&(g+=w.length),y!==n&&(d+=w.length)}return p&&(this.patch_addContext_(f,v),c.push(f)),c},e.prototype.patch_deepCopy=function(i){for(var o=[],s=0;sthis.Match_MaxBits?(g=this.match_main(o,p.substring(0,this.Match_MaxBits),f),g!=-1&&(d=this.match_main(o,p.substring(p.length-this.Match_MaxBits),f+p.length-this.Match_MaxBits),(d==-1||g>=d)&&(g=-1))):g=this.match_main(o,p,f),g==-1)u[c]=!1,l-=i[c].length2-i[c].length1;else{u[c]=!0,l=g-f;var v;if(d==-1?v=o.substring(g,g+p.length):v=o.substring(g,d+this.Match_MaxBits),p==v)o=o.substring(0,g)+this.diff_text2(i[c].diffs)+o.substring(g+p.length);else{var m=this.diff_main(p,v,!1);if(p.length>this.Match_MaxBits&&this.diff_levenshtein(m)/p.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,y,w=0;wc[0][1].length){var f=o-c[0][1].length;c[0][1]=s.substring(c[0][1].length)+c[0][1],u.start1-=f,u.start2-=f,u.length1+=f,u.length2+=f}if(u=i[i.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=a)c.push(new e.Diff(a,s)),u.length1+=o,u.length2+=o;else if(o>c[c.length-1][1].length){var f=o-c[c.length-1][1].length;c[c.length-1][1]+=s.substring(0,f),u.length1+=f,u.length2+=f}return s},e.prototype.patch_splitMax=function(i){for(var o=this.Match_MaxBits,s=0;s2*o?(p.length1+=v.length,u+=v.length,g=!1,p.diffs.push(new e.Diff(d,v)),l.diffs.shift()):(v=v.substring(0,o-p.length1-this.Patch_Margin),p.length1+=v.length,u+=v.length,d===a?(p.length2+=v.length,c+=v.length):g=!1,p.diffs.push(new e.Diff(d,v)),v==l.diffs[0][1]?l.diffs.shift():l.diffs[0][1]=l.diffs[0][1].substring(v.length))}f=this.diff_text2(p.diffs),f=f.substring(f.length-this.Patch_Margin);var m=this.diff_text1(l.diffs).substring(0,this.Patch_Margin);m!==""&&(p.length1+=m.length,p.length2+=m.length,p.diffs.length!==0&&p.diffs[p.diffs.length-1][0]===a?p.diffs[p.diffs.length-1][1]+=m:p.diffs.push(new e.Diff(a,m))),g||i.splice(++s,0,p)}}},e.prototype.patch_toText=function(i){for(var o=[],s=0;s{const e=[];let n=0;return t.map(r=>{const a=r[0][1].replace(/\n$/,"").split(`
`),i=r[1][1].replace(/\n$/,"").split(`
`);a.map(o=>{xn(r[0][0])==="removed"&&e.push([{type:xn(r[0][0]),lineNum:void 0,value:o}])}),i.map(o=>{xn(r[1][0])!=="disabled"&&(n+=1,e.push([{type:xn(r[1][0]),lineNum:n,value:o}]))})}),e},Iee=(t,e,n)=>{function r(i,o){const s=new mg.exports.diff_match_patch,l=s.diff_linesToChars_(i,o),u=l.chars1,c=l.chars2,f=l.lineArray,p=s.diff_main(u,c,!1);return s.diff_charsToLines_(p,f),p}const a=r(e,n).reduce((i,o)=>{const s=xn(o[0]);if(s==="equal"&&i.push([o]),s==="removed"&&i.push([o]),s==="added"){const l=i.length&&i[i.length-1][0]?i[i.length-1][0]:null;l&&xn(l[0])==="removed"?i[i.length-1].push(o):i.push([o])}return i},[]);return a.map(i=>{if(i.length>1)return;const o=xn(i[0][0]);o==="added"?i.unshift([2,""]):o==="removed"?i.push([2,""]):o==="equal"&&i.push([...i[0]])}),t==="split"?kee(a):t==="unified"?Aee(a):[]},Mee=(t,e)=>{const n=new mg.exports.diff_match_patch,r=n.diff_main(t,e);return n.diff_cleanupSemantic(r),r.filter(a=>xn(a[0])!=="removed").map(a=>xn(a[0])==="added"?`${Hr}${a[1]}${Ur}`:a[1]).join("")},Nee=({highlightCode:t,language:e,code:n})=>{if(!n.match(new RegExp(`(${Hr}|${Ur})`,"g"))){t.value=Rr.highlight(n,{language:e}).value;return}let a=n;const i=n.replace(new RegExp(`(${Hr}|${Ur})`,"g"),"");let o=document.createElement("div");o.innerHTML=Rr.highlight(i,{language:e}).value;let s=!1;const l=f=>{f.childNodes.forEach(p=>{if(p.nodeType===1&&l(p),p.nodeType===3){if(!p.textContent)return;let g=p.textContent,d="";for(s&&(d+=Hr);g.length;){if(a.startsWith(Hr)){a=a.slice(Hr.length),d+=Hr,s=!0;continue}if(a.startsWith(Ur)){a=a.slice(Ur.length),d+=Ur,s=!1;continue}const v=a.match(new RegExp(`(${Hr}|${Ur})`)),m=v&&v.index?v.index:a.length,h=Math.min(m,g.length);d+=a.substring(0,h),a=a.slice(h),g=g.slice(h)}s&&(d+=Ur),p.textContent=d}})};l(o);const u=Hr.replace("<","<").replace(">",">"),c=Ur.replace("<","<").replace(">",">");t.value=o.innerHTML.replace(new RegExp(u,"g"),'').replace(new RegExp(c,"g")," "),o=null},$ee=(t,e,n)=>{const r=z([]),a=z([]),i=B(()=>a.value.filter(s=>t.folding?!s.foldable&&s.visible:s.visible));return DP([()=>t.mode,()=>t.prev,()=>t.current,()=>t.folding],()=>{const s=Iee(t.mode,t.prev,t.current);r.value=s,a.value.splice(r.value.length),r.value.map((l,u)=>{var c;const f=a.value[u],p=t.folding&&l[0].type==="equal"&&((c=r.value[u-1])==null?void 0:c[0].type)==="equal",g={index:u,foldable:p,visible:!0};n.value?a.value[u]=qZ(Iv({},g),{visible:(f==null?void 0:f.visible)||!1,top:(f==null?void 0:f.top)||void 0,height:(f==null?void 0:f.height)||n.value.lineMinHeight}):a.value[u]=Iv({},g)})},{debounce:t.inputDelay,immediate:!0}),{meta:a,render:r,list:i}},Fee=(t,e,n,r)=>{const a=B(()=>n.value?r.value.reduce((s,l)=>(l.top=s,l.foldable?s:s+l.height),0)+"px":void 0),i=()=>{if(!e.value||!n.value)return;const o=e.value.scrollTop,s=n.value.height,l=o-1.5*s,u=o+s+1.5*s;r.value.reduce((c,f)=>(c>=l&&c<=u?f.visible=!0:f.visible=!1,f.top=c,f.foldable?c:c+f.height),0)};return DP([()=>t.mode,()=>t.prev,()=>t.current,()=>t.folding],()=>qe(i),{debounce:t.inputDelay,immediate:!0}),He(()=>{var o;n.value&&((o=e.value)==null||o.addEventListener("scroll",Yo(i,n.value.delay)))}),pt(()=>{var o;n.value&&((o=e.value)==null||o.removeEventListener("scroll",Yo(i,n.value.delay)))}),me(n,(o,s)=>{var l,u;!s&&o&&((l=e.value)==null||l.addEventListener("scroll",Yo(i,o.delay))),s&&!o&&((u=e.value)==null||u.removeEventListener("scroll",Yo(i,s.delay)))}),{minHeight:a}};var xg=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n};const Ree=de({props:{language:{type:String,required:!0},code:{type:String,required:!0},scrollOptions:{type:[Boolean,Object],default:!1}},emits:["rendered"],setup(t,{emit:e}){const n=z("");return He(()=>{me([()=>t.language,()=>t.code],()=>{Nee({highlightCode:n,language:t.language,code:t.code}),qe(()=>e("rendered"))},{immediate:!0}),me([()=>t.scrollOptions],()=>{qe(()=>e("rendered"))},{deep:!0})}),{highlightCode:n}}}),Dee=["innerHTML"];function Lee(t,e,n,r,a,i){return xe(),ke("pre",null,[Se("code",{class:"hljs",innerHTML:t.highlightCode},null,8,Dee)])}var zee=xg(Ree,[["render",Lee]]);const Bee=de({components:{Code:zee},props:{mode:{type:String,required:!0},folding:{type:Boolean,default:!1},language:{type:String,required:!0},meta:{type:Object,required:!0},render:{type:Object,required:!0},scrollOptions:{type:[Boolean,Object],default:!1}},setup(t,{emit:e}){const n=z(null),r=B(()=>{if(t.scrollOptions)return{position:"absolute",left:0,top:0,transform:`translate3d(0, ${t.meta.top}px, 0)`,minHeight:t.scrollOptions.lineMinHeight+"px"}}),a=B(()=>t.folding&&t.render[0].type==="equal"),i=(s,l,u)=>{if(!s.value)return`
-`;if(typeof l>"u"||typeof u>"u"||!s.chkWords)return s.value;const c=l[u===0?1:0];return c.value?Mee(c.value,s.value):s.value},o=()=>{!n.value||t.meta.height===n.value.offsetHeight||e("setLineHeight",t.meta.index,n.value.offsetHeight)};return t.scrollOptions&&pQ(n,Yo(()=>{!n.value||t.meta.height===n.value.offsetHeight||e("setLineHeight",t.meta.index,n.value.offsetHeight)},t.scrollOptions.delay)),{line:n,isFoldLine:a,rendered:o,rowStyle:r,setCode:i}}}),jee=Se("div",{class:"lineNum vue-diff-cell-fold"},null,-1),Vee=Se("div",{class:"code vue-diff-cell-fold"},null,-1),Wee=Se("div",{class:"lineNum vue-diff-cell-fold"},null,-1),Hee=Se("div",{class:"code vue-diff-cell-fold"},null,-1);function Uee(t,e,n,r,a,i){const o=Ks("Code");return xe(),ke("div",{ref:"line",class:on(["vue-diff-row",`vue-diff-row-${t.mode}`]),style:Fn(t.rowStyle)},[t.mode==="split"?(xe(!0),ke(Ie,{key:0},Ir(t.render,(s,l)=>(xe(),ke(Ie,{key:l},[t.isFoldLine?(xe(),ke(Ie,{key:0},[jee,Vee],64)):(xe(),ke(Ie,{key:1},[Se("div",{class:on(["lineNum",`vue-diff-cell-${s.type}`])},Ae(s.lineNum),3),Se("div",{class:on(["code",`vue-diff-cell-${s.type}`])},[S(o,{language:t.language,code:t.setCode(s,t.render,l),scrollOptions:t.scrollOptions,onRendered:t.rendered},null,8,["language","code","scrollOptions","onRendered"])],2)],64))],64))),128)):tt("",!0),t.mode==="unified"?(xe(),ke(Ie,{key:1},[t.isFoldLine?(xe(),ke(Ie,{key:0},[Wee,Hee],64)):(xe(),ke(Ie,{key:1},[Se("div",{class:on(["lineNum",`vue-diff-cell-${t.render[0].type}`])},Ae(t.render[0].lineNum),3),Se("div",{class:on(["code",`vue-diff-cell-${t.render[0].type}`])},[S(o,{language:t.language,code:t.setCode(t.render[0]),scrollOptions:t.scrollOptions,onRendered:t.rendered},null,8,["language","code","scrollOptions","onRendered"])],2)],64))],64)):tt("",!0)],6)}var Kee=xg(Bee,[["render",Uee]]);const Gee=de({components:{Line:Kee},props:{mode:{type:String,default:"split"},theme:{type:String,default:"dark"},language:{type:String,default:"plaintext"},prev:{type:String,default:""},current:{type:String,default:""},folding:{type:Boolean,default:!1},inputDelay:{type:Number,default:0},virtualScroll:{type:[Boolean,Object],default:!1}},setup(t){const e=z(null),n=B(()=>t.virtualScroll?Iv({height:500,lineMinHeight:24,delay:100},typeof t.virtualScroll=="object"?Ve(t.virtualScroll):{}):!1),{meta:r,render:a,list:i}=$ee(t,e,n),{minHeight:o}=Fee(t,e,n,r);return{list:i,meta:r,minHeight:o,render:a,scrollOptions:n,setLineHeight:(l,u)=>{r.value[l]&&r.value[l].height!==u&&(r.value[l].height=u)},viewer:e}}});function qee(t,e,n,r,a,i){const o=Ks("Line");return xe(),ke("div",{class:on(["vue-diff-wrapper",`vue-diff-mode-${t.mode} vue-diff-theme-${t.theme}`])},[Se("div",{ref:"viewer",class:"vue-diff-viewer",style:Fn({height:t.scrollOptions?t.scrollOptions.height+"px":void 0})},[Se("div",{class:"vue-diff-viewer-inner",style:Fn({minHeight:t.minHeight})},[(xe(!0),ke(Ie,null,Ir(t.list,(s,l)=>(xe(),gt(o,{key:l,mode:t.mode,folding:t.folding,language:t.language,meta:t.meta[s.index],render:t.render[s.index],scrollOptions:t.scrollOptions,onSetLineHeight:t.setLineHeight},null,8,["mode","folding","language","meta","render","scrollOptions","onSetLineHeight"]))),128))],4)],4)],2)}var Yee=xg(Gee,[["render",qee]]),Jee={install:(t,e={})=>{const{componentName:n="Diff"}=e;t.component(n,Yee)},hljs:Rr};const aE=xq();aE.use(VZ);BA(RZ).use(aE).use(Kh).use(Jee,{componentName:"VueDiff"}).mount("#zanllp_dev_gradio_fe");export{xa as $,Ze as A,gt as B,Be as C,Yp as D,ce as E,Ie as F,sn as G,_t as H,q1 as I,Fn as J,Ir as K,Rne as L,Ca as M,Xee as N,Qk as O,Z as P,ane as Q,bq as R,PT as S,iP as T,Zr as U,on as V,At as W,ve as X,rne as Y,xt as Z,ft as _,E as a,i3 as a$,Ou as a0,$n as a1,Ft as a2,Gt as a3,Ms as a4,Xx as a5,v9 as a6,pa as a7,Hi as a8,hx as a9,dP as aA,GH as aB,aP as aC,rg as aD,$ne as aE,ine as aF,pG as aG,zs as aH,IP as aI,KT as aJ,fne as aK,lt as aL,Ene as aM,bo as aN,hc as aO,cr as aP,vh as aQ,I5 as aR,Np as aS,wx as aT,Zs as aU,fh as aV,Cu as aW,__ as aX,M5 as aY,Fx as aZ,G8 as a_,O6 as aa,yq as ab,hne as ac,lo as ad,gne as ae,mne as af,YT as ag,cu as ah,bp as ai,B as aj,ai as ak,qte as al,_P as am,Rq as an,Kte as ao,m8 as ap,Rn as aq,Yh as ar,rr as as,aL as at,Yl as au,j4 as av,fo as aw,vo as ax,ri as ay,C9 as az,Ye as b,X7 as b$,nS as b0,Dp as b1,ur as b2,g_ as b3,E3 as b4,Mr as b5,SG as b6,Dte as b7,zte as b8,ot as b9,Iu as bA,rs as bB,ate as bC,ote as bD,pne as bE,Cv as bF,FH as bG,lh as bH,Wte as bI,na as bJ,P8 as bK,Ix as bL,gn as bM,An as bN,tO as bO,aY as bP,lY as bQ,_ne as bR,u9 as bS,Bj as bT,xne as bU,pt as bV,Gte as bW,ene as bX,Cne as bY,bne as bZ,Sne as b_,Lt as ba,Rte as bb,fn as bc,rte as bd,yt as be,Qee as bf,Lte as bg,Ks as bh,Ek as bi,rp as bj,hr as bk,rc as bl,Kc as bm,V_ as bn,br as bo,cP as bp,JY as bq,Ov as br,Hte as bs,une as bt,lne as bu,XY as bv,dne as bw,cne as bx,NB as by,CB as bz,S as c,One as c$,wne as c0,wX as c1,Aq as c2,lq as c3,ze as c4,mt as c5,Ve as c6,jte as c7,Ute as c8,tne as c9,Vte as cA,G1 as cB,Os as cC,dY as cD,gY as cE,oP as cF,qo as cG,Bte as cH,au as cI,m9 as cJ,Mne as cK,Nne as cL,Oj as cM,_L as cN,zt as cO,_e as cP,kn as cQ,wt as cR,It as cS,eL as cT,Rt as cU,yL as cV,qn as cW,nh as cX,y6 as cY,il as cZ,ag as c_,Fte as ca,vne as cb,wn as cc,aC as cd,nte as ce,TP as cf,Pv as cg,K1 as ch,eO as ci,OP as cj,G_ as ck,Kq as cl,Bu as cm,vq as cn,Xte as co,nne as cp,Ns as cq,Vd as cr,Au as cs,ko as ct,ns as cu,uk as cv,Ju as cw,qE as cx,kk as cy,Zee as cz,de as d,one as d0,jp as d1,L2 as d2,sne as d3,Iq as d4,mP as d5,yP as d6,Ane as d7,nq as d8,Qte as d9,O_ as dA,aS as dB,Ei as dC,ite as dD,nL as dE,wk as dF,Qe as dG,tte as dH,ete as dI,Lp as dJ,OT as da,Ine as db,sr as dc,Pne as dd,Tne as de,oq as df,uq as dg,ZY as dh,yne as di,tw as dj,Fne as dk,sP as dl,wq as dm,Yte as dn,Jte as dp,aJ as dq,Zte as dr,_T as ds,LG as dt,op as du,Pa as dv,C6 as dw,_n as dx,nr as dy,$e as dz,Ln as e,En as f,Pn as g,H as h,Je as i,ke as j,Se as k,vt as l,tt as m,ia as n,xe as o,cn as p,YY as q,z as r,me as s,Ae as t,We as u,He as v,qr as w,qe as x,si as y,kne as z};
+`;if(typeof l>"u"||typeof u>"u"||!s.chkWords)return s.value;const c=l[u===0?1:0];return c.value?Mee(c.value,s.value):s.value},o=()=>{!n.value||t.meta.height===n.value.offsetHeight||e("setLineHeight",t.meta.index,n.value.offsetHeight)};return t.scrollOptions&&pQ(n,Yo(()=>{!n.value||t.meta.height===n.value.offsetHeight||e("setLineHeight",t.meta.index,n.value.offsetHeight)},t.scrollOptions.delay)),{line:n,isFoldLine:a,rendered:o,rowStyle:r,setCode:i}}}),jee=Se("div",{class:"lineNum vue-diff-cell-fold"},null,-1),Vee=Se("div",{class:"code vue-diff-cell-fold"},null,-1),Wee=Se("div",{class:"lineNum vue-diff-cell-fold"},null,-1),Hee=Se("div",{class:"code vue-diff-cell-fold"},null,-1);function Uee(t,e,n,r,a,i){const o=Ks("Code");return xe(),ke("div",{ref:"line",class:on(["vue-diff-row",`vue-diff-row-${t.mode}`]),style:Fn(t.rowStyle)},[t.mode==="split"?(xe(!0),ke(Ie,{key:0},Ir(t.render,(s,l)=>(xe(),ke(Ie,{key:l},[t.isFoldLine?(xe(),ke(Ie,{key:0},[jee,Vee],64)):(xe(),ke(Ie,{key:1},[Se("div",{class:on(["lineNum",`vue-diff-cell-${s.type}`])},Ae(s.lineNum),3),Se("div",{class:on(["code",`vue-diff-cell-${s.type}`])},[S(o,{language:t.language,code:t.setCode(s,t.render,l),scrollOptions:t.scrollOptions,onRendered:t.rendered},null,8,["language","code","scrollOptions","onRendered"])],2)],64))],64))),128)):tt("",!0),t.mode==="unified"?(xe(),ke(Ie,{key:1},[t.isFoldLine?(xe(),ke(Ie,{key:0},[Wee,Hee],64)):(xe(),ke(Ie,{key:1},[Se("div",{class:on(["lineNum",`vue-diff-cell-${t.render[0].type}`])},Ae(t.render[0].lineNum),3),Se("div",{class:on(["code",`vue-diff-cell-${t.render[0].type}`])},[S(o,{language:t.language,code:t.setCode(t.render[0]),scrollOptions:t.scrollOptions,onRendered:t.rendered},null,8,["language","code","scrollOptions","onRendered"])],2)],64))],64)):tt("",!0)],6)}var Kee=xg(Bee,[["render",Uee]]);const Gee=de({components:{Line:Kee},props:{mode:{type:String,default:"split"},theme:{type:String,default:"dark"},language:{type:String,default:"plaintext"},prev:{type:String,default:""},current:{type:String,default:""},folding:{type:Boolean,default:!1},inputDelay:{type:Number,default:0},virtualScroll:{type:[Boolean,Object],default:!1}},setup(t){const e=z(null),n=B(()=>t.virtualScroll?Iv({height:500,lineMinHeight:24,delay:100},typeof t.virtualScroll=="object"?Ve(t.virtualScroll):{}):!1),{meta:r,render:a,list:i}=$ee(t,e,n),{minHeight:o}=Fee(t,e,n,r);return{list:i,meta:r,minHeight:o,render:a,scrollOptions:n,setLineHeight:(l,u)=>{r.value[l]&&r.value[l].height!==u&&(r.value[l].height=u)},viewer:e}}});function qee(t,e,n,r,a,i){const o=Ks("Line");return xe(),ke("div",{class:on(["vue-diff-wrapper",`vue-diff-mode-${t.mode} vue-diff-theme-${t.theme}`])},[Se("div",{ref:"viewer",class:"vue-diff-viewer",style:Fn({height:t.scrollOptions?t.scrollOptions.height+"px":void 0})},[Se("div",{class:"vue-diff-viewer-inner",style:Fn({minHeight:t.minHeight})},[(xe(!0),ke(Ie,null,Ir(t.list,(s,l)=>(xe(),gt(o,{key:l,mode:t.mode,folding:t.folding,language:t.language,meta:t.meta[s.index],render:t.render[s.index],scrollOptions:t.scrollOptions,onSetLineHeight:t.setLineHeight},null,8,["mode","folding","language","meta","render","scrollOptions","onSetLineHeight"]))),128))],4)],4)],2)}var Yee=xg(Gee,[["render",qee]]),Jee={install:(t,e={})=>{const{componentName:n="Diff"}=e;t.component(n,Yee)},hljs:Rr};const aE=xq();aE.use(VZ);BA(RZ).use(aE).use(Kh).use(Jee,{componentName:"VueDiff"}).mount("#zanllp_dev_gradio_fe");export{xa as $,Ze as A,gt as B,Be as C,Yp as D,ce as E,Ie as F,sn as G,_t as H,q1 as I,Fn as J,Ir as K,Rne as L,Ca as M,Xee as N,Qk as O,Z as P,ane as Q,bq as R,PT as S,iP as T,Zr as U,on as V,At as W,ve as X,rne as Y,xt as Z,ft as _,E as a,i3 as a$,Ou as a0,$n as a1,Ft as a2,Gt as a3,Ms as a4,Xx as a5,v9 as a6,pa as a7,Hi as a8,hx as a9,dP as aA,GH as aB,aP as aC,rg as aD,$ne as aE,ine as aF,pG as aG,zs as aH,IP as aI,KT as aJ,fne as aK,lt as aL,Ene as aM,bo as aN,hc as aO,cr as aP,vh as aQ,I5 as aR,Np as aS,wx as aT,Zs as aU,fh as aV,Cu as aW,__ as aX,M5 as aY,Fx as aZ,G8 as a_,O6 as aa,yq as ab,hne as ac,lo as ad,gne as ae,mne as af,YT as ag,cu as ah,bp as ai,B as aj,ai as ak,qte as al,_P as am,Rq as an,Kte as ao,m8 as ap,Rn as aq,Yh as ar,rr as as,aL as at,Yl as au,j4 as av,fo as aw,vo as ax,ri as ay,C9 as az,Ye as b,X7 as b$,nS as b0,Dp as b1,ur as b2,g_ as b3,E3 as b4,Mr as b5,SG as b6,Dte as b7,zte as b8,ot as b9,Iu as bA,rs as bB,ate as bC,ote as bD,pne as bE,Cv as bF,FH as bG,lh as bH,Wte as bI,na as bJ,P8 as bK,Ix as bL,gn as bM,An as bN,tO as bO,aY as bP,lY as bQ,_ne as bR,u9 as bS,Bj as bT,xne as bU,pt as bV,Gte as bW,ene as bX,Cne as bY,bne as bZ,Sne as b_,Lt as ba,Rte as bb,fn as bc,rte as bd,yt as be,Qee as bf,Lte as bg,Ks as bh,Ek as bi,rp as bj,hr as bk,rc as bl,Kc as bm,V_ as bn,br as bo,cP as bp,JY as bq,Ov as br,Hte as bs,une as bt,lne as bu,XY as bv,dne as bw,cne as bx,NB as by,CB as bz,S as c,il as c$,wne as c0,wX as c1,Aq as c2,lq as c3,ze as c4,mt as c5,Ve as c6,jte as c7,Ute as c8,tne as c9,Vte as cA,_T as cB,Uh as cC,G1 as cD,Os as cE,dY as cF,gY as cG,oP as cH,qo as cI,Bte as cJ,au as cK,m9 as cL,Mne as cM,Nne as cN,Oj as cO,_L as cP,zt as cQ,_e as cR,kn as cS,wt as cT,It as cU,eL as cV,Rt as cW,yL as cX,qn as cY,nh as cZ,y6 as c_,Fte as ca,vne as cb,wn as cc,aC as cd,nte as ce,TP as cf,Pv as cg,K1 as ch,eO as ci,OP as cj,G_ as ck,Kq as cl,Bu as cm,vq as cn,Xte as co,nne as cp,Ns as cq,Vd as cr,Au as cs,ko as ct,ns as cu,uk as cv,Ju as cw,qE as cx,kk as cy,Zee as cz,de as d,ag as d0,One as d1,one as d2,jp as d3,L2 as d4,sne as d5,Iq as d6,mP as d7,yP as d8,Ane as d9,$e as dA,O_ as dB,aS as dC,Ei as dD,ite as dE,nL as dF,wk as dG,Qe as dH,tte as dI,ete as dJ,Lp as dK,nq as da,Qte as db,OT as dc,Ine as dd,sr as de,Pne as df,Tne as dg,oq as dh,uq as di,ZY as dj,yne as dk,tw as dl,Fne as dm,sP as dn,wq as dp,Yte as dq,Jte as dr,aJ as ds,Zte as dt,LG as du,op as dv,Pa as dw,C6 as dx,_n as dy,nr as dz,Ln as e,En as f,Pn as g,H as h,Je as i,ke as j,Se as k,vt as l,tt as m,ia as n,xe as o,cn as p,YY as q,z as r,me as s,Ae as t,We as u,He as v,qr as w,qe as x,si as y,kne as z};
diff --git a/vue/dist/assets/randomImage-e636ca3e.js b/vue/dist/assets/randomImage-4f4bfa2d.js
similarity index 92%
rename from vue/dist/assets/randomImage-e636ca3e.js
rename to vue/dist/assets/randomImage-4f4bfa2d.js
index 2d6ed07..6421351 100644
--- a/vue/dist/assets/randomImage-e636ca3e.js
+++ b/vue/dist/assets/randomImage-4f4bfa2d.js
@@ -1 +1 @@
-import{d as Y,p as ee,r as F,aC as te,aD as le,v as se,ca as ie,o as v,j as N,c as s,E as e,k as g,C as n,l as k,t as u,G as R,I as oe,H as ae,U as ne,V as A,m as $,B as re,W as w,X as ce,cb as de,a3 as ue,a1 as me,Z as fe,n as pe}from"./index-32743103.js";import{F as ve,s as ge}from"./FileItem-aa47825a.js";import{u as ke,g as we,c as he,b as Ce,d as Se,e as _e,o as z}from"./index-c80754a2.js";import{M as Ie,L as ye,R as be,f as xe}from"./MultiSelectKeep-56b94e1f.js";import"./index-e1a70e12.js";import"./shortcut-3129f75b.js";import"./_isIterateeCall-16c5cf9c.js";/* empty css */const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=Y({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),P=()=>{h.value||(w.info({content:ce("randomImageSettingNotification"),duration:6,key:"randomImageSetting"}),h.value=!0)},f=async()=>{try{m.value=!0;const i=await de();i.length===0&&w.warn("No data, please generate index in image search page first"),l.value=i}finally{m.value=!1,_()}},C=()=>{if(l.value.length===0){w.warn("没有图片可以浏览");return}z(l.value,a.value||0)};se(()=>{f(),setTimeout(()=>{P()},2e3)});const{stackViewEl:D,multiSelectedIdxs:p,stack:E,scroller:G}=ke({images:l}).toRefs(),{onClearAllSelected:U,onSelectAll:K,onReverseSelect:L}=we();he();const{itemSize:S,gridItems:O,cellWidth:W,onScroll:_}=Ce(),{showGenInfo:c,imageGenInfo:I,q:H,onContextMenuClick:j,onFileItemClick:q}=Se({openNext:ie}),{previewIdx:a,previewing:y,onPreviewVisibleChange:Q,previewImgMove:b,canPreview:x}=_e(),V=async(i,t,d)=>{E.value=[{curr:"",files:l.value}],await j(i,t,d)};return(i,t)=>{var M;const d=ue,X=me,Z=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:D},[s(Ie,{show:!!e(p).length||e(B).keepMultiSelect,onClearAllSelected:e(U),onSelectAll:e(K),onReverseSelect:e(L)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),g("div",Ve,[s(d,{onClick:f,onTouchstart:R(f,["prevent"]),type:"primary",loading:m.value,shape:"round"},{default:n(()=>[k(u(i.$t("shuffle")),1)]),_:1},8,["onTouchstart","loading"]),s(d,{onClick:C,onTouchstart:R(C,["prevent"]),type:"default",disabled:!((M=l.value)!=null&&M.length),shape:"round"},{default:n(()=>[k(u(i.$t("tiktokView")),1)]),_:1},8,["onTouchstart","disabled"])]),s(Z,{visible:e(c),"onUpdate:visible":t[1]||(t[1]=o=>ae(c)?c.value=o:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=o=>c.value=!1)},{cancelText:n(()=>[]),default:n(()=>[s(X,{active:"",loading:!e(H).isIdle},{default:n(()=>[g("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=o=>e(oe)(e(I)))},[g("div",Me,u(i.$t("doubleClickToCopy")),1),k(" "+u(e(I)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),s(e(ge),{ref_key:"scroller",ref:G,class:"file-list",items:l.value.slice(),"item-size":e(S).first,"key-field":"fullpath","item-secondary-size":e(S).second,gridItems:e(O),onScroll:e(_)},{default:n(({item:o,index:T})=>[s(ve,{idx:T,file:o,"cell-width":e(W),"full-screen-preview-image-url":e(r)[e(a)]?e(ne)(e(r)[e(a)]):"",onContextMenuClick:V,onPreviewVisibleChange:e(Q),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(q),onTiktokView:(Re,J)=>e(z)(l.value,J)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick","onTiktokView"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(y)?(v(),N("div",Te,[s(e(ye),{onClick:t[3]||(t[3]=o=>e(b)("prev")),class:A({disable:!e(x)("prev")})},null,8,["class"]),s(e(be),{onClick:t[4]||(t[4]=o=>e(b)("next")),class:A({disable:!e(x)("next")})},null,8,["class"])])):$("",!0),e(y)&&e(r)&&e(r)[e(a)]?(v(),re(xe,{key:1,file:e(r)[e(a)],idx:e(a),onContextMenuClick:V},null,8,["file","idx"])):$("",!0)],512)}}});const Ue=pe(Fe,[["__scopeId","data-v-49082269"]]);export{Ue as default};
+import{d as Y,p as ee,r as F,aC as te,aD as le,v as se,ca as ie,o as v,j as N,c as s,E as e,k as g,C as n,l as k,t as u,G as R,I as oe,H as ae,U as ne,V as A,m as $,B as re,W as w,X as ce,cb as de,a3 as ue,a1 as me,Z as fe,n as pe}from"./index-f2db319b.js";import{F as ve,s as ge}from"./FileItem-72718f68.js";import{u as ke,g as we,c as he,b as Ce,d as Se,e as _e,o as z}from"./index-0d856f16.js";import{M as Ie,L as ye,R as be,f as xe}from"./MultiSelectKeep-a11efe88.js";import"./index-29e38a15.js";import"./shortcut-869fab50.js";import"./_isIterateeCall-dd643bcf.js";/* empty css */const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=Y({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),P=()=>{h.value||(w.info({content:ce("randomImageSettingNotification"),duration:6,key:"randomImageSetting"}),h.value=!0)},f=async()=>{try{m.value=!0;const i=await de();i.length===0&&w.warn("No data, please generate index in image search page first"),l.value=i}finally{m.value=!1,_()}},C=()=>{if(l.value.length===0){w.warn("没有图片可以浏览");return}z(l.value,a.value||0)};se(()=>{f(),setTimeout(()=>{P()},2e3)});const{stackViewEl:D,multiSelectedIdxs:p,stack:E,scroller:G}=ke({images:l}).toRefs(),{onClearAllSelected:U,onSelectAll:K,onReverseSelect:L}=we();he();const{itemSize:S,gridItems:O,cellWidth:W,onScroll:_}=Ce(),{showGenInfo:c,imageGenInfo:I,q:H,onContextMenuClick:j,onFileItemClick:q}=Se({openNext:ie}),{previewIdx:a,previewing:y,onPreviewVisibleChange:Q,previewImgMove:b,canPreview:x}=_e(),V=async(i,t,d)=>{E.value=[{curr:"",files:l.value}],await j(i,t,d)};return(i,t)=>{var M;const d=ue,X=me,Z=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:D},[s(Ie,{show:!!e(p).length||e(B).keepMultiSelect,onClearAllSelected:e(U),onSelectAll:e(K),onReverseSelect:e(L)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),g("div",Ve,[s(d,{onClick:f,onTouchstart:R(f,["prevent"]),type:"primary",loading:m.value,shape:"round"},{default:n(()=>[k(u(i.$t("shuffle")),1)]),_:1},8,["onTouchstart","loading"]),s(d,{onClick:C,onTouchstart:R(C,["prevent"]),type:"default",disabled:!((M=l.value)!=null&&M.length),shape:"round"},{default:n(()=>[k(u(i.$t("tiktokView")),1)]),_:1},8,["onTouchstart","disabled"])]),s(Z,{visible:e(c),"onUpdate:visible":t[1]||(t[1]=o=>ae(c)?c.value=o:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=o=>c.value=!1)},{cancelText:n(()=>[]),default:n(()=>[s(X,{active:"",loading:!e(H).isIdle},{default:n(()=>[g("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=o=>e(oe)(e(I)))},[g("div",Me,u(i.$t("doubleClickToCopy")),1),k(" "+u(e(I)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),s(e(ge),{ref_key:"scroller",ref:G,class:"file-list",items:l.value.slice(),"item-size":e(S).first,"key-field":"fullpath","item-secondary-size":e(S).second,gridItems:e(O),onScroll:e(_)},{default:n(({item:o,index:T})=>[s(ve,{idx:T,file:o,"cell-width":e(W),"full-screen-preview-image-url":e(r)[e(a)]?e(ne)(e(r)[e(a)]):"",onContextMenuClick:V,onPreviewVisibleChange:e(Q),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(q),onTiktokView:(Re,J)=>e(z)(l.value,J)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick","onTiktokView"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(y)?(v(),N("div",Te,[s(e(ye),{onClick:t[3]||(t[3]=o=>e(b)("prev")),class:A({disable:!e(x)("prev")})},null,8,["class"]),s(e(be),{onClick:t[4]||(t[4]=o=>e(b)("next")),class:A({disable:!e(x)("next")})},null,8,["class"])])):$("",!0),e(y)&&e(r)&&e(r)[e(a)]?(v(),re(xe,{key:1,file:e(r)[e(a)],idx:e(a),onContextMenuClick:V},null,8,["file","idx"])):$("",!0)],512)}}});const Ue=pe(Fe,[["__scopeId","data-v-49082269"]]);export{Ue as default};
diff --git a/vue/dist/assets/shortcut-3129f75b.js b/vue/dist/assets/shortcut-869fab50.js
similarity index 96%
rename from vue/dist/assets/shortcut-3129f75b.js
rename to vue/dist/assets/shortcut-869fab50.js
index e6144aa..f39e42c 100644
--- a/vue/dist/assets/shortcut-3129f75b.js
+++ b/vue/dist/assets/shortcut-869fab50.js
@@ -1,2 +1,2 @@
-import{du as $e,a as m,P as M,d as R,dv as ae,u as ne,b9 as _e,c5 as He,bV as re,v as me,w as ie,r as E,f as Oe,_ as J,cP as D,h as k,c as w,dw as Ne,s as Z,aj as z,be as Le,i as A,b as pe,cW as Ee,dx as ge,dy as X,dz as j,dA as se,cO as be,dB as Ae,dC as ee,dD as De,dE as Re,dF as je,at as Ie,dG as le,bJ as Ge,dH as Ue,dI as Ke,o as We,j as Xe,bj as ue,bT as ze,n as Ye}from"./index-32743103.js";function Je(o,e){var a=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!a){if(Array.isArray(o)||(a=$e(o))||e&&o&&typeof o.length=="number"){a&&(o=a);var t=0,n=function(){};return{s:n,n:function(){return t>=o.length?{done:!0}:{done:!1,value:o[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,i=!1,s;return{s:function(){a=a.call(o)},n:function(){var u=a.next();return r=u.done,u},e:function(u){i=!0,s=u},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}}}var qe=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},Qe=function(){return m(m({},qe()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},Ze=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:M.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},et=function(){return m(m({},Ze()),{},{indeterminate:{type:Boolean,default:!1}})},ye=Symbol("CheckboxGroupContext"),tt=["indeterminate","skipGroup","id"],at=["onMouseenter","onMouseleave","onInput","class","style"];const Y=R({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:et(),setup:function(e,a){var t=a.emit,n=a.attrs,r=a.slots,i=a.expose,s=ae(),l=ne("checkbox",e),u=l.prefixCls,c=l.direction,v=_e(ye,void 0),g=Symbol("checkboxUniId");He(function(){!e.skipGroup&&v&&v.registerValue(g,e.value)}),re(function(){v&&v.cancelValue(g)}),me(function(){ie(e.checked!==void 0||v||e.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var C=function(d){var f=d.target.checked;t("update:checked",f),t("change",d)},S=E(),T=function(){var d;(d=S.value)===null||d===void 0||d.focus()},F=function(){var d;(d=S.value)===null||d===void 0||d.blur()};return i({focus:T,blur:F}),function(){var b,d,f=Oe((b=r.default)===null||b===void 0?void 0:b.call(r)),y=e.indeterminate,x=e.skipGroup,V=e.id,p=V===void 0?s.id.value:V,h=J(e,tt),P=n.onMouseenter,$=n.onMouseleave;n.onInput;var B=n.class,L=n.style,H=J(n,at),_=m(m({},h),{},{id:p,prefixCls:u.value},H);v&&!x?(_.onChange=function(){for(var G=arguments.length,q=new Array(G),U=0;U0&&(x=v.value.map(function(p){var h;return w(Y,{prefixCls:l.value,key:p.value.toString(),disabled:"disabled"in p?p.disabled:e.disabled,indeterminate:p.indeterminate,value:p.value,checked:c.value.indexOf(p.value)!==-1,onChange:p.onChange,class:"".concat(V,"-item")},{default:function(){return[p.label===void 0?(h=t.label)===null||h===void 0?void 0:h.call(t,p):p.label]}})})),w("div",{class:[V,k({},"".concat(V,"-rtl"),u.value==="rtl")],id:y},[x||((d=t.default)===null||d===void 0?void 0:d.call(t))])}}});Y.Group=te;Y.install=function(o){return o.component(Y.name,Y),o.component(te.name,te),o};var xe=function(e,a){var t,n,r=a.attrs,i=r.included,s=r.vertical,l=r.style,u=r.class,c=r.length,v=r.offset,g=r.reverse;c<0&&(g=!g,c=Math.abs(c),v=100-v);var C=s?(t={},k(t,g?"top":"bottom","".concat(v,"%")),k(t,g?"bottom":"top","auto"),k(t,"height","".concat(c,"%")),t):(n={},k(n,g?"right":"left","".concat(v,"%")),k(n,g?"left":"right","auto"),k(n,"width","".concat(c,"%")),n),S=m(m({},l),C);return i?w("div",{class:u,style:S},null):null};xe.inheritAttrs=!1;const ke=xe;var nt=function(e,a,t,n,r,i){ie(t?n>0:!0,"Slider","`Slider[step]` should be a positive number in order to make Slider[dots] work.");var s=Object.keys(a).map(parseFloat).sort(function(u,c){return u-c});if(t&&n)for(var l=r;l<=i;l+=n)s.indexOf(l)===-1&&s.push(l);return s},Ce=function(e,a){var t=a.attrs,n=t.prefixCls,r=t.vertical,i=t.reverse,s=t.marks,l=t.dots,u=t.step,c=t.included,v=t.lowerBound,g=t.upperBound,C=t.max,S=t.min,T=t.dotStyle,F=t.activeDotStyle,b=C-S,d=nt(r,s,l,u,S,C).map(function(f){var y,x="".concat(Math.abs(f-S)/b*100,"%"),V=!c&&f===g||c&&f<=g&&f>=v,p=r?m(m({},T),{},k({},i?"top":"bottom",x)):m(m({},T),{},k({},i?"right":"left",x));V&&(p=m(m({},p),F));var h=D((y={},k(y,"".concat(n,"-dot"),!0),k(y,"".concat(n,"-dot-active"),V),k(y,"".concat(n,"-dot-reverse"),i),y));return w("span",{class:h,style:p,key:f},null)});return w("div",{class:"".concat(n,"-step")},[d])};Ce.inheritAttrs=!1;const rt=Ce;var Se=function(e,a){var t=a.attrs,n=a.slots,r=t.class,i=t.vertical,s=t.reverse,l=t.marks,u=t.included,c=t.upperBound,v=t.lowerBound,g=t.max,C=t.min,S=t.onClickLabel,T=Object.keys(l),F=n.mark,b=g-C,d=T.map(parseFloat).sort(function(f,y){return f-y}).map(function(f){var y,x=typeof l[f]=="function"?l[f]():l[f],V=pe(x)==="object"&&!Ee(x),p=V?x.label:x;if(!p&&p!==0)return null;F&&(p=F({point:f,label:p}));var h=!u&&f===c||u&&f<=c&&f>=v,P=D((y={},k(y,"".concat(r,"-text"),!0),k(y,"".concat(r,"-text-active"),h),y)),$=k({marginBottom:"-50%"},s?"top":"bottom","".concat((f-C)/b*100,"%")),B=k({transform:"translateX(".concat(s?"50%":"-50%",")"),msTransform:"translateX(".concat(s?"50%":"-50%",")")},s?"right":"left","".concat((f-C)/b*100,"%")),L=i?$:B,H=V?m(m({},L),x.style):L,_=k({},ge?"onTouchstartPassive":"onTouchstart",function(O){return S(O,f)});return w("span",m({class:P,style:H,key:f,onMousedown:function(N){return S(N,f)}},_),[p])});return w("div",{class:r},[d])};Se.inheritAttrs=!1;const it=Se,Ve=R({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup:function(e,a){var t=a.attrs,n=a.emit,r=a.expose,i=E(!1),s=E(),l=function(){document.activeElement===s.value&&(i.value=!0)},u=function(d){i.value=!1,n("blur",d)},c=function(){i.value=!1},v=function(){var d;(d=s.value)===null||d===void 0||d.focus()},g=function(){var d;(d=s.value)===null||d===void 0||d.blur()},C=function(){i.value=!0,v()},S=function(d){d.preventDefault(),v(),n("mousedown",d)};r({focus:v,blur:g,clickFocus:C,ref:s});var T=null;me(function(){T=X(document,"mouseup",l)}),re(function(){var b;(b=T)===null||b===void 0||b.remove()});var F=z(function(){var b,d,f=e.vertical,y=e.offset,x=e.reverse;return f?(b={},k(b,x?"top":"bottom","".concat(y,"%")),k(b,x?"bottom":"top","auto"),k(b,"transform",x?null:"translateY(+50%)"),b):(d={},k(d,x?"right":"left","".concat(y,"%")),k(d,x?"left":"right","auto"),k(d,"transform","translateX(".concat(x?"+":"-","50%)")),d)});return function(){var b=e.prefixCls,d=e.disabled,f=e.min,y=e.max,x=e.value,V=e.tabindex,p=e.ariaLabel,h=e.ariaLabelledBy,P=e.ariaValueTextFormatter,$=e.onMouseenter,B=e.onMouseleave,L=D(t.class,k({},"".concat(b,"-handle-click-focused"),i.value)),H={"aria-valuemin":f,"aria-valuemax":y,"aria-valuenow":x,"aria-disabled":!!d},_=[t.style,F.value],O=V||0;(d||V===null)&&(O=null);var N;P&&(N=P(x));var G=m(m(m({},t),{},{role:"slider",tabindex:O},H),{},{class:L,onBlur:u,onKeydown:c,onMousedown:S,onMouseenter:$,onMouseleave:B,ref:s,style:_});return w("div",m(m({},G),{},{"aria-label":p,"aria-labelledby":h,"aria-valuetext":N}),null)}}});function Q(o,e){try{return Object.keys(e).some(function(a){return o.target===e[a].ref})}catch{return!1}}function Me(o,e){var a=e.min,t=e.max;return ot}function de(o){return o.touches.length>1||o.type.toLowerCase()==="touchend"&&o.touches.length>0}function ce(o,e){var a=e.marks,t=e.step,n=e.min,r=e.max,i=Object.keys(a).map(parseFloat);if(t!==null){var s=Math.pow(10,Be(t)),l=Math.floor((r*s-n*s)/(t*s)),u=Math.min((o-n)/t,l),c=Math.round(u)*t+n;i.push(c)}var v=i.map(function(g){return Math.abs(o-g)});return i[v.indexOf(Math.min.apply(Math,A(v)))]}function Be(o){var e=o.toString(),a=0;return e.indexOf(".")>=0&&(a=e.length-e.indexOf(".")-1),a}function ve(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.clientY:e.pageX)/a}function fe(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.touches[0].clientY:e.touches[0].pageX)/a}function he(o,e){var a=e.getBoundingClientRect();return o?a.top+a.height*.5:window.pageXOffset+a.left+a.width*.5}function oe(o,e){var a=e.max,t=e.min;return o<=t?t:o>=a?a:o}function Te(o,e){var a=e.step,t=isFinite(ce(o,e))?ce(o,e):0;return a===null?t:parseFloat(t.toFixed(Be(a)))}function K(o){o.stopPropagation(),o.preventDefault()}function st(o,e,a){var t={increase:function(s,l){return s+l},decrease:function(s,l){return s-l}},n=t[o](Object.keys(a.marks).indexOf(JSON.stringify(e)),1),r=Object.keys(a.marks)[n];return a.step?t[o](e,a.step):Object.keys(a.marks).length&&a.marks[r]?a.marks[r]:e}function Pe(o,e,a){var t="increase",n="decrease",r=t;switch(o.keyCode){case j.UP:r=e&&a?n:t;break;case j.RIGHT:r=!e&&a?n:t;break;case j.DOWN:r=e&&a?t:n;break;case j.LEFT:r=!e&&a?t:n;break;case j.END:return function(i,s){return s.max};case j.HOME:return function(i,s){return s.min};case j.PAGE_UP:return function(i,s){return i+s.step*2};case j.PAGE_DOWN:return function(i,s){return i-s.step*2};default:return}return function(i,s){return st(r,i,s)}}var ot=["index","directives","className","style"];function I(){}function we(o){var e={id:String,min:Number,max:Number,step:Number,marks:M.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:M.object,maximumTrackStyle:M.object,handleStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),trackStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),railStyle:M.object,dotStyle:M.object,activeDotStyle:M.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return R({compatConfig:{MODE:3},name:"CreateSlider",mixins:[se,o],inheritAttrs:!1,slots:["mark"],props:be(e,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data:function(){var t=this.step,n=this.max,r=this.min,i=isFinite(n-r)?(n-r)%t===0:!0;return ie(t&&Math.floor(t)===t?i:!0,"Slider[max] - Slider[min] (".concat(n-r,") should be a multiple of Slider[step] (").concat(t,")")),this.handlesRefs={},{}},mounted:function(){var t=this;this.$nextTick(function(){t.document=t.sliderRef&&t.sliderRef.ownerDocument;var n=t.autofocus,r=t.disabled;n&&!r&&t.focus()})},beforeUnmount:function(){var t=this;this.$nextTick(function(){t.removeDocumentEvents()})},methods:{defaultHandle:function(t){var n=t.index;t.directives;var r=t.className,i=t.style,s=J(t,ot);if(delete s.dragging,s.value===null)return null;var l=m(m({},s),{},{class:r,style:i,key:n});return w(Ve,l,null)},onDown:function(t,n){var r=n,i=this.$props,s=i.draggableTrack,l=i.vertical,u=this.$data.bounds,c=s&&this.positionGetValue?this.positionGetValue(r)||[]:[],v=Q(t,this.handlesRefs);if(this.dragTrack=s&&u.length>=2&&!v&&!c.map(function(C,S){var T=S?!0:C>=u[S];return S===c.length-1?C<=u[S]:T}).some(function(C){return!C}),this.dragTrack)this.dragOffset=r,this.startBounds=A(u);else{if(!v)this.dragOffset=0;else{var g=he(l,t.target);this.dragOffset=r-g,r=g}this.onStart(r)}},onMouseDown:function(t){if(t.button===0){this.removeDocumentEvents();var n=this.$props.vertical,r=ve(n,t);this.onDown(t,r),this.addDocumentMouseEvents()}},onTouchStart:function(t){if(!de(t)){var n=this.vertical,r=fe(n,t);this.onDown(t,r),this.addDocumentTouchEvents(),K(t)}},onFocus:function(t){var n=this.vertical;if(Q(t,this.handlesRefs)&&!this.dragTrack){var r=he(n,t.target);this.dragOffset=0,this.onStart(r),K(t),this.$emit("focus",t)}},onBlur:function(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp:function(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove:function(t){if(!this.sliderRef){this.onEnd();return}var n=ve(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove:function(t){if(de(t)||!this.sliderRef){this.onEnd();return}var n=fe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown:function(t){this.sliderRef&&Q(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel:function(t,n){var r=this;t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},function(){return r.onEnd(!0)})},getSliderStart:function(){var t=this.sliderRef,n=this.vertical,r=this.reverse,i=t.getBoundingClientRect();return n?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)},getSliderLength:function(){var t=this.sliderRef;if(!t)return 0;var n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents:function(){this.onTouchMoveListener=X(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=X(this.document,"touchend",this.onEnd)},addDocumentMouseEvents:function(){this.onMouseMoveListener=X(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=X(this.document,"mouseup",this.onEnd)},removeDocumentEvents:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus:function(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur:function(){var t=this;this.$props.disabled||Object.keys(this.handlesRefs).forEach(function(n){var r,i;(r=t.handlesRefs[n])===null||r===void 0||(i=r.blur)===null||i===void 0||i.call(r)})},calcValue:function(t){var n=this.vertical,r=this.min,i=this.max,s=Math.abs(Math.max(t,0)/this.getSliderLength()),l=n?(1-s)*(i-r)+r:s*(i-r)+r;return l},calcValueByPos:function(t){var n=this.reverse?-1:1,r=n*(t-this.getSliderStart()),i=this.trimAlignValue(this.calcValue(r));return i},calcOffset:function(t){var n=this.min,r=this.max,i=(t-n)/(r-n);return Math.max(0,i*100)},saveSlider:function(t){this.sliderRef=t},saveHandle:function(t,n){this.handlesRefs[t]=n}},render:function(){var t,n=this.prefixCls,r=this.marks,i=this.dots,s=this.step,l=this.included,u=this.disabled,c=this.vertical,v=this.reverse,g=this.min,C=this.max,S=this.maximumTrackStyle,T=this.railStyle,F=this.dotStyle,b=this.activeDotStyle,d=this.id,f=this.$attrs,y=f.class,x=f.style,V=this.renderSlider(),p=V.tracks,h=V.handles,P=D(n,y,(t={},k(t,"".concat(n,"-with-marks"),Object.keys(r).length),k(t,"".concat(n,"-disabled"),u),k(t,"".concat(n,"-vertical"),c),t)),$={vertical:c,marks:r,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,reverse:v,class:"".concat(n,"-mark"),onClickLabel:u?I:this.onClickMarkLabel},B=k({},ge?"onTouchstartPassive":"onTouchstart",u?I:this.onTouchStart);return w("div",m(m({id:d,ref:this.saveSlider,tabindex:"-1",class:P},B),{},{onMousedown:u?I:this.onMouseDown,onMouseup:u?I:this.onMouseUp,onKeydown:u?I:this.onKeyDown,onFocus:u?I:this.onFocus,onBlur:u?I:this.onBlur,style:x}),[w("div",{class:"".concat(n,"-rail"),style:m(m({},S),T)},null),p,w(rt,{prefixCls:n,vertical:c,reverse:v,marks:r,dots:i,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,dotStyle:F,activeDotStyle:b},null),h,w(it,$,{mark:this.$slots.mark}),Ae(this)])}})}var lt=R({compatConfig:{MODE:3},name:"Slider",mixins:[se],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data:function(){var e=this.defaultValue!==void 0?this.defaultValue:this.min,a=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(a),dragging:!1}},watch:{value:{handler:function(e){this.setChangeValue(e)},deep:!0},min:function(){var e=this.sValue;this.setChangeValue(e)},max:function(){var e=this.sValue;this.setChangeValue(e)}},methods:{setChangeValue:function(e){var a=e!==void 0?e:this.sValue,t=this.trimAlignValue(a,this.$props);t!==this.sValue&&(this.setState({sValue:t}),Me(a,this.$props)&&this.$emit("change",t))},onChange:function(e){var a=!ee(this,"value"),t=e.sValue>this.max?m(m({},e),{},{sValue:this.max}):e;a&&this.setState(t);var n=t.sValue;this.$emit("change",n)},onStart:function(e){this.setState({dragging:!0});var a=this.sValue;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==a&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd:function(e){var a=this.dragging;this.removeDocumentEvents(),(a||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove:function(e,a){K(e);var t=this.sValue,n=this.calcValueByPos(a);n!==t&&this.onChange({sValue:n})},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.sValue,s=r(i,this.$props),l=this.trimAlignValue(s);if(l===i)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound:function(){var e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound:function(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;var t=m(m({},this.$props),a),n=oe(e,t);return Te(n,t)},getTrack:function(e){var a=e.prefixCls,t=e.reverse,n=e.vertical,r=e.included,i=e.minimumTrackStyle,s=e.mergedTrackStyle,l=e.length,u=e.offset;return w(ke,{class:"".concat(a,"-track"),vertical:n,included:r,offset:u,reverse:t,length:l,style:m(m({},i),s)},null)},renderSlider:function(){var e=this,a=this.prefixCls,t=this.vertical,n=this.included,r=this.disabled,i=this.minimumTrackStyle,s=this.trackStyle,l=this.handleStyle,u=this.tabindex,c=this.ariaLabelForHandle,v=this.ariaLabelledByForHandle,g=this.ariaValueTextFormatterForHandle,C=this.min,S=this.max,T=this.startPoint,F=this.reverse,b=this.handle,d=this.defaultHandle,f=b||d,y=this.sValue,x=this.dragging,V=this.calcOffset(y),p=f({class:"".concat(a,"-handle"),prefixCls:a,vertical:t,offset:V,value:y,dragging:x,disabled:r,min:C,max:S,reverse:F,index:0,tabindex:u,ariaLabel:c,ariaLabelledBy:v,ariaValueTextFormatter:g,style:l[0]||l,ref:function(B){return e.saveHandle(0,B)},onFocus:this.onFocus,onBlur:this.onBlur}),h=T!==void 0?this.calcOffset(T):0,P=s[0]||s;return{tracks:this.getTrack({prefixCls:a,reverse:F,vertical:t,included:n,offset:h,minimumTrackStyle:i,mergedTrackStyle:P,length:V-h}),handles:p}}}});const ut=we(lt);var W=function(e){var a=e.value,t=e.handle,n=e.bounds,r=e.props,i=r.allowCross,s=r.pushable,l=Number(s),u=oe(a,r),c=u;return!i&&t!=null&&n!==void 0&&(t>0&&u<=n[t-1]+l&&(c=n[t-1]+l),t=n[t+1]-l&&(c=n[t+1]-l)),Te(c,r)},dt={defaultValue:M.arrayOf(M.number),value:M.arrayOf(M.number),count:Number,pushable:De(M.oneOfType([M.looseBool,M.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:M.arrayOf(M.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},ct=R({compatConfig:{MODE:3},name:"Range",mixins:[se],inheritAttrs:!1,props:be(dt,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data:function(){var e=this,a=this.count,t=this.min,n=this.max,r=Array.apply(void 0,A(Array(a+1))).map(function(){return t}),i=ee(this,"defaultValue")?this.defaultValue:r,s=this.value;s===void 0&&(s=i);var l=s.map(function(c,v){return W({value:c,handle:v,props:e.$props})}),u=l[0]===n?0:l.length-1;return{sHandle:null,recent:u,bounds:l}},watch:{value:{handler:function(e){var a=this.bounds;this.setChangeValue(e||a)},deep:!0},min:function(){var e=this.value;this.setChangeValue(e||this.bounds)},max:function(){var e=this.value;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue:function(e){var a=this,t=this.bounds,n=e.map(function(i,s){return W({value:i,handle:s,bounds:t,props:a.$props})});if(t.length===n.length){if(n.every(function(i,s){return i===t[s]}))return null}else n=e.map(function(i,s){return W({value:i,handle:s,props:a.$props})});if(this.setState({bounds:n}),e.some(function(i){return Me(i,a.$props)})){var r=e.map(function(i){return oe(i,a.$props)});this.$emit("change",r)}},onChange:function(e){var a=!ee(this,"value");if(a)this.setState(e);else{var t={};["sHandle","recent"].forEach(function(i){e[i]!==void 0&&(t[i]=e[i])}),Object.keys(t).length&&this.setState(t)}var n=m(m({},this.$data),e),r=n.bounds;this.$emit("change",r)},positionGetValue:function(e){var a=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),r=this.getBoundNeedMoving(t,n),i=a[r];if(t===i)return null;var s=A(a);return s[r]=t,s},onStart:function(e){var a=this.bounds;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;var n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});var r=a[this.prevMovedHandleIndex];if(t!==r){var i=A(a);i[this.prevMovedHandleIndex]=t,this.onChange({bounds:i})}},onEnd:function(e){var a=this.sHandle;this.removeDocumentEvents(),a||(this.dragTrack=!1),(a!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove:function(e,a,t,n){K(e);var r=this.$data,i=this.$props,s=i.max||100,l=i.min||0;if(t){var u=i.vertical?-a:a;u=i.reverse?-u:u;var c=s-Math.max.apply(Math,A(n)),v=l-Math.min.apply(Math,A(n)),g=Math.min(Math.max(u/(this.getSliderLength()/100),v),c),C=n.map(function(d){return Math.floor(Math.max(Math.min(d+g,s),l))});r.bounds.map(function(d,f){return d===C[f]}).some(function(d){return!d})&&this.onChange({bounds:C});return}var S=this.bounds,T=this.sHandle,F=this.calcValueByPos(a),b=S[T];F!==b&&this.moveTo(F)},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.bounds,s=this.sHandle,l=i[s===null?this.recent:s],u=r(l,this.$props),c=W({value:u,handle:s,bounds:i,props:this.$props});if(c===l)return;var v=!0;this.moveTo(c,v)}},getClosestBound:function(e){for(var a=this.bounds,t=0,n=1;n=a[n]&&(t=n);return Math.abs(a[t+1]-e)=n.length||i<0)return!1;var s=a+t,l=n[i],u=this.pushable,c=Number(u),v=t*(e[s]-l);return this.pushHandle(e,s,t,c-v)?(e[a]=l,!0):!1},trimAlignValue:function(e){var a=this.sHandle,t=this.bounds;return W({value:e,handle:a,bounds:t,props:this.$props})},ensureValueNotConflict:function(e,a,t){var n=t.allowCross,r=t.pushable,i=this.$data||{},s=i.bounds;if(e=e===void 0?i.sHandle:e,r=Number(r),!n&&e!=null&&s!==void 0){if(e>0&&a<=s[e-1]+r)return s[e-1]+r;if(e=s[e+1]-r)return s[e+1]-r}return a},getTrack:function(e){var a=e.bounds,t=e.prefixCls,n=e.reverse,r=e.vertical,i=e.included,s=e.offsets,l=e.trackStyle;return a.slice(0,-1).map(function(u,c){var v,g=c+1,C=D((v={},k(v,"".concat(t,"-track"),!0),k(v,"".concat(t,"-track-").concat(g),!0),v));return w(ke,{class:C,vertical:r,reverse:n,included:i,offset:s[g-1],length:s[g]-s[g-1],style:l[c],key:g},null)})},renderSlider:function(){var e=this,a=this.sHandle,t=this.bounds,n=this.prefixCls,r=this.vertical,i=this.included,s=this.disabled,l=this.min,u=this.max,c=this.reverse,v=this.handle,g=this.defaultHandle,C=this.trackStyle,S=this.handleStyle,T=this.tabindex,F=this.ariaLabelGroupForHandles,b=this.ariaLabelledByGroupForHandles,d=this.ariaValueTextFormatterGroupForHandles,f=v||g,y=t.map(function(p){return e.calcOffset(p)}),x="".concat(n,"-handle"),V=t.map(function(p,h){var P,$=T[h]||0;(s||T[h]===null)&&($=null);var B=a===h;return f({class:D((P={},k(P,x,!0),k(P,"".concat(x,"-").concat(h+1),!0),k(P,"".concat(x,"-dragging"),B),P)),prefixCls:n,vertical:r,dragging:B,offset:y[h],value:p,index:h,tabindex:$,min:l,max:u,reverse:c,disabled:s,style:S[h],ref:function(H){return e.saveHandle(h,H)},onFocus:e.onFocus,onBlur:e.onBlur,ariaLabel:F[h],ariaLabelledBy:b[h],ariaValueTextFormatter:d[h]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:c,vertical:r,included:i,offsets:y,trackStyle:C}),handles:V}}}});const vt=we(ct),ft=R({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Re(),setup:function(e,a){var t=a.attrs,n=a.slots,r=E(null),i=E(null);function s(){le.cancel(i.value),i.value=null}function l(){i.value=le(function(){var c;(c=r.value)===null||c===void 0||c.forcePopupAlign(),i.value=null})}var u=function(){s(),e.visible&&l()};return Z([function(){return e.visible},function(){return e.title}],function(){u()},{flush:"post",immediate:!0}),je(function(){u()}),re(function(){s()}),function(){return w(Ie,m(m({ref:r},e),t),n)}}});var ht=["value","dragging","index"],mt=["tooltipPrefixCls","range","id"],pt=function(e){return typeof e=="number"?e.toString():""},gt=function(){return{id:String,prefixCls:String,tooltipPrefixCls:String,range:{type:[Boolean,Object],default:void 0},reverse:{type:Boolean,default:void 0},min:Number,max:Number,step:{type:[Number,Object]},marks:{type:Object},dots:{type:Boolean,default:void 0},value:{type:[Number,Array]},defaultValue:{type:[Number,Array]},included:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},tipFormatter:{type:[Function,Object],default:function(){return pt}},tooltipVisible:{type:Boolean,default:void 0},tooltipPlacement:{type:String},getTooltipPopupContainer:{type:Function},autofocus:{type:Boolean,default:void 0},handleStyle:{type:[Object,Array]},trackStyle:{type:[Object,Array]},onChange:{type:Function},onAfterChange:{type:Function},onFocus:{type:Function},onBlur:{type:Function},"onUpdate:value":{type:Function}}},bt=R({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:gt(),slots:["mark"],setup:function(e,a){var t=a.attrs,n=a.slots,r=a.emit,i=a.expose,s=ne("slider",e),l=s.prefixCls,u=s.rootPrefixCls,c=s.direction,v=s.getPopupContainer,g=s.configProvider,C=ae(),S=E(),T=E({}),F=function(h,P){T.value[h]=P},b=z(function(){return e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"}),d=function(){var h;(h=S.value)===null||h===void 0||h.focus()},f=function(){var h;(h=S.value)===null||h===void 0||h.blur()},y=function(h){r("update:value",h),r("change",h),C.onFieldChange()},x=function(h){r("blur",h)};i({focus:d,blur:f});var V=function(h){var P=h.tooltipPrefixCls,$=h.info,B=$.value,L=$.dragging,H=$.index,_=J($,ht),O=e.tipFormatter,N=e.tooltipVisible,G=e.getTooltipPopupContainer,q=O?T.value[H]||L:!1,U=N||N===void 0&&q;return w(ft,{prefixCls:P,title:O?O(B):"",visible:U,placement:b.value,transitionName:"".concat(u.value,"-zoom-down"),key:H,overlayClassName:"".concat(l.value,"-tooltip"),getPopupContainer:G||v.value},{default:function(){return[w(Ve,m(m({},_),{},{value:B,onMouseenter:function(){return F(H,!0)},onMouseleave:function(){return F(H,!1)}}),null)]}})};return function(){var p=e.tooltipPrefixCls,h=e.range,P=e.id,$=P===void 0?C.id.value:P,B=J(e,mt),L=g.getPrefixCls("tooltip",p),H=D(t.class,k({},"".concat(l.value,"-rtl"),c.value==="rtl"));c.value==="rtl"&&!B.vertical&&(B.reverse=!B.reverse);var _;return pe(h)==="object"&&(_=h.draggableTrack),h?w(vt,m(m({},B),{},{step:B.step,draggableTrack:_,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark}):w(ut,m(m({},B),{},{id:$,step:B.step,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark})}}});const yt=Ge(bt);const xt={class:"num-input"},kt=R({__name:"numInput",props:Ue({min:{},max:{},step:{}},{modelValue:{}}),emits:["update:modelValue"],setup(o){const e=o,a=Ke(o,"modelValue");return(t,n)=>{const r=ze,i=yt;return We(),Xe("div",xt,[w(r,ue({value:a.value,"onUpdate:value":n[0]||(n[0]=s=>a.value=s)},e),null,16,["value"]),w(i,ue({value:a.value,"onUpdate:value":n[1]||(n[1]=s=>a.value=s)},e,{class:"slide"}),null,16,["value"])])}}});const Vt=Ye(kt,[["__scopeId","data-v-55978858"]]),Mt=o=>{const e=[];return o.shiftKey&&e.push("Shift"),o.ctrlKey&&e.push("Ctrl"),o.metaKey&&e.push("Cmd"),(o.code.startsWith("Key")||o.code.startsWith("Digit"))&&e.push(o.code),o.key==="Escape"&&e.push("Esc"),e.join(" + ")};export{Y as C,Vt as _,te as a,Mt as g};
+import{dv as $e,a as m,P as M,d as R,dw as ae,u as ne,b9 as _e,c5 as He,bV as re,v as me,w as ie,r as E,f as Oe,_ as J,cR as D,h as k,c as w,dx as Ne,s as Z,aj as z,be as Le,i as A,b as pe,cY as Ee,dy as ge,dz as X,dA as j,dB as se,cQ as be,dC as Ae,dD as ee,dE as De,dF as Re,dG as je,at as Ie,dH as le,bJ as Ge,dI as Ue,dJ as Ke,o as We,j as Xe,bj as ue,bT as ze,n as Ye}from"./index-f2db319b.js";function Je(o,e){var a=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!a){if(Array.isArray(o)||(a=$e(o))||e&&o&&typeof o.length=="number"){a&&(o=a);var t=0,n=function(){};return{s:n,n:function(){return t>=o.length?{done:!0}:{done:!1,value:o[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,i=!1,s;return{s:function(){a=a.call(o)},n:function(){var u=a.next();return r=u.done,u},e:function(u){i=!0,s=u},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}}}var Qe=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},qe=function(){return m(m({},Qe()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},Ze=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:M.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},et=function(){return m(m({},Ze()),{},{indeterminate:{type:Boolean,default:!1}})},ye=Symbol("CheckboxGroupContext"),tt=["indeterminate","skipGroup","id"],at=["onMouseenter","onMouseleave","onInput","class","style"];const Y=R({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:et(),setup:function(e,a){var t=a.emit,n=a.attrs,r=a.slots,i=a.expose,s=ae(),l=ne("checkbox",e),u=l.prefixCls,c=l.direction,v=_e(ye,void 0),g=Symbol("checkboxUniId");He(function(){!e.skipGroup&&v&&v.registerValue(g,e.value)}),re(function(){v&&v.cancelValue(g)}),me(function(){ie(e.checked!==void 0||v||e.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var C=function(d){var f=d.target.checked;t("update:checked",f),t("change",d)},S=E(),T=function(){var d;(d=S.value)===null||d===void 0||d.focus()},F=function(){var d;(d=S.value)===null||d===void 0||d.blur()};return i({focus:T,blur:F}),function(){var b,d,f=Oe((b=r.default)===null||b===void 0?void 0:b.call(r)),y=e.indeterminate,x=e.skipGroup,V=e.id,p=V===void 0?s.id.value:V,h=J(e,tt),P=n.onMouseenter,$=n.onMouseleave;n.onInput;var B=n.class,L=n.style,H=J(n,at),_=m(m({},h),{},{id:p,prefixCls:u.value},H);v&&!x?(_.onChange=function(){for(var G=arguments.length,Q=new Array(G),U=0;U0&&(x=v.value.map(function(p){var h;return w(Y,{prefixCls:l.value,key:p.value.toString(),disabled:"disabled"in p?p.disabled:e.disabled,indeterminate:p.indeterminate,value:p.value,checked:c.value.indexOf(p.value)!==-1,onChange:p.onChange,class:"".concat(V,"-item")},{default:function(){return[p.label===void 0?(h=t.label)===null||h===void 0?void 0:h.call(t,p):p.label]}})})),w("div",{class:[V,k({},"".concat(V,"-rtl"),u.value==="rtl")],id:y},[x||((d=t.default)===null||d===void 0?void 0:d.call(t))])}}});Y.Group=te;Y.install=function(o){return o.component(Y.name,Y),o.component(te.name,te),o};var xe=function(e,a){var t,n,r=a.attrs,i=r.included,s=r.vertical,l=r.style,u=r.class,c=r.length,v=r.offset,g=r.reverse;c<0&&(g=!g,c=Math.abs(c),v=100-v);var C=s?(t={},k(t,g?"top":"bottom","".concat(v,"%")),k(t,g?"bottom":"top","auto"),k(t,"height","".concat(c,"%")),t):(n={},k(n,g?"right":"left","".concat(v,"%")),k(n,g?"left":"right","auto"),k(n,"width","".concat(c,"%")),n),S=m(m({},l),C);return i?w("div",{class:u,style:S},null):null};xe.inheritAttrs=!1;const ke=xe;var nt=function(e,a,t,n,r,i){ie(t?n>0:!0,"Slider","`Slider[step]` should be a positive number in order to make Slider[dots] work.");var s=Object.keys(a).map(parseFloat).sort(function(u,c){return u-c});if(t&&n)for(var l=r;l<=i;l+=n)s.indexOf(l)===-1&&s.push(l);return s},Ce=function(e,a){var t=a.attrs,n=t.prefixCls,r=t.vertical,i=t.reverse,s=t.marks,l=t.dots,u=t.step,c=t.included,v=t.lowerBound,g=t.upperBound,C=t.max,S=t.min,T=t.dotStyle,F=t.activeDotStyle,b=C-S,d=nt(r,s,l,u,S,C).map(function(f){var y,x="".concat(Math.abs(f-S)/b*100,"%"),V=!c&&f===g||c&&f<=g&&f>=v,p=r?m(m({},T),{},k({},i?"top":"bottom",x)):m(m({},T),{},k({},i?"right":"left",x));V&&(p=m(m({},p),F));var h=D((y={},k(y,"".concat(n,"-dot"),!0),k(y,"".concat(n,"-dot-active"),V),k(y,"".concat(n,"-dot-reverse"),i),y));return w("span",{class:h,style:p,key:f},null)});return w("div",{class:"".concat(n,"-step")},[d])};Ce.inheritAttrs=!1;const rt=Ce;var Se=function(e,a){var t=a.attrs,n=a.slots,r=t.class,i=t.vertical,s=t.reverse,l=t.marks,u=t.included,c=t.upperBound,v=t.lowerBound,g=t.max,C=t.min,S=t.onClickLabel,T=Object.keys(l),F=n.mark,b=g-C,d=T.map(parseFloat).sort(function(f,y){return f-y}).map(function(f){var y,x=typeof l[f]=="function"?l[f]():l[f],V=pe(x)==="object"&&!Ee(x),p=V?x.label:x;if(!p&&p!==0)return null;F&&(p=F({point:f,label:p}));var h=!u&&f===c||u&&f<=c&&f>=v,P=D((y={},k(y,"".concat(r,"-text"),!0),k(y,"".concat(r,"-text-active"),h),y)),$=k({marginBottom:"-50%"},s?"top":"bottom","".concat((f-C)/b*100,"%")),B=k({transform:"translateX(".concat(s?"50%":"-50%",")"),msTransform:"translateX(".concat(s?"50%":"-50%",")")},s?"right":"left","".concat((f-C)/b*100,"%")),L=i?$:B,H=V?m(m({},L),x.style):L,_=k({},ge?"onTouchstartPassive":"onTouchstart",function(O){return S(O,f)});return w("span",m({class:P,style:H,key:f,onMousedown:function(N){return S(N,f)}},_),[p])});return w("div",{class:r},[d])};Se.inheritAttrs=!1;const it=Se,Ve=R({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup:function(e,a){var t=a.attrs,n=a.emit,r=a.expose,i=E(!1),s=E(),l=function(){document.activeElement===s.value&&(i.value=!0)},u=function(d){i.value=!1,n("blur",d)},c=function(){i.value=!1},v=function(){var d;(d=s.value)===null||d===void 0||d.focus()},g=function(){var d;(d=s.value)===null||d===void 0||d.blur()},C=function(){i.value=!0,v()},S=function(d){d.preventDefault(),v(),n("mousedown",d)};r({focus:v,blur:g,clickFocus:C,ref:s});var T=null;me(function(){T=X(document,"mouseup",l)}),re(function(){var b;(b=T)===null||b===void 0||b.remove()});var F=z(function(){var b,d,f=e.vertical,y=e.offset,x=e.reverse;return f?(b={},k(b,x?"top":"bottom","".concat(y,"%")),k(b,x?"bottom":"top","auto"),k(b,"transform",x?null:"translateY(+50%)"),b):(d={},k(d,x?"right":"left","".concat(y,"%")),k(d,x?"left":"right","auto"),k(d,"transform","translateX(".concat(x?"+":"-","50%)")),d)});return function(){var b=e.prefixCls,d=e.disabled,f=e.min,y=e.max,x=e.value,V=e.tabindex,p=e.ariaLabel,h=e.ariaLabelledBy,P=e.ariaValueTextFormatter,$=e.onMouseenter,B=e.onMouseleave,L=D(t.class,k({},"".concat(b,"-handle-click-focused"),i.value)),H={"aria-valuemin":f,"aria-valuemax":y,"aria-valuenow":x,"aria-disabled":!!d},_=[t.style,F.value],O=V||0;(d||V===null)&&(O=null);var N;P&&(N=P(x));var G=m(m(m({},t),{},{role:"slider",tabindex:O},H),{},{class:L,onBlur:u,onKeydown:c,onMousedown:S,onMouseenter:$,onMouseleave:B,ref:s,style:_});return w("div",m(m({},G),{},{"aria-label":p,"aria-labelledby":h,"aria-valuetext":N}),null)}}});function q(o,e){try{return Object.keys(e).some(function(a){return o.target===e[a].ref})}catch{return!1}}function Me(o,e){var a=e.min,t=e.max;return ot}function de(o){return o.touches.length>1||o.type.toLowerCase()==="touchend"&&o.touches.length>0}function ce(o,e){var a=e.marks,t=e.step,n=e.min,r=e.max,i=Object.keys(a).map(parseFloat);if(t!==null){var s=Math.pow(10,Be(t)),l=Math.floor((r*s-n*s)/(t*s)),u=Math.min((o-n)/t,l),c=Math.round(u)*t+n;i.push(c)}var v=i.map(function(g){return Math.abs(o-g)});return i[v.indexOf(Math.min.apply(Math,A(v)))]}function Be(o){var e=o.toString(),a=0;return e.indexOf(".")>=0&&(a=e.length-e.indexOf(".")-1),a}function ve(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.clientY:e.pageX)/a}function fe(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.touches[0].clientY:e.touches[0].pageX)/a}function he(o,e){var a=e.getBoundingClientRect();return o?a.top+a.height*.5:window.pageXOffset+a.left+a.width*.5}function oe(o,e){var a=e.max,t=e.min;return o<=t?t:o>=a?a:o}function Te(o,e){var a=e.step,t=isFinite(ce(o,e))?ce(o,e):0;return a===null?t:parseFloat(t.toFixed(Be(a)))}function K(o){o.stopPropagation(),o.preventDefault()}function st(o,e,a){var t={increase:function(s,l){return s+l},decrease:function(s,l){return s-l}},n=t[o](Object.keys(a.marks).indexOf(JSON.stringify(e)),1),r=Object.keys(a.marks)[n];return a.step?t[o](e,a.step):Object.keys(a.marks).length&&a.marks[r]?a.marks[r]:e}function Pe(o,e,a){var t="increase",n="decrease",r=t;switch(o.keyCode){case j.UP:r=e&&a?n:t;break;case j.RIGHT:r=!e&&a?n:t;break;case j.DOWN:r=e&&a?t:n;break;case j.LEFT:r=!e&&a?t:n;break;case j.END:return function(i,s){return s.max};case j.HOME:return function(i,s){return s.min};case j.PAGE_UP:return function(i,s){return i+s.step*2};case j.PAGE_DOWN:return function(i,s){return i-s.step*2};default:return}return function(i,s){return st(r,i,s)}}var ot=["index","directives","className","style"];function I(){}function we(o){var e={id:String,min:Number,max:Number,step:Number,marks:M.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:M.object,maximumTrackStyle:M.object,handleStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),trackStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),railStyle:M.object,dotStyle:M.object,activeDotStyle:M.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return R({compatConfig:{MODE:3},name:"CreateSlider",mixins:[se,o],inheritAttrs:!1,slots:["mark"],props:be(e,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data:function(){var t=this.step,n=this.max,r=this.min,i=isFinite(n-r)?(n-r)%t===0:!0;return ie(t&&Math.floor(t)===t?i:!0,"Slider[max] - Slider[min] (".concat(n-r,") should be a multiple of Slider[step] (").concat(t,")")),this.handlesRefs={},{}},mounted:function(){var t=this;this.$nextTick(function(){t.document=t.sliderRef&&t.sliderRef.ownerDocument;var n=t.autofocus,r=t.disabled;n&&!r&&t.focus()})},beforeUnmount:function(){var t=this;this.$nextTick(function(){t.removeDocumentEvents()})},methods:{defaultHandle:function(t){var n=t.index;t.directives;var r=t.className,i=t.style,s=J(t,ot);if(delete s.dragging,s.value===null)return null;var l=m(m({},s),{},{class:r,style:i,key:n});return w(Ve,l,null)},onDown:function(t,n){var r=n,i=this.$props,s=i.draggableTrack,l=i.vertical,u=this.$data.bounds,c=s&&this.positionGetValue?this.positionGetValue(r)||[]:[],v=q(t,this.handlesRefs);if(this.dragTrack=s&&u.length>=2&&!v&&!c.map(function(C,S){var T=S?!0:C>=u[S];return S===c.length-1?C<=u[S]:T}).some(function(C){return!C}),this.dragTrack)this.dragOffset=r,this.startBounds=A(u);else{if(!v)this.dragOffset=0;else{var g=he(l,t.target);this.dragOffset=r-g,r=g}this.onStart(r)}},onMouseDown:function(t){if(t.button===0){this.removeDocumentEvents();var n=this.$props.vertical,r=ve(n,t);this.onDown(t,r),this.addDocumentMouseEvents()}},onTouchStart:function(t){if(!de(t)){var n=this.vertical,r=fe(n,t);this.onDown(t,r),this.addDocumentTouchEvents(),K(t)}},onFocus:function(t){var n=this.vertical;if(q(t,this.handlesRefs)&&!this.dragTrack){var r=he(n,t.target);this.dragOffset=0,this.onStart(r),K(t),this.$emit("focus",t)}},onBlur:function(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp:function(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove:function(t){if(!this.sliderRef){this.onEnd();return}var n=ve(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove:function(t){if(de(t)||!this.sliderRef){this.onEnd();return}var n=fe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown:function(t){this.sliderRef&&q(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel:function(t,n){var r=this;t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},function(){return r.onEnd(!0)})},getSliderStart:function(){var t=this.sliderRef,n=this.vertical,r=this.reverse,i=t.getBoundingClientRect();return n?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)},getSliderLength:function(){var t=this.sliderRef;if(!t)return 0;var n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents:function(){this.onTouchMoveListener=X(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=X(this.document,"touchend",this.onEnd)},addDocumentMouseEvents:function(){this.onMouseMoveListener=X(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=X(this.document,"mouseup",this.onEnd)},removeDocumentEvents:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus:function(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur:function(){var t=this;this.$props.disabled||Object.keys(this.handlesRefs).forEach(function(n){var r,i;(r=t.handlesRefs[n])===null||r===void 0||(i=r.blur)===null||i===void 0||i.call(r)})},calcValue:function(t){var n=this.vertical,r=this.min,i=this.max,s=Math.abs(Math.max(t,0)/this.getSliderLength()),l=n?(1-s)*(i-r)+r:s*(i-r)+r;return l},calcValueByPos:function(t){var n=this.reverse?-1:1,r=n*(t-this.getSliderStart()),i=this.trimAlignValue(this.calcValue(r));return i},calcOffset:function(t){var n=this.min,r=this.max,i=(t-n)/(r-n);return Math.max(0,i*100)},saveSlider:function(t){this.sliderRef=t},saveHandle:function(t,n){this.handlesRefs[t]=n}},render:function(){var t,n=this.prefixCls,r=this.marks,i=this.dots,s=this.step,l=this.included,u=this.disabled,c=this.vertical,v=this.reverse,g=this.min,C=this.max,S=this.maximumTrackStyle,T=this.railStyle,F=this.dotStyle,b=this.activeDotStyle,d=this.id,f=this.$attrs,y=f.class,x=f.style,V=this.renderSlider(),p=V.tracks,h=V.handles,P=D(n,y,(t={},k(t,"".concat(n,"-with-marks"),Object.keys(r).length),k(t,"".concat(n,"-disabled"),u),k(t,"".concat(n,"-vertical"),c),t)),$={vertical:c,marks:r,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,reverse:v,class:"".concat(n,"-mark"),onClickLabel:u?I:this.onClickMarkLabel},B=k({},ge?"onTouchstartPassive":"onTouchstart",u?I:this.onTouchStart);return w("div",m(m({id:d,ref:this.saveSlider,tabindex:"-1",class:P},B),{},{onMousedown:u?I:this.onMouseDown,onMouseup:u?I:this.onMouseUp,onKeydown:u?I:this.onKeyDown,onFocus:u?I:this.onFocus,onBlur:u?I:this.onBlur,style:x}),[w("div",{class:"".concat(n,"-rail"),style:m(m({},S),T)},null),p,w(rt,{prefixCls:n,vertical:c,reverse:v,marks:r,dots:i,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,dotStyle:F,activeDotStyle:b},null),h,w(it,$,{mark:this.$slots.mark}),Ae(this)])}})}var lt=R({compatConfig:{MODE:3},name:"Slider",mixins:[se],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data:function(){var e=this.defaultValue!==void 0?this.defaultValue:this.min,a=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(a),dragging:!1}},watch:{value:{handler:function(e){this.setChangeValue(e)},deep:!0},min:function(){var e=this.sValue;this.setChangeValue(e)},max:function(){var e=this.sValue;this.setChangeValue(e)}},methods:{setChangeValue:function(e){var a=e!==void 0?e:this.sValue,t=this.trimAlignValue(a,this.$props);t!==this.sValue&&(this.setState({sValue:t}),Me(a,this.$props)&&this.$emit("change",t))},onChange:function(e){var a=!ee(this,"value"),t=e.sValue>this.max?m(m({},e),{},{sValue:this.max}):e;a&&this.setState(t);var n=t.sValue;this.$emit("change",n)},onStart:function(e){this.setState({dragging:!0});var a=this.sValue;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==a&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd:function(e){var a=this.dragging;this.removeDocumentEvents(),(a||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove:function(e,a){K(e);var t=this.sValue,n=this.calcValueByPos(a);n!==t&&this.onChange({sValue:n})},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.sValue,s=r(i,this.$props),l=this.trimAlignValue(s);if(l===i)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound:function(){var e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound:function(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;var t=m(m({},this.$props),a),n=oe(e,t);return Te(n,t)},getTrack:function(e){var a=e.prefixCls,t=e.reverse,n=e.vertical,r=e.included,i=e.minimumTrackStyle,s=e.mergedTrackStyle,l=e.length,u=e.offset;return w(ke,{class:"".concat(a,"-track"),vertical:n,included:r,offset:u,reverse:t,length:l,style:m(m({},i),s)},null)},renderSlider:function(){var e=this,a=this.prefixCls,t=this.vertical,n=this.included,r=this.disabled,i=this.minimumTrackStyle,s=this.trackStyle,l=this.handleStyle,u=this.tabindex,c=this.ariaLabelForHandle,v=this.ariaLabelledByForHandle,g=this.ariaValueTextFormatterForHandle,C=this.min,S=this.max,T=this.startPoint,F=this.reverse,b=this.handle,d=this.defaultHandle,f=b||d,y=this.sValue,x=this.dragging,V=this.calcOffset(y),p=f({class:"".concat(a,"-handle"),prefixCls:a,vertical:t,offset:V,value:y,dragging:x,disabled:r,min:C,max:S,reverse:F,index:0,tabindex:u,ariaLabel:c,ariaLabelledBy:v,ariaValueTextFormatter:g,style:l[0]||l,ref:function(B){return e.saveHandle(0,B)},onFocus:this.onFocus,onBlur:this.onBlur}),h=T!==void 0?this.calcOffset(T):0,P=s[0]||s;return{tracks:this.getTrack({prefixCls:a,reverse:F,vertical:t,included:n,offset:h,minimumTrackStyle:i,mergedTrackStyle:P,length:V-h}),handles:p}}}});const ut=we(lt);var W=function(e){var a=e.value,t=e.handle,n=e.bounds,r=e.props,i=r.allowCross,s=r.pushable,l=Number(s),u=oe(a,r),c=u;return!i&&t!=null&&n!==void 0&&(t>0&&u<=n[t-1]+l&&(c=n[t-1]+l),t=n[t+1]-l&&(c=n[t+1]-l)),Te(c,r)},dt={defaultValue:M.arrayOf(M.number),value:M.arrayOf(M.number),count:Number,pushable:De(M.oneOfType([M.looseBool,M.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:M.arrayOf(M.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},ct=R({compatConfig:{MODE:3},name:"Range",mixins:[se],inheritAttrs:!1,props:be(dt,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data:function(){var e=this,a=this.count,t=this.min,n=this.max,r=Array.apply(void 0,A(Array(a+1))).map(function(){return t}),i=ee(this,"defaultValue")?this.defaultValue:r,s=this.value;s===void 0&&(s=i);var l=s.map(function(c,v){return W({value:c,handle:v,props:e.$props})}),u=l[0]===n?0:l.length-1;return{sHandle:null,recent:u,bounds:l}},watch:{value:{handler:function(e){var a=this.bounds;this.setChangeValue(e||a)},deep:!0},min:function(){var e=this.value;this.setChangeValue(e||this.bounds)},max:function(){var e=this.value;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue:function(e){var a=this,t=this.bounds,n=e.map(function(i,s){return W({value:i,handle:s,bounds:t,props:a.$props})});if(t.length===n.length){if(n.every(function(i,s){return i===t[s]}))return null}else n=e.map(function(i,s){return W({value:i,handle:s,props:a.$props})});if(this.setState({bounds:n}),e.some(function(i){return Me(i,a.$props)})){var r=e.map(function(i){return oe(i,a.$props)});this.$emit("change",r)}},onChange:function(e){var a=!ee(this,"value");if(a)this.setState(e);else{var t={};["sHandle","recent"].forEach(function(i){e[i]!==void 0&&(t[i]=e[i])}),Object.keys(t).length&&this.setState(t)}var n=m(m({},this.$data),e),r=n.bounds;this.$emit("change",r)},positionGetValue:function(e){var a=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),r=this.getBoundNeedMoving(t,n),i=a[r];if(t===i)return null;var s=A(a);return s[r]=t,s},onStart:function(e){var a=this.bounds;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;var n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});var r=a[this.prevMovedHandleIndex];if(t!==r){var i=A(a);i[this.prevMovedHandleIndex]=t,this.onChange({bounds:i})}},onEnd:function(e){var a=this.sHandle;this.removeDocumentEvents(),a||(this.dragTrack=!1),(a!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove:function(e,a,t,n){K(e);var r=this.$data,i=this.$props,s=i.max||100,l=i.min||0;if(t){var u=i.vertical?-a:a;u=i.reverse?-u:u;var c=s-Math.max.apply(Math,A(n)),v=l-Math.min.apply(Math,A(n)),g=Math.min(Math.max(u/(this.getSliderLength()/100),v),c),C=n.map(function(d){return Math.floor(Math.max(Math.min(d+g,s),l))});r.bounds.map(function(d,f){return d===C[f]}).some(function(d){return!d})&&this.onChange({bounds:C});return}var S=this.bounds,T=this.sHandle,F=this.calcValueByPos(a),b=S[T];F!==b&&this.moveTo(F)},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.bounds,s=this.sHandle,l=i[s===null?this.recent:s],u=r(l,this.$props),c=W({value:u,handle:s,bounds:i,props:this.$props});if(c===l)return;var v=!0;this.moveTo(c,v)}},getClosestBound:function(e){for(var a=this.bounds,t=0,n=1;n=a[n]&&(t=n);return Math.abs(a[t+1]-e)=n.length||i<0)return!1;var s=a+t,l=n[i],u=this.pushable,c=Number(u),v=t*(e[s]-l);return this.pushHandle(e,s,t,c-v)?(e[a]=l,!0):!1},trimAlignValue:function(e){var a=this.sHandle,t=this.bounds;return W({value:e,handle:a,bounds:t,props:this.$props})},ensureValueNotConflict:function(e,a,t){var n=t.allowCross,r=t.pushable,i=this.$data||{},s=i.bounds;if(e=e===void 0?i.sHandle:e,r=Number(r),!n&&e!=null&&s!==void 0){if(e>0&&a<=s[e-1]+r)return s[e-1]+r;if(e=s[e+1]-r)return s[e+1]-r}return a},getTrack:function(e){var a=e.bounds,t=e.prefixCls,n=e.reverse,r=e.vertical,i=e.included,s=e.offsets,l=e.trackStyle;return a.slice(0,-1).map(function(u,c){var v,g=c+1,C=D((v={},k(v,"".concat(t,"-track"),!0),k(v,"".concat(t,"-track-").concat(g),!0),v));return w(ke,{class:C,vertical:r,reverse:n,included:i,offset:s[g-1],length:s[g]-s[g-1],style:l[c],key:g},null)})},renderSlider:function(){var e=this,a=this.sHandle,t=this.bounds,n=this.prefixCls,r=this.vertical,i=this.included,s=this.disabled,l=this.min,u=this.max,c=this.reverse,v=this.handle,g=this.defaultHandle,C=this.trackStyle,S=this.handleStyle,T=this.tabindex,F=this.ariaLabelGroupForHandles,b=this.ariaLabelledByGroupForHandles,d=this.ariaValueTextFormatterGroupForHandles,f=v||g,y=t.map(function(p){return e.calcOffset(p)}),x="".concat(n,"-handle"),V=t.map(function(p,h){var P,$=T[h]||0;(s||T[h]===null)&&($=null);var B=a===h;return f({class:D((P={},k(P,x,!0),k(P,"".concat(x,"-").concat(h+1),!0),k(P,"".concat(x,"-dragging"),B),P)),prefixCls:n,vertical:r,dragging:B,offset:y[h],value:p,index:h,tabindex:$,min:l,max:u,reverse:c,disabled:s,style:S[h],ref:function(H){return e.saveHandle(h,H)},onFocus:e.onFocus,onBlur:e.onBlur,ariaLabel:F[h],ariaLabelledBy:b[h],ariaValueTextFormatter:d[h]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:c,vertical:r,included:i,offsets:y,trackStyle:C}),handles:V}}}});const vt=we(ct),ft=R({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Re(),setup:function(e,a){var t=a.attrs,n=a.slots,r=E(null),i=E(null);function s(){le.cancel(i.value),i.value=null}function l(){i.value=le(function(){var c;(c=r.value)===null||c===void 0||c.forcePopupAlign(),i.value=null})}var u=function(){s(),e.visible&&l()};return Z([function(){return e.visible},function(){return e.title}],function(){u()},{flush:"post",immediate:!0}),je(function(){u()}),re(function(){s()}),function(){return w(Ie,m(m({ref:r},e),t),n)}}});var ht=["value","dragging","index"],mt=["tooltipPrefixCls","range","id"],pt=function(e){return typeof e=="number"?e.toString():""},gt=function(){return{id:String,prefixCls:String,tooltipPrefixCls:String,range:{type:[Boolean,Object],default:void 0},reverse:{type:Boolean,default:void 0},min:Number,max:Number,step:{type:[Number,Object]},marks:{type:Object},dots:{type:Boolean,default:void 0},value:{type:[Number,Array]},defaultValue:{type:[Number,Array]},included:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},tipFormatter:{type:[Function,Object],default:function(){return pt}},tooltipVisible:{type:Boolean,default:void 0},tooltipPlacement:{type:String},getTooltipPopupContainer:{type:Function},autofocus:{type:Boolean,default:void 0},handleStyle:{type:[Object,Array]},trackStyle:{type:[Object,Array]},onChange:{type:Function},onAfterChange:{type:Function},onFocus:{type:Function},onBlur:{type:Function},"onUpdate:value":{type:Function}}},bt=R({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:gt(),slots:["mark"],setup:function(e,a){var t=a.attrs,n=a.slots,r=a.emit,i=a.expose,s=ne("slider",e),l=s.prefixCls,u=s.rootPrefixCls,c=s.direction,v=s.getPopupContainer,g=s.configProvider,C=ae(),S=E(),T=E({}),F=function(h,P){T.value[h]=P},b=z(function(){return e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"}),d=function(){var h;(h=S.value)===null||h===void 0||h.focus()},f=function(){var h;(h=S.value)===null||h===void 0||h.blur()},y=function(h){r("update:value",h),r("change",h),C.onFieldChange()},x=function(h){r("blur",h)};i({focus:d,blur:f});var V=function(h){var P=h.tooltipPrefixCls,$=h.info,B=$.value,L=$.dragging,H=$.index,_=J($,ht),O=e.tipFormatter,N=e.tooltipVisible,G=e.getTooltipPopupContainer,Q=O?T.value[H]||L:!1,U=N||N===void 0&&Q;return w(ft,{prefixCls:P,title:O?O(B):"",visible:U,placement:b.value,transitionName:"".concat(u.value,"-zoom-down"),key:H,overlayClassName:"".concat(l.value,"-tooltip"),getPopupContainer:G||v.value},{default:function(){return[w(Ve,m(m({},_),{},{value:B,onMouseenter:function(){return F(H,!0)},onMouseleave:function(){return F(H,!1)}}),null)]}})};return function(){var p=e.tooltipPrefixCls,h=e.range,P=e.id,$=P===void 0?C.id.value:P,B=J(e,mt),L=g.getPrefixCls("tooltip",p),H=D(t.class,k({},"".concat(l.value,"-rtl"),c.value==="rtl"));c.value==="rtl"&&!B.vertical&&(B.reverse=!B.reverse);var _;return pe(h)==="object"&&(_=h.draggableTrack),h?w(vt,m(m({},B),{},{step:B.step,draggableTrack:_,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark}):w(ut,m(m({},B),{},{id:$,step:B.step,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark})}}});const yt=Ge(bt);const xt={class:"num-input"},kt=R({__name:"numInput",props:Ue({min:{},max:{},step:{}},{modelValue:{}}),emits:["update:modelValue"],setup(o){const e=o,a=Ke(o,"modelValue");return(t,n)=>{const r=ze,i=yt;return We(),Xe("div",xt,[w(r,ue({value:a.value,"onUpdate:value":n[0]||(n[0]=s=>a.value=s)},e),null,16,["value"]),w(i,ue({value:a.value,"onUpdate:value":n[1]||(n[1]=s=>a.value=s)},e,{class:"slide"}),null,16,["value"])])}}});const Vt=Ye(kt,[["__scopeId","data-v-55978858"]]),Mt=o=>{const e=[];return o.shiftKey&&e.push("Shift"),o.ctrlKey&&e.push("Ctrl"),o.metaKey&&e.push("Cmd"),(o.code.startsWith("Key")||o.code.startsWith("Digit"))&&e.push(o.code),o.key==="Escape"&&e.push("Esc"),e.join(" + ")};export{Y as C,Vt as _,te as a,Mt as g};
diff --git a/vue/dist/assets/stackView-19fe464d.js b/vue/dist/assets/stackView-e80f96dd.js
similarity index 98%
rename from vue/dist/assets/stackView-19fe464d.js
rename to vue/dist/assets/stackView-e80f96dd.js
index 28e7393..d0c1a09 100644
--- a/vue/dist/assets/stackView-19fe464d.js
+++ b/vue/dist/assets/stackView-e80f96dd.js
@@ -1 +1 @@
-import{d as Z,u as we,g as X,_ as qe,c as r,a as ye,P as le,D as Ce,f as He,w as It,b as At,e as Pt,h as Ne,M as be,i as xt,A as Rt,o as g,j as x,k as l,l as V,t as p,F as _e,m as N,n as Ke,p as Mt,q as Tt,r as Bt,s as ge,v as Ot,x as Le,y as ze,z as Dt,B as O,C as i,E as e,G as d,H as D,I as Nt,J as Lt,K as Ee,L as zt,N as Et,O as Vt,S as jt,Q as Ut,R as Wt,T as Gt,U as qt,V as Ve,W as A,X as $,Y as je,Z as ke,$ as E,a0 as Ht,a1 as Kt,a2 as Qt,a3 as Jt,a4 as Xt,a5 as Yt,a6 as Zt,a7 as en,a8 as tn}from"./index-32743103.js";import{_ as nn}from"./shortcut-3129f75b.js";import{D as Qe}from"./index-e1a70e12.js";/* empty css *//* empty css */import{u as on,a as an,b as rn,c as ln,d as sn,e as dn,f as un,g as cn,h as pn,s as fn,o as Ue}from"./index-c80754a2.js";import{s as vn,F as mn}from"./FileItem-aa47825a.js";import{M as gn,L as kn,R as yn,f as Cn}from"./MultiSelectKeep-56b94e1f.js";import"./_isIterateeCall-16c5cf9c.js";var bn=["class","style"],_n=function(){return{prefixCls:String,href:String,separator:le.any,overlay:le.any,onClick:Function}};const Y=Z({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:_n(),slots:["separator","overlay"],setup:function(a,u){var f=u.slots,v=u.attrs,S=we("breadcrumb",a),C=S.prefixCls,P=function(F,m){var c=X(f,a,"overlay");return c?r(Qe,{overlay:c,placement:"bottom"},{default:function(){return[r("span",{class:"".concat(m,"-overlay-link")},[F,r(Ce,null,null)])]}}):F};return function(){var w,F=(w=X(f,a,"separator"))!==null&&w!==void 0?w:"/",m=X(f,a),c=v.class,b=v.style,k=qe(v,bn),y;return a.href!==void 0?y=r("a",ye({class:"".concat(C.value,"-link"),onClick:a.onClick},k),[m]):y=r("span",ye({class:"".concat(C.value,"-link"),onClick:a.onClick},k),[m]),y=P(y,C.value),m?r("span",{class:c,style:b},[y,F&&r("span",{class:"".concat(C.value,"-separator")},[F])]):null}}});var hn=function(){return{prefixCls:String,routes:{type:Array},params:le.any,separator:le.any,itemRender:{type:Function}}};function wn(s,a){if(!s.breadcrumbName)return null;var u=Object.keys(a).join("|"),f=s.breadcrumbName.replace(new RegExp(":(".concat(u,")"),"g"),function(v,S){return a[S]||v});return f}function We(s){var a=s.route,u=s.params,f=s.routes,v=s.paths,S=f.indexOf(a)===f.length-1,C=wn(a,u);return S?r("span",null,[C]):r("a",{href:"#/".concat(v.join("/"))},[C])}const G=Z({compatConfig:{MODE:3},name:"ABreadcrumb",props:hn(),slots:["separator","itemRender"],setup:function(a,u){var f=u.slots,v=we("breadcrumb",a),S=v.prefixCls,C=v.direction,P=function(c,b){return c=(c||"").replace(/^\//,""),Object.keys(b).forEach(function(k){c=c.replace(":".concat(k),b[k])}),c},w=function(c,b,k){var y=xt(c),I=P(b||"",k);return I&&y.push(I),y},F=function(c){var b=c.routes,k=b===void 0?[]:b,y=c.params,I=y===void 0?{}:y,L=c.separator,R=c.itemRender,T=R===void 0?We:R,z=[];return k.map(function(h){var B=P(h.path,I);B&&z.push(B);var q=[].concat(z),H=null;return h.children&&h.children.length&&(H=r(be,null,{default:function(){return[h.children.map(function(j){return r(be.Item,{key:j.path||j.breadcrumbName},{default:function(){return[T({route:j,params:I,routes:k,paths:w(q,j.path,I)})]}})})]}})),r(Y,{overlay:H,separator:L,key:B||h.breadcrumbName},{default:function(){return[T({route:h,params:I,routes:k,paths:q})]}})})};return function(){var m,c,b,k=a.routes,y=a.params,I=y===void 0?{}:y,L=He(X(f,a)),R=(m=X(f,a,"separator"))!==null&&m!==void 0?m:"/",T=a.itemRender||f.itemRender||We;k&&k.length>0?b=F({routes:k,params:I,separator:R,itemRender:T}):L.length&&(b=L.map(function(h,B){return It(At(h.type)==="object"&&(h.type.__ANT_BREADCRUMB_ITEM||h.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Pt(h,{separator:R,key:B})}));var z=(c={},Ne(c,S.value,!0),Ne(c,"".concat(S.value,"-rtl"),C.value==="rtl"),c);return r("div",{class:z},[b])}}});var Sn=["separator","class"],$n=function(){return{prefixCls:String}};const he=Z({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:$n(),setup:function(a,u){var f=u.slots,v=u.attrs,S=we("breadcrumb",a),C=S.prefixCls;return function(){var P;v.separator;var w=v.class,F=qe(v,Sn),m=He((P=f.default)===null||P===void 0?void 0:P.call(f));return r("span",ye({class:["".concat(C.value,"-separator"),w]},F),[m.length>0?m:"/"])}}});G.Item=Y;G.Separator=he;G.install=function(s){return s.component(G.name,G),s.component(Y.name,Y),s.component(he.name,he),s};var Fn={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 In=Fn;function Ge(s){for(var a=1;a(g(),x("div",xn,[l("span",null,[V(p(a.$t("items",[a.fileNum]))+" ",1),a.selectedFileNum?(g(),x(_e,{key:0},[V(", "+p(a.$t("selectedItems",[a.selectedFileNum])),1)],64)):N("",!0)])]))}});const Mn=Ke(Rn,[["__scopeId","data-v-afd25667"]]),Tn={class:"hint"},Bn={class:"location-bar"},On=["onClick"],Dn={key:3,class:"location-act"},Nn={class:"actions"},Ln=["onClick"],zn=["title"],En=["onClick"],Vn={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)"}},jn={style:{padding:"4px"}},Un={style:{padding:"4px"}},Wn={style:{padding:"4px"}},Gn={key:0,style:{padding:"4px"}},qn={style:{padding:"4px"}},Hn={style:{padding:"4px"}},Kn=["onClick"],Qn={key:0,class:"view"},Jn={style:{padding:"16px 0 512px"}},Xn={key:0,class:"preview-switch"},Yn=Z({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},mode:{},targetFile:{},openPreview:{type:Boolean},stackKey:{}},setup(s){const a=s,u=Mt(),{scroller:f,stackViewEl:v,props:S,multiSelectedIdxs:C,spinning:P}=on().toRefs();f.value,v.value;const{currLocation:w,currPage:F,refresh:m,copyLocation:c,back:b,openNext:k,stack:y,quickMoveTo:I,addToSearchScanPathAndQuickMove:L,locInputValue:R,isLocationEditing:T,onLocEditEnter:z,onEditBtnClick:h,share:B,selectAll:q,onCreateFloderBtnClick:H,onWalkBtnClick:ee,showWalkButton:j,searchInCurrentDir:se,backToLastUseTo:$e,polling:Je,onPollRefreshClick:Fe}=an(),{gridItems:Xe,sortMethodConv:Ye,moreActionsDropdownShow:te,sortedFiles:M,sortMethod:ie,itemSize:Ie,loadNextDir:Ze,loadNextDirLoading:et,canLoadNext:tt,onScroll:nt,cellWidth:ne,dirCoverCache:ot}=rn(),{onDrop:Ae,onFileDragStart:at,onFileDragEnd:rt,onFileDropToFolder:lt}=ln(),{onFileItemClick:st,onContextMenuClick:Pe,showGenInfo:oe,imageGenInfo:xe,q:it}=sn({openNext:k}),{previewIdx:K,onPreviewVisibleChange:dt,previewing:de,previewImgMove:Re,canPreview:Me,scrollToFileId:ut,scrollToIndex:ct}=dn(),Te=Tt(),{showMenuIdx:ue}=un(),{onClearAllSelected:pt,onReverseSelect:ft,onSelectAll:vt}=cn(),{getGenDiff:mt,changeIndchecked:Q,seedChangeChecked:ae,getRawGenParams:gt,getGenDiffWatchDep:kt}=pn(),yt=async(o,t)=>{await lt(o,t)||await Ae(o)},Ct=()=>{M.value.length!==0&&Ue(M.value,K.value||0)},ce=Bt(!1),bt=async()=>{te.value=!1,ce.value=!0;let o;try{A.loading({content:$("flattenFolderScanning"),key:"flatten",duration:0}),o=await je({folder_path:w.value,dry_run:!0})}catch(t){A.destroy("flatten"),A.error(t.message||String(t)),ce.value=!1;return}if(A.destroy("flatten"),ce.value=!1,o.total_files===0){A.info($("flattenFolderNoFiles"));return}if(o.conflicts.length>0){ke.error({title:$("flattenFolderConflict"),content:E("div",{},[E("p",{},`${$("flattenFolderConflictFiles")}:`),E("ul",{style:"max-height: 300px; overflow-y: auto;"},o.conflicts.map(t=>E("li",{style:"color: red;"},t)))])});return}ke.confirm({title:$("flattenFolder"),content:E("div",{},[E("p",{style:"color: red; font-weight: bold;"},$("flattenFolderWarning")),E("p",{},$("flattenFolderConfirm",{count:o.total_files}))]),okText:$("confirm"),okType:"danger",cancelText:$("cancel"),onOk:async()=>{var t;try{A.loading({content:$("flattenFolderExecuting"),key:"flatten",duration:0});const _=await je({folder_path:w.value,dry_run:!1});A.destroy("flatten"),_.success?(A.success($("flattenFolderSuccess",{count:_.moved_files})),m()):A.error(`${$("error")}: ${(t=_.errors)==null?void 0:t.join(", ")}`)}catch(_){A.destroy("flatten"),A.error(_.message||String(_))}}})};return ge(()=>a,()=>{S.value=a;const o=fn.get(a.stackKey??"");o&&(y.value=o.slice())},{immediate:!0}),ge(()=>Te.visible,(o,t)=>{if(!o&&t){const _=Te.lastActiveId;_&&ut(_)}}),Ot(()=>{const{targetFile:o,openPreview:t}=a;!o||!t||(console.log("StackView mounted with targetFile:",o,"openPreview:",t),Le(()=>{const _=ge(()=>M.value,J=>{if(J&&J.length>0){const U=J.map(pe=>ze(pe.fullpath)).indexOf(ze(o));U!==-1&&(_(),Le(()=>{console.log("Found target file in stack view:",o,"at index",U),ct(U),setTimeout(()=>{Dt(U,v.value)},300)}))}},{immediate:!0});setTimeout(()=>{_()},5e3)}))}),(o,t)=>{const _=Ht,J=Kt,U=ke,pe=Qt,_t=Y,ht=G,Be=Jt,fe=Xt,Oe=be,ve=Qe,wt=nn,re=Yt,De=Zt,St=en,$t=tn;return g(),O($t,{spinning:e(P),size:"large"},{default:i(()=>[r(gn,{show:e(u).keepMultiSelect||!!e(C).length,onClearAllSelected:e(pt),onSelectAll:e(vt),onReverseSelect:e(ft)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),r(_,{style:{display:"none"}}),l("div",{ref_key:"stackViewEl",ref:v,onDragover:t[32]||(t[32]=d(()=>{},["prevent"])),onDrop:t[33]||(t[33]=d(n=>e(Ae)(n),["prevent"])),class:"container"},[r(U,{visible:e(oe),"onUpdate:visible":t[1]||(t[1]=n=>D(oe)?oe.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>oe.value=!1)},{cancelText:i(()=>[]),default:i(()=>[r(J,{active:"",loading:!e(it).isIdle},{default:i(()=>[l("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(Nt)(e(xe)))},[l("div",Tn,p(o.$t("doubleClickToCopy")),1),V(" "+p(e(xe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),l("div",Bn,[l("div",{class:"breadcrumb",style:Lt({flex:e(T)?1:""})},[e(T)?(g(),O(pe,{key:0,style:{flex:"1"},value:e(R),"onUpdate:value":t[3]||(t[3]=n=>D(R)?R.value=n:null),onClick:t[4]||(t[4]=d(()=>{},["stop"])),onKeydown:t[5]||(t[5]=d(()=>{},["stop"])),onPressEnter:e(z),"allow-clear":""},null,8,["value","onPressEnter"])):(g(),O(ht,{key:1,style:{flex:"1"}},{default:i(()=>[(g(!0),x(_e,null,Ee(e(y),(n,W)=>(g(),O(_t,{key:W},{default:i(()=>[l("a",{onClick:d(me=>e(b)(W),["prevent"])},p(n.curr==="/"?o.$t("root"):n.curr.replace(/:\/$/,o.$t("drive"))),9,On)]),_:2},1024))),128))]),_:1})),e(T)?(g(),O(Be,{key:2,size:"small",onClick:e(z),type:"primary"},{default:i(()=>[V(p(o.$t("go")),1)]),_:1},8,["onClick"])):(g(),x("div",Dn,[o.mode==="scanned-fixed"?(g(),x("a",{key:0,onClick:t[6]||(t[6]=d((...n)=>e($e)&&e($e)(...n),["prevent"])),style:{margin:"0 8px 16px 0"}},[r(e(Pn))])):N("",!0),l("a",{onClick:t[7]||(t[7]=d((...n)=>e(c)&&e(c)(...n),["prevent"])),class:"copy"},p(o.$t("copy")),1),l("a",{onClick:t[8]||(t[8]=d((...n)=>e(h)&&e(h)(...n),["prevent","stop"]))},p(o.$t("edit")),1)]))],4),l("div",Nn,[l("a",{class:"opt",onClick:t[9]||(t[9]=d((...n)=>e(m)&&e(m)(...n),["prevent"]))},p(o.$t("refresh")),1),l("a",{class:"opt",onClick:d(Ct,["prevent"])},p(o.$t("TikTok View")),9,Ln),l("a",{class:"opt",onClick:t[10]||(t[10]=d(n=>e(zt)(e(w)),["prevent"])),title:o.$t("smartOrganizeHint")},p(o.$t("smartOrganize")),9,zn),r(ve,null,{overlay:i(()=>[r(Oe,null,{default:i(()=>[r(fe,{key:"tag-search"},{default:i(()=>[l("a",{onClick:t[12]||(t[12]=d(n=>e(se)("tag-search"),["prevent"]))},p(o.$t("imgSearch")),1)]),_:1}),r(fe,{key:"tag-search"},{default:i(()=>[l("a",{onClick:t[13]||(t[13]=d(n=>e(se)("fuzzy-search"),["prevent"]))},p(o.$t("fuzzy-search")),1)]),_:1})]),_:1})]),default:i(()=>[l("a",{class:"opt",onClick:t[11]||(t[11]=d(()=>{},["prevent"]))},[V(p(o.$t("search"))+" ",1),r(e(Ce))])]),_:1}),e(j)?(g(),x("a",{key:0,class:"opt",onClick:t[14]||(t[14]=d((...n)=>e(ee)&&e(ee)(...n),["prevent"]))}," Walk ")):N("",!0),l("a",{class:"opt",onClick:t[15]||(t[15]=d((...n)=>e(q)&&e(q)(...n),["prevent","stop"]))},p(o.$t("selectAll")),1),r(ve,null,{overlay:i(()=>[r(Oe,null,{default:i(()=>[(g(!0),x(_e,null,Ee(e(u).quickMovePaths,n=>(g(),O(fe,{key:n.dir},{default:i(()=>[l("a",{onClick:d(W=>e(I)(n.dir),["prevent"])},p(n.zh),9,En)]),_:2},1024))),128))]),_:1})]),default:i(()=>[l("a",{class:"opt",onClick:t[16]||(t[16]=d(()=>{},["prevent"]))},[V(p(o.$t("quickMove"))+" ",1),r(e(Ce))])]),_:1}),r(ve,{trigger:["click"],visible:e(te),"onUpdate:visible":t[28]||(t[28]=n=>D(te)?te.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[l("div",Vn,[r(St,Et(Vt({labelCol:{span:10},wrapperCol:{span:14}})),{default:i(()=>[r(re,{label:o.$t("gridCellWidth")},{default:i(()=>[r(wt,{modelValue:e(ne),"onUpdate:modelValue":t[18]||(t[18]=n=>D(ne)?ne.value=n:null),max:1024,min:64,step:16},null,8,["modelValue"])]),_:1},8,["label"]),r(re,{label:o.$t("sortingMethod")},{default:i(()=>[r(e(jt),{value:e(ie),"onUpdate:value":t[19]||(t[19]=n=>D(ie)?ie.value=n:null),onClick:t[20]||(t[20]=d(()=>{},["stop"])),conv:e(Ye),options:e(Ut)},null,8,["value","conv","options"])]),_:1},8,["label"]),r(re,{label:o.$t("showChangeIndicators")},{default:i(()=>[r(De,{checked:e(Q),"onUpdate:checked":t[21]||(t[21]=n=>D(Q)?Q.value=n:null),onClick:e(gt)},null,8,["checked","onClick"])]),_:1},8,["label"]),r(re,{label:o.$t("seedAsChange")},{default:i(()=>[r(De,{checked:e(ae),"onUpdate:checked":t[22]||(t[22]=n=>D(ae)?ae.value=n:null),disabled:!e(Q)},null,8,["checked","disabled"])]),_:1},8,["label"]),l("div",jn,[l("a",{onClick:t[23]||(t[23]=d((...n)=>e(L)&&e(L)(...n),["prevent"]))},p(o.$t("addToSearchScanPathAndQuickMove")),1)]),l("div",Un,[l("a",{onClick:t[24]||(t[24]=d(n=>e(Wt)(e(w)+"/"),["prevent"]))},p(o.$t("openWithLocalFileBrowser")),1)]),l("div",Wn,[l("a",{onClick:t[25]||(t[25]=d((...n)=>e(Fe)&&e(Fe)(...n),["prevent"]))},p(e(Je)?o.$t("stopPollRefresh"):o.$t("pollRefresh")),1)]),e(Gt)?N("",!0):(g(),x("div",Gn,[l("a",{onClick:t[26]||(t[26]=d((...n)=>e(B)&&e(B)(...n),["prevent"]))},p(o.$t("share")),1)])),l("div",qn,[l("a",{onClick:t[27]||(t[27]=d((...n)=>e(H)&&e(H)(...n),["prevent"]))},p(o.$t("createFolder")),1)]),l("div",Hn,[l("a",{onClick:d(bt,["prevent"]),style:{color:"#ff4d4f"}},p(o.$t("flattenFolder")),9,Kn)])]),_:1},16)])]),default:i(()=>[l("a",{class:"opt",onClick:t[17]||(t[17]=d(()=>{},["prevent"]))},p(o.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(F)?(g(),x("div",Qn,[r(e(vn),{class:"file-list",items:e(M),ref_key:"scroller",ref:f,onScroll:e(nt),"item-size":e(Ie).first,"key-field":"fullpath","item-secondary-size":e(Ie).second,gridItems:e(Xe)},{default:i(({item:n,index:W})=>[r(mn,{idx:parseInt(W),file:n,"full-screen-preview-image-url":e(M)[e(K)]?e(qt)(e(M)[e(K)]):"","show-menu-idx":e(ue),"onUpdate:showMenuIdx":t[29]||(t[29]=me=>D(ue)?ue.value=me:null),selected:e(C).includes(W),"cell-width":e(ne),onFileItemClick:e(st),onDragstart:e(at),onDragend:e(rt),onPreviewVisibleChange:e(dt),onContextMenuClick:e(Pe),onDropToFolder:yt,onTiktokView:(me,Ft)=>e(Ue)(e(M),Ft),"is-selected-mutil-files":e(C).length>1,"enable-change-indicator":e(Q),"seed-change-checked":e(ae),"get-gen-diff":e(mt),"get-gen-diff-watch-dep":e(kt),previewing:e(de),"cover-files":e(ot).get(n.fullpath)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick","onTiktokView","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep","previewing","cover-files"])]),after:i(()=>[l("div",Jn,[a.mode==="walk"?(g(),O(Be,{key:0,onClick:e(Ze),loading:e(et),block:"",type:"primary",disabled:!e(tt),ghost:""},{default:i(()=>[V(p(o.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])):N("",!0)])]),_:1},8,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(de)?(g(),x("div",Xn,[r(e(kn),{onClick:t[30]||(t[30]=n=>e(Re)("prev")),class:Ve({disable:!e(Me)("prev")})},null,8,["class"]),r(e(yn),{onClick:t[31]||(t[31]=n=>e(Re)("next")),class:Ve({disable:!e(Me)("next")})},null,8,["class"])])):N("",!0)])):N("",!0)],544),e(de)?(g(),O(Cn,{key:0,file:e(M)[e(K)],idx:e(K),onContextMenuClick:e(Pe)},null,8,["file","idx","onContextMenuClick"])):N("",!0),r(Mn,{"file-num":e(M).length,"selected-file-num":e(C).length},null,8,["file-num","selected-file-num"])]),_:1},8,["spinning"])}}});const io=Ke(Yn,[["__scopeId","data-v-9516e28d"]]);export{io as default};
+import{d as Z,u as we,g as X,_ as qe,c as r,a as ye,P as le,D as Ce,f as He,w as It,b as At,e as Pt,h as Ne,M as be,i as xt,A as Rt,o as g,j as x,k as l,l as V,t as p,F as _e,m as N,n as Ke,p as Mt,q as Tt,r as Bt,s as ge,v as Ot,x as Le,y as ze,z as Dt,B as O,C as i,E as e,G as d,H as D,I as Nt,J as Lt,K as Ee,L as zt,N as Et,O as Vt,S as jt,Q as Ut,R as Wt,T as Gt,U as qt,V as Ve,W as A,X as $,Y as je,Z as ke,$ as E,a0 as Ht,a1 as Kt,a2 as Qt,a3 as Jt,a4 as Xt,a5 as Yt,a6 as Zt,a7 as en,a8 as tn}from"./index-f2db319b.js";import{_ as nn}from"./shortcut-869fab50.js";import{D as Qe}from"./index-29e38a15.js";/* empty css *//* empty css */import{u as on,a as an,b as rn,c as ln,d as sn,e as dn,f as un,g as cn,h as pn,s as fn,o as Ue}from"./index-0d856f16.js";import{s as vn,F as mn}from"./FileItem-72718f68.js";import{M as gn,L as kn,R as yn,f as Cn}from"./MultiSelectKeep-a11efe88.js";import"./_isIterateeCall-dd643bcf.js";var bn=["class","style"],_n=function(){return{prefixCls:String,href:String,separator:le.any,overlay:le.any,onClick:Function}};const Y=Z({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:_n(),slots:["separator","overlay"],setup:function(a,u){var f=u.slots,v=u.attrs,S=we("breadcrumb",a),C=S.prefixCls,P=function(F,m){var c=X(f,a,"overlay");return c?r(Qe,{overlay:c,placement:"bottom"},{default:function(){return[r("span",{class:"".concat(m,"-overlay-link")},[F,r(Ce,null,null)])]}}):F};return function(){var w,F=(w=X(f,a,"separator"))!==null&&w!==void 0?w:"/",m=X(f,a),c=v.class,b=v.style,k=qe(v,bn),y;return a.href!==void 0?y=r("a",ye({class:"".concat(C.value,"-link"),onClick:a.onClick},k),[m]):y=r("span",ye({class:"".concat(C.value,"-link"),onClick:a.onClick},k),[m]),y=P(y,C.value),m?r("span",{class:c,style:b},[y,F&&r("span",{class:"".concat(C.value,"-separator")},[F])]):null}}});var hn=function(){return{prefixCls:String,routes:{type:Array},params:le.any,separator:le.any,itemRender:{type:Function}}};function wn(s,a){if(!s.breadcrumbName)return null;var u=Object.keys(a).join("|"),f=s.breadcrumbName.replace(new RegExp(":(".concat(u,")"),"g"),function(v,S){return a[S]||v});return f}function We(s){var a=s.route,u=s.params,f=s.routes,v=s.paths,S=f.indexOf(a)===f.length-1,C=wn(a,u);return S?r("span",null,[C]):r("a",{href:"#/".concat(v.join("/"))},[C])}const G=Z({compatConfig:{MODE:3},name:"ABreadcrumb",props:hn(),slots:["separator","itemRender"],setup:function(a,u){var f=u.slots,v=we("breadcrumb",a),S=v.prefixCls,C=v.direction,P=function(c,b){return c=(c||"").replace(/^\//,""),Object.keys(b).forEach(function(k){c=c.replace(":".concat(k),b[k])}),c},w=function(c,b,k){var y=xt(c),I=P(b||"",k);return I&&y.push(I),y},F=function(c){var b=c.routes,k=b===void 0?[]:b,y=c.params,I=y===void 0?{}:y,L=c.separator,R=c.itemRender,T=R===void 0?We:R,z=[];return k.map(function(h){var B=P(h.path,I);B&&z.push(B);var q=[].concat(z),H=null;return h.children&&h.children.length&&(H=r(be,null,{default:function(){return[h.children.map(function(j){return r(be.Item,{key:j.path||j.breadcrumbName},{default:function(){return[T({route:j,params:I,routes:k,paths:w(q,j.path,I)})]}})})]}})),r(Y,{overlay:H,separator:L,key:B||h.breadcrumbName},{default:function(){return[T({route:h,params:I,routes:k,paths:q})]}})})};return function(){var m,c,b,k=a.routes,y=a.params,I=y===void 0?{}:y,L=He(X(f,a)),R=(m=X(f,a,"separator"))!==null&&m!==void 0?m:"/",T=a.itemRender||f.itemRender||We;k&&k.length>0?b=F({routes:k,params:I,separator:R,itemRender:T}):L.length&&(b=L.map(function(h,B){return It(At(h.type)==="object"&&(h.type.__ANT_BREADCRUMB_ITEM||h.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Pt(h,{separator:R,key:B})}));var z=(c={},Ne(c,S.value,!0),Ne(c,"".concat(S.value,"-rtl"),C.value==="rtl"),c);return r("div",{class:z},[b])}}});var Sn=["separator","class"],$n=function(){return{prefixCls:String}};const he=Z({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:$n(),setup:function(a,u){var f=u.slots,v=u.attrs,S=we("breadcrumb",a),C=S.prefixCls;return function(){var P;v.separator;var w=v.class,F=qe(v,Sn),m=He((P=f.default)===null||P===void 0?void 0:P.call(f));return r("span",ye({class:["".concat(C.value,"-separator"),w]},F),[m.length>0?m:"/"])}}});G.Item=Y;G.Separator=he;G.install=function(s){return s.component(G.name,G),s.component(Y.name,Y),s.component(he.name,he),s};var Fn={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 In=Fn;function Ge(s){for(var a=1;a(g(),x("div",xn,[l("span",null,[V(p(a.$t("items",[a.fileNum]))+" ",1),a.selectedFileNum?(g(),x(_e,{key:0},[V(", "+p(a.$t("selectedItems",[a.selectedFileNum])),1)],64)):N("",!0)])]))}});const Mn=Ke(Rn,[["__scopeId","data-v-afd25667"]]),Tn={class:"hint"},Bn={class:"location-bar"},On=["onClick"],Dn={key:3,class:"location-act"},Nn={class:"actions"},Ln=["onClick"],zn=["title"],En=["onClick"],Vn={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)"}},jn={style:{padding:"4px"}},Un={style:{padding:"4px"}},Wn={style:{padding:"4px"}},Gn={key:0,style:{padding:"4px"}},qn={style:{padding:"4px"}},Hn={style:{padding:"4px"}},Kn=["onClick"],Qn={key:0,class:"view"},Jn={style:{padding:"16px 0 512px"}},Xn={key:0,class:"preview-switch"},Yn=Z({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},mode:{},targetFile:{},openPreview:{type:Boolean},stackKey:{}},setup(s){const a=s,u=Mt(),{scroller:f,stackViewEl:v,props:S,multiSelectedIdxs:C,spinning:P}=on().toRefs();f.value,v.value;const{currLocation:w,currPage:F,refresh:m,copyLocation:c,back:b,openNext:k,stack:y,quickMoveTo:I,addToSearchScanPathAndQuickMove:L,locInputValue:R,isLocationEditing:T,onLocEditEnter:z,onEditBtnClick:h,share:B,selectAll:q,onCreateFloderBtnClick:H,onWalkBtnClick:ee,showWalkButton:j,searchInCurrentDir:se,backToLastUseTo:$e,polling:Je,onPollRefreshClick:Fe}=an(),{gridItems:Xe,sortMethodConv:Ye,moreActionsDropdownShow:te,sortedFiles:M,sortMethod:ie,itemSize:Ie,loadNextDir:Ze,loadNextDirLoading:et,canLoadNext:tt,onScroll:nt,cellWidth:ne,dirCoverCache:ot}=rn(),{onDrop:Ae,onFileDragStart:at,onFileDragEnd:rt,onFileDropToFolder:lt}=ln(),{onFileItemClick:st,onContextMenuClick:Pe,showGenInfo:oe,imageGenInfo:xe,q:it}=sn({openNext:k}),{previewIdx:K,onPreviewVisibleChange:dt,previewing:de,previewImgMove:Re,canPreview:Me,scrollToFileId:ut,scrollToIndex:ct}=dn(),Te=Tt(),{showMenuIdx:ue}=un(),{onClearAllSelected:pt,onReverseSelect:ft,onSelectAll:vt}=cn(),{getGenDiff:mt,changeIndchecked:Q,seedChangeChecked:ae,getRawGenParams:gt,getGenDiffWatchDep:kt}=pn(),yt=async(o,t)=>{await lt(o,t)||await Ae(o)},Ct=()=>{M.value.length!==0&&Ue(M.value,K.value||0)},ce=Bt(!1),bt=async()=>{te.value=!1,ce.value=!0;let o;try{A.loading({content:$("flattenFolderScanning"),key:"flatten",duration:0}),o=await je({folder_path:w.value,dry_run:!0})}catch(t){A.destroy("flatten"),A.error(t.message||String(t)),ce.value=!1;return}if(A.destroy("flatten"),ce.value=!1,o.total_files===0){A.info($("flattenFolderNoFiles"));return}if(o.conflicts.length>0){ke.error({title:$("flattenFolderConflict"),content:E("div",{},[E("p",{},`${$("flattenFolderConflictFiles")}:`),E("ul",{style:"max-height: 300px; overflow-y: auto;"},o.conflicts.map(t=>E("li",{style:"color: red;"},t)))])});return}ke.confirm({title:$("flattenFolder"),content:E("div",{},[E("p",{style:"color: red; font-weight: bold;"},$("flattenFolderWarning")),E("p",{},$("flattenFolderConfirm",{count:o.total_files}))]),okText:$("confirm"),okType:"danger",cancelText:$("cancel"),onOk:async()=>{var t;try{A.loading({content:$("flattenFolderExecuting"),key:"flatten",duration:0});const _=await je({folder_path:w.value,dry_run:!1});A.destroy("flatten"),_.success?(A.success($("flattenFolderSuccess",{count:_.moved_files})),m()):A.error(`${$("error")}: ${(t=_.errors)==null?void 0:t.join(", ")}`)}catch(_){A.destroy("flatten"),A.error(_.message||String(_))}}})};return ge(()=>a,()=>{S.value=a;const o=fn.get(a.stackKey??"");o&&(y.value=o.slice())},{immediate:!0}),ge(()=>Te.visible,(o,t)=>{if(!o&&t){const _=Te.lastActiveId;_&&ut(_)}}),Ot(()=>{const{targetFile:o,openPreview:t}=a;!o||!t||(console.log("StackView mounted with targetFile:",o,"openPreview:",t),Le(()=>{const _=ge(()=>M.value,J=>{if(J&&J.length>0){const U=J.map(pe=>ze(pe.fullpath)).indexOf(ze(o));U!==-1&&(_(),Le(()=>{console.log("Found target file in stack view:",o,"at index",U),ct(U),setTimeout(()=>{Dt(U,v.value)},300)}))}},{immediate:!0});setTimeout(()=>{_()},5e3)}))}),(o,t)=>{const _=Ht,J=Kt,U=ke,pe=Qt,_t=Y,ht=G,Be=Jt,fe=Xt,Oe=be,ve=Qe,wt=nn,re=Yt,De=Zt,St=en,$t=tn;return g(),O($t,{spinning:e(P),size:"large"},{default:i(()=>[r(gn,{show:e(u).keepMultiSelect||!!e(C).length,onClearAllSelected:e(pt),onSelectAll:e(vt),onReverseSelect:e(ft)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),r(_,{style:{display:"none"}}),l("div",{ref_key:"stackViewEl",ref:v,onDragover:t[32]||(t[32]=d(()=>{},["prevent"])),onDrop:t[33]||(t[33]=d(n=>e(Ae)(n),["prevent"])),class:"container"},[r(U,{visible:e(oe),"onUpdate:visible":t[1]||(t[1]=n=>D(oe)?oe.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>oe.value=!1)},{cancelText:i(()=>[]),default:i(()=>[r(J,{active:"",loading:!e(it).isIdle},{default:i(()=>[l("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(Nt)(e(xe)))},[l("div",Tn,p(o.$t("doubleClickToCopy")),1),V(" "+p(e(xe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),l("div",Bn,[l("div",{class:"breadcrumb",style:Lt({flex:e(T)?1:""})},[e(T)?(g(),O(pe,{key:0,style:{flex:"1"},value:e(R),"onUpdate:value":t[3]||(t[3]=n=>D(R)?R.value=n:null),onClick:t[4]||(t[4]=d(()=>{},["stop"])),onKeydown:t[5]||(t[5]=d(()=>{},["stop"])),onPressEnter:e(z),"allow-clear":""},null,8,["value","onPressEnter"])):(g(),O(ht,{key:1,style:{flex:"1"}},{default:i(()=>[(g(!0),x(_e,null,Ee(e(y),(n,W)=>(g(),O(_t,{key:W},{default:i(()=>[l("a",{onClick:d(me=>e(b)(W),["prevent"])},p(n.curr==="/"?o.$t("root"):n.curr.replace(/:\/$/,o.$t("drive"))),9,On)]),_:2},1024))),128))]),_:1})),e(T)?(g(),O(Be,{key:2,size:"small",onClick:e(z),type:"primary"},{default:i(()=>[V(p(o.$t("go")),1)]),_:1},8,["onClick"])):(g(),x("div",Dn,[o.mode==="scanned-fixed"?(g(),x("a",{key:0,onClick:t[6]||(t[6]=d((...n)=>e($e)&&e($e)(...n),["prevent"])),style:{margin:"0 8px 16px 0"}},[r(e(Pn))])):N("",!0),l("a",{onClick:t[7]||(t[7]=d((...n)=>e(c)&&e(c)(...n),["prevent"])),class:"copy"},p(o.$t("copy")),1),l("a",{onClick:t[8]||(t[8]=d((...n)=>e(h)&&e(h)(...n),["prevent","stop"]))},p(o.$t("edit")),1)]))],4),l("div",Nn,[l("a",{class:"opt",onClick:t[9]||(t[9]=d((...n)=>e(m)&&e(m)(...n),["prevent"]))},p(o.$t("refresh")),1),l("a",{class:"opt",onClick:d(Ct,["prevent"])},p(o.$t("TikTok View")),9,Ln),l("a",{class:"opt",onClick:t[10]||(t[10]=d(n=>e(zt)(e(w)),["prevent"])),title:o.$t("smartOrganizeHint")},p(o.$t("smartOrganize")),9,zn),r(ve,null,{overlay:i(()=>[r(Oe,null,{default:i(()=>[r(fe,{key:"tag-search"},{default:i(()=>[l("a",{onClick:t[12]||(t[12]=d(n=>e(se)("tag-search"),["prevent"]))},p(o.$t("imgSearch")),1)]),_:1}),r(fe,{key:"tag-search"},{default:i(()=>[l("a",{onClick:t[13]||(t[13]=d(n=>e(se)("fuzzy-search"),["prevent"]))},p(o.$t("fuzzy-search")),1)]),_:1})]),_:1})]),default:i(()=>[l("a",{class:"opt",onClick:t[11]||(t[11]=d(()=>{},["prevent"]))},[V(p(o.$t("search"))+" ",1),r(e(Ce))])]),_:1}),e(j)?(g(),x("a",{key:0,class:"opt",onClick:t[14]||(t[14]=d((...n)=>e(ee)&&e(ee)(...n),["prevent"]))}," Walk ")):N("",!0),l("a",{class:"opt",onClick:t[15]||(t[15]=d((...n)=>e(q)&&e(q)(...n),["prevent","stop"]))},p(o.$t("selectAll")),1),r(ve,null,{overlay:i(()=>[r(Oe,null,{default:i(()=>[(g(!0),x(_e,null,Ee(e(u).quickMovePaths,n=>(g(),O(fe,{key:n.dir},{default:i(()=>[l("a",{onClick:d(W=>e(I)(n.dir),["prevent"])},p(n.zh),9,En)]),_:2},1024))),128))]),_:1})]),default:i(()=>[l("a",{class:"opt",onClick:t[16]||(t[16]=d(()=>{},["prevent"]))},[V(p(o.$t("quickMove"))+" ",1),r(e(Ce))])]),_:1}),r(ve,{trigger:["click"],visible:e(te),"onUpdate:visible":t[28]||(t[28]=n=>D(te)?te.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[l("div",Vn,[r(St,Et(Vt({labelCol:{span:10},wrapperCol:{span:14}})),{default:i(()=>[r(re,{label:o.$t("gridCellWidth")},{default:i(()=>[r(wt,{modelValue:e(ne),"onUpdate:modelValue":t[18]||(t[18]=n=>D(ne)?ne.value=n:null),max:1024,min:64,step:16},null,8,["modelValue"])]),_:1},8,["label"]),r(re,{label:o.$t("sortingMethod")},{default:i(()=>[r(e(jt),{value:e(ie),"onUpdate:value":t[19]||(t[19]=n=>D(ie)?ie.value=n:null),onClick:t[20]||(t[20]=d(()=>{},["stop"])),conv:e(Ye),options:e(Ut)},null,8,["value","conv","options"])]),_:1},8,["label"]),r(re,{label:o.$t("showChangeIndicators")},{default:i(()=>[r(De,{checked:e(Q),"onUpdate:checked":t[21]||(t[21]=n=>D(Q)?Q.value=n:null),onClick:e(gt)},null,8,["checked","onClick"])]),_:1},8,["label"]),r(re,{label:o.$t("seedAsChange")},{default:i(()=>[r(De,{checked:e(ae),"onUpdate:checked":t[22]||(t[22]=n=>D(ae)?ae.value=n:null),disabled:!e(Q)},null,8,["checked","disabled"])]),_:1},8,["label"]),l("div",jn,[l("a",{onClick:t[23]||(t[23]=d((...n)=>e(L)&&e(L)(...n),["prevent"]))},p(o.$t("addToSearchScanPathAndQuickMove")),1)]),l("div",Un,[l("a",{onClick:t[24]||(t[24]=d(n=>e(Wt)(e(w)+"/"),["prevent"]))},p(o.$t("openWithLocalFileBrowser")),1)]),l("div",Wn,[l("a",{onClick:t[25]||(t[25]=d((...n)=>e(Fe)&&e(Fe)(...n),["prevent"]))},p(e(Je)?o.$t("stopPollRefresh"):o.$t("pollRefresh")),1)]),e(Gt)?N("",!0):(g(),x("div",Gn,[l("a",{onClick:t[26]||(t[26]=d((...n)=>e(B)&&e(B)(...n),["prevent"]))},p(o.$t("share")),1)])),l("div",qn,[l("a",{onClick:t[27]||(t[27]=d((...n)=>e(H)&&e(H)(...n),["prevent"]))},p(o.$t("createFolder")),1)]),l("div",Hn,[l("a",{onClick:d(bt,["prevent"]),style:{color:"#ff4d4f"}},p(o.$t("flattenFolder")),9,Kn)])]),_:1},16)])]),default:i(()=>[l("a",{class:"opt",onClick:t[17]||(t[17]=d(()=>{},["prevent"]))},p(o.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(F)?(g(),x("div",Qn,[r(e(vn),{class:"file-list",items:e(M),ref_key:"scroller",ref:f,onScroll:e(nt),"item-size":e(Ie).first,"key-field":"fullpath","item-secondary-size":e(Ie).second,gridItems:e(Xe)},{default:i(({item:n,index:W})=>[r(mn,{idx:parseInt(W),file:n,"full-screen-preview-image-url":e(M)[e(K)]?e(qt)(e(M)[e(K)]):"","show-menu-idx":e(ue),"onUpdate:showMenuIdx":t[29]||(t[29]=me=>D(ue)?ue.value=me:null),selected:e(C).includes(W),"cell-width":e(ne),onFileItemClick:e(st),onDragstart:e(at),onDragend:e(rt),onPreviewVisibleChange:e(dt),onContextMenuClick:e(Pe),onDropToFolder:yt,onTiktokView:(me,Ft)=>e(Ue)(e(M),Ft),"is-selected-mutil-files":e(C).length>1,"enable-change-indicator":e(Q),"seed-change-checked":e(ae),"get-gen-diff":e(mt),"get-gen-diff-watch-dep":e(kt),previewing:e(de),"cover-files":e(ot).get(n.fullpath)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick","onTiktokView","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep","previewing","cover-files"])]),after:i(()=>[l("div",Jn,[a.mode==="walk"?(g(),O(Be,{key:0,onClick:e(Ze),loading:e(et),block:"",type:"primary",disabled:!e(tt),ghost:""},{default:i(()=>[V(p(o.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])):N("",!0)])]),_:1},8,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(de)?(g(),x("div",Xn,[r(e(kn),{onClick:t[30]||(t[30]=n=>e(Re)("prev")),class:Ve({disable:!e(Me)("prev")})},null,8,["class"]),r(e(yn),{onClick:t[31]||(t[31]=n=>e(Re)("next")),class:Ve({disable:!e(Me)("next")})},null,8,["class"])])):N("",!0)])):N("",!0)],544),e(de)?(g(),O(Cn,{key:0,file:e(M)[e(K)],idx:e(K),onContextMenuClick:e(Pe)},null,8,["file","idx","onContextMenuClick"])):N("",!0),r(Mn,{"file-num":e(M).length,"selected-file-num":e(C).length},null,8,["file-num","selected-file-num"])]),_:1},8,["spinning"])}}});const io=Ke(Yn,[["__scopeId","data-v-9516e28d"]]);export{io as default};
diff --git a/vue/dist/index.html b/vue/dist/index.html
index b07af90..be3e2ae 100644
--- a/vue/dist/index.html
+++ b/vue/dist/index.html
@@ -7,7 +7,7 @@
Infinite Image Browsing
-
+
diff --git a/vue/src/components/FileItem.vue b/vue/src/components/FileItem.vue
index c0d18b1..867ad52 100644
--- a/vue/src/components/FileItem.vue
+++ b/vue/src/components/FileItem.vue
@@ -6,7 +6,7 @@ import type { FileNodeInfo } from '@/api/files'
import { isImageFile, isVideoFile, isAudioFile } from '@/util'
import { toImageThumbnailUrl, toVideoCoverUrl, toRawFileUrl } from '@/util/file'
import type { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'
-import { computed, ref } from 'vue'
+import { computed, ref, nextTick, watch } from 'vue'
import ContextMenu from './ContextMenu.vue'
import ChangeIndicator from './ChangeIndicator.vue'
import { useTagStore } from '@/store/useTagStore'
@@ -16,10 +16,12 @@ import { openVideoModal, openAudioModal } from './functionalCallableComp'
import type { GenDiffInfo } from '@/api/files'
import { play } from '@/icon'
import { Top4MediaInfo } from '@/api'
-import { watch } from 'vue'
import { debounce } from 'lodash-es'
-
import { closeImageFullscreenPreview } from '@/util/imagePreviewOperation'
+import { eventEmitter as videoEventEmitter, useEventListen } from './videoEventEmitter'
+import { useI18n } from 'vue-i18n'
+
+const { t } = useI18n()
const global = useGlobalStore()
const tagStore = useTagStore()
@@ -97,6 +99,75 @@ const taggleLikeTag = () => {
const minShowDetailWidth = 160
+// 视频原地播放相关
+const isPlayingInline = ref(false)
+const videoElementRef = ref(null)
+
+// 切换原地播放
+const toggleInlinePlay = (event: MouseEvent) => {
+ console.log('toggleInlinePlay', { event, isPlayingInline: isPlayingInline.value, videoRef: videoElementRef.value })
+ event.stopPropagation()
+
+ // 如果要开始播放,先通知其他视频停止
+ if (!isPlayingInline.value) {
+ videoEventEmitter.emit('stopInlinePlay')
+ }
+
+ // 先切换状态,让video元素渲染出来
+ isPlayingInline.value = !isPlayingInline.value
+
+ // 使用 nextTick 确保 video 元素已经渲染
+ if (!isPlayingInline.value) {
+ // 如果是暂停,直接暂停
+ if (videoElementRef.value) {
+ videoElementRef.value.pause()
+ }
+ } else {
+ // 如果是播放,等待DOM更新后再播放
+ nextTick(() => {
+ if (videoElementRef.value) {
+ console.log('Playing video', videoElementRef.value)
+ videoElementRef.value.play().catch(err => {
+ console.error('Play failed:', err)
+ isPlayingInline.value = false
+ })
+ } else {
+ console.error('Video ref is null after nextTick')
+ isPlayingInline.value = false
+ }
+ })
+ }
+}
+
+// 处理其他视频播放的通知
+const handleStopInlinePlay = () => {
+ if (isPlayingInline.value && videoElementRef.value) {
+ videoElementRef.value.pause()
+ isPlayingInline.value = false
+ }
+}
+
+// 监听停止事件
+useEventListen('stopInlinePlay', handleStopInlinePlay)
+
+// 视频播放结束处理
+const handleVideoEnded = () => {
+ isPlayingInline.value = false
+}
+
+// 判断是否显示原地播放按钮(宽度大于400且未在播放)
+const shouldShowInlinePlayBtn = computed(() => {
+ return props.cellWidth > 400 && !isPlayingInline.value
+})
+
+// 监听 idx 变化,如果正在播放则停止
+watch(() => props.idx, () => {
+ if (isPlayingInline.value && videoElementRef.value) {
+ videoElementRef.value.pause()
+ isPlayingInline.value = false
+ }
+})
+
const handleDragOver = (event: DragEvent) => {
if (props.file.type !== 'dir') {
return
@@ -136,13 +207,22 @@ const handleFileClick = (event: MouseEvent) => {
// 处理视频点击事件
const handleVideoClick = () => {
+ // 如果正在原地播放,先停止播放
+ if (isPlayingInline.value) {
+ isPlayingInline.value = false
+ if (videoElementRef.value) {
+ videoElementRef.value.pause()
+ }
+ return
+ }
+
if (global.magicSwitchTiktokView) {
// 直接触发TikTok视图
emit('tiktokView', props.file, props.idx)
} else {
// 正常打开视频模态框
openVideoModal(
- props.file,
+ props.file,
(id) => emit('contextMenuClick', { key: `toggle-tag-${id}` } as any, props.file, props.idx),
() => emit('tiktokView', props.file, props.idx)
)
@@ -222,11 +302,31 @@ const handleAudioClick = () => {
-
-
+
+
+
+
+
+
+
+
{{ t('playInline') }}
+
+
+
+
+
@@ -295,6 +395,81 @@ const handleAudioClick = () => {
background-size: cover;
background-position: center;
cursor: pointer;
+
+ &.playing-inline {
+ background-color: #000;
+ }
+
+ .inline-video-player {
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ }
+
+ .inline-play-overlay {
+ position: absolute;
+ bottom: 8px;
+ left: 8px;
+ display: flex;
+ align-items: flex-end;
+ justify-content: flex-start;
+ cursor: pointer;
+ opacity: 0;
+ transition: opacity 0.3s ease;
+ z-index: 5;
+ }
+
+ .inline-play-btn {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 16px;
+ border-radius: 8px;
+ background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.9) 100%);
+ backdrop-filter: blur(8px);
+ cursor: pointer;
+ transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+ border: 1px solid rgba(255, 255, 255, 0.12);
+ box-shadow:
+ 0 2px 8px rgba(0, 0, 0, 0.3),
+ 0 0 0 1px rgba(0, 0, 0, 0.1) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.1) inset;
+
+ &:hover {
+ background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(30, 30, 30, 0.95) 100%);
+ border-color: rgba(255, 255, 255, 0.25);
+ transform: translateY(-1px);
+ box-shadow:
+ 0 4px 12px rgba(0, 0, 0, 0.4),
+ 0 0 0 1px rgba(0, 0, 0, 0.1) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.15) inset;
+ }
+
+ &:active {
+ transform: translateY(0);
+ background: rgba(0, 0, 0, 0.95);
+ }
+
+ .play-icon-img {
+ width: 24px;
+ height: 24px;
+ filter: brightness(0) invert(1);
+ flex-shrink: 0;
+ }
+
+ .play-text {
+ color: #fff;
+ font-size: 13px;
+ font-weight: 600;
+ letter-spacing: 0.2px;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
+ white-space: nowrap;
+ }
+ }
+
+ &:hover .inline-play-overlay {
+ opacity: 1;
+ }
}
&.audio {
diff --git a/vue/src/components/videoEventEmitter.ts b/vue/src/components/videoEventEmitter.ts
new file mode 100644
index 0000000..5eeafd5
--- /dev/null
+++ b/vue/src/components/videoEventEmitter.ts
@@ -0,0 +1,6 @@
+import { typedEventEmitter } from 'vue3-ts-util'
+
+// 创建视频原地播放的事件发射器(模块级别,所有组件共享)
+export const { eventEmitter, useEventListen } = typedEventEmitter<{
+ stopInlinePlay: () => void
+}>()
diff --git a/vue/src/i18n/de.ts b/vue/src/i18n/de.ts
index c295a12..a8b6e0a 100644
--- a/vue/src/i18n/de.ts
+++ b/vue/src/i18n/de.ts
@@ -316,5 +316,8 @@ export const de: Partial = {
loadingTip7: '📸 Workspace-Snapshots\n\nSie können Ihren aktuellen Workspace-Status (offene Ordner, Sortierung, etc.) speichern, um ihn beim nächsten Öffnen von IIB schnell wiederherzustellen. In den globalen Einstellungen kann automatische Wiederherstellung beim Start eingestellt werden.|info',
loadingTip8: '🏷️ Auto-Tagging-Funktion\n\nKonfigurieren Sie Auto-Tagging-Regeln in den globalen Einstellungen. Tags werden automatisch angewendet, wenn Bilder indexiert werden, unterstützt Bedingungen wie Prompt, Modell, Sampler, etc.|info',
loadingTip9: '⚡ Leistungstipp\n\nWenn Sie beim schnellen Scrollen durch viele Bilder Verzögerungen bemerken, können Sie "Change Indicators" in den globalen Einstellungen deaktivieren für deutlich bessere Leistung.|info',
- loadingTip10: '🤖 KI-Agenten-Integration\n\nSie können jetzt KI-Agenten IIB nutzen lassen, um bei Bildverwaltung, Tag-Organisation und intelligenter Suche zu helfen. Über die API-Schnittstelle kann die KI auf alle IIB-Funktionen zugreifen und automatisierte Workflows erstellen.|info'
+ loadingTip10: '🤖 KI-Agenten-Integration\n\nSie können jetzt KI-Agenten IIB nutzen lassen, um bei Bildverwaltung, Tag-Organisation und intelligenter Suche zu helfen. Über die API-Schnittstelle kann die KI auf alle IIB-Funktionen zugreifen und automatisierte Workflows erstellen.|info',
+
+ // ===== Video Inline Play =====
+ playInline: 'Hier abspielen'
}
diff --git a/vue/src/i18n/en.ts b/vue/src/i18n/en.ts
index 3b1ec6c..75405c7 100644
--- a/vue/src/i18n/en.ts
+++ b/vue/src/i18n/en.ts
@@ -576,5 +576,8 @@ You can specify which snapshot to restore to when starting IIB in the global set
loadingTip7: '📸 Workspace Snapshots\n\nSave your current workspace state (open folders, sorting, etc.) for quick restoration later. In global settings, set it to auto-restore on startup.|info',
loadingTip8: '🏷️ Auto Tagging Feature\n\nConfigure auto-tagging rules in global settings. Tags are automatically applied when images are indexed, supporting conditions like prompt, model, sampler, etc.|info',
loadingTip9: '⚡ Performance Tip\n\nIf you experience lag when scrolling through a large number of images quickly, you can disable "Change Indicators" in global settings for significantly better performance.|info',
- loadingTip10: '🤖 AI Agent Integration\n\nYou can now let AI agents use IIB to help with image management, tag organization, and smart search. Through the API interface, AI can access all IIB features for automated workflows.|info'
+ loadingTip10: '🤖 AI Agent Integration\n\nYou can now let AI agents use IIB to help with image management, tag organization, and smart search. Through the API interface, AI can access all IIB features for automated workflows.|info',
+
+ // ===== Video Inline Play =====
+ playInline: 'Play Here'
}
diff --git a/vue/src/i18n/zh-hans.ts b/vue/src/i18n/zh-hans.ts
index 4cbe1b3..1cdaf75 100644
--- a/vue/src/i18n/zh-hans.ts
+++ b/vue/src/i18n/zh-hans.ts
@@ -554,5 +554,8 @@ export const zhHans = {
loadingTip7: '📸 工作区快照\n\n你可以保存当前的工作区状态(打开的文件夹、排序方式等),下次打开 IIB 时快速恢复。在全局设置中可以设为启动时自动恢复。|info',
loadingTip8: '🏷️ 自动标签功能\n\n在全局设置中配置自动标签规则,当图片被索引时会自动添加标签。支持根据 prompt、模型、采样器等条件自动分类。|info',
loadingTip9: '⚡ 性能优化提示\n\n如果在快速滚动大量图片时感到卡顿,可以在全局设置中关闭"变更指示器"功能,这可以显著提升浏览性能。|info',
- loadingTip10: '🤖 AI Agent 集成\n\n现在你可以让 AI agent 来使用 IIB 帮助进行图像管理、标签整理和智能搜索。通过 API 接口,AI 可以访问所有 IIB 功能,实现自动化工作流程。|info'
+ loadingTip10: '🤖 AI Agent 集成\n\n现在你可以让 AI agent 来使用 IIB 帮助进行图像管理、标签整理和智能搜索。通过 API 接口,AI 可以访问所有 IIB 功能,实现自动化工作流程。|info',
+
+ // ===== 视频原地播放 =====
+ playInline: '在此播放'
}
diff --git a/vue/src/i18n/zh-hant.ts b/vue/src/i18n/zh-hant.ts
index 809f85e..67c8c45 100644
--- a/vue/src/i18n/zh-hant.ts
+++ b/vue/src/i18n/zh-hant.ts
@@ -556,5 +556,8 @@ export const zhHant: Partial = {
loadingTip7: '📸 工作區快照\n\n你可以儲存目前的工作區狀態(打開的資料夾、排序方式等),下次打開 IIB 時快速還原。在全域設定中可以設為啟動時自動還原。|info',
loadingTip8: '🏷️ 自動標籤功能\n\n在全域設定中配置自動標籤規則,當圖片被索引時會自動添加標籤。支援根據 prompt、模型、採樣器等條件自動分類。|info',
loadingTip9: '⚡ 效能優化提示\n\n如果在快速滾動大量圖片時感到卡頓,可以在全域設定中關閉「變更指示器」功能,這可以顯著提升瀏覽效能。|info',
- loadingTip10: '🤖 AI Agent 整合\n\n現在您可以讓 AI agent 使用 IIB 來協助進行圖片管理、標籤整理和智慧搜尋。透過 API 介面,AI 可以存取所有 IIB 功能,實現自動化工作流程。|info'
+ loadingTip10: '🤖 AI Agent 整合\n\n現在您可以讓 AI agent 使用 IIB 來協助進行圖片管理、標籤整理和智慧搜尋。透過 API 介面,AI 可以存取所有 IIB 功能,實現自動化工作流程。|info',
+
+ // ===== 視頻原地播放 =====
+ playInline: '在此播放'
}