sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-7ddf5...

4 lines
93 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{P as We,a as x,d as ue,a_ as Pt,u as lt,c as v,bn as wr,_ as xt,a2 as fe,V as z,b4 as Xt,a9 as Kt,a7 as st,h as G,bo as Cr,b as ut,a8 as Fn,bp as Sr,ao as en,b3 as Qn,r as L,aX as Ye,ad as Fe,a4 as tn,ai as Ar,ah as jn,bq as Rn,a5 as De,x as se,aB as Or,s as ge,br as _e,bs as Vn,e as pt,a6 as nn,bt as Er,T as K,be as Pr,bu as xr,bv as at,at as kr,bw as Ir,ae as kt,aY as Be,bx as $r,by as rn,bz as Lr,a0 as Ze,as as Mr,bA as zr,bB as _r,bC as Nr,bD as Un,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 ht,bL as Vr,bk as Ur,U as B,bM as It,bN as Hr,v as $t,bO as Hn,bg as le,ag as Lt,bP as pe,bQ as Gr,bR as Mt,bS as on,aC as Gn,bb as ln,bc as Wr,bT as yt,bU as Yr,ba as zt,bV as Jr,bW as oe,A as _t,bX as qr,I as Zr,bY as Wn,Y as Xr,W as dt,bZ as Kr,b_ as ei,b$ as ti,c0 as ni,Z as Yn,$ as Jn,o as D,y as J,c1 as ri,c2 as ii,c3 as ai,c4 as oi,c5 as li,b5 as si,l as q,c6 as Ke,H as be,m as _,C as Nt,c7 as sn,c8 as ui,c9 as ci,ca as di,K as Je,B as V,t as N,n as T,q as te,Q as qn,cb as fi,M as Zn,R as Xn,cc as vi,z as mi}from"./index-66a3e480.js";import{t as ft,l as Te}from"./index-27030971.js";import{_ as gi,e as pi,D as hi,E as yi,M as re,f as Ne,h as bi,i as wi,t as un,j as Kn}from"./db-e470e247.js";import{b as Ci}from"./_baseIteratee-882722a7.js";import{b as Si,B as qe,c as Ai}from"./button-aed742e0.js";var er=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:We.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}}},vt=Si(),Oi=function(){return x(x({},er()),{},{type:vt.type,size:String,htmlType:vt.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:We.any,title:String,loading:vt.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=qe.Group;const ot=ue({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(p){u("update:visible",p),u("visibleChange",p)},b=lt("dropdown-button",e),h=b.prefixCls,m=b.direction,y=b.getPopupContainer;return function(){var w,p,f=x(x({},e),i),o=f.type,a=o===void 0?"default":o,l=f.disabled,c=f.loading,g=f.htmlType,P=f.class,d=P===void 0?"":P,k=f.overlay,O=k===void 0?(w=r.overlay)===null||w===void 0?void 0:w.call(r):k,S=f.trigger,A=f.align,E=f.visible;f.onVisibleChange;var C=f.placement,I=C===void 0?m.value==="rtl"?"bottomLeft":"bottomRight":C,$=f.href,M=f.title,F=f.icon,ne=F===void 0?((p=r.icon)===null||p===void 0?void 0:p.call(r))||v(wr,null,null):F,R=f.mouseEnterDelay,ie=f.mouseLeaveDelay,ce=f.overlayClassName,de=f.overlayStyle,me=f.destroyPopupOnHide,j=f.onClick;f["onUpdate:visible"];var W=xt(f,Ei),Z={align:A,disabled:l,trigger:l?[]:S,placement:I,getPopupContainer:y.value,onVisibleChange:s,mouseEnterDelay:R,mouseLeaveDelay:ie,visible:E,overlayClassName:ce,overlayStyle:de,destroyPopupOnHide:me},X=v(qe,{type:a,disabled:l,loading:c,onClick:j,htmlType:g,href:$,title:M},{default:r.default}),Y=v(qe,{type:a,icon:ne},null);return v(Pi,x(x({},W),{},{class:fe(h.value,d)}),{default:function(){return[r.leftButton?r.leftButton({button:X}):X,v(Pe,Z,{default:function(){return[r.rightButton?r.rightButton({button:Y}):Y]},overlay:function(){return O}})]}})}}});var tr=ue({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=lt("dropdown",e),b=s.prefixCls,h=s.rootPrefixCls,m=s.direction,y=s.getPopupContainer,w=z(function(){var a=e.placement,l=a===void 0?"":a,c=e.transitionName;return c!==void 0?c:l.indexOf("top")>=0?"".concat(h.value,"-slide-down"):"".concat(h.value,"-slide-up")}),p=function(){var l,c,g,P=e.overlay||((l=r.overlay)===null||l===void 0?void 0:l.call(r)),d=Array.isArray(P)?P[0]:P;if(!d)return null;var k=d.props||{};Xt(!k.mode||k.mode==="vertical","Dropdown",'mode="'.concat(k.mode,`" is not supported for Dropdown's Menu.`));var O=k.selectable,S=O===void 0?!1:O,A=k.expandIcon,E=A===void 0?(c=d.children)===null||c===void 0||(g=c.expandIcon)===null||g===void 0?void 0:g.call(c):A,C=typeof E<"u"&&en(E)?E:v("span",{class:"".concat(b.value,"-menu-submenu-arrow")},[v(Qn,{class:"".concat(b.value,"-menu-submenu-arrow-icon")},null)]),I=en(d)?Kt(d,{mode:"vertical",selectable:S,expandIcon:function(){return C}}):d;return I},f=z(function(){var a=e.placement;if(!a)return m.value==="rtl"?"bottomRight":"bottomLeft";if(a.includes("Center")){var l=a.slice(0,a.indexOf("Center"));return Xt(!a.includes("Center"),"Dropdown","You are using '".concat(a,"' placement in Dropdown, which is deprecated. Try to use '").concat(l,"' instead.")),l}return a}),o=function(l){u("update:visible",l),u("visibleChange",l)};return function(){var a,l,c=e.arrow,g=e.trigger,P=e.disabled,d=e.overlayClassName,k=(a=r.default)===null||a===void 0?void 0:a.call(r)[0],O=Kt(k,st({class:fe(k==null||(l=k.props)===null||l===void 0?void 0:l.class,G({},"".concat(b.value,"-rtl"),m.value==="rtl"),"".concat(b.value,"-trigger"))},P?{disabled:P}:{})),S=fe(d,G({},"".concat(b.value,"-rtl"),m.value==="rtl")),A=P?[]:g,E;A&&A.indexOf("contextmenu")!==-1&&(E=!0);var C=Cr({arrowPointAtCenter:ut(c)==="object"&&c.pointAtCenter,autoAdjustOverflow:!0}),I=Fn(x(x(x({},e),i),{},{builtinPlacements:C,overlayClassName:S,arrow:c,alignPoint:E,prefixCls:b.value,getPopupContainer:y.value,transitionName:w.value,trigger:A,onVisibleChange:o,placement:f.value}),["overlay","onUpdate:visible"]);return v(Sr,I,{default:function(){return[O]},overlay:p})}}});tr.Button=ot;const Pe=tr;Pe.Button=ot;Pe.install=function(t){return t.component(Pe.name,Pe),t.component(ot.name,ot),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=Ye(x({},t)),r=L([]),i=function(s){e.value===null&&(r.value=[],e.value=tn(function(){var b;r.value.forEach(function(h){b=x(x({},b),h)}),st(n,b),e.value=null})),r.value.push(s)};return Fe(function(){e.value&&tn.cancel(e.value)}),[n,i]}function cn(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&&i<r)return G({},t,-u)}else if(e<0||i>r)return G({},t,e<0?u:-u);return{}}function Ii(t,e,n,r){var i=xi(),u=i.width,s=i.height,b=null;return t<=u&&e<=s?b={x:0,y:0}:(t>u||e>s)&&(b=x(x({},cn("x",n,t,u)),cn("y",r,e,s))),b}var dn=Symbol("previewGroupContext"),Dt={provide:function(e){Ar(dn,e)},inject:function(){return jn(dn,{isPreviewGroup:L(!1),previewUrls:z(function(){return new Map}),setPreviewUrls:function(){},current:L(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},$i=ue({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 A={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return ut(e.preview)==="object"?or(e.preview,A):A}),u=Ye(new Map),s=L(),b=z(function(){return i.value.visible}),h=z(function(){return i.value.getContainer}),m=function(E,C){var I,$;(I=($=i.value).onVisibleChange)===null||I===void 0||I.call($,E,C)},y=Rn(!!b.value,{value:b,onChange:m}),w=De(y,2),p=w[0],f=w[1],o=L(null),a=z(function(){return b.value!==void 0}),l=z(function(){return Array.from(u.keys())}),c=z(function(){return l.value[i.value.current]}),g=z(function(){return new Map(Array.from(u).filter(function(A){var E=De(A,2),C=E[1].canPreview;return!!C}).map(function(A){var E=De(A,2),C=E[0],I=E[1].url;return[C,I]}))}),P=function(E,C){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;u.set(E,{url:C,canPreview:I})},d=function(E){s.value=E},k=function(E){o.value=E},O=function(E,C){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,$=function(){u.delete(E)};return u.set(E,{url:C,canPreview:I}),$},S=function(E){E==null||E.stopPropagation(),f(!1),k(null)};return se(c,function(A){d(A)},{immediate:!0,flush:"post"}),Or(function(){p.value&&a.value&&d(c.value)},{flush:"post"}),Dt.provide({isPreviewGroup:L(!0),previewUrls:g,setPreviewUrls:P,current:s,setCurrent:d,setShowPreview:f,setMousePosition:k,registerImage:O}),function(){var A=st({},(gi(i.value),i.value));return v(ge,null,[r.default&&r.default(),v(ir,x(x({},A),{},{"ria-hidden":!p.value,visible:p.value,prefixCls:e.previewPrefixCls,onClose:S,mousePosition:o.value,src:g.value.get(s.value),icons:e.icons,getContainer:h.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{}}}}),Mi=ue({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Li,emits:["close","afterClose"],setup:function(e,n){var r=n.emit,i=n.attrs,u=Ye(e.icons),s=u.rotateLeft,b=u.rotateRight,h=u.zoomIn,m=u.zoomOut,y=u.close,w=u.left,p=u.right,f=L(1),o=L(0),a=ki(Oe),l=De(a,2),c=l[0],g=l[1],P=function(){return r("close")},d=L(),k=Ye({originX:0,originY:0,deltaX:0,deltaY:0}),O=L(!1),S=Dt.inject(),A=S.previewUrls,E=S.current,C=S.isPreviewGroup,I=S.setCurrent,$=z(function(){return A.value.size}),M=z(function(){return Array.from(A.value.keys())}),F=z(function(){return M.value.indexOf(E.value)}),ne=z(function(){return C.value?A.value.get(E.value):e.src}),R=z(function(){return C.value&&$.value>1}),ie=L({wheelDirection:0}),ce=function(){f.value=1,o.value=0,g(Oe),r("afterClose")},de=function(){f.value++,g(Oe)},me=function(){f.value>1&&f.value--,g(Oe)},j=function(){o.value+=90},W=function(){o.value-=90},Z=function(Q){Q.preventDefault(),Q.stopPropagation(),F.value>0&&I(M.value[F.value-1])},X=function(Q){Q.preventDefault(),Q.stopPropagation(),F.value<$.value-1&&I(M.value[F.value+1])},Y=fe(G({},"".concat(e.prefixCls,"-moving"),O.value)),ee="".concat(e.prefixCls,"-operations-operation"),he="".concat(e.prefixCls,"-operations-icon"),Qe=[{icon:y,onClick:P,type:"close"},{icon:h,onClick:de,type:"zoomIn"},{icon:m,onClick:me,type:"zoomOut",disabled:z(function(){return f.value===1})},{icon:b,onClick:j,type:"rotateRight"},{icon:s,onClick:W,type:"rotateLeft"}],Ce=function(){if(e.visible&&O.value){var Q=d.value.offsetWidth*f.value,ae=d.value.offsetHeight*f.value,Se=nr(d.value),ve=Se.left,Ae=Se.top,ye=o.value%180!==0;O.value=!1;var Me=Ii(ye?ae:Q,ye?Q:ae,ve,Ae);Me&&g(x({},Me))}},xe=function(Q){Q.button===0&&(Q.preventDefault(),Q.stopPropagation(),k.deltaX=Q.pageX-c.x,k.deltaY=Q.pageY-c.y,k.originX=c.x,k.originY=c.y,O.value=!0)},ke=function(Q){e.visible&&O.value&&g({x:Q.pageX-k.deltaX,y:Q.pageY-k.deltaY})},Ie=function(Q){if(e.visible){Q.preventDefault();var ae=Q.deltaY;ie.value={wheelDirection:ae}}},$e=function(Q){!e.visible||!R.value||(Q.preventDefault(),Q.keyCode===nn.LEFT?F.value>0&&I(M.value[F.value-1]):Q.keyCode===nn.RIGHT&&F.value<$.value-1&&I(M.value[F.value+1]))},Le=function(){e.visible&&(f.value!==1&&(f.value=1),(c.x!==Oe.x||c.y!==Oe.y)&&g(Oe))},je=function(){};return Fe(function(){se([function(){return e.visible},O],function(){je();var U,Q,ae=_e(window,"mouseup",Ce,!1),Se=_e(window,"mousemove",ke,!1),ve=_e(window,"wheel",Ie,{passive:!1}),Ae=_e(window,"keydown",$e,!1);try{window.top!==window.self&&(U=_e(window.top,"mouseup",Ce,!1),Q=_e(window.top,"mousemove",ke,!1))}catch{}je=function(){ae.remove(),Se.remove(),ve.remove(),Ae.remove(),U&&U.remove(),Q&&Q.remove()}},{flush:"post",immediate:!0}),se([ie],function(){var U=ie.value.wheelDirection;U>0?me():U<0&&de()})}),Vn(function(){je()}),function(){var U=e.visible,Q=e.prefixCls,ae=e.rootClassName;return v(hi,x(x({},i),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:Q,onClose:P,afterClose:ce,visible:U,wrapClassName:Y,rootClassName:ae,getContainer:e.getContainer}),{default:function(){return[v("ul",{class:"".concat(e.prefixCls,"-operations")},[Qe.map(function(ve){var Ae=ve.icon,ye=ve.onClick,Me=ve.type,ze=ve.disabled;return v("li",{class:fe(ee,G({},"".concat(e.prefixCls,"-operations-operation-disabled"),ze&&(ze==null?void 0:ze.value))),onClick:ye,key:Me},[pt(Ae,{class:he})])})]),v("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(c.x,"px, ").concat(c.y,"px, 0)")}},[v("img",{onMousedown:xe,onDblclick:Le,ref:d,class:"".concat(e.prefixCls,"-img"),src:ne.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(o.value,"deg)")}},null)]),R.value&&v("div",{class:fe("".concat(e.prefixCls,"-switch-left"),G({},"".concat(e.prefixCls,"-switch-left-disabled"),F.value<=0)),onClick:Z},[w]),R.value&&v("div",{class:fe("".concat(e.prefixCls,"-switch-right"),G({},"".concat(e.prefixCls,"-switch-right-disabled"),F.value>=$.value-1)),onClick:X},[p])]}})}}});const ir=Mi;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:We.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},_i=0,lr=ue({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}),b=z(function(){return"".concat(s.value,"-preview")}),h=z(function(){var j={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return ut(e.preview)==="object"?or(e.preview,j):j}),m=z(function(){var j;return(j=h.value.src)!==null&&j!==void 0?j:e.src}),y=z(function(){return e.placeholder&&e.placeholder!==!0||i.placeholder}),w=z(function(){return h.value.visible}),p=z(function(){return h.value.getContainer}),f=z(function(){return w.value!==void 0}),o=function(W,Z){var X,Y;(X=(Y=h.value).onVisibleChange)===null||X===void 0||X.call(Y,W,Z)},a=Rn(!!w.value,{value:w,onChange:o}),l=De(a,2),c=l[0],g=l[1];se(c,function(j,W){o(j,W)});var P=L(y.value?"loading":"normal");se(function(){return e.src},function(){P.value=y.value?"loading":"normal"});var d=L(null),k=z(function(){return P.value==="error"}),O=Dt.inject(),S=O.isPreviewGroup,A=O.setCurrent,E=O.setShowPreview,C=O.setMousePosition,I=O.registerImage,$=L(_i++),M=z(function(){return e.preview&&!k.value}),F=function(){P.value="normal"},ne=function(W){P.value="error",u("error",W)},R=function(W){if(!f.value){var Z=nr(W.target),X=Z.left,Y=Z.top;S.value?(A($.value),C({x:X,y:Y})):d.value={x:X,y:Y}}S.value?E(!0):g(!0),u("click",W)},ie=function(){g(!1),f.value||(d.value=null)},ce=L(null);se(function(){return ce},function(){P.value==="loading"&&ce.value.complete&&(ce.value.naturalWidth||ce.value.naturalHeight)&&F()});var de=function(){};Fe(function(){se([m,M],function(){if(de(),!S.value)return function(){};de=I($.value,m.value,M.value),M.value||de()},{flush:"post",immediate:!0})}),Vn(function(){de()});var me=function(W){return Er(W)?W+"px":W};return function(){var j=e.prefixCls,W=e.wrapperClassName,Z=e.fallback,X=e.src,Y=e.placeholder,ee=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,U=r.class,Q=r.style,ae=h.value,Se=ae.icons,ve=ae.maskClassName,Ae=xt(ae,zi),ye=fe(j,W,he,G({},"".concat(j,"-error"),k.value)),Me=k.value&&Z?Z:m.value,ze={crossorigin:xe,decoding:ke,alt:Ie,sizes:$e,srcset:Le,usemap:je,class:fe("".concat(j,"-img"),G({},"".concat(j,"-img-placeholder"),Y===!0),U),style:x({height:Ce},Q)};return v(ge,null,[v("div",{class:ye,onClick:M.value?R:function(br){u("click",br)},style:x({width:me(Qe),height:me(Ce)},ee)},[v("img",x(x(x({},ze),k.value&&Z?{src:Z}:{onLoad:F,onError:ne,src:X}),{},{ref:ce}),null),P.value==="loading"&&v("div",{"aria-hidden":"true",class:"".concat(j,"-placeholder")},[Y||i.placeholder&&i.placeholder()]),i.previewMask&&M.value&&v("div",{class:["".concat(j,"-mask"),ve]},[i.previewMask()])]),!S.value&&M.value&&v(ir,x(x({},Ae),{},{"aria-hidden":!c.value,visible:c.value,prefixCls:b.value,onClose:ie,mousePosition:d.value,src:Me,alt:Ie,getContainer:p.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 fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Bi(t,i,n[i])})}return t}function Bi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tt=function(e,n){var r=fn({},e,n.attrs);return v(K,fn({},r,{icon:Ti}),null)};Tt.displayName="RotateLeftOutlined";Tt.inheritAttrs=!1;const Fi=Tt;var Qi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-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 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const ji=Qi;function vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ri(t,i,n[i])})}return t}function Ri(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bt=function(e,n){var r=vn({},e,n.attrs);return v(K,vn({},r,{icon:ji}),null)};Bt.displayName="RotateRightOutlined";Bt.inheritAttrs=!1;const Vi=Bt;var Ui={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const Hi=Ui;function mn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Gi(t,i,n[i])})}return t}function Gi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ft=function(e,n){var r=mn({},e,n.attrs);return v(K,mn({},r,{icon:Hi}),null)};Ft.displayName="ZoomInOutlined";Ft.inheritAttrs=!1;const Wi=Ft;var Yi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const Ji=Yi;function gn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){qi(t,i,n[i])})}return t}function qi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qt=function(e,n){var r=gn({},e,n.attrs);return v(K,gn({},r,{icon:Ji}),null)};Qt.displayName="ZoomOutOutlined";Qt.inheritAttrs=!1;const Zi=Qt;var sr={rotateLeft:v(Fi,null,null),rotateRight:v(Vi,null,null),zoomIn:v(Wi,null,null),zoomOut:v(Zi,null,null),close:v(Pr,null,null),left:v(xr,null,null),right:v(Qn,null,null)},Xi=ue({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String},setup:function(e,n){var r=n.attrs,i=n.slots,u=lt("image",e),s=u.getPrefixCls,b=z(function(){return s("image-preview",e.previewPrefixCls)});return function(){return v(rr,x(x({},x(x({},r),e)),{},{icons:sr,previewPrefixCls:b.value}),i)}}});const Ki=Xi;var Ee=ue({name:"AImage",inheritAttrs:!1,props:ar(),setup:function(e,n){var r=n.slots,i=n.attrs,u=lt("image",e),s=u.prefixCls,b=u.rootPrefixCls,h=u.configProvider,m=z(function(){var y=e.preview;if(y===!1)return y;var w=ut(y)==="object"?y:{};return x(x({icons:sr},w),{},{transitionName:at(b.value,"zoom",w.transitionName),maskTransitionName:at(b.value,"fade",w.maskTransitionName)})});return function(){var y,w=((y=h.locale)===null||y===void 0?void 0:y.Image)||kr.Image,p=function(){return v("div",{class:"".concat(s.value,"-mask-info")},[v(yi,null,null),w==null?void 0:w.preview])},f=e.previewMask,o=f===void 0?r.previewMask||p:f;return v(Ni,x(x({},x(x(x({},i),e),{},{prefixCls:s.value})),{},{preview:m.value}),x(x({},r),{},{previewMask:typeof o=="function"?o:null}))}}});Ee.PreviewGroup=Ki;Ee.install=function(t){return t.component(Ee.name,Ee),t.component(Ee.PreviewGroup.name,Ee.PreviewGroup),t};const ea=Ee;var ta=["class","style"],na=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:We.any,delay:Number,indicator:We.any}},tt=null;function ra(t,e){return!!t&&!!e&&!isNaN(Number(e))}function ul(t){var e=t.indicator;tt=typeof e=="function"?e:function(){return v(e,null,null)}}const cl=ue({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Pt(na(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:jn("configProvider",Ir)}},data:function(){var e=this.spinning,n=this.delay,r=ra(e,n);return{sSpinning:e&&!r}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;kt(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var n=e||this.$props,r=n.delay;r&&(this.cancelExistingSpin(),this.updateSpinning=Be(this.originalUpdateSpinning,r))},updateSpinning:function(){var e=this.spinning,n=this.sSpinning;n!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var n="".concat(e,"-dot"),r=$r(this,"indicator");return r===null?null:(Array.isArray(r)&&(r=r.length===1?r[0]:r),rn(r)?pt(r,{class:n}):tt&&rn(tt())?pt(tt(),{class:n}):v("span",{class:"".concat(n," ").concat(e,"-dot-spin")},[v("i",{class:"".concat(e,"-dot-item")},null),v("i",{class:"".concat(e,"-dot-item")},null),v("i",{class:"".concat(e,"-dot-item")},null),v("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,n,r,i=this.$props,u=i.size,s=i.prefixCls,b=i.tip,h=b===void 0?(e=(n=this.$slots).tip)===null||e===void 0?void 0:e.call(n):b,m=i.wrapperClassName,y=this.$attrs,w=y.class,p=y.style,f=xt(y,ta),o=this.configProvider,a=o.getPrefixCls,l=o.direction,c=a("spin",s),g=this.sSpinning,P=(r={},G(r,c,!0),G(r,"".concat(c,"-sm"),u==="small"),G(r,"".concat(c,"-lg"),u==="large"),G(r,"".concat(c,"-spinning"),g),G(r,"".concat(c,"-show-text"),!!h),G(r,"".concat(c,"-rtl"),l==="rtl"),G(r,w,!!w),r),d=v("div",x(x({},f),{},{style:p,class:P}),[this.renderIndicator(c),h?v("div",{class:"".concat(c,"-text")},[h]):null]),k=Lr(this);if(k&&k.length){var O,S=(O={},G(O,"".concat(c,"-container"),!0),G(O,"".concat(c,"-blur"),g),O);return v("div",{class:["".concat(c,"-nested-loading"),m]},[g&&v("div",{key:"loading"},[d]),v("div",{class:S,key:"container"},[k])])}return d}});var ia=function(){var e=L(!1);return Ze(function(){e.value=!0}),e};const aa=ia;var oa={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Object,emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function pn(t){return!!(t&&t.then)}const hn=ue({compatConfig:{MODE:3},name:"ActionButton",props:oa,setup:function(e,n){var r=n.slots,i=L(!1),u=L(),s=L(!1),b,h=aa();Fe(function(){e.autofocus&&(b=setTimeout(function(){var w;return(w=u.value.$el)===null||w===void 0?void 0:w.focus()}))}),Ze(function(){clearTimeout(b)});var m=function(p){var f=e.close;pn(p)&&(s.value=!0,p.then(function(){h.value||(s.value=!1),f.apply(void 0,arguments),i.value=!1},function(o){console.error(o),h.value||(s.value=!1),i.value=!1}))},y=function(p){var f=e.actionFn,o=e.close,a=o===void 0?function(){}:o;if(!i.value){if(i.value=!0,!f){a();return}var l;if(e.emitEvent){if(l=f(p),e.quitOnNullishReturnValue&&!pn(l)){i.value=!1,a(p);return}}else if(f.length)l=f(a),i.value=!1;else if(l=f(),!l){a();return}m(l)}};return function(){var w=e.type,p=e.prefixCls,f=e.buttonProps;return v(qe,x(x(x({},Ai(w)),{},{onClick:y,loading:s.value,prefixCls:p},f),{},{ref:u}),r)}}});function Re(t){return typeof t=="function"?t():t}const la=ue({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName"],setup:function(e,n){var r=n.attrs,i=Mr("Modal"),u=De(i,1),s=u[0];return function(){var b=e.icon,h=e.onCancel,m=e.onOk,y=e.close,w=e.closable,p=w===void 0?!1:w,f=e.zIndex,o=e.afterClose,a=e.visible,l=e.keyboard,c=e.centered,g=e.getContainer,P=e.maskStyle,d=e.okButtonProps,k=e.cancelButtonProps,O=e.okCancel,S=O===void 0?!0:O,A=e.width,E=A===void 0?416:A,C=e.mask,I=C===void 0?!0:C,$=e.maskClosable,M=$===void 0?!1:$,F=e.type,ne=e.title,R=e.content,ie=e.direction,ce=e.closeIcon,de=e.modalRender,me=e.focusTriggerAfterClose,j=e.rootPrefixCls,W=e.bodyStyle,Z=e.wrapClassName,X=e.okType||"primary",Y=e.prefixCls||"ant-modal",ee="".concat(Y,"-confirm"),he=r.style||{},Qe=Re(e.okText)||(S?s.value.okText:s.value.justOkText),Ce=Re(e.cancelText)||s.value.cancelText,xe=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",ke=fe(ee,"".concat(ee,"-").concat(F),"".concat(Y,"-").concat(F),G({},"".concat(ee,"-rtl"),ie==="rtl"),r.class),Ie=S&&v(hn,{actionFn:h,close:y,autofocus:xe==="cancel",buttonProps:k,prefixCls:"".concat(j,"-btn")},{default:function(){return[Ce]}});return v(re,{prefixCls:Y,class:ke,wrapClassName:fe(G({},"".concat(ee,"-centered"),!!c),Z),onCancel:function(Le){return y({triggerCancel:!0},Le)},visible:a,title:"",footer:"",transitionName:at(j,"zoom",e.transitionName),maskTransitionName:at(j,"fade",e.maskTransitionName),mask:I,maskClosable:M,maskStyle:P,style:he,bodyStyle:W,width:E,zIndex:f,afterClose:o,keyboard:l,centered:c,getContainer:g,closable:p,closeIcon:ce,modalRender:de,focusTriggerAfterClose:me},{default:function(){return[v("div",{class:"".concat(ee,"-body-wrapper")},[v("div",{class:"".concat(ee,"-body")},[Re(b),ne===void 0?null:v("span",{class:"".concat(ee,"-title")},[Re(ne)]),v("div",{class:"".concat(ee,"-content")},[Re(R)])]),v("div",{class:"".concat(ee,"-btns")},[Ie,v(hn,{type:X,actionFn:m,close:y,autofocus:xe==="ok",buttonProps:d,prefixCls:"".concat(j,"-btn")},{default:function(){return[Qe]}})])])]}})}}});var sa=function(e){var n=document.createDocumentFragment(),r=x(x({},Fn(e,["parentContext","appContext"])),{},{close:s,visible:!0}),i=null;function u(){i&&(an(null,n),i.component.update(),i=null);for(var y=arguments.length,w=new Array(y),p=0;p<y;p++)w[p]=arguments[p];var f=w.some(function(l){return l&&l.triggerCancel});e.onCancel&&f&&e.onCancel.apply(e,w);for(var o=0;o<Ne.length;o++){var a=Ne[o];if(a===s){Ne.splice(o,1);break}}}function s(){for(var y=this,w=arguments.length,p=new Array(w),f=0;f<w;f++)p[f]=arguments[f];r=x(x({},r),{},{visible:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),u.apply(y,p)}}),b(r)}function b(y){typeof y=="function"?r=y(r):r=x(x({},r),y),i&&(st(i.component.props,r),i.component.update())}var h=function(w){var p=Tr,f=p.prefixCls,o=w.prefixCls||"".concat(f,"-modal");return v(Dr,x(x({},p),{},{notUpdateGlobalConfig:!0,prefixCls:f}),{default:function(){return[v(la,x(x({},w),{},{rootPrefixCls:f,prefixCls:o}),null)]}})};function m(y){var w=v(h,x({},y));return w.appContext=e.parentContext||e.appContext||w.appContext,an(w,n),w}return i=m(r),Ne.push(s),{destroy:s,update:b}};const Xe=sa;function ua(t){return x(x({icon:function(){return v(Un,null,null)},okCancel:!1},t),{},{type:"warning"})}function ca(t){return x(x({icon:function(){return v(zr,null,null)},okCancel:!1},t),{},{type:"info"})}function da(t){return x(x({icon:function(){return v(_r,null,null)},okCancel:!1},t),{},{type:"success"})}function fa(t){return x(x({icon:function(){return v(Nr,null,null)},okCancel:!1},t),{},{type:"error"})}function va(t){return x(x({icon:function(){return v(Un,null,null)},okCancel:!0},t),{},{type:"confirm"})}function ur(t){return Xe(ua(t))}re.info=function(e){return Xe(ca(e))};re.success=function(e){return Xe(da(e))};re.error=function(e){return Xe(fa(e))};re.warning=ur;re.warn=ur;re.confirm=function(e){return Xe(va(e))};re.destroyAll=function(){for(;Ne.length;){var e=Ne.pop();e&&e()}};re.install=function(t){return t.component(re.name,re),t};var ma={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const ga=ma;function yn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){pa(t,i,n[i])})}return t}function pa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jt=function(e,n){var r=yn({},e,n.attrs);return v(K,yn({},r,{icon:ga}),null)};jt.displayName="StarFilled";jt.inheritAttrs=!1;const cr=jt;var ha={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const ya=ha;function bn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ba(t,i,n[i])})}return t}function ba(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rt=function(e,n){var r=bn({},e,n.attrs);return v(K,bn({},r,{icon:ya}),null)};Rt.displayName="FileOutlined";Rt.inheritAttrs=!1;const wn=Rt;var wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Ca=wa;function Cn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Sa(t,i,n[i])})}return t}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vt=function(e,n){var r=Cn({},e,n.attrs);return v(K,Cn({},r,{icon:Ca}),null)};Vt.displayName="FolderOpenOutlined";Vt.inheritAttrs=!1;const Sn=Vt;function Aa(t,e,n){if(!Br(n))return!1;var r=typeof e;return(r=="number"?Fr(n)&&Qr(e,n.length):r=="string"&&e in n)?jr(n[e],t):!1}var Oa=Math.ceil,Ea=Math.max;function Pa(t,e,n,r){for(var i=-1,u=Ea(Oa((e-t)/(n||1)),0),s=Array(u);u--;)s[r?u:++i]=t,t+=n;return s}function xa(t){return function(e,n,r){return r&&typeof r!="number"&&Aa(e,n,r)&&(n=r=void 0),e=ft(e),n===void 0?(n=e,e=0):n=ft(n),r=r===void 0?e<n?1:-1:ft(r),Pa(e,n,r,t)}}var ka=xa();const Ia=ka;function $a(t,e){return t&&t.length?Rr(t,Ci(e)):[]}const bt=(...t)=>{document.addEventListener(...t),Ze(()=>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==",et=new WeakMap;function Ma(t,e){return{useHookShareState:r=>{const i=Ur();ht(i),et.has(i)||(et.set(i,Ye(t(i,r??(e==null?void 0:e())))),Ze(()=>{et.delete(i)}));const u=et.get(i);return ht(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 _a=za;function An(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Na(t,i,n[i])})}return t}function Na(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ut=function(e,n){var r=An({},e,n.attrs);return v(K,An({},r,{icon:_a}),null)};Ut.displayName="ArrowsAltOutlined";Ut.inheritAttrs=!1;const Da=Ut;var Ta={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const Ba=Ta;function On(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Fa(t,i,n[i])})}return t}function Fa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ht=function(e,n){var r=On({},e,n.attrs);return v(K,On({},r,{icon:Ba}),null)};Ht.displayName="DatabaseOutlined";Ht.inheritAttrs=!1;const Qa=Ht;var ja={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const Ra=ja;function En(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Va(t,i,n[i])})}return t}function Va(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gt=function(e,n){var r=En({},e,n.attrs);return v(K,En({},r,{icon:Ra}),null)};Gt.displayName="DragOutlined";Gt.inheritAttrs=!1;const Ua=Gt;var Ha={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const Ga=Ha;function Pn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Wa(t,i,n[i])})}return t}function Wa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wt=function(e,n){var r=Pn({},e,n.attrs);return v(K,Pn({},r,{icon:Ga}),null)};Wt.displayName="FullscreenExitOutlined";Wt.inheritAttrs=!1;const Ya=Wt;var Ja={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const qa=Ja;function xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Za(t,i,n[i])})}return t}function Za(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yt=function(e,n){var r=xn({},e,n.attrs);return v(K,xn({},r,{icon:qa}),null)};Yt.displayName="FullscreenOutlined";Yt.inheritAttrs=!1;const Xa=Yt;var Ka={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"left-circle",theme:"outlined"};const eo=Ka;function kn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){to(t,i,n[i])})}return t}function to(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=function(e,n){var r=kn({},e,n.attrs);return v(K,kn({},r,{icon:eo}),null)};Jt.displayName="LeftCircleOutlined";Jt.inheritAttrs=!1;const dl=Jt;var no={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"right-circle",theme:"outlined"};const ro=no;function In(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){io(t,i,n[i])})}return t}function io(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qt=function(e,n){var r=In({},e,n.attrs);return v(K,In({},r,{icon:ro}),null)};qt.displayName="RightCircleOutlined";qt.inheritAttrs=!1;const fl=qt;var ao={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};const oo=ao;function $n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){lo(t,i,n[i])})}return t}function lo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zt=function(e,n){var r=$n({},e,n.attrs);return v(K,$n({},r,{icon:oo}),null)};Zt.displayName="StarOutlined";Zt.inheritAttrs=!1;const dr=Zt,so={"date-asc":B("sortByDateAscending"),"date-desc":B("sortByDateDescending"),"name-asc":B("sortByNameAscending"),"name-desc":B("sortByNameDescending"),"size-asc":B("sortBySizeAscending"),"size-desc":B("sortBySizeDescending"),"created-time-asc":B("sortByCreatedDateAscending"),"created-time-desc":B("sortByCreatedDateDescending")};var fr=(t=>(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},Ln=(t,e)=>{const n=Date.parse(t.date),r=Date.parse(e.date);return n-r},Mn=(t,e)=>{const n=Date.parse(t.created_time),r=Date.parse(e.created_time);return n-r},zn=(t,e)=>{const n=t.name.toLowerCase(),r=e.name.toLowerCase();return n.localeCompare(r)},_n=(t,e)=>t.bytes-e.bytes,Ue=(t,e)=>{const n=(r,i)=>{switch(e){case"date-asc":return Ln(r,i);case"date-desc":return Ln(i,r);case"created-time-asc":return Mn(r,i);case"created-time-desc":return Mn(i,r);case"name-asc":return zn(r,i);case"name-desc":return zn(i,r);case"size-asc":return _n(r,i);case"size-desc":return _n(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 wt={},fo={get exports(){return wt},set exports(t){wt=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:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(o){var a,l;for(a in o)l=o[a],l!==void 0&&o.hasOwnProperty(a)&&(r[a]=l);return this},n.status=null,n.set=function(o){var a=n.isStarted();o=i(o,r.minimum,1),n.status=o===1?null:o;var l=n.render(!a),c=l.querySelector(r.barSelector),g=r.speed,P=r.easing;return l.offsetWidth,b(function(d){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),h(c,s(o,g,P)),o===1?(h(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout(function(){h(l,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){n.remove(),d()},g)},g)):setTimeout(d,g)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var o=function(){setTimeout(function(){n.status&&(n.trickle(),o())},r.trickleSpeed)};return r.trickle&&o(),this},n.done=function(o){return!o&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(o){var a=n.status;return a?a>1?void 0:(typeof o!="number"&&(a>=0&&a<.2?o=.1:a>=.2&&a<.5?o=.04:a>=.5&&a<.8?o=.02:a>=.8&&a<.99?o=.005:o=0),a=i(a+o,0,.994),n.set(a)):n.start()},n.trickle=function(){return n.inc()},function(){var o=0,a=0;n.promise=function(l){return!l||l.state()==="resolved"?this:(a===0&&n.start(),o++,a++,l.always(function(){a--,a===0?(o=0,n.done()):n.set((o-a)/o)}),this)}}(),n.getElement=function(){var o=n.getParent();if(o){var a=Array.prototype.slice.call(o.querySelectorAll(".nprogress")).filter(function(l){return l.parentElement===o});if(a.length>0)return a[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(o){if(n.isRendered())return n.getElement();y(document.documentElement,"nprogress-busy");var a=document.createElement("div");a.id="nprogress",a.className="nprogress",a.innerHTML=r.template;var l=a.querySelector(r.barSelector),c=o?"-100":u(n.status||0),g=n.getParent(),P;return h(l,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(P=a.querySelector(r.spinnerSelector),P&&f(P)),g!=document.body&&y(g,"nprogress-custom-parent"),g.appendChild(a),a},n.remove=function(){n.status=null,w(document.documentElement,"nprogress-busy"),w(n.getParent(),"nprogress-custom-parent");var o=n.getElement();o&&f(o)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var o=document.body.style,a="WebkitTransform"in o?"Webkit":"MozTransform"in o?"Moz":"msTransform"in o?"ms":"OTransform"in o?"O":"";return a+"Perspective"in o?"translate3d":a+"Transform"in o?"translate":"margin"};function i(o,a,l){return o<a?a:o>l?l:o}function u(o){return(-1+o)*100}function s(o,a,l){var c;return r.positionUsing==="translate3d"?c={transform:"translate3d("+u(o)+"%,0,0)"}:r.positionUsing==="translate"?c={transform:"translate("+u(o)+"%,0)"}:c={"margin-left":u(o)+"%"},c.transition="all "+a+"ms "+l,c}var b=function(){var o=[];function a(){var l=o.shift();l&&l(a)}return function(l){o.push(l),o.length==1&&a()}}(),h=function(){var o=["Webkit","O","Moz","ms"],a={};function l(d){return d.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(k,O){return O.toUpperCase()})}function c(d){var k=document.body.style;if(d in k)return d;for(var O=o.length,S=d.charAt(0).toUpperCase()+d.slice(1),A;O--;)if(A=o[O]+S,A in k)return A;return d}function g(d){return d=l(d),a[d]||(a[d]=c(d))}function P(d,k,O){k=g(k),d.style[k]=O}return function(d,k){var O=arguments,S,A;if(O.length==2)for(S in k)A=k[S],A!==void 0&&k.hasOwnProperty(S)&&P(d,S,A);else P(d,O[1],O[2])}}();function m(o,a){var l=typeof o=="string"?o:p(o);return l.indexOf(" "+a+" ")>=0}function y(o,a){var l=p(o),c=l+a;m(l,a)||(o.className=c.substring(1))}function w(o,a){var l=p(o),c;m(o,a)&&(c=l.replace(" "+a+" "," "),o.className=c.substring(1,c.length-1))}function p(o){return(" "+(o&&o.className||"")+" ").replace(/\s+/gi," ")}function f(o){o&&o.parentNode&&o.parentNode.removeChild(o)}return n})})(fo);const vo=wt,mt=new Map,H=$t(),Nn=new BroadcastChannel("iib-image-transfer-bus"),He=encodeURIComponent,Ge=(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:nt,useEventListen:Ct}=Hn(),{useHookShareState:we}=Ma(()=>{const t=L({tabIdx:-1,paneIdx:-1}),e=z(()=>Te(n.value)),n=L([]),r=z(()=>{var p;return n.value.map(f=>f.curr).slice((p=H.conf)!=null&&p.is_win?1:0)}),i=z(()=>Mt(...r.value)),u=L(fr.CREATED_TIME_DESC),s=z(()=>{var l;if(!e.value)return[];const p=((l=e.value)==null?void 0:l.files)??[],f=u.value,{walkFiles:o}=e.value,a=c=>H.onlyFoldersAndImages?c.filter(g=>g.type==="dir"||oe(g.name)):c;return t.value.walkMode&&o?o.map(c=>Ue(a(c),f)).flat():Ue(a(p),f)}),b=L([]),h=L(-1),m=L(!0),y=L();return{spinning:L(!1),canLoadNext:m,multiSelectedIdxs:b,previewIdx:h,basePath:r,currLocation:i,currPage:e,stack:n,sortMethod:u,sortedFiles:s,scroller:L(),stackViewEl:L(),walkModePath:y,props:t,...Hn()}});function vl(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),b=z(()=>(e==null?void 0:e.scroller.value)??u.scroller),h=L(!1);let m=null;const y=(o,a)=>{var l;h.value=o,m!=null&&!o&&a&&((l=b.value)==null||l.scrollToItem(m),m=null)},w=()=>{t.walkMode&&!f("next")&&i&&(le.info(B("loadingNextFolder")),r.value.emit("loadNextDir",!0))};bt("keydown",o=>{var a;if(h.value){let l=n.value;if(["ArrowDown","ArrowRight"].includes(o.key))for(l++;s.value[l]&&!oe(s.value[l].name);)l++;else if(["ArrowUp","ArrowLeft"].includes(o.key))for(l--;s.value[l]&&!oe(s.value[l].name);)l--;if(oe((a=s.value[l])==null?void 0:a.name)??""){n.value=l;const c=b.value;c&&!(l>=c.$_startIndex&&l<=c.$_endIndex)&&(m=l)}w()}});const p=o=>{var l;let a=n.value;if(o==="next")for(a++;s.value[a]&&!oe(s.value[a].name);)a++;else if(o==="prev")for(a--;s.value[a]&&!oe(s.value[a].name);)a--;if(oe((l=s.value[a])==null?void 0:l.name)??""){n.value=a;const c=b.value;c&&!(a>=c.$_startIndex&&a<=c.$_endIndex)&&(m=a)}w()},f=o=>{var l;let a=n.value;if(o==="next")for(a++;s.value[a]&&!oe(s.value[a].name);)a++;else if(o==="prev")for(a--;s.value[a]&&!oe(s.value[a].name);)a--;return oe((l=s.value[a])==null?void 0:l.name)??""};return Ct("removeFiles",async()=>{var o;h.value&&!u.sortedFiles[n.value]&&(le.info(B("manualExitFullScreen"),5),await Lt(500),(o=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||o.click(),n.value=-1)}),{previewIdx:n,onPreviewVisibleChange:y,previewing:h,previewImgMove:p,canPreview:f}}function ml(t){const e=L(),{scroller:n,stackViewEl:r,stack:i,currPage:u,currLocation:s,sortMethod:b,useEventListen:h,walkModePath:m,eventEmitter:y}=we().toRefs();se(()=>i.value.length,Be((O,S)=>{var A;O!==S&&((A=n.value)==null||A.scrollToItem(0))},300));const w=async O=>{if(await l(O),t.walkMode){await Lt();const[S]=Ue(u.value.files,b.value).filter(A=>A.type==="dir");S&&await l(S.fullpath),await y.value.emit("loadNextDir")}};Fe(async()=>{var O;if(!i.value.length){const S=await Ve("/");i.value.push({files:S.files,curr:"/"})}e.value=new vo,e.value.configure({parent:r.value}),t.path&&t.path!=="/"?await w(t.path):(O=H.conf)!=null&&O.home&&l(H.conf.home)}),se(s,Be(O=>{const S=H.tabList[t.tabIdx].panes[t.paneIdx];S.path=O;const A=S.path.split("/").pop(),E=()=>{var C;return t.walkMode?"Walk: "+(((C=H.autoCompletedDirList.find(I=>I.dir===m.value))==null?void 0:C.zh)??A):A};S.name=pe("div",{style:"display:flex;align-items:center"},[pe(Qa),pe("span",{class:"line-clamp-1",style:"max-width: 256px"},E())]),H.recent=H.recent.filter(C=>C.key!==S.key),H.recent.unshift({path:O,key:S.key}),H.recent.length>20&&(H.recent=H.recent.slice(0,20))},300));const p=()=>_t(s.value),f=async O=>{var S,A;if(O.type==="dir")try{(S=e.value)==null||S.start();const{files:E}=await Ve(O.fullpath);i.value.push({files:E,curr:O.name})}finally{(A=e.value)==null||A.done()}},o=O=>{for(;O<i.value.length-1;)i.value.pop()},a=(O,S)=>(ht(H.conf,"global.conf load failed"),H.conf.is_win?O.toLowerCase()==S.toLowerCase():O==S),l=async O=>{var A,E;const S=i.value.slice();try{Gr(O)||(O=Mt(((A=H.conf)==null?void 0:A.sd_cwd)??"/",O));const C=on(O),I=i.value.map($=>$.curr);for(I.shift();I[0]&&C[0]&&a(I[0],C[0]);)I.shift(),C.shift();for(let $=0;$<I.length;$++)i.value.pop();if(!C.length)return c();for(const $ of C){const M=(E=u.value)==null?void 0:E.files.find(F=>a(F.name,$));if(!M)throw console.error({frags:C,frag:$,stack:Gn(i.value)}),new Error(`${$} not found`);await f(M)}}catch(C){throw le.error(B("moveFailedCheckPath")+(C instanceof Error?C.message:"")),console.error(O,on(O),u.value),i.value=S,C}},c=ln(async()=>{var O,S,A;try{if((O=e.value)==null||O.start(),m.value)o(0),await w(m.value);else{const{files:E}=await Ve(i.value.length===1?"/":s.value);Te(i.value).files=E}(S=n.value)==null||S.scrollToItem(0),le.success(B("refreshCompleted"))}finally{(A=e.value)==null||A.done()}});Wr("return-to-iib",ln(async()=>{var O,S;if(!t.walkMode)try{(O=e.value)==null||O.start();const{files:A}=await Ve(i.value.length===1?"/":s.value);Te(i.value).files.map(C=>C.date).join()!==A.map(C=>C.date).join()&&(Te(i.value).files=A,le.success(B("autoUpdate")))}finally{(S=e.value)==null||S.done()}})),h.value("refresh",c);const g=O=>{t.walkMode&&(m.value=O),w(O)},P=z(()=>H.autoCompletedDirList.map(O=>({...O,path:yt(O.dir)}))),d=z(()=>{const O=yt(s.value);return P.value.find(A=>A.path===O)});return{addToSearchScanPathAndQuickMove:async()=>{const O=d.value;if(O){if(!O.can_delete)return;await bi(s.value),le.success(B("removeComplete"))}else await wi(s.value),le.success(B("addComplete"));await qr.emit("updateGlobalSetting")},searchPathInfo:d,refresh:c,copyLocation:p,back:o,openNext:f,currPage:u,currLocation:s,to:l,stack:i,scroller:n,quickMoveTo:g}}function gl(t){const{scroller:e,sortedFiles:n,stack:r,sortMethod:i,currLocation:u,currPage:s,stackViewEl:b,canLoadNext:h,previewIdx:m}=we().toRefs(),{state:y}=we(),w=L(!1),p=L("grid"),f={line:B("detailList"),grid:B("previewGrid"),"large-size-grid":B("largePreviewGrid")},o={value:E=>E,text:E=>B("sortBy")+" "+so[E].toLocaleLowerCase()},a=272,l=64,c=a*2,{width:g}=Yr(b),P=z(()=>{const E=g.value;if(!(p.value==="line"||!E))return~~(E/(p.value==="grid"?a:c))}),d=z(()=>{const E=p.value;if(E==="line")return{first:80,second:void 0};const C=E==="grid"?a:c;return{first:C+l,second:C}}),k=L(!1),O=async()=>{var E;if(!(k.value||!t.walkMode||!h.value))try{k.value=!0;const C=r.value[r.value.length-2],I=Ue(C.files,i.value),$=I.findIndex(M=>{var F;return M.name===((F=s.value)==null?void 0:F.curr)});if($!==-1){const M=I[$+1],F=Mt(u.value,"../",M.name),ne=await Ve(F),R=s.value;R.curr=M.name,R.walkFiles||(R.walkFiles=[R.files]),R.walkFiles.push(ne.files),console.log("curr page files length",(E=s.value)==null?void 0:E.files.length)}}catch(C){console.error("loadNextDir",C),h.value=!1}finally{k.value=!1}},S=async(E=!1)=>{const C=e.value,I=()=>E?m.value:(C==null?void 0:C.$_endIndex)??0;for(;!n.value.length||I()>n.value.length-20&&h.value;)await Lt(100),await O()};y.useEventListen("loadNextDir",S);const A=Be(()=>S(),300);return{gridItems:P,sortedFiles:n,sortMethodConv:o,viewModeMap:f,moreActionsDropdownShow:w,viewMode:p,gridSize:a,sortMethod:i,largeGridSize:c,onScroll:A,loadNextDir:O,loadNextDirLoading:k,canLoadNext:h,itemSize:d}}function pl(){const{currLocation:t,sortedFiles:e,currPage:n,multiSelectedIdxs:r,eventEmitter:i}=we().toRefs(),u=()=>{r.value=[]};return bt("click",u),bt("blur",u),se(n,u),{onFileDragStart:(h,m)=>{const y=Gn(e.value[m]);console.log("onFileDragStart set drag file ",h,m,y);const w=[y];let p=y.type==="dir";if(r.value.includes(m)){const f=r.value.map(o=>e.value[o]);w.push(...f),p=f.some(o=>o.type==="dir")}h.dataTransfer.setData("text/plain",JSON.stringify({includeDir:p,loc:t.value,path:$a(w,"fullpath").map(f=>f.fullpath)}))},onDrop:async h=>{var y;const m=JSON.parse(((y=h.dataTransfer)==null?void 0:y.getData("text"))||"{}");if(console.log(m),m.path&&typeof m.includeDir<"u"&&m.loc){const w=t.value;if(m.loc===w)return;const p=pe("div",[pe("div",`${B("moveSelectedFilesTo")}${w}`),pe("ol",m.path.map(f=>f.split(/[/\\]/).pop()).map(f=>pe("li",f)))]);re.confirm({title:B("confirm"),content:p,maskClosable:!0,async onOk(){await vr(m.path,w),nt.emit("removeFiles",{paths:m.path,loc:m.loc}),await i.value.emit("refresh")}})}},multiSelectedIdxs:r}}function hl(t,{openNext:e}){const n=L(!1),r=L(""),{sortedFiles:i,previewIdx:u,multiSelectedIdxs:s,stack:b,currLocation:h,spinning:m}=we().toRefs(),y=yt;Ct("removeFiles",({paths:o,loc:a})=>{if(y(a)!==y(h.value))return;const l=Te(b.value);l&&(l.files=l.files.filter(c=>!o.includes(c.fullpath)),l.walkFiles&&(l.walkFiles=l.walkFiles.map(c=>c.filter(g=>!o.includes(g.fullpath)))))}),Ct("addFiles",({files:o,loc:a})=>{if(y(a)!==y(h.value))return;const l=Te(b.value);l&&l.files.unshift(...o)});const w=zt();return{onFileItemClick:async(o,a,l)=>{u.value=l,H.fullscreenPreviewInitialUrl=Ge(a);const c=s.value.indexOf(l);if(o.shiftKey){if(c!==-1)s.value.splice(c,1);else{s.value.push(l),s.value.sort((d,k)=>d-k);const g=s.value[0],P=s.value[s.value.length-1];s.value=Ia(g,P+1)}o.stopPropagation()}else o.ctrlKey||o.metaKey?(c!==-1?s.value.splice(c,1):s.value.push(l),o.stopPropagation()):await e(a)},onContextMenuClick:async(o,a,l)=>{var k,O;console.log(o,a);const c=Ge(a),g=h.value,P=()=>{let S=[];return s.value.includes(l)?S=s.value.map(A=>i.value[A]):S.push(a),S},d=async S=>{if(!m.value)try{m.value=!0,await ei(a.fullpath),Nn.postMessage("iib_hidden_img_update_trigger");const A=setTimeout(()=>ti.warn({message:B("long_loading"),duration:20}),5e3);await ni(),clearTimeout(A),Nn.postMessage(`iib_hidden_tab_${S}`)}catch(A){console.error(A),le.error("发送图像失败请携带console的错误消息找开发者")}finally{m.value=!1}};if(((k=o.keyPath)==null?void 0:k[0])==="toggle-tag"){const{is_remove:S}=await un({tag_id:o.key,img_path:a.fullpath});le.success(S?B("removedTagFromImage"):B("addedTagToImage"));return}else if(o.key.toString().startsWith("toggle-tag-")){const{is_remove:S}=await un({tag_id:+o.key.toString().split("toggle-tag-")[1],img_path:a.fullpath});le.success(S?B("removedTagFromImage"):B("addedTagToImage"));return}switch(o.key){case"previewInNewWindow":return window.open(c);case"download":return window.open(Ge(a,!0));case"copyPreviewUrl":return _t(parent.document.location.origin+c);case"send2txt2img":return d("txt2img");case"send2img2img":return d("img2img");case"send2inpaint":return d("inpaint");case"send2extras":return d("extras");case"send2savedDir":{const S=H.autoCompletedDirList.find(C=>C.key==="outdir_save");if(!S)return le.error(B("unknownSavedDir"));const A=Kr(S.dir,(O=H.conf)==null?void 0:O.sd_cwd),E=P();await vr(E.map(C=>C.fullpath),A),nt.emit("removeFiles",{paths:E.map(C=>C.fullpath),loc:h.value}),nt.emit("addFiles",{files:E,loc:A});break}case"openWithWalkMode":{mt.set(g,b.value);const S=H.tabList[t.tabIdx],A={type:"local",key:dt(),path:a.fullpath,name:B("local"),stackKey:g,walkMode:!0};S.panes.push(A),S.key=A.key;break}case"openInNewTab":{mt.set(g,b.value);const S=H.tabList[t.tabIdx],A={type:"local",key:dt(),path:a.fullpath,name:B("local"),stackKey:g};S.panes.push(A),S.key=A.key;break}case"openOnTheRight":{mt.set(g,b.value);let S=H.tabList[t.tabIdx+1];S||(S=Xr({panes:[],key:""}),H.tabList[t.tabIdx+1]=S);const A={type:"local",key:dt(),path:a.fullpath,name:B("local"),stackKey:g};S.panes.push(A),S.key=A.key;break}case"viewGenInfo":{n.value=!0,r.value=await w.pushAction(()=>Wn(a.fullpath)).res;break}case"openWithLocalFileBrowser":{await Zr(a.fullpath);break}case"deleteFiles":{const S=P();await new Promise(A=>{re.confirm({title:B("confirmDelete"),maskClosable:!0,content:pe("ol",{style:"max-height:50vh;overflow:auto;"},S.map(E=>E.fullpath.split(/[/\\]/).pop()).map(E=>pe("li",E))),async onOk(){const E=S.map(C=>C.fullpath);await co(E),le.success(B("deleteSuccess")),nt.emit("removeFiles",{paths:E,loc:h.value}),A()}})});break}}return{}},showGenInfo:n,imageGenInfo:r,q:w}}const yl=()=>{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 go(){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 rt;function St(){St.init||(St.init=!0,rt=go()!==-1)}var ct={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",rt&&this.$el.appendChild(t),t.data="about:blank",rt||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&&(!rt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const po=ri();Yn("data-v-b329ee4c");const ho={class:"resize-observer",tabindex:"-1"};Jn();const yo=po((t,e,n,r,i,u)=>(D(),J("div",ho)));ct.render=yo;ct.__scopeId="data-v-b329ee4c";ct.__file="src/components/ResizeObserver.vue";function it(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?it=function(e){return typeof e}:it=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(t)}function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wo(t,e,n){return e&&Dn(t.prototype,e),n&&Dn(t,n),t}function Tn(t){return Co(t)||So(t)||Ao(t)||Oo()}function Co(t){if(Array.isArray(t))return At(t)}function So(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Ao(t,e){if(t){if(typeof t=="string")return At(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return At(t,e)}}function At(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Oo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eo(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function Po(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,u,s=function(h){for(var m=arguments.length,y=new Array(m>1?m-1:0),w=1;w<m;w++)y[w-1]=arguments[w];if(u=y,!(r&&h===i)){var p=n.leading;typeof p=="function"&&(p=p(h,i)),(!r||h!==i)&&p&&t.apply(void 0,[h].concat(Tn(u))),i=h,clearTimeout(r),r=setTimeout(function(){t.apply(void 0,[h].concat(Tn(u))),r=0},e)}};return s._clear=function(){clearTimeout(r),r=null},s}function mr(t,e){if(t===e)return!0;if(it(t)==="object"){for(var n in t)if(!mr(t[n],e[n]))return!1;return!0}return!1}var xo=function(){function t(e,n,r){bo(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return wo(t,[{key:"createObserver",value:function(n,r){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Eo(n),this.callback=function(b,h){i.options.callback(b,h),b&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var u=this.options.throttleOptions||{},s=u.leading;this.callback=Po(this.callback,this.options.throttle,{leading:function(h){return s==="both"||s==="visible"&&h||s==="hidden"&&!h}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(b){var h=b[0];if(b.length>1){var m=b.find(function(w){return w.isIntersecting});m&&(h=m)}if(i.callback){var y=h.isIntersecting&&h.intersectionRatio>=i.threshold;if(y===i.oldResult)return;i.oldResult=y,i.callback(y,h)}},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 gr(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){pr(t);return}u?u.createObserver(r,n):gr(t,{value:r},n)}}function pr(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var Io={beforeMount:gr,updated:ko,unmounted:pr},$o={itemsLimit:1e3},Lo=/(auto|scroll)/;function hr(t,e){return t.parentNode===null?e:hr(t.parentNode,e.concat([t]))}var gt=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},Mo=function(e){return gt(e,"overflow")+gt(e,"overflow-y")+gt(e,"overflow-x")},zo=function(e){return Lo.test(Mo(e))};function Bn(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=hr(t.parentNode,[]),n=0;n<e.length;n+=1)if(zo(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Ot(t){return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(t)}var _o={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function No(){return this.items.length&&Ot(this.items[0])!=="object"}var Et=!1;if(typeof window<"u"){Et=!1;try{var Do=Object.defineProperty({},"passive",{get:function(){Et=!0}});window.addEventListener("test",null,Do)}catch{}}let To=0;var yr={name:"RecycleScroller",components:{ResizeObserver:ct},directives:{ObserveVisibility:Io},props:{..._o,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,r=this.minItemSize;let i=1e4,u=0,s;for(let b=0,h=e.length;b<h;b++)s=e[b][n]||r,s<i&&(i=s),u+=s,t[b]={accumulator:u,size:s};return this.$_computedMinItemSize=i,t}return[]},simpleArray:No,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let r=0,i=e.length;r<i;r++)n[e[r][t]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{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,b=this.simpleArray?null:this.keyField,h=this.items,m=h.length,y=this.sizes,w=this.$_views,p=this.$_unusedViews,f=this.pool,o=this.itemIndexByKey;let a,l,c,g,P;if(!m)a=l=g=P=c=0;else if(this.$_prerender)a=g=0,l=P=Math.min(this.prerender,h.length),c=null;else{const C=this.getScroll();if(e){let M=C.start-this.$_lastUpdateScrollPosition;if(M<0&&(M=-M),n===null&&M<u||M<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=C.start;const I=this.buffer;C.start-=I,C.end+=I;let $=0;if(this.$refs.before&&($=this.$refs.before.scrollHeight,C.start-=$),this.$refs.after){const M=this.$refs.after.scrollHeight;C.end+=M}if(n===null){let M,F=0,ne=m-1,R=~~(m/2),ie;do ie=R,M=y[R].accumulator,M<C.start?F=R:R<m-1&&y[R+1].accumulator>C.start&&(ne=R),R=~~((F+ne)/2);while(R!==ie);for(R<0&&(R=0),a=R,c=y[m-1].accumulator,l=R;l<m&&y[l].accumulator<C.end;l++);for(l===-1?l=h.length-1:(l++,l>m&&(l=m)),g=a;g<m&&$+y[g].accumulator<C.start;g++);for(P=g;P<m&&$+y[P].accumulator<C.end;P++);}else{a=~~(C.start/n*r);const M=a%r;a-=M,l=Math.ceil(C.end/n*r),g=Math.max(0,Math.floor((C.start-$)/n*r)),P=Math.floor((C.end-$)/n*r),a<0&&(a=0),l>m&&(l=m),g<0&&(g=0),P>m&&(P=m),c=Math.ceil(m/r)*n}}l-a>$o.itemsLimit&&this.itemsLimitError(),this.totalSize=c;let d;const k=a<=this.$_endIndex&&l>=this.$_startIndex;if(k)for(let C=0,I=f.length;C<I;C++)d=f[C],d.nr.used&&(t&&(d.nr.index=o[d.item[b]]),(d.nr.index==null||d.nr.index<a||d.nr.index>=l)&&this.unuseView(d));const O=k?null:new Map;let S,A,E;for(let C=a;C<l;C++){S=h[C];const I=b?S[b]:S;if(I==null)throw new Error(`Key is ${I} on item (keyField is '${b}')`);if(d=w.get(I),!n&&!y[C].size){d&&this.unuseView(d);continue}A=S[s];let $=p.get(A),M=!1;if(!d)k?$&&$.length?d=$.pop():d=this.addView(f,C,S,I,A):(E=O.get(A)||0,(!$||E>=$.length)&&(d=this.addView(f,C,S,I,A),this.unuseView(d,!0),$=p.get(A)),d=$[E],O.set(A,E+1)),w.delete(d.nr.key),d.nr.used=!0,d.nr.index=C,d.nr.key=I,d.nr.type=A,w.set(I,d),M=!0;else if(!d.nr.used&&(d.nr.used=!0,d.nr.index=C,M=!0,$)){const F=$.indexOf(d);F!==-1&&$.splice(F,1)}d.item=S,M&&(C===h.length-1&&this.$emit("scroll-end"),C===0&&this.$emit("scroll-start")),n===null?(d.position=y[C-1].accumulator,d.offset=0):(d.position=Math.floor(C/r)*n,d.offset=C%r*i)}return this.$_startIndex=a,this.$_endIndex=l,this.emitUpdate&&this.$emit("update",a,l,g,P),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:k}},getListenerTarget(){let t=Bn(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),b=n?window.innerHeight:window.innerWidth;s<0&&(b+=s,s=0),s+b>u&&(b=u-s),r={start:s,end:s+b}}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=Bn(this.$el),s=u.tagName==="HTML"?0:u[e.scroll],b=u.getBoundingClientRect(),m=this.$el.getBoundingClientRect()[e.start]-b[e.start];n=u,r=e.scroll,i=t+s+m}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"),b=li("observe-visibility");return si((D(),q("div",{class:Je(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...h)=>u.handleScroll&&u.handleScroll(...h))},[t.$slots.before?(D(),q("div",Bo,[Ke(t.$slots,"before")],512)):be("v-if",!0),(D(),J(sn(n.listTag),{ref:"wrapper",style:di({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:Je(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:_(()=>[(D(!0),q(ge,null,Nt(i.pool,h=>(D(),J(sn(n.itemTag),ui({key:h.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${h.position}px) translate${t.direction==="vertical"?"X":"Y"}(${h.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===h.nr.key}]]},ci(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=h.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:_(()=>[Ke(t.$slots,"default",{item:h.item,index:h.nr.index,active:h.nr.used})]),_:2},1040,["style","class"]))),128)),Ke(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(D(),q("div",Fo,[Ke(t.$slots,"after")],512)):be("v-if",!0),v(s,{onNotify:u.handleResize},null,8,["onNotify"])],34)),[[b,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=ue({__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 m;return(((m=r.conf)==null?void 0:m.all_custom_tags)??[]).reduce((y,w)=>[...y,{...w,selected:!!i.value.find(p=>p.id===w.id)}],[])}),s=()=>{var m;((m=n==null?void 0:n.file)==null?void 0:m.type)==="file"&&b.pushAction(()=>Kn(n.file.fullpath)).res.then(y=>{i.value=y})},b=zt(),h=z(()=>n.viewMode==="grid"?[r.gridThumbnailSize,r.gridThumbnailSize].join("x"):[r.largeGridThumbnailSize,r.largeGridThumbnailSize].join("x"));return(m,y)=>{const w=ea,p=qn,f=fi,o=Zn,a=Pe;return D(),J(a,{trigger:["contextmenu"],visible:T(r).longPressOpenContextMenu?typeof t.idx=="number"&&t.showMenuIdx===t.idx:void 0,"onUpdate:visible":y[3]||(y[3]=l=>typeof t.idx=="number"&&e("update:showMenuIdx",l?t.idx:-1))},{overlay:_(()=>[v(o,{onClick:y[2]||(y[2]=l=>e("contextMenuClick",l,t.file,t.idx))},{default:_(()=>[v(p,{key:"deleteFiles"},{default:_(()=>[V(N(m.$t("deleteSelected")),1)]),_:1}),t.file.type==="dir"?(D(),q(ge,{key:0},[v(p,{key:"openInNewTab"},{default:_(()=>[V(N(m.$t("openInNewTab")),1)]),_:1}),v(p,{key:"openOnTheRight"},{default:_(()=>[V(N(m.$t("openOnTheRight")),1)]),_:1}),v(p,{key:"openWithWalkMode"},{default:_(()=>[V(N(m.$t("openWithWalkMode")),1)]),_:1})],64)):be("",!0),t.file.type==="file"?(D(),q(ge,{key:1},[v(p,{key:"previewInNewWindow"},{default:_(()=>[V(N(m.$t("previewInNewWindow")),1)]),_:1}),v(p,{key:"download"},{default:_(()=>[V(N(m.$t("downloadDirectly")),1)]),_:1}),v(p,{key:"copyPreviewUrl"},{default:_(()=>[V(N(m.$t("copySourceFilePreviewLink")),1)]),_:1}),T(oe)(t.file.name)?(D(),q(ge,{key:0},[v(p,{key:"viewGenInfo"},{default:_(()=>[V(N(m.$t("viewGenerationInfo")),1)]),_:1}),v(p,{key:"send2txt2img"},{default:_(()=>[V(N(m.$t("sendToTxt2img")),1)]),_:1}),v(p,{key:"send2img2img"},{default:_(()=>[V(N(m.$t("sendToImg2img")),1)]),_:1}),v(p,{key:"send2inpaint"},{default:_(()=>[V(N(m.$t("sendToInpaint")),1)]),_:1}),v(p,{key:"send2extras"},{default:_(()=>[V(N(m.$t("sendToExtraFeatures")),1)]),_:1}),v(p,{key:"send2savedDir"},{default:_(()=>[V(N(m.$t("send2savedDir")),1)]),_:1}),v(p,{key:"openWithLocalFileBrowser"},{default:_(()=>[V(N(m.$t("openWithLocalFileBrowser")),1)]),_:1}),v(f,{key:"toggle-tag",title:m.$t("toggleTag")},{default:_(()=>[(D(!0),q(ge,null,Nt(T(u),l=>(D(),J(p,{key:l.id},{default:_(()=>[V(N(l.name)+" ",1),l.selected?(D(),J(T(cr),{key:0})):(D(),J(T(dr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])],64)):be("",!0)],64)):be("",!0)]),_:1})]),default:_(()=>[(D(),q("li",{class:Je(["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:y[0]||(y[0]=l=>e("dragstart",l,t.idx)),onContextmenu:s,onClickCapture:y[1]||(y[1]=l=>e("fileItemClick",l,t.file,t.idx))},[t.viewMode!=="line"?(D(),q("div",Ro,[T(oe)(t.file.name)?(D(),J(w,{key:t.file.fullpath,class:Je(`idx-${t.idx}`),src:T(r).enableThumbnail?T(mo)(t.file,T(h)):T(Ge)(t.file),fallback:T(La),preview:{src:t.fullScreenPreviewImageUrl,onVisibleChange:(l,c)=>e("previewVisibleChange",l,c)}},null,8,["class","src","fallback","preview"])):(D(),q("div",Vo,[t.file.type==="file"?(D(),J(T(wn),{key:0,class:"icon center"})):(D(),J(T(Sn),{key:1,class:"icon center"}))])),te("div",Uo,[te("div",Ho,N(t.file.name),1),te("div",Go,[te("div",null,N(t.file.size),1),te("div",null,N(t.file.date),1)])])])):(D(),q(ge,{key:1},[t.file.type==="file"?(D(),J(T(wn),{key:0,class:"icon"})):(D(),J(T(Sn),{key:1,class:"icon"})),te("div",Wo,N(t.file.name),1),te("div",Yo,[te("div",null,N(t.file.size),1),te("div",null,N(t.file.date),1)])],64))],42,jo))]),_:1},8,["visible"])}}});const bl=Xn(Jo,[["__scopeId","data-v-7b6efa60"]]);function qo(t,e,n,r){const i={x:0,y:0};let u=0,s=0,b=typeof(r==null?void 0:r.width)=="number"?r.width:0,h=typeof(r==null?void 0:r.height)=="number"?r.height:0,m=typeof(r==null?void 0:r.left)=="number"?r.left:0,y=typeof(r==null?void 0:r.top)=="number"?r.top:0,w=!1;const p=g=>{g.stopPropagation(),g.preventDefault(),!(!t.value||!e.value)&&(u=g instanceof MouseEvent?g.clientX:g.touches[0].clientX,s=g instanceof MouseEvent?g.clientY:g.touches[0].clientY,b=t.value.offsetWidth,h=t.value.offsetHeight,i.x=e.value.offsetLeft,i.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",f),document.documentElement.addEventListener("touchmove",f),document.documentElement.addEventListener("mouseup",o),document.documentElement.addEventListener("touchend",o))},f=g=>{if(!t.value||!e.value)return;const P=b+((g instanceof MouseEvent?g.clientX:g.touches[0].clientX)-u),d=h+((g instanceof MouseEvent?g.clientY:g.touches[0].clientY)-s),k=i.x+((g instanceof MouseEvent?g.clientX:g.touches[0].clientX)-u),O=i.y+((g instanceof MouseEvent?g.clientY:g.touches[0].clientY)-s);t.value.style.width=`${P}px`,t.value.style.height=`${d}px`,e.value.style.left=`${k}px`,e.value.style.top=`${O}px`,r!=null&&r.onResize&&r.onResize(P,d)},o=()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",o),document.documentElement.removeEventListener("touchend",o)},a=g=>{g.stopPropagation(),g.preventDefault(),!(!t.value||!n.value)&&(w=!0,m=t.value.offsetLeft,y=t.value.offsetTop,u=g instanceof MouseEvent?g.clientX:g.touches[0].clientX,s=g instanceof MouseEvent?g.clientY:g.touches[0].clientY,document.documentElement.addEventListener("mousemove",l),document.documentElement.addEventListener("touchmove",l),document.documentElement.addEventListener("mouseup",c),document.documentElement.addEventListener("touchend",c))},l=g=>{if(!t.value||!n.value||!w)return;const P=m+((g instanceof MouseEvent?g.clientX:g.touches[0].clientX)-u),d=y+((g instanceof MouseEvent?g.clientY:g.touches[0].clientY)-s);t.value.style.left=`${P}px`,t.value.style.top=`${d}px`,r!=null&&r.onDrag&&r.onDrag(P,d)},c=()=>{w=!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`))}),Ze(()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",o),document.documentElement.removeEventListener("touchend",o),document.documentElement.removeEventListener("mousemove",l),document.documentElement.removeEventListener("touchmove",l),document.documentElement.removeEventListener("mouseup",c),document.documentElement.removeEventListener("touchend",c)}),se(()=>[t.value,e.value,n.value],([g,P,d])=>{g&&P&&d&&(P.addEventListener("mousedown",p),P.addEventListener("touchstart",p),d.addEventListener("mousedown",a),d.addEventListener("touchstart",a))}),{handleResizeMouseDown:p,handleDragMouseDown:a}}const Zo=t=>(Yn("data-v-bbddd009"),t=t(),Jn(),t),Xo={class:"container"},Ko={class:"action-bar"},el=Zo(()=>te("div",{"flex-placeholder":""},null,-1)),tl={key:0,class:"action-bar"},nl={key:0,class:"gen-info"},rl=ue({__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 o;return(((o=r.conf)==null?void 0:o.all_custom_tags)??[]).reduce((a,l)=>[...a,{...l,selected:!!u.value.find(c=>c.id===l.id)}],[])}),b=zt(),h=L("");se(()=>{var o;return(o=n==null?void 0:n.file)==null?void 0:o.fullpath},async o=>{o&&(b.tasks.forEach(a=>a.cancel()),b.pushAction(()=>Wn(o)).res.then(a=>{h.value=a}))},{immediate:!0});const m=o=>{o&&b.pushAction(()=>Kn(n.file.fullpath)).res.then(a=>{u.value=a})},y=L(),w=L(),p=vi("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});qo(i,y,w,{...p.value,onDrag:Be(function(o,a){p.value={...p.value,left:o,top:a}},300),onResize:Be(function(o,a){p.value={...p.value,width:o,height:a}},300)});function f(o){return o.parentNode}return(o,a)=>{const l=qe,c=qn,g=Zn,P=Pe;return D(),q("div",{ref_key:"el",ref:i,class:Je(["full-screen-menu",{"unset-size":!T(p).expanded}]),onWheelCapture:a[4]||(a[4]=mi(()=>{},["stop"]))},[te("div",Xo,[te("div",Ko,[te("div",{ref_key:"dragHandle",ref:w,class:"icon",style:{cursor:"grab"}},[v(T(Ua))],512),te("div",{class:"icon",style:{cursor:"pointer"},onClick:a[0]||(a[0]=d=>T(p).expanded=!T(p).expanded)},[T(p).expanded?(D(),J(T(Ya),{key:0})):(D(),J(T(Xa),{key:1}))]),el,T(p).expanded?(D(),q("div",tl,[v(P,{trigger:["hover"],"get-popup-container":f,onVisibleChange:m},{overlay:_(()=>[v(g,{onClick:a[1]||(a[1]=d=>e("contextMenuClick",d,t.file,t.idx))},{default:_(()=>[(D(!0),q(ge,null,Nt(T(s),d=>(D(),J(c,{key:`toggle-tag-${d.id}`},{default:_(()=>[V(N(d.name)+" ",1),d.selected?(D(),J(T(cr),{key:0})):(D(),J(T(dr),{key:1}))]),_:2},1024))),128))]),_:1})]),default:_(()=>[v(l,null,{default:_(()=>[V(N(o.$t("toggleTag")),1)]),_:1})]),_:1}),v(P,{trigger:["hover"],"get-popup-container":f},{overlay:_(()=>[v(g,{onClick:a[2]||(a[2]=d=>e("contextMenuClick",d,t.file,t.idx))},{default:_(()=>[v(c,{key:"send2txt2img"},{default:_(()=>[V(N(o.$t("sendToTxt2img")),1)]),_:1}),v(c,{key:"send2img2img"},{default:_(()=>[V(N(o.$t("sendToImg2img")),1)]),_:1}),v(c,{key:"send2inpaint"},{default:_(()=>[V(N(o.$t("sendToInpaint")),1)]),_:1}),v(c,{key:"send2extras"},{default:_(()=>[V(N(o.$t("sendToExtraFeatures")),1)]),_:1}),v(c,{key:"send2savedDir"},{default:_(()=>[V(N(o.$t("send2savedDir")),1)]),_:1}),v(c,{key:"deleteFiles",disabled:T(Ge)(t.file)===T(r).fullscreenPreviewInitialUrl},{default:_(()=>[V(N(o.$t("deleteSelected")),1)]),_:1},8,["disabled"]),v(c,{key:"previewInNewWindow"},{default:_(()=>[V(N(o.$t("previewInNewWindow")),1)]),_:1}),v(c,{key:"download"},{default:_(()=>[V(N(o.$t("downloadDirectly")),1)]),_:1}),v(c,{key:"copyPreviewUrl"},{default:_(()=>[V(N(o.$t("copySourceFilePreviewLink")),1)]),_:1})]),_:1})]),default:_(()=>[v(l,null,{default:_(()=>[V(N(T(B)("openContextMenu")),1)]),_:1})]),_:1}),v(l,{onClick:a[3]||(a[3]=d=>T(_t)(h.value))},{default:_(()=>[V(N(o.$t("copyPrompt")),1)]),_:1})])):be("",!0)]),T(p).expanded?(D(),q("div",nl,N(h.value),1)):be("",!0)]),T(p).expanded?(D(),q("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:y},[v(T(Da))],512)):be("",!0)],34)}}});const wl=Xn(rl,[["__scopeId","data-v-bbddd009"]]);export{Pe as D,dl as L,fl as R,cl as S,ml as a,gl as b,pl as c,hl as d,vl as e,yl as f,mt as g,so as h,yr as i,bl as j,wl as k,Ct as l,ul as s,Ge as t,we as u};