sd-webui-infinite-image-bro.../vue/dist/assets/FileItem-ba9b9206.js

4 lines
96 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 V,h as S,d as q,s as Ge,u as rt,a as C,bD as Ai,a1 as Ct,c as oe,G as z,an as tn,b as nn,aZ as wt,_ as L,bE as ki,a5 as at,B as jt,bF as Pi,i as rn,aS as Rn,a8 as an,r as O,z as xi,y as Je,ad as re,x as ye,aH as Ke,aG as mt,A as Ye,bG as Ii,bH as Ei,aK as Fn,e as Qn,f as Vt,v as jn,T as Vn,H as Un,bI as Oi,bJ as Ni,aY as gt,bK as Ti,J as Ve,bb as $i,b4 as Hn,bL as Wn,W as we,bM as Ie,bN as Gn,a6 as zt,bO as zi,D as Se,C as Jn,bP as Bi,bQ as Ue,bd as Mi,bR as _i,bx as ht,bS as Di,bT as on,bU as Li,bc as Kn,m as Ri,l as Fi,n as Qi,o as Yn,bV as ln,bW as ji,bX as Vi,bY as Ui,b8 as Hi,bZ as Wi,b_ as Gi,b$ as pt,c0 as Ji,aT as D,c1 as Ut,c2 as Ki,F as Zn,c3 as qn,at as it,$ as Yi,c4 as Zi,b0 as qi,c5 as Xi,c6 as fe,c7 as ie,c8 as sn,c9 as er,aU as tr,aV as kt,ca as nr,cb as ir,cc as un,cd as rr,ce as ar,cf as cn,cg as or,aD as lr,aE as sr,K as H,O as pe,ch as ur,ci as cr,cj as fr,b1 as dr,ck as vr,L as de,cl as lt,Q as nt,N as Z,X as mr,cm as fn,cn as gr,co as hr,cp as pr,Y as yt,R as se,U as K,M as ue,V as ge,ak as yr,a7 as br,a0 as Cr}from"./index-6eb64f08.js";import{l as Ht,c as wr}from"./index-8b6f769c.js";import{u as Sr}from"./useTaskListStore-db67ad53.js";import{c as Xn,u as Ar}from"./copy2clipboard-b3ef2142.js";import{_ as kr,a as Pr,c as xr,t as Pt}from"./styleChecker-572b0d40.js";import{E as Ir}from"./EyeOutlined-652d774a.js";import{b as Er,B as He,c as ei}from"./button-3e5cfde3.js";var ti=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:V.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}}},xt=Er(),Or=function(){return S(S({},ti()),{},{type:xt.type,size:String,htmlType:xt.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:V.any,title:String,loading:xt.loading,onClick:{type:Function}})},Nr=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Tr=He.Group;const bt=q({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Ge(Or(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,t){var i=t.slots,r=t.attrs,o=t.emit,l=function(w){o("update:visible",w),o("visibleChange",w)},u=rt("dropdown-button",e),c=u.prefixCls,b=u.direction,h=u.getPopupContainer;return function(){var m,w,f=S(S({},e),r),a=f.type,s=a===void 0?"default":a,d=f.disabled,g=f.loading,y=f.htmlType,p=f.class,v=p===void 0?"":p,A=f.overlay,I=A===void 0?(m=i.overlay)===null||m===void 0?void 0:m.call(i):A,k=f.trigger,P=f.align,E=f.visible;f.onVisibleChange;var x=f.placement,N=x===void 0?b.value==="rtl"?"bottomLeft":"bottomRight":x,T=f.href,$=f.title,_=f.icon,j=_===void 0?((w=i.icon)===null||w===void 0?void 0:w.call(i))||C(Ai,null,null):_,R=f.mouseEnterDelay,G=f.mouseLeaveDelay,X=f.overlayClassName,ee=f.overlayStyle,te=f.destroyPopupOnHide,B=f.onClick;f["onUpdate:visible"];var Q=Ct(f,Nr),J={align:P,disabled:d,trigger:d?[]:k,placement:N,getPopupContainer:h.value,onVisibleChange:l,mouseEnterDelay:R,mouseLeaveDelay:G,visible:E,overlayClassName:X,overlayStyle:ee,destroyPopupOnHide:te},Y=C(He,{type:s,disabled:d,loading:g,onClick:B,htmlType:y,href:T,title:$},{default:i.default}),U=C(He,{type:s,icon:j},null);return C(Tr,S(S({},Q),{},{class:oe(c.value,v)}),{default:function(){return[i.leftButton?i.leftButton({button:Y}):Y,C(Re,J,{default:function(){return[i.rightButton?i.rightButton({button:U}):U]},overlay:function(){return I}})]}})}}});var ni=q({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Ge(ti(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,t){var i=t.slots,r=t.attrs,o=t.emit,l=rt("dropdown",e),u=l.prefixCls,c=l.rootPrefixCls,b=l.direction,h=l.getPopupContainer,m=z(function(){var s=e.placement,d=s===void 0?"":s,g=e.transitionName;return g!==void 0?g:d.indexOf("top")>=0?"".concat(c.value,"-slide-down"):"".concat(c.value,"-slide-up")}),w=function(){var d,g,y,p=e.overlay||((d=i.overlay)===null||d===void 0?void 0:d.call(i)),v=Array.isArray(p)?p[0]:p;if(!v)return null;var A=v.props||{};tn(!A.mode||A.mode==="vertical","Dropdown",'mode="'.concat(A.mode,`" is not supported for Dropdown's Menu.`));var I=A.selectable,k=I===void 0?!1:I,P=A.expandIcon,E=P===void 0?(g=v.children)===null||g===void 0||(y=g.expandIcon)===null||y===void 0?void 0:y.call(g):P,x=typeof E<"u"&&rn(E)?E:C("span",{class:"".concat(u.value,"-menu-submenu-arrow")},[C(Rn,{class:"".concat(u.value,"-menu-submenu-arrow-icon")},null)]),N=rn(v)?nn(v,{mode:"vertical",selectable:k,expandIcon:function(){return x}}):v;return N},f=z(function(){var s=e.placement;if(!s)return b.value==="rtl"?"bottomRight":"bottomLeft";if(s.includes("Center")){var d=s.slice(0,s.indexOf("Center"));return tn(!s.includes("Center"),"Dropdown","You are using '".concat(s,"' placement in Dropdown, which is deprecated. Try to use '").concat(d,"' instead.")),d}return s}),a=function(d){o("update:visible",d),o("visibleChange",d)};return function(){var s,d,g=e.arrow,y=e.trigger,p=e.disabled,v=e.overlayClassName,A=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],I=nn(A,wt({class:oe(A==null||(d=A.props)===null||d===void 0?void 0:d.class,L({},"".concat(u.value,"-rtl"),b.value==="rtl"),"".concat(u.value,"-trigger"))},p?{disabled:p}:{})),k=oe(v,L({},"".concat(u.value,"-rtl"),b.value==="rtl")),P=p?[]:y,E;P&&P.indexOf("contextmenu")!==-1&&(E=!0);var x=ki({arrowPointAtCenter:at(g)==="object"&&g.pointAtCenter,autoAdjustOverflow:!0}),N=jt(S(S(S({},e),r),{},{builtinPlacements:x,overlayClassName:k,arrow:g,alignPoint:E,prefixCls:u.value,getPopupContainer:h.value,transitionName:m.value,trigger:P,onVisibleChange:a,placement:f.value}),["overlay","onUpdate:visible"]);return C(Pi,N,{default:function(){return[I]},overlay:w})}}});ni.Button=bt;const Re=ni;Re.Button=bt;Re.install=function(n){return n.component(Re.name,Re),n.component(bt.name,bt),n};var It;function ii(n){if(typeof document>"u")return 0;if(n||It===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div"),i=t.style;i.position="absolute",i.top="0",i.left="0",i.pointerEvents="none",i.visibility="hidden",i.width="200px",i.height="150px",i.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var r=e.offsetWidth;t.style.overflow="scroll";var o=e.offsetWidth;r===o&&(o=t.clientWidth),document.body.removeChild(t),It=r-o}return It}function We(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.element,i=t===void 0?document.body:t,r={},o=Object.keys(n);return o.forEach(function(l){r[l]=i.style[l]}),o.forEach(function(l){i.style[l]=n[l]}),r}function $r(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Et={};const dn=function(n){if(!(!$r()&&!n)){var e="ant-scrolling-effect",t=new RegExp("".concat(e),"g"),i=document.body.className;if(n){if(!t.test(i))return;We(Et),Et={},document.body.className=i.replace(t,"").trim();return}var r=ii();if(r&&(Et=We({position:"relative",width:"calc(100% - ".concat(r,"px)")}),!t.test(i))){var o="".concat(i," ").concat(e);document.body.className=o.trim()}}};var ce=[],ri="ant-scrolling-effect",Ot=new RegExp("".concat(ri),"g"),zr=0,Nt=new Map,Br=kr(function n(e){var t=this;Pr(this,n),L(this,"getContainer",function(){var i;return(i=t.options)===null||i===void 0?void 0:i.container}),L(this,"reLock",function(i){var r=ce.find(function(o){var l=o.target;return l===t.lockTarget});r&&t.unLock(),t.options=i,r&&(r.options=i,t.lock())}),L(this,"lock",function(){var i;if(!ce.some(function(c){var b=c.target;return b===t.lockTarget})){if(ce.some(function(c){var b,h=c.options;return(h==null?void 0:h.container)===((b=t.options)===null||b===void 0?void 0:b.container)})){ce=[].concat(an(ce),[{target:t.lockTarget,options:t.options}]);return}var r=0,o=((i=t.options)===null||i===void 0?void 0:i.container)||document.body;(o===document.body&&window.innerWidth-document.documentElement.clientWidth>0||o.scrollHeight>o.clientHeight)&&(r=ii());var l=o.className;if(ce.filter(function(c){var b,h=c.options;return(h==null?void 0:h.container)===((b=t.options)===null||b===void 0?void 0:b.container)}).length===0&&Nt.set(o,We({width:r!==0?"calc(100% - ".concat(r,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:o})),!Ot.test(l)){var u="".concat(l," ").concat(ri);o.className=u.trim()}ce=[].concat(an(ce),[{target:t.lockTarget,options:t.options}])}}),L(this,"unLock",function(){var i,r=ce.find(function(u){var c=u.target;return c===t.lockTarget});if(ce=ce.filter(function(u){var c=u.target;return c!==t.lockTarget}),!(!r||ce.some(function(u){var c,b=u.options;return(b==null?void 0:b.container)===((c=r.options)===null||c===void 0?void 0:c.container)}))){var o=((i=t.options)===null||i===void 0?void 0:i.container)||document.body,l=o.className;Ot.test(l)&&(We(Nt.get(o),{element:o}),Nt.delete(o),o.className=o.className.replace(Ot,"").trim())}}),this.lockTarget=zr++,this.options=e}),he=0,et=Ei(),st={},De=function(e){if(!et)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(at(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body};const Mr=q({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:V.any,visible:{type:Boolean,default:void 0}},setup:function(e,t){var i=t.slots,r=O(),o=O(),l=O(),u=new Br({container:De(e.getContainer)}),c=function(){var s,d;(s=r.value)===null||s===void 0||(d=s.parentNode)===null||d===void 0||d.removeChild(r.value)},b=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(s||r.value&&!r.value.parentNode){var d=De(e.getContainer);return d?(d.appendChild(r.value),!0):!1}return!0},h=function(){return et?(r.value||(r.value=document.createElement("div"),b(!0)),m(),r.value):null},m=function(){var s=e.wrapperClassName;r.value&&s&&s!==r.value.className&&(r.value.className=s)};xi(function(){m(),b()});var w=function(){he===1&&!Object.keys(st).length?(dn(),st=We({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):he||(We(st),st={},dn(!0))},f=Fn();return Je(function(){var a=!1;re([function(){return e.visible},function(){return e.getContainer}],function(s,d){var g=ye(s,2),y=g[0],p=g[1],v=ye(d,2),A=v[0],I=v[1];if(et&&De(e.getContainer)===document.body&&(y&&!A?he+=1:a&&(he-=1)),a){var k=typeof p=="function"&&typeof I=="function";(k?p.toString()!==I.toString():p!==I)&&c(),y&&y!==A&&et&&De(p)!==u.getContainer()&&u.reLock({container:De(p)})}a=!0},{immediate:!0,flush:"post"}),Ke(function(){b()||(l.value=mt(function(){f.update()}))})}),Ye(function(){var a=e.visible,s=e.getContainer;et&&De(s)===document.body&&(he=a&&he?he-1:he),c(),mt.cancel(l.value)}),function(){var a=e.forceRender,s=e.visible,d=null,g={getOpenCount:function(){return he},getContainer:h,switchScrollingEffect:w,scrollLocker:u};return(a||s||o.value)&&(d=C(Ii,{getContainer:h,ref:o},{default:function(){var p;return(p=i.default)===null||p===void 0?void 0:p.call(i,g)}})),d}}});function _r(){var n=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:e}}function ai(n){var e=n.getBoundingClientRect(),t=document.documentElement;return{left:e.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||t.scrollTop)-(t.clientTop||document.body.clientTop||0)}}function St(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:V.shape({x:Number,y:Number}).loose,title:V.any,footer:V.any,transitionName:String,maskTransitionName:String,animation:V.any,maskAnimation:V.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:V.any,maskProps:V.any,wrapProps:V.any,getContainer:V.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:V.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function vn(n,e,t){var i=e;return!i&&t&&(i="".concat(n,"-").concat(t)),i}var mn=-1;function Dr(){return mn+=1,mn}function gn(n,e){var t=n["page".concat(e?"Y":"X","Offset")],i="scroll".concat(e?"Top":"Left");if(typeof t!="number"){var r=n.document;t=r.documentElement[i],typeof t!="number"&&(t=r.body[i])}return t}function Lr(n){var e=n.getBoundingClientRect(),t={left:e.left,top:e.top},i=n.ownerDocument,r=i.defaultView||i.parentWindow;return t.left+=gn(r),t.top+=gn(r,!0),t}var hn={width:0,height:0,overflow:"hidden",outline:"none"};const Rr=q({compatConfig:{MODE:3},name:"Content",inheritAttrs:!1,props:S(S({},St()),{},{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup:function(e,t){var i=t.expose,r=t.slots,o=t.attrs,l=O(),u=O(),c=O();i({focus:function(){var a;(a=l.value)===null||a===void 0||a.focus()},changeActive:function(a){var s=document,d=s.activeElement;a&&d===u.value?l.value.focus():!a&&d===l.value&&u.value.focus()}});var b=O(),h=z(function(){var f=e.width,a=e.height,s={};return f!==void 0&&(s.width=typeof f=="number"?"".concat(f,"px"):f),a!==void 0&&(s.height=typeof a=="number"?"".concat(a,"px"):a),b.value&&(s.transformOrigin=b.value),s}),m=function(){Ke(function(){if(c.value){var a=Lr(c.value);b.value=e.mousePosition?"".concat(e.mousePosition.x-a.left,"px ").concat(e.mousePosition.y-a.top,"px"):""}})},w=function(a){e.onVisibleChanged(a)};return function(){var f,a,s,d,g=e.prefixCls,y=e.footer,p=y===void 0?(f=r.footer)===null||f===void 0?void 0:f.call(r):y,v=e.title,A=v===void 0?(a=r.title)===null||a===void 0?void 0:a.call(r):v,I=e.ariaId,k=e.closable,P=e.closeIcon,E=P===void 0?(s=r.closeIcon)===null||s===void 0?void 0:s.call(r):P,x=e.onClose,N=e.bodyStyle,T=e.bodyProps,$=e.onMousedown,_=e.onMouseup,j=e.visible,R=e.modalRender,G=R===void 0?r.modalRender:R,X=e.destroyOnClose,ee=e.motionName,te;p&&(te=C("div",{class:"".concat(g,"-footer")},[p]));var B;A&&(B=C("div",{class:"".concat(g,"-header")},[C("div",{class:"".concat(g,"-title"),id:I},[A])]));var Q;k&&(Q=C("button",{type:"button",onClick:x,"aria-label":"Close",class:"".concat(g,"-close")},[E||C("span",{class:"".concat(g,"-close-x")},null)]));var J=C("div",{class:"".concat(g,"-content")},[Q,B,C("div",S({class:"".concat(g,"-body"),style:N},T),[(d=r.default)===null||d===void 0?void 0:d.call(r)]),te]),Y=Qn(ee);return C(Vn,S(S({},Y),{},{onBeforeEnter:m,onAfterEnter:function(){return w(!0)},onAfterLeave:function(){return w(!1)}}),{default:function(){return[j||!X?Vt(C("div",S(S({},o),{},{ref:c,key:"dialog-element",role:"document",style:[h.value,o.style],class:[g,o.class],onMousedown:$,onMouseup:_}),[C("div",{tabindex:0,ref:l,style:hn,"aria-hidden":"true"},null),G?G({originVNode:J}):J,C("div",{tabindex:0,ref:u,style:hn,"aria-hidden":"true"},null)]),[[jn,j]]):null]}})}}});function oi(n){if(n==null)throw new TypeError("Cannot destructure "+n)}const Fr=q({compatConfig:{MODE:3},name:"Mask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup:function(e,t){return oi(t),function(){var i=e.prefixCls,r=e.visible,o=e.maskProps,l=e.motionName,u=Qn(l);return C(Vn,u,{default:function(){return[Vt(C("div",S({class:"".concat(i,"-mask")},o),null),[[jn,r]])]}})}}}),pn=q({compatConfig:{MODE:3},name:"Dialog",inheritAttrs:!1,props:Ge(S(S({},St()),{},{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:function(){return null},focusTriggerAfterClose:!0}),setup:function(e,t){var i=t.attrs,r=t.slots,o=O(),l=O(),u=O(),c=O(e.visible),b=O("vcDialogTitle".concat(Dr())),h=function(p){if(p){if(!Ni(l.value,document.activeElement)){var v;o.value=document.activeElement,(v=u.value)===null||v===void 0||v.focus()}}else{var A=c.value;if(c.value=!1,e.mask&&o.value&&e.focusTriggerAfterClose){try{o.value.focus({preventScroll:!0})}catch{}o.value=null}if(A){var I;(I=e.afterClose)===null||I===void 0||I.call(e)}}},m=function(p){var v;(v=e.onClose)===null||v===void 0||v.call(e,p)},w=O(!1),f=O(),a=function(){clearTimeout(f.value),w.value=!0},s=function(){f.value=setTimeout(function(){w.value=!1})},d=function(p){if(!e.maskClosable)return null;w.value?w.value=!1:l.value===p.target&&m(p)},g=function(p){if(e.keyboard&&p.keyCode===gt.ESC){p.stopPropagation(),m(p);return}e.visible&&p.keyCode===gt.TAB&&u.value.changeActive(!p.shiftKey)};return re(function(){return e.visible},function(){e.visible&&(c.value=!0)},{flush:"post"}),Ye(function(){var y;clearTimeout(f.value),(y=e.scrollLocker)===null||y===void 0||y.unLock()}),Un(function(){var y;if((y=e.scrollLocker)===null||y===void 0||y.unLock(),c.value){var p;(p=e.scrollLocker)===null||p===void 0||p.lock()}}),function(){var y=e.prefixCls,p=e.mask,v=e.visible,A=e.maskTransitionName,I=e.maskAnimation,k=e.zIndex,P=e.wrapClassName,E=e.rootClassName,x=e.wrapStyle,N=e.closable,T=e.maskProps,$=e.maskStyle,_=e.transitionName,j=e.animation,R=e.wrapProps,G=e.title,X=G===void 0?r.title:G,ee=i.style,te=i.class;return C("div",S({class:["".concat(y,"-root"),E]},Oi(e,{data:!0})),[C(Fr,{prefixCls:y,visible:p&&v,motionName:vn(y,A,I),style:S({zIndex:k},$),maskProps:T},null),C("div",S({tabIndex:-1,onKeydown:g,class:oe("".concat(y,"-wrap"),P),ref:l,onClick:d,role:"dialog","aria-labelledby":X?b.value:null,style:S(S({zIndex:k},x),{},{display:c.value?null:"none"})},R),[C(Rr,S(S({},jt(e,["scrollLocker"])),{},{style:ee,class:te,onMousedown:a,onMouseup:s,ref:u,closable:N,ariaId:b.value,prefixCls:y,visible:v,onClose:m,onVisibleChanged:h,motionName:vn(y,_,j)}),r)])])}}});var Qr=St(),jr=q({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:Ge(Qr,{visible:!1}),setup:function(e,t){var i=t.attrs,r=t.slots,o=O(e.visible);return Ti({},{inTriggerContext:!1}),re(function(){return e.visible},function(){e.visible&&(o.value=!0)},{flush:"post"}),function(){var l=e.visible,u=e.getContainer,c=e.forceRender,b=e.destroyOnClose,h=b===void 0?!1:b,m=e.afterClose,w=S(S(S({},e),i),{},{ref:"_component",key:"dialog"});return u===!1?C(pn,S(S({},w),{},{getOpenCount:function(){return 2}}),r):!c&&h&&!o.value?null:C(Mr,{visible:l,forceRender:c,getContainer:u},{default:function(a){return w=S(S(S({},w),a),{},{afterClose:function(){m==null||m(),o.value=!1}}),C(pn,w,r)}})}}});const li=jr;function Vr(n){var e=O(null),t=Ve(S({},n)),i=O([]),r=function(l){e.value===null&&(i.value=[],e.value=mt(function(){var u;i.value.forEach(function(c){u=S(S({},u),c)}),wt(t,u),e.value=null})),i.value.push(l)};return Je(function(){e.value&&mt.cancel(e.value)}),[t,r]}function yn(n,e,t,i){var r=e+t,o=(t-i)/2;if(t>i){if(e>0)return L({},n,o);if(e<0&&r<i)return L({},n,-o)}else if(e<0||r>i)return L({},n,e<0?o:-o);return{}}function Ur(n,e,t,i){var r=_r(),o=r.width,l=r.height,u=null;return n<=o&&e<=l?u={x:0,y:0}:(n>o||e>l)&&(u=S(S({},yn("x",t,n,o)),yn("y",i,e,l))),u}var bn=Symbol("previewGroupContext"),Wt={provide:function(e){$i(bn,e)},inject:function(){return Hn(bn,{isPreviewGroup:O(!1),previewUrls:z(function(){return new Map}),setPreviewUrls:function(){},current:O(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},Hr=q({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,t){var i=t.slots,r=z(function(){var P={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return at(e.preview)==="object"?fi(e.preview,P):P}),o=Ve(new Map),l=O(),u=z(function(){return r.value.visible}),c=z(function(){return r.value.getContainer}),b=function(E,x){var N,T;(N=(T=r.value).onVisibleChange)===null||N===void 0||N.call(T,E,x)},h=Wn(!!u.value,{value:u,onChange:b}),m=ye(h,2),w=m[0],f=m[1],a=O(null),s=z(function(){return u.value!==void 0}),d=z(function(){return Array.from(o.keys())}),g=z(function(){return d.value[r.value.current]}),y=z(function(){return new Map(Array.from(o).filter(function(P){var E=ye(P,2),x=E[1].canPreview;return!!x}).map(function(P){var E=ye(P,2),x=E[0],N=E[1].url;return[x,N]}))}),p=function(E,x){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;o.set(E,{url:x,canPreview:N})},v=function(E){l.value=E},A=function(E){a.value=E},I=function(E,x){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,T=function(){o.delete(E)};return o.set(E,{url:x,canPreview:N}),T},k=function(E){E==null||E.stopPropagation(),f(!1),A(null)};return re(g,function(P){v(P)},{immediate:!0,flush:"post"}),Un(function(){w.value&&s.value&&v(g.value)},{flush:"post"}),Wt.provide({isPreviewGroup:O(!0),previewUrls:y,setPreviewUrls:p,current:l,setCurrent:v,setShowPreview:f,setMousePosition:A,registerImage:I}),function(){var P=wt({},(oi(r.value),r.value));return C(we,null,[i.default&&i.default(),C(ui,S(S({},P),{},{"ria-hidden":!w.value,visible:w.value,prefixCls:e.previewPrefixCls,onClose:k,mousePosition:a.value,src:y.value.get(l.value),icons:e.icons,getContainer:c.value}),null)])}}});const si=Hr;var xe={x:0,y:0},Wr=S(S({},St()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),Gr=q({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Wr,emits:["close","afterClose"],setup:function(e,t){var i=t.emit,r=t.attrs,o=Ve(e.icons),l=o.rotateLeft,u=o.rotateRight,c=o.zoomIn,b=o.zoomOut,h=o.close,m=o.left,w=o.right,f=O(1),a=O(0),s=Vr(xe),d=ye(s,2),g=d[0],y=d[1],p=function(){return i("close")},v=O(),A=Ve({originX:0,originY:0,deltaX:0,deltaY:0}),I=O(!1),k=Wt.inject(),P=k.previewUrls,E=k.current,x=k.isPreviewGroup,N=k.setCurrent,T=z(function(){return P.value.size}),$=z(function(){return Array.from(P.value.keys())}),_=z(function(){return $.value.indexOf(E.value)}),j=z(function(){return x.value?P.value.get(E.value):e.src}),R=z(function(){return x.value&&T.value>1}),G=O({wheelDirection:0}),X=function(){f.value=1,a.value=0,y(xe),i("afterClose")},ee=function(){f.value++,y(xe)},te=function(){f.value>1&&f.value--,y(xe)},B=function(){a.value+=90},Q=function(){a.value-=90},J=function(M){M.preventDefault(),M.stopPropagation(),_.value>0&&N($.value[_.value-1])},Y=function(M){M.preventDefault(),M.stopPropagation(),_.value<T.value-1&&N($.value[_.value+1])},U=oe(L({},"".concat(e.prefixCls,"-moving"),I.value)),ne="".concat(e.prefixCls,"-operations-operation"),be="".concat(e.prefixCls,"-operations-icon"),Ze=[{icon:h,onClick:p,type:"close"},{icon:c,onClick:ee,type:"zoomIn"},{icon:b,onClick:te,type:"zoomOut",disabled:z(function(){return f.value===1})},{icon:u,onClick:B,type:"rotateRight"},{icon:l,onClick:Q,type:"rotateLeft"}],Ae=function(){if(e.visible&&I.value){var M=v.value.offsetWidth*f.value,le=v.value.offsetHeight*f.value,ke=ai(v.value),ve=ke.left,Pe=ke.top,Ce=a.value%180!==0;I.value=!1;var Me=Ur(Ce?le:M,Ce?M:le,ve,Pe);Me&&y(S({},Me))}},Ne=function(M){M.button===0&&(M.preventDefault(),M.stopPropagation(),A.deltaX=M.pageX-g.x,A.deltaY=M.pageY-g.y,A.originX=g.x,A.originY=g.y,I.value=!0)},Te=function(M){e.visible&&I.value&&y({x:M.pageX-A.deltaX,y:M.pageY-A.deltaY})},$e=function(M){if(e.visible){M.preventDefault();var le=M.deltaY;G.value={wheelDirection:le}}},ze=function(M){!e.visible||!R.value||(M.preventDefault(),M.keyCode===gt.LEFT?_.value>0&&N($.value[_.value-1]):M.keyCode===gt.RIGHT&&_.value<T.value-1&&N($.value[_.value+1]))},Be=function(){e.visible&&(f.value!==1&&(f.value=1),(g.x!==xe.x||g.y!==xe.y)&&y(xe))},qe=function(){};return Je(function(){re([function(){return e.visible},I],function(){qe();var F,M,le=Ie(window,"mouseup",Ae,!1),ke=Ie(window,"mousemove",Te,!1),ve=Ie(window,"wheel",$e,{passive:!1}),Pe=Ie(window,"keydown",ze,!1);try{window.top!==window.self&&(F=Ie(window.top,"mouseup",Ae,!1),M=Ie(window.top,"mousemove",Te,!1))}catch{}qe=function(){le.remove(),ke.remove(),ve.remove(),Pe.remove(),F&&F.remove(),M&&M.remove()}},{flush:"post",immediate:!0}),re([G],function(){var F=G.value.wheelDirection;F>0?te():F<0&&ee()})}),Gn(function(){qe()}),function(){var F=e.visible,M=e.prefixCls,le=e.rootClassName;return C(li,S(S({},r),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:M,onClose:p,afterClose:X,visible:F,wrapClassName:U,rootClassName:le,getContainer:e.getContainer}),{default:function(){return[C("ul",{class:"".concat(e.prefixCls,"-operations")},[Ze.map(function(ve){var Pe=ve.icon,Ce=ve.onClick,Me=ve.type,_e=ve.disabled;return C("li",{class:oe(ne,L({},"".concat(e.prefixCls,"-operations-operation-disabled"),_e&&(_e==null?void 0:_e.value))),onClick:Ce,key:Me},[zt(Pe,{class:be})])})]),C("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(g.x,"px, ").concat(g.y,"px, 0)")}},[C("img",{onMousedown:Ne,onDblclick:Be,ref:v,class:"".concat(e.prefixCls,"-img"),src:j.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(a.value,"deg)")}},null)]),R.value&&C("div",{class:oe("".concat(e.prefixCls,"-switch-left"),L({},"".concat(e.prefixCls,"-switch-left-disabled"),_.value<=0)),onClick:J},[m]),R.value&&C("div",{class:oe("".concat(e.prefixCls,"-switch-right"),L({},"".concat(e.prefixCls,"-switch-right-disabled"),_.value>=T.value-1)),onClick:Y},[w])]}})}}});const ui=Gr;var Jr=["icons","maskClassName"],ci=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:V.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},fi=function(e,t){var i=S({},e);return Object.keys(t).forEach(function(r){e[r]===void 0&&(i[r]=t[r])}),i},Kr=0,di=q({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:ci(),emits:["click","error"],setup:function(e,t){var i=t.attrs,r=t.slots,o=t.emit,l=z(function(){return e.prefixCls}),u=z(function(){return"".concat(l.value,"-preview")}),c=z(function(){var B={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return at(e.preview)==="object"?fi(e.preview,B):B}),b=z(function(){var B;return(B=c.value.src)!==null&&B!==void 0?B:e.src}),h=z(function(){return e.placeholder&&e.placeholder!==!0||r.placeholder}),m=z(function(){return c.value.visible}),w=z(function(){return c.value.getContainer}),f=z(function(){return m.value!==void 0}),a=function(Q,J){var Y,U;(Y=(U=c.value).onVisibleChange)===null||Y===void 0||Y.call(U,Q,J)},s=Wn(!!m.value,{value:m,onChange:a}),d=ye(s,2),g=d[0],y=d[1];re(g,function(B,Q){a(B,Q)});var p=O(h.value?"loading":"normal");re(function(){return e.src},function(){p.value=h.value?"loading":"normal"});var v=O(null),A=z(function(){return p.value==="error"}),I=Wt.inject(),k=I.isPreviewGroup,P=I.setCurrent,E=I.setShowPreview,x=I.setMousePosition,N=I.registerImage,T=O(Kr++),$=z(function(){return e.preview&&!A.value}),_=function(){p.value="normal"},j=function(Q){p.value="error",o("error",Q)},R=function(Q){if(!f.value){var J=ai(Q.target),Y=J.left,U=J.top;k.value?(P(T.value),x({x:Y,y:U})):v.value={x:Y,y:U}}k.value?E(!0):y(!0),o("click",Q)},G=function(){y(!1),f.value||(v.value=null)},X=O(null);re(function(){return X},function(){p.value==="loading"&&X.value.complete&&(X.value.naturalWidth||X.value.naturalHeight)&&_()});var ee=function(){};Je(function(){re([b,$],function(){if(ee(),!k.value)return function(){};ee=N(T.value,b.value,$.value),$.value||ee()},{flush:"post",immediate:!0})}),Gn(function(){ee()});var te=function(Q){return zi(Q)?Q+"px":Q};return function(){var B=e.prefixCls,Q=e.wrapperClassName,J=e.fallback,Y=e.src,U=e.placeholder,ne=e.wrapperStyle,be=e.rootClassName,Ze=i.width,Ae=i.height,Ne=i.crossorigin,Te=i.decoding,$e=i.alt,ze=i.sizes,Be=i.srcset,qe=i.usemap,F=i.class,M=i.style,le=c.value,ke=le.icons,ve=le.maskClassName,Pe=Ct(le,Jr),Ce=oe(B,Q,be,L({},"".concat(B,"-error"),A.value)),Me=A.value&&J?J:b.value,_e={crossorigin:Ne,decoding:Te,alt:$e,sizes:ze,srcset:Be,usemap:qe,class:oe("".concat(B,"-img"),L({},"".concat(B,"-img-placeholder"),U===!0),F),style:S({height:Ae},M)};return C(we,null,[C("div",{class:Ce,onClick:$.value?R:function(Si){o("click",Si)},style:S({width:te(Ze),height:te(Ae)},ne)},[C("img",S(S(S({},_e),A.value&&J?{src:J}:{onLoad:_,onError:j,src:Y}),{},{ref:X}),null),p.value==="loading"&&C("div",{"aria-hidden":"true",class:"".concat(B,"-placeholder")},[U||r.placeholder&&r.placeholder()]),r.previewMask&&$.value&&C("div",{class:["".concat(B,"-mask"),ve]},[r.previewMask()])]),!k.value&&$.value&&C(ui,S(S({},Pe),{},{"aria-hidden":!g.value,visible:g.value,prefixCls:u.value,onClose:G,mousePosition:v.value,src:Me,alt:$e,getContainer:w.value,icons:ke,rootClassName:be}),null)])}}});di.PreviewGroup=si;const Yr=di;var Zr={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 qr=Zr;function Cn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){Xr(n,r,t[r])})}return n}function Xr(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Gt=function(e,t){var i=Cn({},e,t.attrs);return C(Se,Cn({},i,{icon:qr}),null)};Gt.displayName="RotateLeftOutlined";Gt.inheritAttrs=!1;const ea=Gt;var ta={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 na=ta;function wn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){ia(n,r,t[r])})}return n}function ia(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Jt=function(e,t){var i=wn({},e,t.attrs);return C(Se,wn({},i,{icon:na}),null)};Jt.displayName="RotateRightOutlined";Jt.inheritAttrs=!1;const ra=Jt;var aa={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 oa=aa;function Sn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){la(n,r,t[r])})}return n}function la(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Kt=function(e,t){var i=Sn({},e,t.attrs);return C(Se,Sn({},i,{icon:oa}),null)};Kt.displayName="ZoomInOutlined";Kt.inheritAttrs=!1;const sa=Kt;var ua={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 ca=ua;function An(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){fa(n,r,t[r])})}return n}function fa(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Yt=function(e,t){var i=An({},e,t.attrs);return C(Se,An({},i,{icon:ca}),null)};Yt.displayName="ZoomOutOutlined";Yt.inheritAttrs=!1;const da=Yt;var vi={rotateLeft:C(ea,null,null),rotateRight:C(ra,null,null),zoomIn:C(sa,null,null),zoomOut:C(da,null,null),close:C(Jn,null,null),left:C(Bi,null,null),right:C(Rn,null,null)},va=q({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String},setup:function(e,t){var i=t.attrs,r=t.slots,o=rt("image",e),l=o.getPrefixCls,u=z(function(){return l("image-preview",e.previewPrefixCls)});return function(){return C(si,S(S({},S(S({},i),e)),{},{icons:vi,previewPrefixCls:u.value}),r)}}});const ma=va;var Ee=q({name:"AImage",inheritAttrs:!1,props:ci(),setup:function(e,t){var i=t.slots,r=t.attrs,o=rt("image",e),l=o.prefixCls,u=o.rootPrefixCls,c=o.configProvider,b=z(function(){var h=e.preview;if(h===!1)return h;var m=at(h)==="object"?h:{};return S(S({icons:vi},m),{},{transitionName:Ue(u.value,"zoom",m.transitionName),maskTransitionName:Ue(u.value,"fade",m.maskTransitionName)})});return function(){var h,m=((h=c.locale)===null||h===void 0?void 0:h.Image)||Mi.Image,w=function(){return C("div",{class:"".concat(l.value,"-mask-info")},[C(Ir,null,null),m==null?void 0:m.preview])},f=e.previewMask,a=f===void 0?i.previewMask||w:f;return C(Yr,S(S({},S(S(S({},r),e),{},{prefixCls:l.value})),{},{preview:b.value}),S(S({},i),{},{previewMask:typeof a=="function"?a:null}))}}});Ee.PreviewGroup=ma;Ee.install=function(n){return n.component(Ee.name,Ee),n.component(Ee.PreviewGroup.name,Ee.PreviewGroup),n};const ga=Ee;var ha=["class","style"],pa=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:V.any,delay:Number,indicator:V.any}},ct=null;function ya(n,e){return!!n&&!!e&&!isNaN(Number(e))}function el(n){var e=n.indicator;ct=typeof e=="function"?e:function(){return C(e,null,null)}}const tl=q({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Ge(pa(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:Hn("configProvider",_i)}},data:function(){var e=this.spinning,t=this.delay,i=ya(e,t);return{sSpinning:e&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;Ke(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var t=e||this.$props,i=t.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=ht(this.originalUpdateSpinning,i))},updateSpinning:function(){var e=this.spinning,t=this.sSpinning;t!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var t="".concat(e,"-dot"),i=Di(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),on(i)?zt(i,{class:t}):ct&&on(ct())?zt(ct(),{class:t}):C("span",{class:"".concat(t," ").concat(e,"-dot-spin")},[C("i",{class:"".concat(e,"-dot-item")},null),C("i",{class:"".concat(e,"-dot-item")},null),C("i",{class:"".concat(e,"-dot-item")},null),C("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,t,i,r=this.$props,o=r.size,l=r.prefixCls,u=r.tip,c=u===void 0?(e=(t=this.$slots).tip)===null||e===void 0?void 0:e.call(t):u,b=r.wrapperClassName,h=this.$attrs,m=h.class,w=h.style,f=Ct(h,ha),a=this.configProvider,s=a.getPrefixCls,d=a.direction,g=s("spin",l),y=this.sSpinning,p=(i={},L(i,g,!0),L(i,"".concat(g,"-sm"),o==="small"),L(i,"".concat(g,"-lg"),o==="large"),L(i,"".concat(g,"-spinning"),y),L(i,"".concat(g,"-show-text"),!!c),L(i,"".concat(g,"-rtl"),d==="rtl"),L(i,m,!!m),i),v=C("div",S(S({},f),{},{style:w,class:p}),[this.renderIndicator(g),c?C("div",{class:"".concat(g,"-text")},[c]):null]),A=Li(this);if(A&&A.length){var I,k=(I={},L(I,"".concat(g,"-container"),!0),L(I,"".concat(g,"-blur"),y),I);return C("div",{class:["".concat(g,"-nested-loading"),b]},[y&&C("div",{key:"loading"},[v]),C("div",{class:k,key:"container"},[A])])}return v}});var ba=["prefixCls","visible","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"],Bt=null,Ca=function(e){Bt={x:e.pageX,y:e.pageY},setTimeout(function(){return Bt=null},100)};xr()&&Ie(document.documentElement,"click",Ca,!0);var wa=function(){return{prefixCls:String,visible:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:V.any,closable:{type:Boolean,default:void 0},closeIcon:V.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:V.any,okText:V.any,okType:String,cancelText:V.any,icon:V.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:Object,cancelButtonProps:Object,destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function}},Le=[];const ae=q({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:Ge(wa(),{width:520,transitionName:"zoom",maskTransitionName:"fade",confirmLoading:!1,visible:!1,okType:"primary"}),setup:function(e,t){var i=t.emit,r=t.slots,o=t.attrs,l=Kn("Modal"),u=ye(l,1),c=u[0],b=rt("modal",e),h=b.prefixCls,m=b.rootPrefixCls,w=b.direction,f=b.getPopupContainer,a=function(y){i("update:visible",!1),i("cancel",y),i("change",!1)},s=function(y){i("ok",y)},d=function(){var y,p,v=e.okText,A=v===void 0?(y=r.okText)===null||y===void 0?void 0:y.call(r):v,I=e.okType,k=e.cancelText,P=k===void 0?(p=r.cancelText)===null||p===void 0?void 0:p.call(r):k,E=e.confirmLoading;return C(we,null,[C(He,S({onClick:a},e.cancelButtonProps),{default:function(){return[P||c.value.cancelText]}}),C(He,S(S({},ei(I)),{},{loading:E,onClick:s},e.okButtonProps),{default:function(){return[A||c.value.okText]}})])};return function(){var g,y;e.prefixCls;var p=e.visible,v=e.wrapClassName,A=e.centered,I=e.getContainer,k=e.closeIcon,P=k===void 0?(g=r.closeIcon)===null||g===void 0?void 0:g.call(r):k,E=e.focusTriggerAfterClose,x=E===void 0?!0:E,N=Ct(e,ba),T=oe(v,(y={},L(y,"".concat(h.value,"-centered"),!!A),L(y,"".concat(h.value,"-wrap-rtl"),w.value==="rtl"),y));return C(li,S(S(S({},N),o),{},{getContainer:I||f.value,prefixCls:h.value,wrapClassName:T,visible:p,mousePosition:Bt,onClose:a,focusTriggerAfterClose:x,transitionName:Ue(m.value,"zoom",e.transitionName),maskTransitionName:Ue(m.value,"fade",e.maskTransitionName)}),S(S({},r),{},{footer:r.footer||d,closeIcon:function(){return C("span",{class:"".concat(h.value,"-close-x")},[P||C(Jn,{class:"".concat(h.value,"-close-icon")},null)])}}))}}});var Sa=function(){var e=O(!1);return Ye(function(){e.value=!0}),e};const Aa=Sa;var ka={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Object,emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function kn(n){return!!(n&&n.then)}const Pn=q({compatConfig:{MODE:3},name:"ActionButton",props:ka,setup:function(e,t){var i=t.slots,r=O(!1),o=O(),l=O(!1),u,c=Aa();Je(function(){e.autofocus&&(u=setTimeout(function(){var m;return(m=o.value.$el)===null||m===void 0?void 0:m.focus()}))}),Ye(function(){clearTimeout(u)});var b=function(w){var f=e.close;kn(w)&&(l.value=!0,w.then(function(){c.value||(l.value=!1),f.apply(void 0,arguments),r.value=!1},function(a){console.error(a),c.value||(l.value=!1),r.value=!1}))},h=function(w){var f=e.actionFn,a=e.close,s=a===void 0?function(){}:a;if(!r.value){if(r.value=!0,!f){s();return}var d;if(e.emitEvent){if(d=f(w),e.quitOnNullishReturnValue&&!kn(d)){r.value=!1,s(w);return}}else if(f.length)d=f(s),r.value=!1;else if(d=f(),!d){s();return}b(d)}};return function(){var m=e.type,w=e.prefixCls,f=e.buttonProps;return C(He,S(S(S({},ei(m)),{},{onClick:h,loading:l.value,prefixCls:w},f),{},{ref:o}),i)}}});function Xe(n){return typeof n=="function"?n():n}const Pa=q({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,t){var i=t.attrs,r=Kn("Modal"),o=ye(r,1),l=o[0];return function(){var u=e.icon,c=e.onCancel,b=e.onOk,h=e.close,m=e.closable,w=m===void 0?!1:m,f=e.zIndex,a=e.afterClose,s=e.visible,d=e.keyboard,g=e.centered,y=e.getContainer,p=e.maskStyle,v=e.okButtonProps,A=e.cancelButtonProps,I=e.okCancel,k=I===void 0?!0:I,P=e.width,E=P===void 0?416:P,x=e.mask,N=x===void 0?!0:x,T=e.maskClosable,$=T===void 0?!1:T,_=e.type,j=e.title,R=e.content,G=e.direction,X=e.closeIcon,ee=e.modalRender,te=e.focusTriggerAfterClose,B=e.rootPrefixCls,Q=e.bodyStyle,J=e.wrapClassName,Y=e.okType||"primary",U=e.prefixCls||"ant-modal",ne="".concat(U,"-confirm"),be=i.style||{},Ze=Xe(e.okText)||(k?l.value.okText:l.value.justOkText),Ae=Xe(e.cancelText)||l.value.cancelText,Ne=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",Te=oe(ne,"".concat(ne,"-").concat(_),"".concat(U,"-").concat(_),L({},"".concat(ne,"-rtl"),G==="rtl"),i.class),$e=k&&C(Pn,{actionFn:c,close:h,autofocus:Ne==="cancel",buttonProps:A,prefixCls:"".concat(B,"-btn")},{default:function(){return[Ae]}});return C(ae,{prefixCls:U,class:Te,wrapClassName:oe(L({},"".concat(ne,"-centered"),!!g),J),onCancel:function(Be){return h({triggerCancel:!0},Be)},visible:s,title:"",footer:"",transitionName:Ue(B,"zoom",e.transitionName),maskTransitionName:Ue(B,"fade",e.maskTransitionName),mask:N,maskClosable:$,maskStyle:p,style:be,bodyStyle:Q,width:E,zIndex:f,afterClose:a,keyboard:d,centered:g,getContainer:y,closable:w,closeIcon:X,modalRender:ee,focusTriggerAfterClose:te},{default:function(){return[C("div",{class:"".concat(ne,"-body-wrapper")},[C("div",{class:"".concat(ne,"-body")},[Xe(u),j===void 0?null:C("span",{class:"".concat(ne,"-title")},[Xe(j)]),C("div",{class:"".concat(ne,"-content")},[Xe(R)])]),C("div",{class:"".concat(ne,"-btns")},[$e,C(Pn,{type:Y,actionFn:b,close:h,autofocus:Ne==="ok",buttonProps:v,prefixCls:"".concat(B,"-btn")},{default:function(){return[Ze]}})])])]}})}}});var xa=function(e){var t=document.createDocumentFragment(),i=S(S({},jt(e,["parentContext","appContext"])),{},{close:l,visible:!0}),r=null;function o(){r&&(ln(null,t),r.component.update(),r=null);for(var h=arguments.length,m=new Array(h),w=0;w<h;w++)m[w]=arguments[w];var f=m.some(function(d){return d&&d.triggerCancel});e.onCancel&&f&&e.onCancel.apply(e,m);for(var a=0;a<Le.length;a++){var s=Le[a];if(s===l){Le.splice(a,1);break}}}function l(){for(var h=this,m=arguments.length,w=new Array(m),f=0;f<m;f++)w[f]=arguments[f];i=S(S({},i),{},{visible:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),o.apply(h,w)}}),u(i)}function u(h){typeof h=="function"?i=h(i):i=S(S({},i),h),r&&(wt(r.component.props,i),r.component.update())}var c=function(m){var w=Vi,f=w.prefixCls,a=m.prefixCls||"".concat(f,"-modal");return C(ji,S(S({},w),{},{notUpdateGlobalConfig:!0,prefixCls:f}),{default:function(){return[C(Pa,S(S({},m),{},{rootPrefixCls:f,prefixCls:a}),null)]}})};function b(h){var m=C(c,S({},h));return m.appContext=e.parentContext||e.appContext||m.appContext,ln(m,t),m}return r=b(i),Le.push(l),{destroy:l,update:u}};const ot=xa;function Ia(n){return S(S({icon:function(){return C(Yn,null,null)},okCancel:!1},n),{},{type:"warning"})}function Ea(n){return S(S({icon:function(){return C(Ri,null,null)},okCancel:!1},n),{},{type:"info"})}function Oa(n){return S(S({icon:function(){return C(Fi,null,null)},okCancel:!1},n),{},{type:"success"})}function Na(n){return S(S({icon:function(){return C(Qi,null,null)},okCancel:!1},n),{},{type:"error"})}function Ta(n){return S(S({icon:function(){return C(Yn,null,null)},okCancel:!0},n),{},{type:"confirm"})}function mi(n){return ot(Ia(n))}ae.info=function(e){return ot(Ea(e))};ae.success=function(e){return ot(Oa(e))};ae.error=function(e){return ot(Na(e))};ae.warning=mi;ae.warn=mi;ae.confirm=function(e){return ot(Ta(e))};ae.destroyAll=function(){for(;Le.length;){var e=Le.pop();e&&e()}};ae.install=function(n){return n.component(ae.name,ae),n};var $a={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 za=$a;function xn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){Ba(n,r,t[r])})}return n}function Ba(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Zt=function(e,t){var i=xn({},e,t.attrs);return C(Se,xn({},i,{icon:za}),null)};Zt.displayName="FileOutlined";Zt.inheritAttrs=!1;const In=Zt;var Ma={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 _a=Ma;function En(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){Da(n,r,t[r])})}return n}function Da(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var qt=function(e,t){var i=En({},e,t.attrs);return C(Se,En({},i,{icon:_a}),null)};qt.displayName="FolderOpenOutlined";qt.inheritAttrs=!1;const On=qt;function La(n,e,t){if(!Ui(t))return!1;var i=typeof e;return(i=="number"?Hi(t)&&Wi(e,t.length):i=="string"&&e in t)?Gi(t[e],n):!1}var Ra=Math.ceil,Fa=Math.max;function Qa(n,e,t,i){for(var r=-1,o=Fa(Ra((e-n)/(t||1)),0),l=Array(o);o--;)l[i?o:++r]=n,n+=t;return l}function ja(n){return function(e,t,i){return i&&typeof i!="number"&&La(e,t,i)&&(t=i=void 0),e=Pt(e),t===void 0?(t=e,e=0):t=Pt(t),i=i===void 0?e<t?1:-1:Pt(i),Qa(e,t,i,n)}}var Va=ja();const Ua=Va,Mt=(...n)=>{document.addEventListener(...n),Ye(()=>document.removeEventListener(...n))},Ha="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==",ut=new WeakMap,Wa=n=>({useHookShareState:()=>{const t=Fn();pt(t),ut.has(t)||(ut.set(t,Ve(n(t))),Ye(()=>{ut.delete(t)}));const i=ut.get(t);return pt(i),{state:i,toRefs(){return Ji(i)}}}});var Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};const Ja=Ga;function Nn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){Ka(n,r,t[r])})}return n}function Ka(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Xt=function(e,t){var i=Nn({},e,t.attrs);return C(Se,Nn({},i,{icon:Ja}),null)};Xt.displayName="CloudServerOutlined";Xt.inheritAttrs=!1;const Ya=Xt;var Za={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 qa=Za;function Tn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){Xa(n,r,t[r])})}return n}function Xa(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var en=function(e,t){var i=Tn({},e,t.attrs);return C(Se,Tn({},i,{icon:qa}),null)};en.displayName="DatabaseOutlined";en.inheritAttrs=!1;const eo=en;const to={"date-asc":D("sortByDateAscending"),"date-desc":D("sortByDateDescending"),"name-asc":D("sortByNameAscending"),"name-desc":D("sortByNameDescending"),"size-asc":D("sortBySizeAscending"),"size-desc":D("sortBySizeDescending")};var gi=(n=>(n.DATE_ASC="date-asc",n.DATE_DESC="date-desc",n.NAME_ASC="name-asc",n.NAME_DESC="name-desc",n.SIZE_ASC="size-asc",n.SIZE_DESC="size-desc",n))(gi||{});const no=(n,e)=>{const t=n.type==="dir"?1:0;return(e.type==="dir"?1:0)-t},$n=(n,e)=>{const t=Date.parse(n.date),i=Date.parse(e.date);return t-i},zn=(n,e)=>{const t=n.name.toLowerCase(),i=e.name.toLowerCase();return t.localeCompare(i)},Bn=(n,e)=>n.bytes-e.bytes,Fe=(n,e)=>{const t=(i,r)=>{switch(e){case"date-asc":return $n(i,r);case"date-desc":return $n(r,i);case"name-asc":return zn(i,r);case"name-desc":return zn(r,i);case"size-asc":return Bn(i,r);case"size-desc":return Bn(r,i);default:throw new Error(`Invalid sort method: ${e}`)}};return n.slice().sort((i,r)=>no(i,r)||t(i,r))},tt=async(n,e)=>(await Ut.get(`/files/${n}`,{params:{folder_path:e}})).data,io=async(n,e)=>(await Ut.post(`/delete_files/${n}`,{file_paths:e})).data,ro=async(n,e,t)=>(await Ut.post(`/move_files/${n}`,{file_paths:e,dest:t})).data;function me(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function Mn(n,e){for(var t="",i=0,r=-1,o=0,l,u=0;u<=n.length;++u){if(u<n.length)l=n.charCodeAt(u);else{if(l===47)break;l=47}if(l===47){if(!(r===u-1||o===1))if(r!==u-1&&o===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var c=t.lastIndexOf("/");if(c!==t.length-1){c===-1?(t="",i=0):(t=t.slice(0,c),i=t.length-1-t.lastIndexOf("/")),r=u,o=0;continue}}else if(t.length===2||t.length===1){t="",i=0,r=u,o=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+n.slice(r+1,u):t=n.slice(r+1,u),i=u-r-1;r=u,o=0}else l===46&&o!==-1?++o:o=-1}return t}function ao(n,e){var t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+i:t+n+i:i}var Qe={resolve:function(){for(var e="",t=!1,i,r=arguments.length-1;r>=-1&&!t;r--){var o;r>=0?o=arguments[r]:(i===void 0&&(i=process.cwd()),o=i),me(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=Mn(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(me(e),e.length===0)return".";var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=Mn(e,!t),e.length===0&&!t&&(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return me(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];me(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":Qe.normalize(e)},relative:function(e,t){if(me(e),me(t),e===t||(e=Qe.resolve(e),t=Qe.resolve(t),e===t))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var r=e.length,o=r-i,l=1;l<t.length&&t.charCodeAt(l)===47;++l);for(var u=t.length,c=u-l,b=o<c?o:c,h=-1,m=0;m<=b;++m){if(m===b){if(c>b){if(t.charCodeAt(l+m)===47)return t.slice(l+m+1);if(m===0)return t.slice(l+m)}else o>b&&(e.charCodeAt(i+m)===47?h=m:m===0&&(h=0));break}var w=e.charCodeAt(i+m),f=t.charCodeAt(l+m);if(w!==f)break;w===47&&(h=m)}var a="";for(m=i+h+1;m<=r;++m)(m===r||e.charCodeAt(m)===47)&&(a.length===0?a+="..":a+="/..");return a.length>0?a+t.slice(l+h):(l+=h,t.charCodeAt(l)===47&&++l,t.slice(l))},_makeLong:function(e){return e},dirname:function(e){if(me(e),e.length===0)return".";for(var t=e.charCodeAt(0),i=t===47,r=-1,o=!0,l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!o){r=l;break}}else o=!1;return r===-1?i?"/":".":i&&r===1?"//":e.slice(0,r)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');me(e);var i=0,r=-1,o=!0,l;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var u=t.length-1,c=-1;for(l=e.length-1;l>=0;--l){var b=e.charCodeAt(l);if(b===47){if(!o){i=l+1;break}}else c===-1&&(o=!1,c=l+1),u>=0&&(b===t.charCodeAt(u)?--u===-1&&(r=l):(u=-1,r=c))}return i===r?r=c:r===-1&&(r=e.length),e.slice(i,r)}else{for(l=e.length-1;l>=0;--l)if(e.charCodeAt(l)===47){if(!o){i=l+1;break}}else r===-1&&(o=!1,r=l+1);return r===-1?"":e.slice(i,r)}},extname:function(e){me(e);for(var t=-1,i=0,r=-1,o=!0,l=0,u=e.length-1;u>=0;--u){var c=e.charCodeAt(u);if(c===47){if(!o){i=u+1;break}continue}r===-1&&(o=!1,r=u+1),c===46?t===-1?t=u:l!==1&&(l=1):t!==-1&&(l=-1)}return t===-1||r===-1||l===0||l===1&&t===r-1&&t===i+1?"":e.slice(t,r)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return ao("/",e)},parse:function(e){me(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var i=e.charCodeAt(0),r=i===47,o;r?(t.root="/",o=1):o=0;for(var l=-1,u=0,c=-1,b=!0,h=e.length-1,m=0;h>=o;--h){if(i=e.charCodeAt(h),i===47){if(!b){u=h+1;break}continue}c===-1&&(b=!1,c=h+1),i===46?l===-1?l=h:m!==1&&(m=1):l!==-1&&(m=-1)}return l===-1||c===-1||m===0||m===1&&l===c-1&&l===u+1?c!==-1&&(u===0&&r?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(u,c)):(u===0&&r?(t.name=e.slice(1,l),t.base=e.slice(1,c)):(t.name=e.slice(u,l),t.base=e.slice(u,c)),t.ext=e.slice(l,c)),u>0?t.dir=e.slice(0,u-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Qe.posix=Qe;var je=Qe,_t={},oo={get exports(){return _t},set exports(n){_t=n}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(n,e){(function(t,i){n.exports=i})(Ki,function(){var t={};t.version="0.3.5";var i=t.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>'};t.configure=function(a){var s,d;for(s in a)d=a[s],d!==void 0&&a.hasOwnProperty(s)&&(i[s]=d);return this},t.status=null,t.set=function(a){var s=t.isStarted();a=r(a,i.minimum,1),t.status=a===1?null:a;var d=t.render(!s),g=d.querySelector(i.barSelector),y=i.speed,p=i.easing;return d.offsetWidth,u(function(v){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),c(g,l(a,y,p)),a===1?(c(d,{transition:"none",opacity:1}),d.offsetWidth,setTimeout(function(){c(d,{transition:"all "+y+"ms linear",opacity:0}),setTimeout(function(){t.remove(),v()},y)},y)):setTimeout(v,y)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var a=function(){setTimeout(function(){t.status&&(t.trickle(),a())},i.trickleSpeed)};return i.trickle&&a(),this},t.done=function(a){return!a&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(a){var s=t.status;return s?s>1?void 0:(typeof a!="number"&&(s>=0&&s<.2?a=.1:s>=.2&&s<.5?a=.04:s>=.5&&s<.8?a=.02:s>=.8&&s<.99?a=.005:a=0),s=r(s+a,0,.994),t.set(s)):t.start()},t.trickle=function(){return t.inc()},function(){var a=0,s=0;t.promise=function(d){return!d||d.state()==="resolved"?this:(s===0&&t.start(),a++,s++,d.always(function(){s--,s===0?(a=0,t.done()):t.set((a-s)/a)}),this)}}(),t.getElement=function(){var a=t.getParent();if(a){var s=Array.prototype.slice.call(a.querySelectorAll(".nprogress")).filter(function(d){return d.parentElement===a});if(s.length>0)return s[0]}return null},t.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},t.render=function(a){if(t.isRendered())return t.getElement();h(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.className="nprogress",s.innerHTML=i.template;var d=s.querySelector(i.barSelector),g=a?"-100":o(t.status||0),y=t.getParent(),p;return c(d,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),i.showSpinner||(p=s.querySelector(i.spinnerSelector),p&&f(p)),y!=document.body&&h(y,"nprogress-custom-parent"),y.appendChild(s),s},t.remove=function(){t.status=null,m(document.documentElement,"nprogress-busy"),m(t.getParent(),"nprogress-custom-parent");var a=t.getElement();a&&f(a)},t.isRendered=function(){return!!t.getElement()},t.getPositioningCSS=function(){var a=document.body.style,s="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return s+"Perspective"in a?"translate3d":s+"Transform"in a?"translate":"margin"};function r(a,s,d){return a<s?s:a>d?d:a}function o(a){return(-1+a)*100}function l(a,s,d){var g;return i.positionUsing==="translate3d"?g={transform:"translate3d("+o(a)+"%,0,0)"}:i.positionUsing==="translate"?g={transform:"translate("+o(a)+"%,0)"}:g={"margin-left":o(a)+"%"},g.transition="all "+s+"ms "+d,g}var u=function(){var a=[];function s(){var d=a.shift();d&&d(s)}return function(d){a.push(d),a.length==1&&s()}}(),c=function(){var a=["Webkit","O","Moz","ms"],s={};function d(v){return v.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(A,I){return I.toUpperCase()})}function g(v){var A=document.body.style;if(v in A)return v;for(var I=a.length,k=v.charAt(0).toUpperCase()+v.slice(1),P;I--;)if(P=a[I]+k,P in A)return P;return v}function y(v){return v=d(v),s[v]||(s[v]=g(v))}function p(v,A,I){A=y(A),v.style[A]=I}return function(v,A){var I=arguments,k,P;if(I.length==2)for(k in A)P=A[k],P!==void 0&&A.hasOwnProperty(k)&&p(v,k,P);else p(v,I[1],I[2])}}();function b(a,s){var d=typeof a=="string"?a:w(a);return d.indexOf(" "+s+" ")>=0}function h(a,s){var d=w(a),g=d+s;b(d,s)||(a.className=g.substring(1))}function m(a,s){var d=w(a),g;b(a,s)&&(g=d.replace(" "+s+" "," "),a.className=g.substring(1,g.length-1))}function w(a){return(" "+(a&&a.className||"")+" ").replace(/\s+/gi," ")}function f(a){a&&a.parentNode&&a.parentNode.removeChild(a)}return t})})(oo);const lo=_t,Tt=new Map,W=Zn(),Dt=(n,e=!1)=>`/infinite_image_browsing/file?filename=${encodeURIComponent(n.fullpath)}${e?`&disposition=${encodeURIComponent(n.name)}`:""}`,so=(n,e)=>`/infinite_image_browsing/image-thumbnail?path=${encodeURIComponent(n.fullpath)}&size=${e}`,{eventEmitter:hi,useEventListen:uo}=qn(),{useHookShareState:Oe}=Wa(()=>{const n=O({tabIdx:-1,paneIdx:-1,target:"local"}),e=z(()=>Ht(t.value)),t=O([]),i=z(()=>{var w;return t.value.map(f=>f.curr).slice((w=W.conf)!=null&&w.is_win&&n.value.target==="local"?1:0)}),r=z(()=>je.join(...i.value)),o=O(gi.DATE_DESC),l=z(()=>{var s;if(!e.value)return[];const w=((s=e.value)==null?void 0:s.files)??[],f=o.value,{walkFiles:a}=e.value;return n.value.walkMode&&a?a.map(d=>Fe(d,f)).flat():Fe(w,f)}),u=O([]),c=O(-1),b=O(!0),h=O();return{spinning:O(!1),canLoadNext:b,multiSelectedIdxs:u,previewIdx:c,basePath:i,currLocation:r,currPage:e,stack:t,sortMethod:o,sortedFiles:l,scroller:O(),stackViewEl:O(),walkModePath:h,props:n,...co(),...qn()}}),ft=Sr(),co=()=>{const n=O(""),e=nr(ft.checkBaiduyunInstalled,!1),t=O(!1),i=O("");return{installBaiduyunBin:async()=>{var l;try{i.value="",t.value=!0,await ar(),ft.baiduyunInstalled=null,await ft.checkBaiduyunInstalled()}catch(u){cn(u)&&(i.value=((l=u.response)==null?void 0:l.data.detail)??"error")}finally{t.value=!1}},installedBaiduyun:e,failedHint:i,baiduyunLoading:t,bduss:n,onLoginBtnClick:async()=>{var l,u;if(!t.value)try{t.value=!0,W.user=await or(n.value)}catch(c){console.error(c),it.error(cn(c)?((u=(l=c.response)==null?void 0:l.data)==null?void 0:u.detail)??D("unknownError"):D("unknownError"))}finally{t.value=!1}}}};function nl(n){const{scroller:e,sortedFiles:t,previewIdx:i,eventEmitter:r,canLoadNext:o}=Oe().toRefs(),l=O(!1);let u=null;const c=(w,f)=>{var a;l.value=w,u!=null&&!w&&f&&((a=e.value)==null||a.scrollToItem(u),u=null)},b=()=>{n.walkMode&&n.target==="local"&&!m("next")&&o&&(it.info(D("loadingNextFolder")),r.value.emit("loadNextDir"))};Mt("keydown",w=>{var f;if(l.value){let a=i.value;if(["ArrowDown","ArrowRight"].includes(w.key))for(a++;t.value[a]&&!fe(t.value[a].name);)a++;else if(["ArrowUp","ArrowLeft"].includes(w.key))for(a--;t.value[a]&&!fe(t.value[a].name);)a--;if(fe((f=t.value[a])==null?void 0:f.name)??""){i.value=a;const s=e.value;s&&!(a>=s.$_startIndex&&a<=s.$_endIndex)&&(u=a)}b()}});const h=w=>{var a;let f=i.value;if(w==="next")for(f++;t.value[f]&&!fe(t.value[f].name);)f++;else if(w==="prev")for(f--;t.value[f]&&!fe(t.value[f].name);)f--;if(fe((a=t.value[f])==null?void 0:a.name)??""){i.value=f;const s=e.value;s&&!(f>=s.$_startIndex&&f<=s.$_endIndex)&&(u=f)}b()},m=w=>{var a;let f=i.value;if(w==="next")for(f++;t.value[f]&&!fe(t.value[f].name);)f++;else if(w==="prev")for(f--;t.value[f]&&!fe(t.value[f].name);)f--;return fe((a=t.value[f])==null?void 0:a.name)??""};return{previewIdx:i,onPreviewVisibleChange:c,previewing:l,previewImgMove:h,canPreview:m}}function il(n){const e=O(),{installedBaiduyun:t,scroller:i,stackViewEl:r,stack:o,currPage:l,currLocation:u,basePath:c,sortMethod:b,useEventListen:h,walkModePath:m}=Oe().toRefs();re(()=>o.value.length,ht((g,y)=>{var p;g!==y&&((p=i.value)==null||p.scrollToItem(0))},300)),Je(async()=>{var g;if(!(n.target==="netdisk"&&t.value)){if(!o.value.length){const y=await tt(n.target,"/");o.value.push({files:y.files,curr:"/"})}if(e.value=new lo,e.value.configure({parent:r.value}),n.path&&n.path!=="/"){if(await s(n.path),n.walkMode){await Ke();const[y]=Fe(l.value.files,b.value).filter(p=>p.type==="dir");y&&s(y.fullpath)}}else n.target=="local"&&(g=W.conf)!=null&&g.home&&s(W.conf.home)}}),re(()=>n.target==="netdisk"&&t.value&&W.user,async(g,y)=>{if(g&&!y){const p=await tt(n.target,"/");o.value=[{files:p.files,curr:"/"}]}}),re(u,ht(g=>{const y=W.tabList[n.tabIdx].panes[n.paneIdx];y.path=g;const p=y.path.split("/").pop(),v=()=>{var A;return n.walkMode?"Walk: "+(((A=W.autoCompletedDirList.find(I=>I.dir===m.value))==null?void 0:A.zh)??p):p};y.name=ie("div",{style:"display:flex;align-items:center"},[ie(n.target==="local"?eo:Ya),ie("span",{class:"line-clamp-1",style:"max-width: 256px"},v())]),W.recent=W.recent.filter(A=>A.key!==y.key),W.recent.unshift({path:g,target:y.target,key:y.key}),W.recent.length>20&&(W.recent=W.recent.slice(0,20))},300));const w=()=>Xn(u.value),f=async g=>{var y,p;if(g.type==="dir")try{(y=e.value)==null||y.start();const v=c.value,{files:A}=await tt(n.target,je.normalize(je.join(...v,g.name)));o.value.push({files:A,curr:g.name})}finally{(p=e.value)==null||p.done()}},a=g=>{for(;g<o.value.length-1;)o.value.pop()},s=async(g,y=!0)=>{var v,A,I;const p=o.value.slice();try{/^((\w:)|\/)/.test(g)||(g=je.join(((v=W.conf)==null?void 0:v.sd_cwd)??"/",g));const k=g.split(/\\|\//);(A=W.conf)!=null&&A.is_win&&n.target==="local"?k[0]=k[0]+"/":k.shift();const P=o.value.map(E=>E.curr);for(P.shift();P[0]&&k[0]&&P[0]===k[0];)P.shift(),k.shift();for(let E=0;E<P.length;E++)o.value.pop();if(!k.length&&y)return d();for(const E of k){if(E==="")break;const x=(I=l.value)==null?void 0:I.files.find(N=>N.name===E);pt(x),await f(x)}}catch(k){throw it.error(D("moveFailedCheckPath")),console.error(g,g.split(/\\|\//),l.value),o.value=p,k}},d=async()=>{var g,y;try{if((g=e.value)==null||g.start(),m.value){await s(m.value,!1),await Yi();const[p]=Fe(l.value.files,b.value).filter(v=>v.type==="dir");p&&await s(p.fullpath,!1)}else{const{files:p}=await tt(n.target,o.value.length===1?"/":u.value);Ht(o.value).files=p}}finally{(y=e.value)==null||y.done()}};return h.value("refresh",d),{refresh:d,copyLocation:w,back:a,openNext:f,currPage:l,currLocation:u,to:s,stack:o,scroller:i}}function rl(n){const{scroller:e,sortedFiles:t,stack:i,sortMethod:r,currLocation:o,currPage:l,stackViewEl:u,canLoadNext:c}=Oe().toRefs(),{state:b}=Oe(),h=O(!1),m=O("grid"),w={line:D("detailList"),grid:D("previewGrid"),"large-size-grid":D("largePreviewGrid")},f={value:k=>k,text:k=>D("sortBy")+" "+to[k].toLocaleLowerCase()},a=272,s=64,d=a*2,{width:g}=Zi(u),y=z(()=>{const k=g.value;if(!(m.value==="line"||!k))return~~(k/(m.value==="grid"?a:d))}),p=z(()=>{const k=m.value;if(k==="line")return{first:80,second:void 0};const P=k==="grid"?a:d;return{first:P+s,second:P}}),v=O(!1),A=async()=>{var P;if(v.value||!n.walkMode||!c.value)return;try{v.value=!0;const E=i.value[i.value.length-2],x=Fe(E.files,r.value),N=x.findIndex(T=>{var $;return T.name===(($=l.value)==null?void 0:$.curr)});if(N!==-1){const T=x[N+1],$=je.normalize(je.join(o.value,"../",T.name)),_=await tt(n.target,$),j=l.value;j.curr=T.name,j.walkFiles||(j.walkFiles=[j.files]),j.walkFiles.push(_.files),console.log("curr page files length",(P=l.value)==null?void 0:P.files.length)}}catch{c.value=!1}finally{v.value=!1}const k=e.value;for(;k&&k.$_endIndex>t.value.length-10&&c.value;)await A()};b.useEventListen("loadNextDir",A);const I=ht(async()=>{const k=e.value;k&&k.$_endIndex>t.value.length-10&&n.walkMode&&A()},300);return{gridItems:y,sortedFiles:t,sortMethodConv:f,viewModeMap:w,moreActionsDropdownShow:h,viewMode:m,gridSize:a,sortMethod:r,largeGridSize:d,onScroll:I,loadNextDir:A,loadNextDirLoading:v,canLoadNext:c,itemSize:p}}function al(n){const{currLocation:e,sortedFiles:t,currPage:i,multiSelectedIdxs:r,eventEmitter:o}=Oe().toRefs(),l=()=>{r.value=[]};return Mt("click",l),Mt("blur",l),re(i,l),{onFileDragStart:(b,h)=>{const m=wr(t.value[h]);console.log("onFileDragStart set drag file ",b,h,m);const w=[m];let f=m.type==="dir";if(r.value.includes(h)){const a=r.value.map(s=>t.value[s]);w.push(...a),f=a.some(s=>s.type==="dir")}b.dataTransfer.setData("text/plain",JSON.stringify({from:n.target,includeDir:f,loc:e.value,path:Ar(w,"fullpath").map(a=>a.fullpath)}))},onDrop:async b=>{var m;const h=JSON.parse(((m=b.dataTransfer)==null?void 0:m.getData("text"))||"{}");if(console.log(h),h.from&&h.path&&typeof h.includeDir<"u"&&h.loc){const w=e.value;if(h.from===n.target&&h.loc===w)return;if(n.target==h.from){const f=ie("div",[ie("div",`${D("moveSelectedFilesTo")}${w}`),ie("ol",h.path.map(a=>a.split(/[/\\]/).pop()).map(a=>ie("li",a)))]);ae.confirm({title:D("confirm"),content:f,maskClosable:!0,async onOk(){await ro(n.target,h.path,w),hi.emit("removeFiles",[h.path,h.loc]),await o.value.emit("refresh")}})}else{const f=h.from==="local"?"upload":"download",a=f==="upload"?D("upload"):D("download"),s=ie("div",[ie("div",`${sn.value==="en"?"from":"从"} ${n.target!=="local"?D("local"):D("cloud")} `),ie("ol",h.path.map(d=>d.split(/[/\\]/).pop()).map(d=>ie("li",d))),ie("div",`${a} ${n.target==="local"?D("local"):D("cloud")} ${w}`)]);ae.confirm({title:D("confirmCreateTask",{type:a,more:sn.value==="zh"?", 这是文件夹或者包含文件夹!":",which contains folders!"}),content:s,maskClosable:!0,async onOk(){await W.createTaskRecordPaneIfNotExist(n.tabIdx),console.log("request createNewTask",{send_dirs:h.path,recv_dir:w,type:f}),ft.pendingBaiduyunTaskQueue.push({send_dirs:h.path,recv_dir:w,type:f})}})}}},multiSelectedIdxs:r}}function ol(n,{openNext:e}){const t=O(!1),i=O(""),{sortedFiles:r,previewIdx:o,multiSelectedIdxs:l,stack:u,currLocation:c,spinning:b}=Oe().toRefs();uo("removeFiles",([f,a])=>{if(a!==c.value)return;const s=Ht(u.value);s.files=s.files.filter(d=>!f.includes(d.fullpath)),s.walkFiles&&(s.walkFiles=s.walkFiles.map(d=>d.filter(g=>!f.includes(g.fullpath))))});const h=Ve(new qi);return{onFileItemClick:async(f,a)=>{const d=r.value.findIndex(g=>g.name===a.name);if(o.value=d,f.shiftKey){l.value.push(d),l.value.sort((p,v)=>p-v);const g=l.value[0],y=l.value[l.value.length-1];l.value=Ua(g,y+1),console.log(l.value),f.stopPropagation()}else f.ctrlKey||f.metaKey?(l.value.push(d),f.stopPropagation()):await e(a)},onContextMenuClick:async(f,a,s)=>{const d=Dt(a),g=c.value,y=async p=>{if(!b.value)try{b.value=!0,await ir(a.fullpath),un().querySelector("#bd_hidden_img_update_trigger").click(),pt(await rr(),"genInfoCompleted timeout"),un().querySelector(`#bd_hidden_tab_${p}`).click()}catch(v){console.error(v),it.error("发送图像失败请携带console的错误消息找开发者")}finally{b.value=!1}};switch(f.key){case"previewInNewWindow":return window.open(d);case"download":return window.open(Dt(a,!0));case"copyPreviewUrl":return Xn(location.host+d);case"send2txt2img":return y("txt2img");case"send2img2img":return y("img2img");case"send2inpaint":return y("inpaint");case"send2extras":return y("extras");case"openWithWalkMode":{Tt.set(g,u.value);const p=W.tabList[n.tabIdx],v={type:n.target,target:n.target,key:kt(),path:a.fullpath,name:n.target==="local"?D("local"):D("cloud"),stackKey:g,walkMode:!0};p.panes.push(v),p.key=v.key;break}case"openInNewTab":{Tt.set(g,u.value);const p=W.tabList[n.tabIdx],v={type:n.target,target:n.target,key:kt(),path:a.fullpath,name:n.target==="local"?D("local"):D("cloud"),stackKey:g};p.panes.push(v),p.key=v.key;break}case"openOnTheRight":{Tt.set(g,u.value);let p=W.tabList[n.tabIdx+1];p||(p=tr({panes:[],key:""}),W.tabList[n.tabIdx+1]=p);const v={type:n.target,target:n.target,key:kt(),path:a.fullpath,name:n.target==="local"?D("local"):D("cloud"),stackKey:g};p.panes.push(v),p.key=v.key;break}case"viewGenInfo":{t.value=!0,i.value=await h.pushAction(()=>er(a.fullpath)).res;break}case"deleteFiles":{let p=[];l.value.includes(s)?p=l.value.map(v=>r.value[v]):p.push(a),ae.confirm({title:D("confirmDelete"),maskClosable:!0,content:ie("ol",{style:"max-height:50vh;overflow:auto;"},p.map(v=>v.fullpath.split(/[/\\]/).pop()).map(v=>ie("li",v))),async onOk(){const v=p.map(A=>A.fullpath);await io(n.target,v),it.success(D("deleteSuccess")),hi.emit("removeFiles",[v,c.value])}})}}},showGenInfo:t,imageGenInfo:i,q:h}}const ll=()=>{const{stackViewEl:n}=Oe().toRefs(),e=O(-1);return Xi(n,t=>{var r;let i=t.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const o=(r=i.dataset)==null?void 0:r.idx;o&&Number.isSafeInteger(+o)&&(e.value=+o);return}}),{showMenuIdx:e}};function fo(){var n=window.navigator.userAgent,e=n.indexOf("MSIE ");if(e>0)return parseInt(n.substring(e+5,n.indexOf(".",e)),10);var t=n.indexOf("Trident/");if(t>0){var i=n.indexOf("rv:");return parseInt(n.substring(i+3,n.indexOf(".",i)),10)}var r=n.indexOf("Edge/");return r>0?parseInt(n.substring(r+5,n.indexOf(".",r)),10):-1}let dt;function Lt(){Lt.init||(Lt.init=!0,dt=fo()!==-1)}var At={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Lt(),Ke(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const n=document.createElement("object");this._resizeObject=n,n.setAttribute("aria-hidden","true"),n.setAttribute("tabindex",-1),n.onload=this.addResizeHandlers,n.type="text/html",dt&&this.$el.appendChild(n),n.data="about:blank",dt||this.$el.appendChild(n)},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&&(!dt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vo=ur();lr("data-v-b329ee4c");const mo={class:"resize-observer",tabindex:"-1"};sr();const go=vo((n,e,t,i,r,o)=>(H(),pe("div",mo)));At.render=go;At.__scopeId="data-v-b329ee4c";At.__file="src/components/ResizeObserver.vue";function vt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vt=function(e){return typeof e}:vt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(n)}function ho(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _n(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function po(n,e,t){return e&&_n(n.prototype,e),t&&_n(n,t),n}function Dn(n){return yo(n)||bo(n)||Co(n)||wo()}function yo(n){if(Array.isArray(n))return Rt(n)}function bo(n){if(typeof Symbol<"u"&&Symbol.iterator in Object(n))return Array.from(n)}function Co(n,e){if(n){if(typeof n=="string")return Rt(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rt(n,e)}}function Rt(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function wo(){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 So(n){var e;return typeof n=="function"?e={callback:n}:e=n,e}function Ao(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o,l=function(c){for(var b=arguments.length,h=new Array(b>1?b-1:0),m=1;m<b;m++)h[m-1]=arguments[m];if(o=h,!(i&&c===r)){var w=t.leading;typeof w=="function"&&(w=w(c,r)),(!i||c!==r)&&w&&n.apply(void 0,[c].concat(Dn(o))),r=c,clearTimeout(i),i=setTimeout(function(){n.apply(void 0,[c].concat(Dn(o))),i=0},e)}};return l._clear=function(){clearTimeout(i),i=null},l}function pi(n,e){if(n===e)return!0;if(vt(n)==="object"){for(var t in n)if(!pi(n[t],e[t]))return!1;return!0}return!1}var ko=function(){function n(e,t,i){ho(this,n),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(t,i)}return po(n,[{key:"createObserver",value:function(t,i){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=So(t),this.callback=function(u,c){r.options.callback(u,c),u&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var o=this.options.throttleOptions||{},l=o.leading;this.callback=Ao(this.callback,this.options.throttle,{leading:function(c){return l==="both"||l==="visible"&&c||l==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(u){var c=u[0];if(u.length>1){var b=u.find(function(m){return m.isIntersecting});b&&(c=b)}if(r.callback){var h=c.isIntersecting&&c.intersectionRatio>=r.threshold;if(h===r.oldResult)return;r.oldResult=h,r.callback(h,c)}},this.options.intersection),Ke(function(){r.observer&&r.observer.observe(r.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}}]),n}();function yi(n,e,t){var i=e.value;if(i)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 r=new ko(n,i,t);n._vue_visibilityState=r}}function Po(n,e,t){var i=e.value,r=e.oldValue;if(!pi(i,r)){var o=n._vue_visibilityState;if(!i){bi(n);return}o?o.createObserver(i,t):yi(n,{value:i},t)}}function bi(n){var e=n._vue_visibilityState;e&&(e.destroyObserver(),delete n._vue_visibilityState)}var xo={beforeMount:yi,updated:Po,unmounted:bi},Io={itemsLimit:1e3},Eo=/(auto|scroll)/;function Ci(n,e){return n.parentNode===null?e:Ci(n.parentNode,e.concat([n]))}var $t=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},Oo=function(e){return $t(e,"overflow")+$t(e,"overflow-y")+$t(e,"overflow-x")},No=function(e){return Eo.test(Oo(e))};function Ln(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var e=Ci(n.parentNode,[]),t=0;t<e.length;t+=1)if(No(e[t]))return e[t];return document.scrollingElement||document.documentElement}}function Ft(n){return Ft=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},Ft(n)}var To={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 $o(){return this.items.length&&Ft(this.items[0])!=="object"}var Qt=!1;if(typeof window<"u"){Qt=!1;try{var zo=Object.defineProperty({},"passive",{get:function(){Qt=!0}});window.addEventListener("test",null,zo)}catch{}}let Bo=0;var wi={name:"RecycleScroller",components:{ResizeObserver:At},directives:{ObserveVisibility:xo},props:{...To,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 n={"-1":{accumulator:0}},e=this.items,t=this.sizeField,i=this.minItemSize;let r=1e4,o=0,l;for(let u=0,c=e.length;u<c;u++)l=e[u][t]||i,l<r&&(r=l),o+=l,n[u]={accumulator:o,size:l};return this.$_computedMinItemSize=r,n}return[]},simpleArray:$o,itemIndexByKey(){const{keyField:n,items:e}=this,t={};for(let i=0,r=e.length;i<r;i++)t[e[i][n]]=i;return t}},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 n=this.$_lastUpdateScrollPosition;typeof n=="number"&&this.$nextTick(()=>{this.scrollToPosition(n)})},beforeUnmount(){this.removeListeners()},methods:{addView(n,e,t,i,r){const o=cr({id:Bo++,index:e,used:!0,key:i,type:r}),l=fr({item:t,position:0,nr:o});return n.push(l),l},unuseView(n,e=!1){const t=this.$_unusedViews,i=n.nr.type;let r=t.get(i);r||(r=[],t.set(i,r)),r.push(n),e||(n.nr.used=!1,n.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(n){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:t}=this.updateVisibleItems(!1,!0);t||(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(n,e){this.ready&&(n||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(n,e=!1){const t=this.itemSize,i=this.gridItems||1,r=this.itemSecondarySize||t,o=this.$_computedMinItemSize,l=this.typeField,u=this.simpleArray?null:this.keyField,c=this.items,b=c.length,h=this.sizes,m=this.$_views,w=this.$_unusedViews,f=this.pool,a=this.itemIndexByKey;let s,d,g,y,p;if(!b)s=d=y=p=g=0;else if(this.$_prerender)s=y=0,d=p=Math.min(this.prerender,c.length),g=null;else{const x=this.getScroll();if(e){let $=x.start-this.$_lastUpdateScrollPosition;if($<0&&($=-$),t===null&&$<o||$<t)return{continuous:!0}}this.$_lastUpdateScrollPosition=x.start;const N=this.buffer;x.start-=N,x.end+=N;let T=0;if(this.$refs.before&&(T=this.$refs.before.scrollHeight,x.start-=T),this.$refs.after){const $=this.$refs.after.scrollHeight;x.end+=$}if(t===null){let $,_=0,j=b-1,R=~~(b/2),G;do G=R,$=h[R].accumulator,$<x.start?_=R:R<b-1&&h[R+1].accumulator>x.start&&(j=R),R=~~((_+j)/2);while(R!==G);for(R<0&&(R=0),s=R,g=h[b-1].accumulator,d=R;d<b&&h[d].accumulator<x.end;d++);for(d===-1?d=c.length-1:(d++,d>b&&(d=b)),y=s;y<b&&T+h[y].accumulator<x.start;y++);for(p=y;p<b&&T+h[p].accumulator<x.end;p++);}else{s=~~(x.start/t*i);const $=s%i;s-=$,d=Math.ceil(x.end/t*i),y=Math.max(0,Math.floor((x.start-T)/t*i)),p=Math.floor((x.end-T)/t*i),s<0&&(s=0),d>b&&(d=b),y<0&&(y=0),p>b&&(p=b),g=Math.ceil(b/i)*t}}d-s>Io.itemsLimit&&this.itemsLimitError(),this.totalSize=g;let v;const A=s<=this.$_endIndex&&d>=this.$_startIndex;if(A)for(let x=0,N=f.length;x<N;x++)v=f[x],v.nr.used&&(n&&(v.nr.index=a[v.item[u]]),(v.nr.index==null||v.nr.index<s||v.nr.index>=d)&&this.unuseView(v));const I=A?null:new Map;let k,P,E;for(let x=s;x<d;x++){k=c[x];const N=u?k[u]:k;if(N==null)throw new Error(`Key is ${N} on item (keyField is '${u}')`);if(v=m.get(N),!t&&!h[x].size){v&&this.unuseView(v);continue}P=k[l];let T=w.get(P),$=!1;if(!v)A?T&&T.length?v=T.pop():v=this.addView(f,x,k,N,P):(E=I.get(P)||0,(!T||E>=T.length)&&(v=this.addView(f,x,k,N,P),this.unuseView(v,!0),T=w.get(P)),v=T[E],I.set(P,E+1)),m.delete(v.nr.key),v.nr.used=!0,v.nr.index=x,v.nr.key=N,v.nr.type=P,m.set(N,v),$=!0;else if(!v.nr.used&&(v.nr.used=!0,$=!0,T)){const _=T.indexOf(v);_!==-1&&T.splice(_,1)}v.item=k,$&&(x===c.length-1&&this.$emit("scroll-end"),x===0&&this.$emit("scroll-start")),t===null?(v.position=h[x-1].accumulator,v.offset=0):(v.position=Math.floor(x/i)*t,v.offset=x%i*r)}return this.$_startIndex=s,this.$_endIndex=d,this.emitUpdate&&this.$emit("update",s,d,y,p),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:A}},getListenerTarget(){let n=Ln(this.$el);return window.document&&(n===window.document.documentElement||n===window.document.body)&&(n=window),n},getScroll(){const{$el:n,direction:e}=this,t=e==="vertical";let i;if(this.pageMode){const r=n.getBoundingClientRect(),o=t?r.height:r.width;let l=-(t?r.top:r.left),u=t?window.innerHeight:window.innerWidth;l<0&&(u+=l,l=0),l+u>o&&(u=o-l),i={start:l,end:l+u}}else t?i={start:n.scrollTop,end:n.scrollTop+n.clientHeight}:i={start:n.scrollLeft,end:n.scrollLeft+n.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Qt?{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(n){let e;const t=this.gridItems||1;this.itemSize===null?e=n>0?this.sizes[n-1].accumulator:0:e=Math.floor(n/t)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(n){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let t,i,r;if(this.pageMode){const o=Ln(this.$el),l=o.tagName==="HTML"?0:o[e.scroll],u=o.getBoundingClientRect(),b=this.$el.getBoundingClientRect()[e.start]-u[e.start];t=o,i=e.scroll,r=n+l+b}else t=this.$el,i=e.scroll,r=n;t[i]=r},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((n,e)=>n.nr.index-e.nr.index)}}};const Mo={key:0,ref:"before",class:"vue-recycle-scroller__slot"},_o={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Do(n,e,t,i,r,o){const l=dr("ResizeObserver"),u=vr("observe-visibility");return Vt((H(),de("div",{class:yt(["vue-recycle-scroller",{ready:r.ready,"page-mode":t.pageMode,[`direction-${n.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...c)=>o.handleScroll&&o.handleScroll(...c))},[n.$slots.before?(H(),de("div",Mo,[lt(n.$slots,"before")],512)):nt("v-if",!0),(H(),pe(fn(t.listTag),{ref:"wrapper",style:pr({[n.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:yt(["vue-recycle-scroller__item-wrapper",t.listClass])},{default:Z(()=>[(H(!0),de(we,null,mr(r.pool,c=>(H(),pe(fn(t.itemTag),gr({key:c.nr.id,style:r.ready?{transform:`translate${n.direction==="vertical"?"Y":"X"}(${c.position}px) translate${n.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:t.gridItems?`${n.direction==="vertical"&&t.itemSecondarySize||t.itemSize}px`:void 0,height:t.gridItems?`${n.direction==="horizontal"&&t.itemSecondarySize||t.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[t.itemClass,{hover:!t.skipHover&&r.hoverKey===c.nr.key}]]},hr(t.skipHover?{}:{mouseenter:()=>{r.hoverKey=c.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:Z(()=>[lt(n.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),lt(n.$slots,"empty")]),_:3},8,["style","class"])),n.$slots.after?(H(),de("div",_o,[lt(n.$slots,"after")],512)):nt("v-if",!0),C(l,{onNotify:o.handleResize},null,8,["onNotify"])],34)),[[u,o.handleVisibilityChange]])}wi.render=Do;wi.__file="src/components/RecycleScroller.vue";const Lo=["data-idx"],Ro={key:0},Fo={key:1,class:"preview-icon-wrap"},Qo={class:"profile"},jo={class:"name line-clamp-1"},Vo={class:"basic-info"},Uo={class:"name line-clamp-1"},Ho={class:"basic-info"},Wo=q({__name:"FileItem",props:{file:null,idx:null,selected:{type:Boolean,default:!1},showMenuIdx:null,viewMode:{default:"grid"},fullScreenPreviewImageUrl:null,target:{default:"local"}},emits:["update:showMenuIdx","fileItemClick","dragstart","previewVisibleChange","contextMenuClick"],setup(n,{emit:e}){const t=n,i=Zn(),r=z(()=>t.viewMode==="grid"?[i.gridThumbnailSize,i.gridThumbnailSize].join():[i.largeGridThumbnailSize,i.largeGridThumbnailSize].join());return(o,l)=>{const u=ga,c=yr,b=br,h=Re;return H(),pe(h,{trigger:["contextmenu"],visible:ue(i).longPressOpenContextMenu?typeof n.idx=="number"&&n.showMenuIdx===n.idx:void 0,"onUpdate:visible":l[3]||(l[3]=m=>typeof n.idx=="number"&&e("update:showMenuIdx",m?n.idx:-1))},{overlay:Z(()=>[C(b,{onClick:l[2]||(l[2]=m=>e("contextMenuClick",m,n.file,n.idx))},{default:Z(()=>[C(c,{key:"deleteFiles"},{default:Z(()=>[se(K(o.$t("deleteSelected")),1)]),_:1}),n.file.type==="dir"?(H(),de(we,{key:0},[C(c,{key:"openInNewTab"},{default:Z(()=>[se(K(o.$t("openInNewTab")),1)]),_:1}),C(c,{key:"openOnTheRight"},{default:Z(()=>[se(K(o.$t("openOnTheRight")),1)]),_:1}),C(c,{key:"openWithWalkMode"},{default:Z(()=>[se(K(o.$t("openWithWalkMode")),1)]),_:1})],64)):nt("",!0),n.file.type==="file"&&t.target==="local"?(H(),de(we,{key:1},[C(c,{key:"previewInNewWindow"},{default:Z(()=>[se(K(o.$t("previewInNewWindow")),1)]),_:1}),C(c,{key:"download"},{default:Z(()=>[se(K(o.$t("downloadDirectly")),1)]),_:1}),C(c,{key:"copyPreviewUrl"},{default:Z(()=>[se(K(o.$t("copySourceFilePreviewLink")),1)]),_:1}),ue(fe)(n.file.name)?(H(),de(we,{key:0},[C(c,{key:"viewGenInfo"},{default:Z(()=>[se(K(o.$t("viewGenerationInfo")),1)]),_:1}),C(c,{key:"send2txt2img"},{default:Z(()=>[se(K(o.$t("sendToTxt2img")),1)]),_:1}),C(c,{key:"send2img2img"},{default:Z(()=>[se(K(o.$t("sendToImg2img")),1)]),_:1}),C(c,{key:"send2inpaint"},{default:Z(()=>[se(K(o.$t("sendToInpaint")),1)]),_:1}),C(c,{key:"send2extras"},{default:Z(()=>[se(K(o.$t("sendToExtraFeatures")),1)]),_:1})],64)):nt("",!0)],64)):nt("",!0)]),_:1})]),default:Z(()=>[(H(),de("li",{class:yt(["file file-item-trigger",{clickable:n.file.type==="dir",selected:n.selected,grid:n.viewMode==="grid"||n.viewMode==="large-size-grid","large-grid":n.viewMode==="large-size-grid"}]),"data-idx":n.idx,key:n.file.name,draggable:"true",onDragstart:l[0]||(l[0]=m=>e("dragstart",m,n.idx)),onClickCapture:l[1]||(l[1]=m=>e("fileItemClick",m,n.file))},[n.viewMode!=="line"?(H(),de("div",Ro,[t.target==="local"&&ue(fe)(n.file.name)?(H(),pe(u,{key:n.file.fullpath,class:yt(`idx-${n.idx}`),src:ue(i).enableThumbnail?ue(so)(n.file,ue(r)):ue(Dt)(n.file),fallback:ue(Ha),preview:{src:n.fullScreenPreviewImageUrl,onVisibleChange:(m,w)=>e("previewVisibleChange",m,w)}},null,8,["class","src","fallback","preview"])):(H(),de("div",Fo,[n.file.type==="file"?(H(),pe(ue(In),{key:0,class:"icon center"})):(H(),pe(ue(On),{key:1,class:"icon center"}))])),ge("div",Qo,[ge("div",jo,K(n.file.name),1),ge("div",Vo,[ge("div",null,K(n.file.size),1),ge("div",null,K(n.file.date),1)])])])):(H(),de(we,{key:1},[n.file.type==="file"?(H(),pe(ue(In),{key:0,class:"icon"})):(H(),pe(ue(On),{key:1,class:"icon"})),ge("div",Uo,K(n.file.name),1),ge("div",Ho,[ge("div",null,K(n.file.size),1),ge("div",null,K(n.file.date),1)])],64))],42,Lo))]),_:1},8,["visible"])}}});const sl=Cr(Wo,[["__scopeId","data-v-d061bb44"]]);export{Re as D,ae as M,tl as S,il as a,rl as b,al as c,ol as d,nl as e,ll as f,Tt as g,to as h,wi as i,sl as j,el as s,Dt as t,Oe as u};