import{cQ as re,cR as le,d as W,br as oe,$ as O,l as q,_ as H,a as v,a0 as z,h as M,c as f,P as ee,j as ae,u as ne,aJ as ue,b1 as ie,aN as ce,ax as se,w as de,f as fe,ap as U,aL as ve,i as he,ag as pe,c6 as D,R as X,cS as me,L as Q,V as be,cy as ge,ai as G,am as ye,al as xe,U as ke,cp as Ce,x as we}from"./index-7c0f3f3a.js";import{j as Se}from"./db-90de1b1b.js";function Ie(a,e){var n=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!n){if(Array.isArray(a)||(n=re(a))||e&&a&&typeof a.length=="number"){n&&(a=n);var r=0,i=function(){};return{s:i,n:function(){return r>=a.length?{done:!0}:{done:!1,value:a[r++]}},e:function(s){throw s},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C=!0,b=!1,g;return{s:function(){n=n.call(a)},n:function(){var s=n.next();return C=s.done,s},e:function(s){b=!0,g=s},f:function(){try{!C&&n.return!=null&&n.return()}finally{if(b)throw g}}}}var Y=1/0,Oe=17976931348623157e292;function Ue(a){if(!a)return a===0?a:0;if(a=le(a),a===Y||a===-Y){var e=a<0?-1:1;return e*Oe}return a===a?a:0}var Pe=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],Me={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:ee.any,required:Boolean};const _e=W({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:oe(Me,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(e,n){var r=n.attrs,i=n.emit,C=n.expose,b=O(e.checked===void 0?e.defaultChecked:e.checked),g=O();q(function(){return e.checked},function(){b.value=e.checked}),C({focus:function(){var l;(l=g.value)===null||l===void 0||l.focus()},blur:function(){var l;(l=g.value)===null||l===void 0||l.blur()}});var d=O(),s=function(l){if(!e.disabled){e.checked===void 0&&(b.value=l.target.checked),l.shiftKey=d.value;var w={target:v(v({},e),{},{checked:l.target.checked}),stopPropagation:function(){l.stopPropagation()},preventDefault:function(){l.preventDefault()},nativeEvent:l};e.checked!==void 0&&(g.value.checked=!!e.checked),i("change",w),d.value=!1}},y=function(l){i("click",l),d.value=l.shiftKey};return function(){var o,l=e.prefixCls,w=e.name,S=e.id,F=e.type,_=e.disabled,k=e.readonly,t=e.tabindex,u=e.autofocus,h=e.value,p=e.required,m=H(e,Pe),c=r.class,I=r.onFocus,B=r.onBlur,A=r.onKeydown,V=r.onKeypress,E=r.onKeyup,K=v(v({},m),r),x=Object.keys(K).reduce(function(N,P){return(P.substr(0,5)==="aria-"||P.substr(0,5)==="data-"||P==="role")&&(N[P]=K[P]),N},{}),R=z(l,c,(o={},M(o,"".concat(l,"-checked"),b.value),M(o,"".concat(l,"-disabled"),_),o)),T=v(v({name:w,id:S,type:F,readonly:k,disabled:_,tabindex:t,class:"".concat(l,"-input"),checked:!!b.value,autofocus:u,value:h},x),{},{onChange:s,onClick:y,onFocus:I,onBlur:B,onKeydown:A,onKeypress:V,onKeyup:E,required:p});return f("span",{class:R},[f("input",v({ref:g},T),null),f("span",{class:"".concat(l,"-inner")},null)])}}});function qe(a){var e=a==null?0:a.length;return e?a[e-1]:void 0}var Ve=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},Be=function(){return v(v({},Ve()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},Fe=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:ee.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},Ae=function(){return v(v({},Fe()),{},{indeterminate:{type:Boolean,default:!1}})},te=Symbol("CheckboxGroupContext"),Ne=["indeterminate","skipGroup","id"],je=["onMouseenter","onMouseleave","onInput","class","style"];const j=W({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:Ae(),setup:function(e,n){var r=n.emit,i=n.attrs,C=n.slots,b=n.expose,g=ae(),d=ne("checkbox",e),s=d.prefixCls,y=d.direction,o=ue(te,void 0),l=Symbol("checkboxUniId");ie(function(){!e.skipGroup&&o&&o.registerValue(l,e.value)}),ce(function(){o&&o.cancelValue(l)}),se(function(){de(e.checked!==void 0||o||e.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var w=function(t){var u=t.target.checked;r("update:checked",u),r("change",t)},S=O(),F=function(){var t;(t=S.value)===null||t===void 0||t.focus()},_=function(){var t;(t=S.value)===null||t===void 0||t.blur()};return b({focus:F,blur:_}),function(){var k,t,u=fe((k=C.default)===null||k===void 0?void 0:k.call(C)),h=e.indeterminate,p=e.skipGroup,m=e.id,c=m===void 0?g.id.value:m,I=H(e,Ne),B=i.onMouseenter,A=i.onMouseleave;i.onInput;var V=i.class,E=i.style,K=H(i,je),x=v(v({},I),{},{id:c,prefixCls:s.value},K);o&&!p?(x.onChange=function(){for(var N=arguments.length,P=new Array(N),$=0;$0&&(p=o.value.map(function(c){var I;return f(j,{prefixCls:d.value,key:c.value.toString(),disabled:"disabled"in c?c.disabled:e.disabled,indeterminate:c.indeterminate,value:c.value,checked:y.value.indexOf(c.value)!==-1,onChange:c.onChange,class:"".concat(m,"-item")},{default:function(){return[c.label===void 0?(I=r.label)===null||I===void 0?void 0:I.call(r,c):c.label]}})})),f("div",{class:[m,M({},"".concat(m,"-rtl"),s.value==="rtl")],id:h},[p||((t=r.default)===null||t===void 0?void 0:t.call(r))])}}});j.Group=L;j.install=function(a){return a.component(j.name,j),a.component(L.name,L),a};var Ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const De=Ge;function Z(a){for(var e=1;e(await D.value.get("/files",{params:{folder_path:a}})).data,ze=async a=>(await D.value.post("/delete_files",{file_paths:a})).data,Le=async(a,e,n)=>(await D.value.post("/move_files",{file_paths:a,dest:e,create_dest_folder:n})).data,We=async(a,e,n)=>(await D.value.post("/copy_files",{file_paths:a,dest:e,create_dest_folder:n})).data,Ee=async a=>{await D.value.post("/mkdirs",{dest_folder:a})},Xe=a=>{const e=[];return a.shiftKey&&e.push("Shift"),a.ctrlKey&&e.push("Ctrl"),a.metaKey&&e.push("Cmd"),(a.code.startsWith("Key")||a.code.startsWith("Digit"))&&e.push(a.code),e.join(" + ")},Je=a=>{const e=O("");return new Promise(n=>{X.confirm({title:G("inputFolderName"),content:()=>f(ke,{value:e.value,"onUpdate:value":r=>e.value=r},null),async onOk(){if(!e.value)return;const r=Ce(a,e.value);await Ee(r),n()}})})},Qe=()=>f("p",{style:{background:"var(--zp-secondary-background)",padding:"8px",borderLeft:"4px solid var(--primary-color)"}},[we("Tips: "),G("multiSelectTips")]),Ye=a=>{X.confirm({width:"80vw",title:a.name,icon:null,content:()=>f("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},[f("video",{style:{maxHeight:me?"80vh":"60vh"},src:Q(a),controls:!0,autoplay:!0},null),f("div",{class:"actions",style:{marginTop:"16px"}},[f(be,{onClick:()=>ge([Q(a,!0)])},{icon:f($e,null,null),default:G("download")})])]),maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},Ze=()=>{X.confirm({title:G("confirmRebuildImageIndex"),onOk:async()=>{await Se(),ye.emit("searchIndexExpired"),xe.success(G("rebuildComplete"))}})};export{j as C,Qe as M,He as a,Je as b,We as c,ze as d,Ye as e,Xe as g,qe as l,Le as m,Ze as o,Ue as t};