import{P as Ge,a as x,d as se,a_ as Pt,u as ot,c as p,bn as wr,_ as xt,a2 as fe,V as z,b4 as Xt,a9 as Kt,a7 as lt,h as G,bo as Cr,b as st,a8 as Bn,bp as Sr,ao as en,b3 as Fn,r as L,aX as We,ad as Fe,a4 as tn,ai as Ar,ah as Qn,bq as jn,a5 as De,x as le,aB as Or,s as me,br as Me,bs as Rn,e as pt,a6 as nn,bt as Er,T as ee,be as Pr,bu as xr,bv as it,at as kr,bw as Ir,ae as kt,aY as Be,bx as $r,by as rn,bz as Lr,a0 as qe,as as _r,bA as zr,bB as Mr,bC as Nr,bD as Vn,bE as an,bF as Dr,bG as Tr,bH as Br,ap as Fr,bI as Qr,bJ as jr,bK as Rr,X as gt,bL as Vr,bk as Ur,U as Q,bM as It,bN as Hr,v as $t,bO as Un,bg as de,bP as Lt,bQ as ge,bR as Gr,bS as _t,bT as on,aC as Hn,bb as ln,bc as Wr,bU as ht,bV as Yr,ba as zt,bW as Jr,bX as oe,A as Mt,bY as qr,I as Zr,bZ as Gn,Y as Xr,W as ct,b_ as Kr,b$ as ei,c0 as ti,c1 as ni,Z as Wn,$ as Yn,o as D,y as q,c2 as ri,c3 as ii,c4 as ai,c5 as oi,c6 as li,b5 as si,l as Z,c7 as Xe,H as be,m as M,C as Nt,c8 as sn,c9 as ui,ca as ci,cb as di,K as Ye,B as R,t as N,n as F,q as ne,Q as Jn,cc as qn,M as Zn,R as Xn,cd as fi,z as vi}from"./index-e71913be.js";import{t as dt,l as Te}from"./index-407e2249.js";import{_ as mi,e as pi,D as gi,E as hi,M as re,f as Ne,h as yi,i as bi,t as wi,j as Kn}from"./db-6021c700.js";import{b as Ci}from"./_baseIteratee-138a9920.js";import{b as Si,B as Je,c as Ai}from"./button-979b73da.js";var er=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Ge.any,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},align:{type:Object},getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:{type:Object,default:void 0},forceRender:{type:Boolean,default:void 0},mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:void 0},onVisibleChange:{type:Function},"onUpdate:visible":{type:Function}}},ft=Si(),Oi=function(){return x(x({},er()),{},{type:ft.type,size:String,htmlType:ft.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Ge.any,title:String,loading:ft.loading,onClick:{type:Function}})},Ei=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Pi=Je.Group;const at=se({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Pt(Oi(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,u=n.emit,s=function(h){u("update:visible",h),u("visibleChange",h)},C=ot("dropdown-button",e),y=C.prefixCls,f=C.direction,w=C.getPopupContainer;return function(){var b,h,d=x(x({},e),i),a=d.type,o=a===void 0?"default":a,l=d.disabled,c=d.loading,v=d.htmlType,k=d.class,m=k===void 0?"":k,E=d.overlay,S=E===void 0?(b=r.overlay)===null||b===void 0?void 0:b.call(r):E,A=d.trigger,g=d.align,P=d.visible;d.onVisibleChange;var O=d.placement,$=O===void 0?f.value==="rtl"?"bottomLeft":"bottomRight":O,I=d.href,_=d.title,j=d.icon,Y=j===void 0?((h=r.icon)===null||h===void 0?void 0:h.call(r))||p(wr,null,null):j,U=d.mouseEnterDelay,ie=d.mouseLeaveDelay,ue=d.overlayClassName,ce=d.overlayStyle,pe=d.destroyPopupOnHide,B=d.onClick;d["onUpdate:visible"];var W=xt(d,Ei),X={align:g,disabled:l,trigger:l?[]:A,placement:$,getPopupContainer:w.value,onVisibleChange:s,mouseEnterDelay:U,mouseLeaveDelay:ie,visible:P,overlayClassName:ue,overlayStyle:ce,destroyPopupOnHide:pe},K=p(Je,{type:o,disabled:l,loading:c,onClick:B,htmlType:v,href:I,title:_},{default:r.default}),J=p(Je,{type:o,icon:Y},null);return p(Pi,x(x({},W),{},{class:fe(y.value,m)}),{default:function(){return[r.leftButton?r.leftButton({button:K}):K,p(Pe,X,{default:function(){return[r.rightButton?r.rightButton({button:J}):J]},overlay:function(){return S}})]}})}}});var tr=se({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Pt(er(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,u=n.emit,s=ot("dropdown",e),C=s.prefixCls,y=s.rootPrefixCls,f=s.direction,w=s.getPopupContainer,b=z(function(){var o=e.placement,l=o===void 0?"":o,c=e.transitionName;return c!==void 0?c:l.indexOf("top")>=0?"".concat(y.value,"-slide-down"):"".concat(y.value,"-slide-up")}),h=function(){var l,c,v,k=e.overlay||((l=r.overlay)===null||l===void 0?void 0:l.call(r)),m=Array.isArray(k)?k[0]:k;if(!m)return null;var E=m.props||{};Xt(!E.mode||E.mode==="vertical","Dropdown",'mode="'.concat(E.mode,`" is not supported for Dropdown's Menu.`));var S=E.selectable,A=S===void 0?!1:S,g=E.expandIcon,P=g===void 0?(c=m.children)===null||c===void 0||(v=c.expandIcon)===null||v===void 0?void 0:v.call(c):g,O=typeof P<"u"&&en(P)?P:p("span",{class:"".concat(C.value,"-menu-submenu-arrow")},[p(Fn,{class:"".concat(C.value,"-menu-submenu-arrow-icon")},null)]),$=en(m)?Kt(m,{mode:"vertical",selectable:A,expandIcon:function(){return O}}):m;return $},d=z(function(){var o=e.placement;if(!o)return f.value==="rtl"?"bottomRight":"bottomLeft";if(o.includes("Center")){var l=o.slice(0,o.indexOf("Center"));return Xt(!o.includes("Center"),"Dropdown","You are using '".concat(o,"' placement in Dropdown, which is deprecated. Try to use '").concat(l,"' instead.")),l}return o}),a=function(l){u("update:visible",l),u("visibleChange",l)};return function(){var o,l,c=e.arrow,v=e.trigger,k=e.disabled,m=e.overlayClassName,E=(o=r.default)===null||o===void 0?void 0:o.call(r)[0],S=Kt(E,lt({class:fe(E==null||(l=E.props)===null||l===void 0?void 0:l.class,G({},"".concat(C.value,"-rtl"),f.value==="rtl"),"".concat(C.value,"-trigger"))},k?{disabled:k}:{})),A=fe(m,G({},"".concat(C.value,"-rtl"),f.value==="rtl")),g=k?[]:v,P;g&&g.indexOf("contextmenu")!==-1&&(P=!0);var O=Cr({arrowPointAtCenter:st(c)==="object"&&c.pointAtCenter,autoAdjustOverflow:!0}),$=Bn(x(x(x({},e),i),{},{builtinPlacements:O,overlayClassName:A,arrow:c,alignPoint:P,prefixCls:C.value,getPopupContainer:w.value,transitionName:b.value,trigger:g,onVisibleChange:a,placement:d.value}),["overlay","onUpdate:visible"]);return p(Sr,$,{default:function(){return[S]},overlay:h})}}});tr.Button=at;const Pe=tr;Pe.Button=at;Pe.install=function(t){return t.component(Pe.name,Pe),t.component(at.name,at),t};function xi(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function nr(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function ki(t){var e=L(null),n=We(x({},t)),r=L([]),i=function(s){e.value===null&&(r.value=[],e.value=tn(function(){var C;r.value.forEach(function(y){C=x(x({},C),y)}),lt(n,C),e.value=null})),r.value.push(s)};return Fe(function(){e.value&&tn.cancel(e.value)}),[n,i]}function un(t,e,n,r){var i=e+n,u=(n-r)/2;if(n>r){if(e>0)return G({},t,u);if(e<0&&ir)return G({},t,e<0?u:-u);return{}}function Ii(t,e,n,r){var i=xi(),u=i.width,s=i.height,C=null;return t<=u&&e<=s?C={x:0,y:0}:(t>u||e>s)&&(C=x(x({},un("x",n,t,u)),un("y",r,e,s))),C}var cn=Symbol("previewGroupContext"),Dt={provide:function(e){Ar(cn,e)},inject:function(){return Qn(cn,{isPreviewGroup:L(!1),previewUrls:z(function(){return new Map}),setPreviewUrls:function(){},current:L(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},$i=se({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,n){var r=n.slots,i=z(function(){var g={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return st(e.preview)==="object"?or(e.preview,g):g}),u=We(new Map),s=L(),C=z(function(){return i.value.visible}),y=z(function(){return i.value.getContainer}),f=function(P,O){var $,I;($=(I=i.value).onVisibleChange)===null||$===void 0||$.call(I,P,O)},w=jn(!!C.value,{value:C,onChange:f}),b=De(w,2),h=b[0],d=b[1],a=L(null),o=z(function(){return C.value!==void 0}),l=z(function(){return Array.from(u.keys())}),c=z(function(){return l.value[i.value.current]}),v=z(function(){return new Map(Array.from(u).filter(function(g){var P=De(g,2),O=P[1].canPreview;return!!O}).map(function(g){var P=De(g,2),O=P[0],$=P[1].url;return[O,$]}))}),k=function(P,O){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;u.set(P,{url:O,canPreview:$})},m=function(P){s.value=P},E=function(P){a.value=P},S=function(P,O){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,I=function(){u.delete(P)};return u.set(P,{url:O,canPreview:$}),I},A=function(P){P==null||P.stopPropagation(),d(!1),E(null)};return le(c,function(g){m(g)},{immediate:!0,flush:"post"}),Or(function(){h.value&&o.value&&m(c.value)},{flush:"post"}),Dt.provide({isPreviewGroup:L(!0),previewUrls:v,setPreviewUrls:k,current:s,setCurrent:m,setShowPreview:d,setMousePosition:E,registerImage:S}),function(){var g=lt({},(mi(i.value),i.value));return p(me,null,[r.default&&r.default(),p(ir,x(x({},g),{},{"ria-hidden":!h.value,visible:h.value,prefixCls:e.previewPrefixCls,onClose:A,mousePosition:a.value,src:v.value.get(s.value),icons:e.icons,getContainer:y.value}),null)])}}});const rr=$i;var Oe={x:0,y:0},Li=x(x({},pi()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),_i=se({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Li,emits:["close","afterClose"],setup:function(e,n){var r=n.emit,i=n.attrs,u=We(e.icons),s=u.rotateLeft,C=u.rotateRight,y=u.zoomIn,f=u.zoomOut,w=u.close,b=u.left,h=u.right,d=L(1),a=L(0),o=ki(Oe),l=De(o,2),c=l[0],v=l[1],k=function(){return r("close")},m=L(),E=We({originX:0,originY:0,deltaX:0,deltaY:0}),S=L(!1),A=Dt.inject(),g=A.previewUrls,P=A.current,O=A.isPreviewGroup,$=A.setCurrent,I=z(function(){return g.value.size}),_=z(function(){return Array.from(g.value.keys())}),j=z(function(){return _.value.indexOf(P.value)}),Y=z(function(){return O.value?g.value.get(P.value):e.src}),U=z(function(){return O.value&&I.value>1}),ie=L({wheelDirection:0}),ue=function(){d.value=1,a.value=0,v(Oe),r("afterClose")},ce=function(){d.value++,v(Oe)},pe=function(){d.value>1&&d.value--,v(Oe)},B=function(){a.value+=90},W=function(){a.value-=90},X=function(T){T.preventDefault(),T.stopPropagation(),j.value>0&&$(_.value[j.value-1])},K=function(T){T.preventDefault(),T.stopPropagation(),j.value0&&$(_.value[j.value-1]):T.keyCode===nn.RIGHT&&j.value0?pe():V<0&&ce()})}),Rn(function(){je()}),function(){var V=e.visible,T=e.prefixCls,ae=e.rootClassName;return p(gi,x(x({},i),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:T,onClose:k,afterClose:ue,visible:V,wrapClassName:J,rootClassName:ae,getContainer:e.getContainer}),{default:function(){return[p("ul",{class:"".concat(e.prefixCls,"-operations")},[Qe.map(function(ve){var Ae=ve.icon,ye=ve.onClick,_e=ve.type,ze=ve.disabled;return p("li",{class:fe(te,G({},"".concat(e.prefixCls,"-operations-operation-disabled"),ze&&(ze==null?void 0:ze.value))),onClick:ye,key:_e},[pt(Ae,{class:he})])})]),p("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(c.x,"px, ").concat(c.y,"px, 0)")}},[p("img",{onMousedown:xe,onDblclick:Le,ref:m,class:"".concat(e.prefixCls,"-img"),src:Y.value,alt:e.alt,style:{transform:"scale3d(".concat(d.value,", ").concat(d.value,", 1) rotate(").concat(a.value,"deg)")}},null)]),U.value&&p("div",{class:fe("".concat(e.prefixCls,"-switch-left"),G({},"".concat(e.prefixCls,"-switch-left-disabled"),j.value<=0)),onClick:X},[b]),U.value&&p("div",{class:fe("".concat(e.prefixCls,"-switch-right"),G({},"".concat(e.prefixCls,"-switch-right-disabled"),j.value>=I.value-1)),onClick:K},[h])]}})}}});const ir=_i;var zi=["icons","maskClassName"],ar=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Ge.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},or=function(e,n){var r=x({},e);return Object.keys(n).forEach(function(i){e[i]===void 0&&(r[i]=n[i])}),r},Mi=0,lr=se({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:ar(),emits:["click","error"],setup:function(e,n){var r=n.attrs,i=n.slots,u=n.emit,s=z(function(){return e.prefixCls}),C=z(function(){return"".concat(s.value,"-preview")}),y=z(function(){var B={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return st(e.preview)==="object"?or(e.preview,B):B}),f=z(function(){var B;return(B=y.value.src)!==null&&B!==void 0?B:e.src}),w=z(function(){return e.placeholder&&e.placeholder!==!0||i.placeholder}),b=z(function(){return y.value.visible}),h=z(function(){return y.value.getContainer}),d=z(function(){return b.value!==void 0}),a=function(W,X){var K,J;(K=(J=y.value).onVisibleChange)===null||K===void 0||K.call(J,W,X)},o=jn(!!b.value,{value:b,onChange:a}),l=De(o,2),c=l[0],v=l[1];le(c,function(B,W){a(B,W)});var k=L(w.value?"loading":"normal");le(function(){return e.src},function(){k.value=w.value?"loading":"normal"});var m=L(null),E=z(function(){return k.value==="error"}),S=Dt.inject(),A=S.isPreviewGroup,g=S.setCurrent,P=S.setShowPreview,O=S.setMousePosition,$=S.registerImage,I=L(Mi++),_=z(function(){return e.preview&&!E.value}),j=function(){k.value="normal"},Y=function(W){k.value="error",u("error",W)},U=function(W){if(!d.value){var X=nr(W.target),K=X.left,J=X.top;A.value?(g(I.value),O({x:K,y:J})):m.value={x:K,y:J}}A.value?P(!0):v(!0),u("click",W)},ie=function(){v(!1),d.value||(m.value=null)},ue=L(null);le(function(){return ue},function(){k.value==="loading"&&ue.value.complete&&(ue.value.naturalWidth||ue.value.naturalHeight)&&j()});var ce=function(){};Fe(function(){le([f,_],function(){if(ce(),!A.value)return function(){};ce=$(I.value,f.value,_.value),_.value||ce()},{flush:"post",immediate:!0})}),Rn(function(){ce()});var pe=function(W){return Er(W)?W+"px":W};return function(){var B=e.prefixCls,W=e.wrapperClassName,X=e.fallback,K=e.src,J=e.placeholder,te=e.wrapperStyle,he=e.rootClassName,Qe=r.width,Ce=r.height,xe=r.crossorigin,ke=r.decoding,Ie=r.alt,$e=r.sizes,Le=r.srcset,je=r.usemap,V=r.class,T=r.style,ae=y.value,Se=ae.icons,ve=ae.maskClassName,Ae=xt(ae,zi),ye=fe(B,W,he,G({},"".concat(B,"-error"),E.value)),_e=E.value&&X?X:f.value,ze={crossorigin:xe,decoding:ke,alt:Ie,sizes:$e,srcset:Le,usemap:je,class:fe("".concat(B,"-img"),G({},"".concat(B,"-img-placeholder"),J===!0),V),style:x({height:Ce},T)};return p(me,null,[p("div",{class:ye,onClick:_.value?U:function(br){u("click",br)},style:x({width:pe(Qe),height:pe(Ce)},te)},[p("img",x(x(x({},ze),E.value&&X?{src:X}:{onLoad:j,onError:Y,src:K}),{},{ref:ue}),null),k.value==="loading"&&p("div",{"aria-hidden":"true",class:"".concat(B,"-placeholder")},[J||i.placeholder&&i.placeholder()]),i.previewMask&&_.value&&p("div",{class:["".concat(B,"-mask"),ve]},[i.previewMask()])]),!A.value&&_.value&&p(ir,x(x({},Ae),{},{"aria-hidden":!c.value,visible:c.value,prefixCls:C.value,onClose:ie,mousePosition:m.value,src:_e,alt:Ie,getContainer:h.value,icons:Se,rootClassName:he}),null)])}}});lr.PreviewGroup=rr;const Ni=lr;var Di={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Ti=Di;function dn(t){for(var e=1;e{document.addEventListener(...t),qe(()=>document.removeEventListener(...t))},La="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",Ke=new WeakMap;function _a(t,e){return{useHookShareState:r=>{const i=Ur();gt(i),Ke.has(i)||(Ke.set(i,We(t(i,r??(e==null?void 0:e())))),qe(()=>{Ke.delete(i)}));const u=Ke.get(i);return gt(u),{state:u,toRefs(){return Vr(u)}}}}}var za={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const Ma=za;function Sn(t){for(var e=1;e(t.DATE_ASC="date-asc",t.DATE_DESC="date-desc",t.NAME_ASC="name-asc",t.NAME_DESC="name-desc",t.SIZE_ASC="size-asc",t.SIZE_DESC="size-desc",t.CREATED_TIME_ASC="created-time-asc",t.CREATED_TIME_DESC="created-time-desc",t))(fr||{});const uo=(t,e)=>{const n=t.type==="dir"?1:0;return(e.type==="dir"?1:0)-n},$n=(t,e)=>{const n=Date.parse(t.date),r=Date.parse(e.date);return n-r},Ln=(t,e)=>{const n=Date.parse(t.created_time),r=Date.parse(e.created_time);return n-r},_n=(t,e)=>{const n=t.name.toLowerCase(),r=e.name.toLowerCase();return n.localeCompare(r)},zn=(t,e)=>t.bytes-e.bytes,Ue=(t,e)=>{const n=(r,i)=>{switch(e){case"date-asc":return $n(r,i);case"date-desc":return $n(i,r);case"created-time-asc":return Ln(r,i);case"created-time-desc":return Ln(i,r);case"name-asc":return _n(r,i);case"name-desc":return _n(i,r);case"size-asc":return zn(r,i);case"size-desc":return zn(i,r);default:throw new Error(`Invalid sort method: ${e}`)}};return t.slice().sort((r,i)=>uo(r,i)||n(r,i))},Ve=async t=>(await It.get("/files",{params:{folder_path:t}})).data,co=async t=>(await It.post("/delete_files",{file_paths:t})).data,vr=async(t,e)=>(await It.post("/move_files",{file_paths:t,dest:e})).data;var bt={},fo={get exports(){return bt},set exports(t){bt=t}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */(function(t,e){(function(n,r){t.exports=r})(Hr,function(){var n={};n.version="0.3.5";var r=n.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};n.configure=function(a){var o,l;for(o in a)l=a[o],l!==void 0&&a.hasOwnProperty(o)&&(r[o]=l);return this},n.status=null,n.set=function(a){var o=n.isStarted();a=i(a,r.minimum,1),n.status=a===1?null:a;var l=n.render(!o),c=l.querySelector(r.barSelector),v=r.speed,k=r.easing;return l.offsetWidth,C(function(m){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),y(c,s(a,v,k)),a===1?(y(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout(function(){y(l,{transition:"all "+v+"ms linear",opacity:0}),setTimeout(function(){n.remove(),m()},v)},v)):setTimeout(m,v)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var a=function(){setTimeout(function(){n.status&&(n.trickle(),a())},r.trickleSpeed)};return r.trickle&&a(),this},n.done=function(a){return!a&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(a){var o=n.status;return o?o>1?void 0:(typeof a!="number"&&(o>=0&&o<.2?a=.1:o>=.2&&o<.5?a=.04:o>=.5&&o<.8?a=.02:o>=.8&&o<.99?a=.005:a=0),o=i(o+a,0,.994),n.set(o)):n.start()},n.trickle=function(){return n.inc()},function(){var a=0,o=0;n.promise=function(l){return!l||l.state()==="resolved"?this:(o===0&&n.start(),a++,o++,l.always(function(){o--,o===0?(a=0,n.done()):n.set((a-o)/a)}),this)}}(),n.getElement=function(){var a=n.getParent();if(a){var o=Array.prototype.slice.call(a.querySelectorAll(".nprogress")).filter(function(l){return l.parentElement===a});if(o.length>0)return o[0]}return null},n.getParent=function(){if(r.parent instanceof HTMLElement)return r.parent;if(typeof r.parent=="string")return document.querySelector(r.parent)},n.render=function(a){if(n.isRendered())return n.getElement();w(document.documentElement,"nprogress-busy");var o=document.createElement("div");o.id="nprogress",o.className="nprogress",o.innerHTML=r.template;var l=o.querySelector(r.barSelector),c=a?"-100":u(n.status||0),v=n.getParent(),k;return y(l,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(k=o.querySelector(r.spinnerSelector),k&&d(k)),v!=document.body&&w(v,"nprogress-custom-parent"),v.appendChild(o),o},n.remove=function(){n.status=null,b(document.documentElement,"nprogress-busy"),b(n.getParent(),"nprogress-custom-parent");var a=n.getElement();a&&d(a)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var a=document.body.style,o="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return o+"Perspective"in a?"translate3d":o+"Transform"in a?"translate":"margin"};function i(a,o,l){return al?l:a}function u(a){return(-1+a)*100}function s(a,o,l){var c;return r.positionUsing==="translate3d"?c={transform:"translate3d("+u(a)+"%,0,0)"}:r.positionUsing==="translate"?c={transform:"translate("+u(a)+"%,0)"}:c={"margin-left":u(a)+"%"},c.transition="all "+o+"ms "+l,c}var C=function(){var a=[];function o(){var l=a.shift();l&&l(o)}return function(l){a.push(l),a.length==1&&o()}}(),y=function(){var a=["Webkit","O","Moz","ms"],o={};function l(m){return m.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(E,S){return S.toUpperCase()})}function c(m){var E=document.body.style;if(m in E)return m;for(var S=a.length,A=m.charAt(0).toUpperCase()+m.slice(1),g;S--;)if(g=a[S]+A,g in E)return g;return m}function v(m){return m=l(m),o[m]||(o[m]=c(m))}function k(m,E,S){E=v(E),m.style[E]=S}return function(m,E){var S=arguments,A,g;if(S.length==2)for(A in E)g=E[A],g!==void 0&&E.hasOwnProperty(A)&&k(m,A,g);else k(m,S[1],S[2])}}();function f(a,o){var l=typeof a=="string"?a:h(a);return l.indexOf(" "+o+" ")>=0}function w(a,o){var l=h(a),c=l+o;f(l,o)||(a.className=c.substring(1))}function b(a,o){var l=h(a),c;f(a,o)&&(c=l.replace(" "+o+" "," "),a.className=c.substring(1,c.length-1))}function h(a){return(" "+(a&&a.className||"")+" ").replace(/\s+/gi," ")}function d(a){a&&a.parentNode&&a.parentNode.removeChild(a)}return n})})(fo);const vo=bt,vt=new Map,H=$t(),Mn=new BroadcastChannel("iib-image-transfer-bus"),He=encodeURIComponent,wt=(t,e=!1)=>`/infinite_image_browsing/file?path=${He(t.fullpath)}&t=${He(t.date)}${e?`&disposition=${He(t.name)}`:""}`,mo=(t,e)=>`/infinite_image_browsing/image-thumbnail?path=${He(t.fullpath)}&size=${e}&t=${He(t.date)}`,{eventEmitter:tt,useEventListen:Ct}=Un(),{useHookShareState:we}=_a(()=>{const t=L({tabIdx:-1,paneIdx:-1}),e=z(()=>Te(n.value)),n=L([]),r=z(()=>{var h;return n.value.map(d=>d.curr).slice((h=H.conf)!=null&&h.is_win?1:0)}),i=z(()=>_t(...r.value)),u=L(fr.CREATED_TIME_DESC),s=z(()=>{var l;if(!e.value)return[];const h=((l=e.value)==null?void 0:l.files)??[],d=u.value,{walkFiles:a}=e.value,o=c=>H.onlyFoldersAndImages?c.filter(v=>v.type==="dir"||oe(v.name)):c;return t.value.walkMode&&a?a.map(c=>Ue(o(c),d)).flat():Ue(o(h),d)}),C=L([]),y=L(-1),f=L(!0),w=L();return{spinning:L(!1),canLoadNext:f,multiSelectedIdxs:C,previewIdx:y,basePath:r,currLocation:i,currPage:e,stack:n,sortMethod:u,sortedFiles:s,scroller:L(),stackViewEl:L(),walkModePath:w,props:t,...Un()}});function fl(t,e){const{previewIdx:n,eventEmitter:r,canLoadNext:i}=we().toRefs(),{state:u}=we(),s=z(()=>(e==null?void 0:e.files.value)??u.sortedFiles),C=z(()=>(e==null?void 0:e.scroller.value)??u.scroller),y=L(!1);let f=null;const w=(a,o)=>{var l;y.value=a,f!=null&&!a&&o&&((l=C.value)==null||l.scrollToItem(f),f=null)},b=()=>{t.walkMode&&!d("next")&&i&&(de.info(Q("loadingNextFolder")),r.value.emit("loadNextDir"))};yt("keydown",a=>{var o;if(y.value){let l=n.value;if(["ArrowDown","ArrowRight"].includes(a.key))for(l++;s.value[l]&&!oe(s.value[l].name);)l++;else if(["ArrowUp","ArrowLeft"].includes(a.key))for(l--;s.value[l]&&!oe(s.value[l].name);)l--;if(oe((o=s.value[l])==null?void 0:o.name)??""){n.value=l;const c=C.value;c&&!(l>=c.$_startIndex&&l<=c.$_endIndex)&&(f=l)}b()}});const h=a=>{var l;let o=n.value;if(a==="next")for(o++;s.value[o]&&!oe(s.value[o].name);)o++;else if(a==="prev")for(o--;s.value[o]&&!oe(s.value[o].name);)o--;if(oe((l=s.value[o])==null?void 0:l.name)??""){n.value=o;const c=C.value;c&&!(o>=c.$_startIndex&&o<=c.$_endIndex)&&(f=o)}b()},d=a=>{var l;let o=n.value;if(a==="next")for(o++;s.value[o]&&!oe(s.value[o].name);)o++;else if(a==="prev")for(o--;s.value[o]&&!oe(s.value[o].name);)o--;return oe((l=s.value[o])==null?void 0:l.name)??""};return Ct("removeFiles",async()=>{var a;y.value&&!u.sortedFiles[n.value]&&(de.info(Q("manualExitFullScreen"),5),await Lt(500),(a=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||a.click(),n.value=-1)}),{previewIdx:n,onPreviewVisibleChange:w,previewing:y,previewImgMove:h,canPreview:d}}function vl(t){const e=L(),{scroller:n,stackViewEl:r,stack:i,currPage:u,currLocation:s,sortMethod:C,useEventListen:y,walkModePath:f,eventEmitter:w}=we().toRefs();le(()=>i.value.length,Be((S,A)=>{var g;S!==A&&((g=n.value)==null||g.scrollToItem(0))},300));const b=async S=>{if(await l(S),t.walkMode){await Lt();const[A]=Ue(u.value.files,C.value).filter(g=>g.type==="dir");A&&await l(A.fullpath),await w.value.emit("loadNextDir")}};Fe(async()=>{var S;if(!i.value.length){const A=await Ve("/");i.value.push({files:A.files,curr:"/"})}e.value=new vo,e.value.configure({parent:r.value}),t.path&&t.path!=="/"?await b(t.path):(S=H.conf)!=null&&S.home&&l(H.conf.home)}),le(s,Be(S=>{const A=H.tabList[t.tabIdx].panes[t.paneIdx];A.path=S;const g=A.path.split("/").pop(),P=()=>{var O;return t.walkMode?"Walk: "+(((O=H.autoCompletedDirList.find($=>$.dir===f.value))==null?void 0:O.zh)??g):g};A.name=ge("div",{style:"display:flex;align-items:center"},[ge(Qa),ge("span",{class:"line-clamp-1",style:"max-width: 256px"},P())]),H.recent=H.recent.filter(O=>O.key!==A.key),H.recent.unshift({path:S,key:A.key}),H.recent.length>20&&(H.recent=H.recent.slice(0,20))},300));const h=()=>Mt(s.value),d=async S=>{var A,g;if(S.type==="dir")try{(A=e.value)==null||A.start();const{files:P}=await Ve(S.fullpath);i.value.push({files:P,curr:S.name})}finally{(g=e.value)==null||g.done()}},a=S=>{for(;S(gt(H.conf,"global.conf load failed"),H.conf.is_win?S.toLowerCase()==A.toLowerCase():S==A),l=async S=>{var g,P;const A=i.value.slice();try{Gr(S)||(S=_t(((g=H.conf)==null?void 0:g.sd_cwd)??"/",S));const O=on(S),$=i.value.map(I=>I.curr);for($.shift();$[0]&&O[0]&&o($[0],O[0]);)$.shift(),O.shift();for(let I=0;I<$.length;I++)i.value.pop();if(!O.length)return c();for(const I of O){const _=(P=u.value)==null?void 0:P.files.find(j=>o(j.name,I));if(!_)throw console.error({frags:O,frag:I,stack:Hn(i.value)}),new Error(`${I} not found`);await d(_)}}catch(O){throw de.error(Q("moveFailedCheckPath")+(O instanceof Error?O.message:"")),console.error(S,on(S),u.value),i.value=A,O}},c=ln(async()=>{var S,A,g;try{if((S=e.value)==null||S.start(),f.value)a(0),await b(f.value);else{const{files:P}=await Ve(i.value.length===1?"/":s.value);Te(i.value).files=P}(A=n.value)==null||A.scrollToItem(0),de.success(Q("refreshCompleted"))}finally{(g=e.value)==null||g.done()}});Wr("return-to-iib",ln(async()=>{var S,A;if(!t.walkMode)try{(S=e.value)==null||S.start();const{files:g}=await Ve(i.value.length===1?"/":s.value);Te(i.value).files.map(O=>O.date).join()!==g.map(O=>O.date).join()&&(Te(i.value).files=g,de.success(Q("autoUpdate")))}finally{(A=e.value)==null||A.done()}})),y.value("refresh",c);const v=S=>{t.walkMode&&(f.value=S),b(S)},k=z(()=>H.autoCompletedDirList.map(S=>({...S,path:ht(S.dir)}))),m=z(()=>{const S=ht(s.value);return k.value.find(g=>g.path===S)});return{addToSearchScanPathAndQuickMove:async()=>{const S=m.value;if(S){if(!S.can_delete)return;await yi(s.value),de.success(Q("removeComplete"))}else await bi(s.value),de.success(Q("addComplete"));await qr.emit("updateGlobalSetting")},searchPathInfo:m,refresh:c,copyLocation:h,back:a,openNext:d,currPage:u,currLocation:s,to:l,stack:i,scroller:n,quickMoveTo:v}}function ml(t){const{scroller:e,sortedFiles:n,stack:r,sortMethod:i,currLocation:u,currPage:s,stackViewEl:C,canLoadNext:y}=we().toRefs(),{state:f}=we(),w=L(!1),b=L("grid"),h={line:Q("detailList"),grid:Q("previewGrid"),"large-size-grid":Q("largePreviewGrid")},d={value:g=>g,text:g=>Q("sortBy")+" "+so[g].toLocaleLowerCase()},a=272,o=64,l=a*2,{width:c}=Yr(C),v=z(()=>{const g=c.value;if(!(b.value==="line"||!g))return~~(g/(b.value==="grid"?a:l))}),k=z(()=>{const g=b.value;if(g==="line")return{first:80,second:void 0};const P=g==="grid"?a:l;return{first:P+o,second:P}}),m=L(!1),E=async()=>{var g;if(!(m.value||!t.walkMode||!y.value))try{m.value=!0;const P=r.value[r.value.length-2],O=Ue(P.files,i.value),$=O.findIndex(I=>{var _;return I.name===((_=s.value)==null?void 0:_.curr)});if($!==-1){const I=O[$+1],_=_t(u.value,"../",I.name),j=await Ve(_),Y=s.value;Y.curr=I.name,Y.walkFiles||(Y.walkFiles=[Y.files]),Y.walkFiles.push(j.files),console.log("curr page files length",(g=s.value)==null?void 0:g.files.length)}}catch(P){console.error("loadNextDir",P),y.value=!1}finally{m.value=!1}},S=async()=>{const g=e.value;for(;!n.value.length||g&&g.$_endIndex>n.value.length-20&&y.value;)await Lt(100),await E()};f.useEventListen("loadNextDir",S);const A=Be(S,300);return{gridItems:v,sortedFiles:n,sortMethodConv:d,viewModeMap:h,moreActionsDropdownShow:w,viewMode:b,gridSize:a,sortMethod:i,largeGridSize:l,onScroll:A,loadNextDir:E,loadNextDirLoading:m,canLoadNext:y,itemSize:k}}function pl(){const{currLocation:t,sortedFiles:e,currPage:n,multiSelectedIdxs:r,eventEmitter:i}=we().toRefs(),u=()=>{r.value=[]};return yt("click",u),yt("blur",u),le(n,u),{onFileDragStart:(y,f)=>{const w=Hn(e.value[f]);console.log("onFileDragStart set drag file ",y,f,w);const b=[w];let h=w.type==="dir";if(r.value.includes(f)){const d=r.value.map(a=>e.value[a]);b.push(...d),h=d.some(a=>a.type==="dir")}y.dataTransfer.setData("text/plain",JSON.stringify({includeDir:h,loc:t.value,path:$a(b,"fullpath").map(d=>d.fullpath)}))},onDrop:async y=>{var w;const f=JSON.parse(((w=y.dataTransfer)==null?void 0:w.getData("text"))||"{}");if(console.log(f),f.path&&typeof f.includeDir<"u"&&f.loc){const b=t.value;if(f.loc===b)return;const h=ge("div",[ge("div",`${Q("moveSelectedFilesTo")}${b}`),ge("ol",f.path.map(d=>d.split(/[/\\]/).pop()).map(d=>ge("li",d)))]);re.confirm({title:Q("confirm"),content:h,maskClosable:!0,async onOk(){await vr(f.path,b),tt.emit("removeFiles",{paths:f.path,loc:f.loc}),await i.value.emit("refresh")}})}},multiSelectedIdxs:r}}function gl(t,{openNext:e}){const n=L(!1),r=L(""),{sortedFiles:i,previewIdx:u,multiSelectedIdxs:s,stack:C,currLocation:y,spinning:f}=we().toRefs(),w=ht;Ct("removeFiles",({paths:a,loc:o})=>{if(w(o)!==w(y.value))return;const l=Te(C.value);l&&(l.files=l.files.filter(c=>!a.includes(c.fullpath)),l.walkFiles&&(l.walkFiles=l.walkFiles.map(c=>c.filter(v=>!a.includes(v.fullpath)))))}),Ct("addFiles",({files:a,loc:o})=>{if(w(o)!==w(y.value))return;const l=Te(C.value);l&&l.files.unshift(...a)});const b=zt();return{onFileItemClick:async(a,o,l)=>{u.value=l;const c=s.value.indexOf(l);if(a.shiftKey){if(c!==-1)s.value.splice(c,1);else{s.value.push(l),s.value.sort((m,E)=>m-E);const v=s.value[0],k=s.value[s.value.length-1];s.value=Ia(v,k+1)}a.stopPropagation()}else a.ctrlKey||a.metaKey?(c!==-1?s.value.splice(c,1):s.value.push(l),a.stopPropagation()):await e(o)},onContextMenuClick:async(a,o,l)=>{var E,S;console.log(a,o);const c=wt(o),v=y.value,k=()=>{let A=[];return s.value.includes(l)?A=s.value.map(g=>i.value[g]):A.push(o),A},m=async A=>{if(!f.value)try{f.value=!0,await ei(o.fullpath),Mn.postMessage("iib_hidden_img_update_trigger");const g=setTimeout(()=>ti.warn({message:Q("long_loading"),duration:20}),5e3);await ni(),clearTimeout(g),Mn.postMessage(`iib_hidden_tab_${A}`)}catch(g){console.error(g),de.error("发送图像失败,请携带console的错误消息找开发者")}finally{f.value=!1}};switch(a.key){case"previewInNewWindow":return window.open(c);case"download":return window.open(wt(o,!0));case"copyPreviewUrl":return Mt(parent.document.location.origin+c);case"send2txt2img":return m("txt2img");case"send2img2img":return m("img2img");case"send2inpaint":return m("inpaint");case"send2extras":return m("extras");case"send2savedDir":{const A=H.autoCompletedDirList.find(O=>O.key==="outdir_save");if(!A)return de.error(Q("unknownSavedDir"));const g=Kr(A.dir,(E=H.conf)==null?void 0:E.sd_cwd),P=k();await vr(P.map(O=>O.fullpath),g),tt.emit("removeFiles",{paths:P.map(O=>O.fullpath),loc:y.value}),tt.emit("addFiles",{files:P,loc:g});break}case"openWithWalkMode":{vt.set(v,C.value);const A=H.tabList[t.tabIdx],g={type:"local",key:ct(),path:o.fullpath,name:Q("local"),stackKey:v,walkMode:!0};A.panes.push(g),A.key=g.key;break}case"openInNewTab":{vt.set(v,C.value);const A=H.tabList[t.tabIdx],g={type:"local",key:ct(),path:o.fullpath,name:Q("local"),stackKey:v};A.panes.push(g),A.key=g.key;break}case"openOnTheRight":{vt.set(v,C.value);let A=H.tabList[t.tabIdx+1];A||(A=Xr({panes:[],key:""}),H.tabList[t.tabIdx+1]=A);const g={type:"local",key:ct(),path:o.fullpath,name:Q("local"),stackKey:v};A.panes.push(g),A.key=g.key;break}case"viewGenInfo":{n.value=!0,r.value=await b.pushAction(()=>Gn(o.fullpath)).res;break}case"openWithLocalFileBrowser":{await Zr(o.fullpath);break}case"deleteFiles":{const A=k();await new Promise(g=>{re.confirm({title:Q("confirmDelete"),maskClosable:!0,content:ge("ol",{style:"max-height:50vh;overflow:auto;"},A.map(P=>P.fullpath.split(/[/\\]/).pop()).map(P=>ge("li",P))),async onOk(){const P=A.map(O=>O.fullpath);await co(P),de.success(Q("deleteSuccess")),tt.emit("removeFiles",{paths:P,loc:y.value}),g()}})});break}}if(((S=a.keyPath)==null?void 0:S[0])==="toggle-tag"){const{is_remove:A}=await wi({tag_id:a.key,img_path:o.fullpath});de.success(A?Q("removedTagFromImage"):Q("addedTagToImage"))}return{}},showGenInfo:n,imageGenInfo:r,q:b}}const hl=()=>{const{stackViewEl:t}=we().toRefs(),e=L(-1);return Jr(t,n=>{var i;let r=n.target;for(;r.parentElement;)if(r=r.parentElement,r.tagName.toLowerCase()==="li"&&r.classList.contains("file-item-trigger")){const u=(i=r.dataset)==null?void 0:i.idx;u&&Number.isSafeInteger(+u)&&(e.value=+u);return}}),{showMenuIdx:e}};function po(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let nt;function St(){St.init||(St.init=!0,nt=po()!==-1)}var ut={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){St(),kt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",nt&&this.$el.appendChild(t),t.data="about:blank",nt||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!nt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const go=ri();Wn("data-v-b329ee4c");const ho={class:"resize-observer",tabindex:"-1"};Yn();const yo=go((t,e,n,r,i,u)=>(D(),q("div",ho)));ut.render=yo;ut.__scopeId="data-v-b329ee4c";ut.__file="src/components/ResizeObserver.vue";function rt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rt=function(e){return typeof e}:rt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(t)}function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nn(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{},r,i,u,s=function(y){for(var f=arguments.length,w=new Array(f>1?f-1:0),b=1;b1){var f=C.find(function(b){return b.isIntersecting});f&&(y=f)}if(i.callback){var w=y.isIntersecting&&y.intersectionRatio>=i.threshold;if(w===i.oldResult)return;i.oldResult=w,i.callback(w,y)}},this.options.intersection),kt(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function pr(t,e,n){var r=e.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new xo(t,r,n);t._vue_visibilityState=i}}function ko(t,e,n){var r=e.value,i=e.oldValue;if(!mr(r,i)){var u=t._vue_visibilityState;if(!r){gr(t);return}u?u.createObserver(r,n):pr(t,{value:r},n)}}function gr(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var Io={beforeMount:pr,updated:ko,unmounted:gr},$o={itemsLimit:1e3},Lo=/(auto|scroll)/;function hr(t,e){return t.parentNode===null?e:hr(t.parentNode,e.concat([t]))}var mt=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},_o=function(e){return mt(e,"overflow")+mt(e,"overflow-y")+mt(e,"overflow-x")},zo=function(e){return Lo.test(_o(e))};function Tn(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=hr(t.parentNode,[]),n=0;n{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,r,i){const u=ii({id:To++,index:e,used:!0,key:r,type:i}),s=ai({item:n,position:0,nr:u});return t.push(s),s},unuseView(t,e=!1){const n=this.$_unusedViews,r=t.nr.type;let i=n.get(r);i||(i=[],n.set(r,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,u=this.$_computedMinItemSize,s=this.typeField,C=this.simpleArray?null:this.keyField,y=this.items,f=y.length,w=this.sizes,b=this.$_views,h=this.$_unusedViews,d=this.pool,a=this.itemIndexByKey;let o,l,c,v,k;if(!f)o=l=v=k=c=0;else if(this.$_prerender)o=v=0,l=k=Math.min(this.prerender,y.length),c=null;else{const O=this.getScroll();if(e){let _=O.start-this.$_lastUpdateScrollPosition;if(_<0&&(_=-_),n===null&&_O.start&&(Y=U),U=~~((j+Y)/2);while(U!==ie);for(U<0&&(U=0),o=U,c=w[f-1].accumulator,l=U;lf&&(l=f)),v=o;vf&&(l=f),v<0&&(v=0),k>f&&(k=f),c=Math.ceil(f/r)*n}}l-o>$o.itemsLimit&&this.itemsLimitError(),this.totalSize=c;let m;const E=o<=this.$_endIndex&&l>=this.$_startIndex;if(E)for(let O=0,$=d.length;O<$;O++)m=d[O],m.nr.used&&(t&&(m.nr.index=a[m.item[C]]),(m.nr.index==null||m.nr.index=l)&&this.unuseView(m));const S=E?null:new Map;let A,g,P;for(let O=o;O=I.length)&&(m=this.addView(d,O,A,$,g),this.unuseView(m,!0),I=h.get(g)),m=I[P],S.set(g,P+1)),b.delete(m.nr.key),m.nr.used=!0,m.nr.index=O,m.nr.key=$,m.nr.type=g,b.set($,m),_=!0;else if(!m.nr.used&&(m.nr.used=!0,m.nr.index=O,_=!0,I)){const j=I.indexOf(m);j!==-1&&I.splice(j,1)}m.item=A,_&&(O===y.length-1&&this.$emit("scroll-end"),O===0&&this.$emit("scroll-start")),n===null?(m.position=w[O-1].accumulator,m.offset=0):(m.position=Math.floor(O/r)*n,m.offset=O%r*i)}return this.$_startIndex=o,this.$_endIndex=l,this.emitUpdate&&this.$emit("update",o,l,v,k),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=Tn(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let r;if(this.pageMode){const i=t.getBoundingClientRect(),u=n?i.height:i.width;let s=-(n?i.top:i.left),C=n?window.innerHeight:window.innerWidth;s<0&&(C+=s,s=0),s+C>u&&(C=u-s),r={start:s,end:s+C}}else n?r={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:r={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Et?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,i;if(this.pageMode){const u=Tn(this.$el),s=u.tagName==="HTML"?0:u[e.scroll],C=u.getBoundingClientRect(),f=this.$el.getBoundingClientRect()[e.start]-C[e.start];n=u,r=e.scroll,i=t+s+f}else n=this.$el,r=e.scroll,i=t;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const Bo={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Fo={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Qo(t,e,n,r,i,u){const s=oi("ResizeObserver"),C=li("observe-visibility");return si((D(),Z("div",{class:Ye(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...y)=>u.handleScroll&&u.handleScroll(...y))},[t.$slots.before?(D(),Z("div",Bo,[Xe(t.$slots,"before")],512)):be("v-if",!0),(D(),q(sn(n.listTag),{ref:"wrapper",style:di({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:Ye(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:M(()=>[(D(!0),Z(me,null,Nt(i.pool,y=>(D(),q(sn(n.itemTag),ui({key:y.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${y.position}px) translate${t.direction==="vertical"?"X":"Y"}(${y.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===y.nr.key}]]},ci(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=y.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:M(()=>[Xe(t.$slots,"default",{item:y.item,index:y.nr.index,active:y.nr.used})]),_:2},1040,["style","class"]))),128)),Xe(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(D(),Z("div",Fo,[Xe(t.$slots,"after")],512)):be("v-if",!0),p(s,{onNotify:u.handleResize},null,8,["onNotify"])],34)),[[C,u.handleVisibilityChange]])}yr.render=Qo;yr.__file="src/components/RecycleScroller.vue";const jo=["data-idx"],Ro={key:0},Vo={key:1,class:"preview-icon-wrap"},Uo={class:"profile"},Ho={class:"name line-clamp-1"},Go={class:"basic-info"},Wo={class:"name line-clamp-1"},Yo={class:"basic-info"},Jo=se({__name:"FileItem",props:{file:null,idx:null,selected:{type:Boolean,default:!1},showMenuIdx:null,viewMode:{default:"grid"},fullScreenPreviewImageUrl:null},emits:["update:showMenuIdx","fileItemClick","dragstart","previewVisibleChange","contextMenuClick"],setup(t,{emit:e}){const n=t,r=$t(),i=L([]),u=z(()=>{var f;return(((f=r.conf)==null?void 0:f.all_custom_tags)??[]).reduce((w,b)=>[...w,{...b,selected:!!i.value.find(h=>h.id===b.id)}],[])}),s=()=>{var f;((f=n==null?void 0:n.file)==null?void 0:f.type)==="file"&&C.pushAction(()=>Kn(n.file.fullpath)).res.then(w=>{i.value=w})},C=zt(),y=z(()=>n.viewMode==="grid"?[r.gridThumbnailSize,r.gridThumbnailSize].join("x"):[r.largeGridThumbnailSize,r.largeGridThumbnailSize].join("x"));return(f,w)=>{const b=ea,h=Jn,d=qn,a=Zn,o=Pe;return D(),q(o,{trigger:["contextmenu"],visible:F(r).longPressOpenContextMenu?typeof t.idx=="number"&&t.showMenuIdx===t.idx:void 0,"onUpdate:visible":w[3]||(w[3]=l=>typeof t.idx=="number"&&e("update:showMenuIdx",l?t.idx:-1))},{overlay:M(()=>[p(a,{onClick:w[2]||(w[2]=l=>e("contextMenuClick",l,t.file,t.idx))},{default:M(()=>[p(h,{key:"deleteFiles"},{default:M(()=>[R(N(f.$t("deleteSelected")),1)]),_:1}),t.file.type==="dir"?(D(),Z(me,{key:0},[p(h,{key:"openInNewTab"},{default:M(()=>[R(N(f.$t("openInNewTab")),1)]),_:1}),p(h,{key:"openOnTheRight"},{default:M(()=>[R(N(f.$t("openOnTheRight")),1)]),_:1}),p(h,{key:"openWithWalkMode"},{default:M(()=>[R(N(f.$t("openWithWalkMode")),1)]),_:1})],64)):be("",!0),t.file.type==="file"?(D(),Z(me,{key:1},[p(h,{key:"previewInNewWindow"},{default:M(()=>[R(N(f.$t("previewInNewWindow")),1)]),_:1}),p(h,{key:"download"},{default:M(()=>[R(N(f.$t("downloadDirectly")),1)]),_:1}),p(h,{key:"copyPreviewUrl"},{default:M(()=>[R(N(f.$t("copySourceFilePreviewLink")),1)]),_:1}),F(oe)(t.file.name)?(D(),Z(me,{key:0},[p(h,{key:"viewGenInfo"},{default:M(()=>[R(N(f.$t("viewGenerationInfo")),1)]),_:1}),p(h,{key:"send2txt2img"},{default:M(()=>[R(N(f.$t("sendToTxt2img")),1)]),_:1}),p(h,{key:"send2img2img"},{default:M(()=>[R(N(f.$t("sendToImg2img")),1)]),_:1}),p(h,{key:"send2inpaint"},{default:M(()=>[R(N(f.$t("sendToInpaint")),1)]),_:1}),p(h,{key:"send2extras"},{default:M(()=>[R(N(f.$t("sendToExtraFeatures")),1)]),_:1}),p(h,{key:"send2savedDir"},{default:M(()=>[R(N(f.$t("send2savedDir")),1)]),_:1}),p(h,{key:"openWithLocalFileBrowser"},{default:M(()=>[R(N(f.$t("openWithLocalFileBrowser")),1)]),_:1}),p(d,{key:"toggle-tag",title:f.$t("toggleTag")},{default:M(()=>[(D(!0),Z(me,null,Nt(F(u),l=>(D(),q(h,{key:l.id},{default:M(()=>[R(N(l.name)+" ",1),l.selected?(D(),q(F(cr),{key:0})):(D(),q(F(dr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])],64)):be("",!0)],64)):be("",!0)]),_:1})]),default:M(()=>[(D(),Z("li",{class:Ye(["file file-item-trigger",{clickable:t.file.type==="dir",selected:t.selected,grid:t.viewMode==="grid"||t.viewMode==="large-size-grid","large-grid":t.viewMode==="large-size-grid"}]),"data-idx":t.idx,key:t.file.name,draggable:"true",onDragstart:w[0]||(w[0]=l=>e("dragstart",l,t.idx)),onContextmenu:s,onClickCapture:w[1]||(w[1]=l=>e("fileItemClick",l,t.file,t.idx))},[t.viewMode!=="line"?(D(),Z("div",Ro,[F(oe)(t.file.name)?(D(),q(b,{key:t.file.fullpath,class:Ye(`idx-${t.idx}`),src:F(r).enableThumbnail?F(mo)(t.file,F(y)):F(wt)(t.file),fallback:F(La),preview:{src:t.fullScreenPreviewImageUrl,onVisibleChange:(l,c)=>e("previewVisibleChange",l,c)}},null,8,["class","src","fallback","preview"])):(D(),Z("div",Vo,[t.file.type==="file"?(D(),q(F(bn),{key:0,class:"icon center"})):(D(),q(F(Cn),{key:1,class:"icon center"}))])),ne("div",Uo,[ne("div",Ho,N(t.file.name),1),ne("div",Go,[ne("div",null,N(t.file.size),1),ne("div",null,N(t.file.date),1)])])])):(D(),Z(me,{key:1},[t.file.type==="file"?(D(),q(F(bn),{key:0,class:"icon"})):(D(),q(F(Cn),{key:1,class:"icon"})),ne("div",Wo,N(t.file.name),1),ne("div",Yo,[ne("div",null,N(t.file.size),1),ne("div",null,N(t.file.date),1)])],64))],42,jo))]),_:1},8,["visible"])}}});const yl=Xn(Jo,[["__scopeId","data-v-e75a956c"]]);function qo(t,e,n,r){const i={x:0,y:0};let u=0,s=0,C=typeof(r==null?void 0:r.width)=="number"?r.width:0,y=typeof(r==null?void 0:r.height)=="number"?r.height:0,f=typeof(r==null?void 0:r.left)=="number"?r.left:0,w=typeof(r==null?void 0:r.top)=="number"?r.top:0,b=!1;const h=v=>{v.stopPropagation(),v.preventDefault(),!(!t.value||!e.value)&&(u=v instanceof MouseEvent?v.clientX:v.touches[0].clientX,s=v instanceof MouseEvent?v.clientY:v.touches[0].clientY,C=t.value.offsetWidth,y=t.value.offsetHeight,i.x=e.value.offsetLeft,i.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",d),document.documentElement.addEventListener("touchmove",d),document.documentElement.addEventListener("mouseup",a),document.documentElement.addEventListener("touchend",a))},d=v=>{if(!t.value||!e.value)return;const k=C+((v instanceof MouseEvent?v.clientX:v.touches[0].clientX)-u),m=y+((v instanceof MouseEvent?v.clientY:v.touches[0].clientY)-s),E=i.x+((v instanceof MouseEvent?v.clientX:v.touches[0].clientX)-u),S=i.y+((v instanceof MouseEvent?v.clientY:v.touches[0].clientY)-s);t.value.style.width=`${k}px`,t.value.style.height=`${m}px`,e.value.style.left=`${E}px`,e.value.style.top=`${S}px`,r!=null&&r.onResize&&r.onResize(k,m)},a=()=>{document.documentElement.removeEventListener("mousemove",d),document.documentElement.removeEventListener("touchmove",d),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a)},o=v=>{v.stopPropagation(),v.preventDefault(),!(!t.value||!n.value)&&(b=!0,f=t.value.offsetLeft,w=t.value.offsetTop,u=v instanceof MouseEvent?v.clientX:v.touches[0].clientX,s=v instanceof MouseEvent?v.clientY:v.touches[0].clientY,document.documentElement.addEventListener("mousemove",l),document.documentElement.addEventListener("touchmove",l),document.documentElement.addEventListener("mouseup",c),document.documentElement.addEventListener("touchend",c))},l=v=>{if(!t.value||!n.value||!b)return;const k=f+((v instanceof MouseEvent?v.clientX:v.touches[0].clientX)-u),m=w+((v instanceof MouseEvent?v.clientY:v.touches[0].clientY)-s);t.value.style.left=`${k}px`,t.value.style.top=`${m}px`,r!=null&&r.onDrag&&r.onDrag(k,m)},c=()=>{b=!1,document.documentElement.removeEventListener("mousemove",l),document.documentElement.removeEventListener("touchmove",l),document.documentElement.removeEventListener("mouseup",c),document.documentElement.removeEventListener("touchend",c)};return Fe(()=>{!t.value||!r||(typeof r.width=="number"&&(t.value.style.width=`${r.width}px`),typeof r.height=="number"&&(t.value.style.height=`${r.height}px`),typeof r.left=="number"&&(t.value.style.left=`${r.left}px`),typeof r.top=="number"&&(t.value.style.top=`${r.top}px`))}),qe(()=>{document.documentElement.removeEventListener("mousemove",d),document.documentElement.removeEventListener("touchmove",d),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a),document.documentElement.removeEventListener("mousemove",l),document.documentElement.removeEventListener("touchmove",l),document.documentElement.removeEventListener("mouseup",c),document.documentElement.removeEventListener("touchend",c)}),le(()=>[t.value,e.value,n.value],([v,k,m])=>{v&&k&&m&&(k.addEventListener("mousedown",h),k.addEventListener("touchstart",h),m.addEventListener("mousedown",o),m.addEventListener("touchstart",o))}),{handleResizeMouseDown:h,handleDragMouseDown:o}}const Zo=t=>(Wn("data-v-d01b3aa8"),t=t(),Yn(),t),Xo={class:"container"},Ko={class:"actoion-bar"},el=Zo(()=>ne("div",{"flex-placeholder":""},null,-1)),tl={key:0,class:"gen-info"},nl=se({__name:"fullScreenContextMenu",props:{file:null,idx:null},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,r=$t(),i=L(),u=L([]),s=z(()=>{var a;return(((a=r.conf)==null?void 0:a.all_custom_tags)??[]).reduce((o,l)=>[...o,{...l,selected:!!u.value.find(c=>c.id===l.id)}],[])}),C=zt(),y=L("");le(()=>{var a;return(a=n==null?void 0:n.file)==null?void 0:a.fullpath},async a=>{a&&(C.tasks.forEach(o=>o.cancel()),C.pushAction(()=>Gn(a)).res.then(o=>{y.value=o}))},{immediate:!0});const f=a=>{a&&C.pushAction(()=>Kn(n.file.fullpath)).res.then(o=>{u.value=o})},w=L(),b=L(),h=fi("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});qo(i,w,b,{...h.value,onDrag:Be(function(a,o){h.value={...h.value,left:a,top:o}},300),onResize:Be(function(a,o){h.value={...h.value,width:a,height:o}},300)});function d(a){return a.parentNode}return(a,o)=>{const l=Je,c=Jn,v=qn,k=Zn,m=Pe;return D(),Z("div",{ref_key:"el",ref:i,class:Ye(["full-screen-menu",{"unset-size":!F(h).expanded}]),onWheelCapture:o[3]||(o[3]=vi(()=>{},["stop"]))},[ne("div",Xo,[ne("div",Ko,[ne("div",{ref_key:"dragHandle",ref:b,class:"icon",style:{cursor:"grab"}},[p(F(Ua))],512),ne("div",{class:"icon",style:{cursor:"pointer"},onClick:o[0]||(o[0]=E=>F(h).expanded=!F(h).expanded)},[F(h).expanded?(D(),q(F(Ya),{key:0})):(D(),q(F(Xa),{key:1}))]),F(h).expanded?(D(),Z(me,{key:0},[el,p(m,{trigger:["hover"],style:{"z-index":"99999"},"get-popup-container":E=>d(E),onVisibleChange:f},{overlay:M(()=>[p(k,{onClick:o[1]||(o[1]=E=>e("contextMenuClick",E,t.file,t.idx)),style:{"z-index":"99999"}},{default:M(()=>[p(c,{key:"previewInNewWindow"},{default:M(()=>[R(N(a.$t("previewInNewWindow")),1)]),_:1}),p(c,{key:"download"},{default:M(()=>[R(N(a.$t("downloadDirectly")),1)]),_:1}),p(c,{key:"copyPreviewUrl"},{default:M(()=>[R(N(a.$t("copySourceFilePreviewLink")),1)]),_:1}),p(c,{key:"deleteFiles"},{default:M(()=>[R(N(a.$t("deleteSelected")),1)]),_:1}),p(c,{key:"send2txt2img"},{default:M(()=>[R(N(a.$t("sendToTxt2img")),1)]),_:1}),p(c,{key:"send2img2img"},{default:M(()=>[R(N(a.$t("sendToImg2img")),1)]),_:1}),p(c,{key:"send2inpaint"},{default:M(()=>[R(N(a.$t("sendToInpaint")),1)]),_:1}),p(c,{key:"send2extras"},{default:M(()=>[R(N(a.$t("sendToExtraFeatures")),1)]),_:1}),p(c,{key:"send2savedDir"},{default:M(()=>[R(N(a.$t("send2savedDir")),1)]),_:1}),p(v,{key:"toggle-tag",title:a.$t("toggleTag")},{default:M(()=>[(D(!0),Z(me,null,Nt(F(s),E=>(D(),q(c,{key:E.id},{default:M(()=>[R(N(E.name)+" ",1),E.selected?(D(),q(F(cr),{key:0})):(D(),q(F(dr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})]),default:M(()=>[p(l,null,{default:M(()=>[R(N(F(Q)("openContextMenu")),1)]),_:1})]),_:1},8,["get-popup-container"]),p(l,{onClick:o[2]||(o[2]=E=>F(Mt)(y.value))},{default:M(()=>[R(N(a.$t("copyPrompt")),1)]),_:1})],64)):be("",!0)]),F(h).expanded?(D(),Z("div",tl,N(y.value),1)):be("",!0)]),F(h).expanded?(D(),Z("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:w},[p(F(Da))],512)):be("",!0)],34)}}});const bl=Xn(nl,[["__scopeId","data-v-d01b3aa8"]]);export{Pe as D,cl as L,dl as R,ul as S,vl as a,ml as b,pl as c,gl as d,fl as e,hl as f,vt as g,so as h,yr as i,yl as j,bl as k,sl as s,wt as t,we as u};