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

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