Files
aaPanel/BTPanel/static/vite/js/feature-FileEditor-legacy.js
T
2026-07-24 16:25:43 +08:00

8 lines
137 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){System.register([`./rolldown-runtime-legacy.js?v=1784873523001`,`./vendor-utils-legacy.js?v=1784873523001`,`./vendor-vue-legacy.js?v=1784873523001`,`./vendor-naive-legacy.js?v=1784873523001`,`./app-legacy.js?v=1784873523001`,`./app-components-legacy.js?v=1784873523001`,`./app-shared-legacy.js?v=1784873523001`,`./vendor-pdf-legacy.js?v=1784873523001`,`./app-base-legacy.js?v=1784873523001`,`./vendor-ace-legacy.js?v=1784873523001`,`./feature-EmailEditor-legacy.js?v=1784873523001`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,te,k,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,A,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,j,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,M,gr,_r,N,vr,yr,br,P,xr,Sr,Cr,F,I,wr,Tr,Er,Dr,L,R,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,z,Ci,B,wi,Ti,Ei,Di,V,Oi,ki,Ai,ji,Mi,Ni,Pi,H,Fi,Ii,Li,Ri,U,zi,Bi,Vi,W,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,G,aa,oa,sa,ca,la,ua,da,fa,K,pa,ma,q,ha,ga,_a,va,J,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Y,Ma,Na,Pa;function Fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e){if(Array.isArray(e))return e}function La(e){if(Array.isArray(e))return Fa(e)}function Ra(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function X(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Ra(a,r,i,o,s,`next`,e)}function s(e){Ra(a,r,i,o,s,`throw`,e)}o(void 0)})}}function za(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e,t){"@swc/helpers - instanceof";return t!=null&&typeof Symbol<`u`&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Va(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ha(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Ua(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wa(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){za(e,t,n[t])})}return e}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qa(e,t){return t=t==null?{}:t,Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ka(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Ja(e,t){return Ia(e)||Ha(e,t)||Xa(e,t)||Ua()}function Ya(e){return La(e)||Va(e)||Xa(e)||Wa()}function Z(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if((i=a.trys,!(i=i.length>0&&i[i.length-1]))&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Xa(e,t){if(e){if(typeof e==`string`)return Fa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fa(e,t)}}function Za(e,t,n){var r=U(!0),i=U(0),a=U(0),o=U(0),s=U(0),c=U(0),l=U(0),u=U(0),d=U(0);function f(){var e=null;return t?function(){e||(e=setTimeout(function(){t({m_flag:r,m_left:i,m_right:a,m_bottom:s,m_top:o,m_x:u,m_y:d,m_height:c,m_width:l}),clearTimeout(e),e=null},10))}:!1}var p;wi(e)?p=e.value:typeof e==`string`?p=document.querySelector(e):Ba(e,Element)&&(p=e);var m=f();function h(e){var t=e.getBoundingClientRect(),n=t.left,r=t.right,f=t.top,p=t.bottom,m=t.height,h=t.width,g=t.x,_=t.y;i.value=n,a.value=r,o.value=f,s.value=p,c.value=m,l.value=h,u.value=g,d.value=_}return p&&(p.onmousedown=function(e){if(n&&n(e,{m_flag:r,m_left:i,m_right:a,m_bottom:s,m_top:o,m_x:u,m_y:d,m_height:c,m_width:l}),r.value){var t=p.getBoundingClientRect(),f=t.left,g=t.right,_=t.top,v=t.bottom,y=document.createElement(`div`),b=e.clientX,x=e.clientY;y.style.position=`absolute`,y.style.left=b-f+`px`,y.style.top=x-_+`px`,y.style.width=`0px`,y.style.height=`0px`,y.style.backgroundColor=`rgba(135, 182, 130, 0.1)`,y.classList.add(`district-wrapper`),p.appendChild(y),e.preventDefault();var S=function(e){e.preventDefault(),!E.value&&!te.value&&(b<=e.clientX?y.style.width=e.clientX-b+`px`:(y.style.width=b-e.clientX+`px`,y.style.marginLeft=-(b-e.clientX)+`px`),x<=e.clientY?(y.style.height=e.clientY-x+ne+`px`,y.style.marginTop=-ne+`px`):(y.style.height=x-e.clientY+re+`px`,y.style.marginTop=-(x-e.clientY)+`px`),e.clientX<f&&(y.style.width=b-f+`px`,y.style.marginLeft=-(b-f)+`px`),e.clientX>g&&(y.style.width=g-b+`px`)),e.clientY>v&&T(),e.clientY<_&&ee(),h(y),m&&m()},C=wa(function(){if(k.scrollTop>=k.scrollHeight-k.clientHeight){w();return}y.style.height=y.offsetHeight+10+`px`,y.style.marginTop=parseInt(getComputedStyle(y).marginTop)-10+`px`,k.scrollTop+=10,ne=k.scrollTop,h(y),m&&m()},{immediate:!1}),w=C.pause,T=C.resume,E=C.isActive,D=wa(function(){if(k.scrollTop<=0){O();return}y.style.height=y.offsetHeight+10+`px`,k.scrollTop-=10,re+=10,h(y),m&&m()},{immediate:!1}),O=D.pause,ee=D.resume,te=D.isActive,k=p.querySelector(`.n-scrollbar-container`),ne=0,re=0;document.onmousemove=S,document.onmouseup=function(){document.onmousemove=null,p.contains(y)&&p.removeChild(y)}}}),{m_flag:r,m_x:u,m_y:d,m_left:i,m_right:a,m_top:o,m_bottom:s,m_height:c,m_width:l}}function Qa(e,t){var n=ma(e.m_left),r=ma(e.m_right),i=ma(e.m_top),a=ma(e.m_bottom),o=ma(t.left),s=ma(t.right),c=ma(t.top),l=ma(t.bottom);return!(s<n||o>r||l<i||c>a)}function $a(e){e.card_hover=!0}function eo(e){e.card_hover=!1}function Q(e,t){return X(function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;return Z(this,function(T){switch(T.label){case 0:n=e.tableLoading,r=e.currentPath,i=e.favoriteList,a=e.fileRecycle,o=e.fileList,s=e.filesView,c=e.directoryCount,l=e.fileCount,u=e.total,d=e.page,f=e.size,p=e.sort,m=e.reverse,h=e.diskMountPoint,g=e.currentFile,_=e.currentDirSize,v=e.uploadFileList,y=e.dragUploadRef,n.value=!0,T.label=1;case 1:return T.trys.push([1,4,5,6]),[4,Xs(r.value,function(e){i.value=e.store,a.value=e.file_recycle,c.value=e.dir.length,l.value=e.files.length,u.value=Xr(e.page),h.value=e.disk,r.value=e.path},Ga(qa(Ga({p:d.value,showRow:f.value},p.value?{sort:p.value,reverse:m.value}:{}),{disk:!0}),t))];case 2:return x=T.sent(),g.value=null,_.value=-1,[4,no(e)];case 3:return S=T.sent(),C=[],S.length&&(C=S.map(function(e){return e.key})),o.value=x.map(function(e){return e.remarks_hover=!1,e.isEditRemarks=!1,e.isCreate=!1,e.card_hover=!1,e.card_choosed=!1,e.isRenameForCard=!1,e.operation_show=!1,C.includes(e.path)?e.isFavorite=!0:e.isFavorite=!1,e.isShare=Number(e.durl)===0?0:Number(e.durl),e}),v.value=[],(b=y.value)==null||b.listenDragEvent(),Oi(function(){s.value==`list`&&(to(e),co(e))}),$s(e),[3,6];case 4:return w=T.sent(),console.warn(w),[3,6];case 5:return n.value=!1,[7];case 6:return[2]}})})()}function to(e){var t=e.tableRef;t.value&&Za(t.value.querySelector(`.n-data-table-base-table-body`),function(t){return ro(e,t)},function(t,n){return io(t,n,e)})}function no(e){return X(function(){var t,n,r,i;return Z(this,function(a){switch(a.label){case 0:t=e.resetFavoriteOptions,n=e.favoriteOptions,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,W.post(`/files?action=get_files_store`,{},{requestOptions:{isOriginalResult:!0}})];case 2:return r=a.sent().message.map(function(e){return{type:e.type,icon:e.type,label:e.name,key:e.path}}),t(),n.value=Ya(r).concat(Ya(n.value)),[2,n.value];case 3:return i=a.sent(),console.warn(i),[2,[]];case 4:return[2]}})})()}function ro(e,t){for(var n=e.trRectArr,r=e.choosedKeys,i=[],a=0;a<n.value.length;a++){var o=Ja(Ja(Object.entries(n.value[a]),1)[0],2),s=o[0],c=o[1];Qa(t,c.getClientRects()[0])&&i.push(s)}r.value=Ya(new Set(i))}function io(e,t,n){var r=n.choosedKeys;if(!e.target.closest(`.n-checkbox-box`)){if(e.target.classList.contains(`file-checkbox`)){var i=e.target.closest(`tr`).dataset.key;r.value.includes(i)?r.value=r.value.filter(function(e){return e!==i}):r.value.push(i);return}if(ao(n),e.target.closest(`tr`)){var a=e.target.closest(`tr`).dataset.key;if(e.button==0&&(r.value=[a]),e.button==2){if(r.value.includes(a))return;r.value=[a]}}e.target.nodeName==`INPUT`?t.m_flag.value=!1:t.m_flag.value=!0}}function ao(e){var t=e.normalTrList,n=e.trRectArr;t.value=document.querySelectorAll(`[class*="normal-tr"]`);for(var r=[],i=0;i<t.value.length;i++){var a=t.value[i].dataset.key;r.push(za({},a,t.value[i]))}n.value=r}function oo(e,t){var n=e.currentPath;t.type==`dir`?(n.value=n.value==`/`?`/`.concat(t.nm):n.value+`/`+t.nm,Q(e)):qs(t)?_o(e,t.path):Ys(t.ext)?$(e,`Decompress`,function(e){return e.value.open()}):Ks(t.ext)?vo(e,t):bs(e)}function so(e,t,n){var r=e.currentPath,i=n.type,a=n.name,o=Vs(a,i);i==`dir`?(r.value=t,Q(e)):Js(o)?_o(e,t):Ys(o)?$(e,`Decompress`,function(e){return e.value.open(t,o)}):Ks(o)?vo(e,{path:t,nm:n.name}):Pi(t,t.substring(0,t.lastIndexOf(`/`)))}function co(e){var t=e.tableRef,n=e.choosePathRef,r=0,i=setInterval(function(){if(r<10?r++:clearInterval(i),t.value){var a=t.value;a.querySelector(`.n-data-table-base-table-body`)&&to(e),a.oncontextmenu=function(t){t.preventDefault(),lo(t,e)},a.onclick=function(t){t.target.nodeName!=`INPUT`&&(Er(e),n.value.handleEnterDown())},clearInterval(i)}else return},1e3)}function lo(e,t){var n=t.choosedKeys,r=t.contextRef,i=`empty`;e.target.closest(`tr`)&&(i=n.value.length>1?`multiple`:n.value.length==1?`single`:`empty`),r.value.filesOperation(e,i)}function uo(){var e,t=(e=document.querySelector(`#createInput`))==null?void 0:e.querySelector(`input`);t==null||t.focus(),t==null||t.select()}function fo(e,t){return X(function(){var n,r,i;return Z(this,function(a){switch(a.label){case 0:n=V.loading(`Processing, please wait...`).close,a.label=1;case 1:return a.trys.push([1,,4,5]),[4,ur(`tamper_core`,71)];case 2:return a.sent(),[4,W.post(`/tamper_core/get_effective_path.json`,{path:t.path},{requestOptions:{isOriginalResult:!0}})];case 3:return r=a.sent().message,B(r)&&r.status&&(i=r.data,t.type===`dir`?po(e,t,i):mo(e,t,i)),[3,5];case 4:return n(),[7];case 5:return[2]}})})()}function po(e,t,n){var r=n.pid,i=n.lock,a=n.action;_a({width:480,title:(i?`Turning off protection `:`Turning on protection `)+`[`.concat(t.path,`]`),content:ua(i?`file.tableController.afterTurningOffProtectionDir`:`file.tableController.afterTurningOnProtectionDir`),onConfirm:function(){return X(function(){var n;return Z(this,function(o){switch(o.label){case 0:return a[0]===`create`&&r===0?[4,ho(t.path,[])]:[3,2];case 1:return o.sent(),Q(e),[2];case 2:return n=[],i?n.push({key:t.path.indexOf(`/www/server/panel/class`)==-1?a[0]:`add_wd`,values:[t.path]}):n.push({key:a[0],values:[t.path]}),[4,go(r,n)];case 3:return o.sent(),Q(e),[2]}})})()}})}function mo(e,t,n){var r=n.pid,i=n.lock,a=n.action,o=ua(i?`file.tableController.turningOffProtection`:`file.tableController.turningOnProtection`,{path:t.path}),s=ua(i?`file.tableController.afterTurningOffProtectionFile`:`file.tableController.afterTurningOnProtectionFile`),c=U(!1),u=U(!0);_a({title:o,width:480,content:function(){return I(x,null,[I(`div`,null,[s]),I(`div`,{class:`mt-8px`},[I(l,{checked:u.value,"onUpdate:checked":function(e){return u.value=e}},{default:function(){return[I(`span`,null,[ua(i?`file.tableController.turningOffProtectionFile`:`file.tableController.turningOnProtectionFile`,{path:t.nm})])]}})]),I(`div`,{class:`mt-8px`},[I(l,{checked:c.value,"onUpdate:checked":function(e){return c.value=e}},{default:function(){return[I(`span`,null,[ua(i?`file.tableController.turningOffProtectionSuffix`:`file.tableController.turningOnProtectionSuffix`,{suffix:t.ext})])]}})])])},onConfirm:function(){return X(function(){var n,o,s,l,d;return Z(this,function(f){switch(f.label){case 0:return a[0]===`create`&&r===0?(n=t.path.substring(0,t.path.lastIndexOf(`/`)),o=[],u.value&&(s=t.path.split(`/`),l=s.length>=2?s[s.length-2]:``,o.push(``.concat(l,`/`,t.nm))),c.value&&o.push(`.`+t.ext),[4,ho(n,o)]):[3,2];case 1:return f.sent(),Q(e),[2];case 2:return d=[],i?(u.value&&(d.push({key:`remove_bf`,values:[t.path]}),d.push({key:`add_wf`,values:[t.path]})),c.value&&d.push({key:`remove_bf`,values:[`.`+t.ext]})):(u.value&&(d.push({key:`add_bf`,values:[t.path]}),d.push({key:`remove_wf`,values:[t.path]})),c.value&&d.push({key:`add_bf`,values:[`.`+t.ext]})),[4,go(r,d)];case 3:return f.sent(),Q(e),[2]}})})()}})}function ho(e,t){return X(function(){var n,r;return Z(this,function(i){switch(i.label){case 0:return[4,W.post(`/tamper_core/create_path.json`,{path:e,exts:JSON.stringify(t)},{requestOptions:{loading:ua(`file.tableController.creatingDirectoryProtection`),isOriginalResult:!0}})];case 1:if(n=i.sent(),r=n.message,B(r))if(r.status)V.success(r.msg);else return V.error(r.msg),[2,Promise.reject()];return[2]}})})()}function go(e,t){return X(function(){var n,r;return Z(this,function(i){switch(i.label){case 0:return[4,W.post(`/tamper_core/batch_setting.json`,{pid:e,settings:JSON.stringify(t)},{requestOptions:{loading:ua(`file.tableController.executing`),isOriginalResult:!0}})];case 1:if(n=i.sent(),r=n.message,B(r))if(r.status)V.success(r.msg);else return V.error(r.msg),[2,Promise.reject()];return[2]}})})()}function _o(e,t){var n=e.currentPreviewImg,r=e.previewShow;n.value=t,r.value=!0}function vo(e,t){var n=e.currentPreviewVideo,r=e.previewVideoShow;n.value={path:t.path,name:t.nm},r.value=!0}function yo(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,W.post(`/files?action=set_file_ps`,e,{requestOptions:{successMessage:!0}})];case 1:return t.sent(),[2]}})})()}function bo(e){return X(function(){var t,n,r;return Z(this,function(i){switch(i.label){case 0:if(t=e.currentFile,n=e.currentPath,!t.value||!(t.value.isCreate&&t.value.isRename||t.value.isRenameForCard)||(t.value.editName||(t.value.isCreate=!1),t.value.editName==t.value.nm&&(t.value.isCreate=!1),!(t.value.isCreate&&t.value.isRename||t.value.isRenameForCard)))return[3,7];if(t.value.editName===t.value.nm)return[3,6];i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,hs(t.value.path,n.value+`/`+t.value.editName)];case 2:return i.sent(),Q(e),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return t.value.isCreate=!1,t.value.isRenameForCard=!1,t.value.isRename=!1,[7];case 5:return[2,!0];case 6:t.value.isCreate=!1,t.value.isRenameForCard=!1,t.value.isRename=!1,i.label=7;case 7:return[2]}})})()}function xo(e){return X(function(){var t,n,r,i;return Z(this,function(a){switch(a.label){case 0:return t=e.currentFile,n=e.currentPath,r=e.fileList,!t.value||!(t.value.isCreate&&!t.value.isRename)?[3,8]:t.value.editName==``?(r.value.shift(),[3,8]):[3,1];case 1:return a.trys.push([1,7,,8]),t.value.type==`dir`?[4,Mo(n.value+`/`+t.value.editName)]:[3,3];case 2:return a.sent(),[3,5];case 3:return[4,No(n.value+`/`+t.value.editName)];case 4:a.sent(),a.label=5;case 5:return[4,Q(e)];case 6:return a.sent(),[2,!0];case 7:return i=a.sent(),r.value.shift(),console.warn(i),[3,8];case 8:return[2]}})})()}function So(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return t=e.currentFile,!t.value||!t.value.isEditRemarks?[3,4]:t.value.editRemarks==t.value.rmk?[3,3]:[4,yo({filename:t.value.path,ps_type:0,ps_body:t.value.editRemarks})];case 1:return n.sent(),[4,Q(e)];case 2:return n.sent(),[2,!0];case 3:return t.value.isEditRemarks=!1,t.value.remarks_hover=!1,[2,!1];case 4:return[2]}})})()}function Co(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,So(e)];case 1:return t.sent()?[2]:[4,bo(e)];case 2:return t.sent()?[2]:[4,xo(e)];case 3:return t.sent(),[2]}})})()}function wo(){return X(function(){return Z(this,function(e){return[2,W.post(`/task?action=get_task_lists`,{status:-3})]})})()}function To(e){return X(function(){var n;return Z(this,function(r){switch(r.label){case 0:return document.querySelector(`.file-task-modal`)?[2]:[4,wo()];case 1:return n=r.sent().message,Ci(n)&&n.length>0&&Sa({title:ua(`file.tableController.realtimeTaskQueue`),width:510,class:`file-task-modal`,unstableShowMask:!1,data:{store:e,taskList:n},component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.O})},void 0)})}),[2]}})})()}function Eo(e){return X(function(){return Z(this,function(t){return[2,W.post(`/task?action=remove_task`,{id:e},{requestOptions:{loading:ua(`file.tableController.deletingTask`),successMessage:!0}})]})})()}function Do(e){return Sa({title:ca(`file.shareListModal.title`),width:850,data:{fileStore:e},component:ea})}function Oo(e){var t=e.fileList.value.find(function(t){return t.nm===e.choosedKeys.value[0]});if(t)return Sa({title:t.type==`dir`?ca(`file.shareModal.setShareFolder`,{name:t.nm}):ca(`file.shareModal.setShareFile`,{name:t.nm}),width:560,footer:!0,confirmText:ca(`file.shareModal.create`),data:{file:t,fileStore:e},component:wr})}function ko(e,t){return Sa({title:ca(`file.shareModal.shareDetails`,{name:e.ps||e.filename||e.id}),width:560,footer:!0,confirmType:`error`,confirmText:ca(`file.shareModal.closeSharingChain`),data:{detail:e,fileStore:t},component:Nr})}function Ao(e,t){ko({id:e},t)}function jo(e,t){var n=Number(e.isShare||e.durl);n&&Ao(n,t)}function Mo(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,W.post(`/files?action=CreateDir`,{path:e},{requestOptions:{loading:sa(`file.buttonGroup.loading.creatingDirectory`),successMessage:!0}})];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),console.warn(t),[3,3];case 3:return[2]}})})()}function No(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,W.post(`/files?action=CreateFile`,{path:e},{requestOptions:{loading:sa(`file.buttonGroup.loading.creatingFile`),successMessage:!0}})];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),console.warn(t),[3,3];case 3:return[2]}})})()}function Po(e,t){return X(function(){var n;return Z(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,W.post(`/files?action=CreateLink`,{sfile:e,dfile:t},{requestOptions:{loading:sa(`file.buttonGroup.loading.creatingSoftlink`),successMessage:!0}})];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),console.warn(n),[3,3];case 3:return[2]}})})()}function Fo(e,t){var n=e.filesView;n.value=t}function Io(e){$(e,`UploadFile`,function(e){e.value.open()})}function Lo(e){$(e,`RemoteDownload`,function(e){e.value.open()})}function Ro(e){return Sa({title:sa(`file.searchFileContentModal.title`),width:1100,height:686,footer:!1,data:{fileStore:e,currentPath:e.currentPath.value},component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.t})},void 0)})})}function zo(e){Ro(e)}function Bo(e,t,n){t==`management`?Fi(e):so(e,t,n)}function Vo(e){Do(e)}function Ho(e){var t=e.currentPath;t.value=`/`,Q(e)}function Uo(e){$(e,`Backup`,function(e){e.value.open()})}function Wo(e){return Sa({title:sa(`file.recycle.title`),width:1100,height:686,data:{fileStore:e},component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.n})},void 0)})})}function Go(e){Wo(e)}function Ko(){return Sa({title:sa(`file.buttonGroup.fileOperationRecord`),width:1100,height:640,footer:!1,component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.r})},void 0)})})}function qo(e){$(e,`Terminal`,function(e){e.value.open()})}function Jo(e,t,n,r){var i=e.fileList,a=e.currentFile;a.value={nm:t,isCreate:!0,type:n,ext:r,path:``,editName:t},a.value.editName=a.value.nm,i.value.unshift(a.value),Oi(uo)}function Yo(e,t){switch(t){case`dir`:Jo(e,sa(`file.buttonGroup.defaultNames.untitledDirectory`),`dir`,`folder`);break;case`file`:Jo(e,sa(`file.buttonGroup.defaultNames.untitledFile`),`file`,`unknown`);break;case`softlink`:$(e,`Softlink`,function(e){e.value.open()})}}function Xo(e){var t=e.isMiniScreen;window.innerWidth<1560?t.value=!0:t.value=!1}function Zo(e,t){return X(function(){var n;return Z(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,W.post(`/files?action=del_files_store`,{path:t},{requestOptions:{loading:sa(`file.buttonGroup.loading.deletingFavorite`),successMessage:!0}})];case 1:return r.sent(),Q(e),[3,3];case 2:return n=r.sent(),console.warn(n),[3,3];case 3:return[2]}})})()}function Qo(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,W.post(`/files?action=`.concat(t===`dir`?`DeleteDir`:`DeleteFile`),{path:e},{requestOptions:{loading:oa(`file.deleteController.deletingSingle`),successMessage:!0}})];case 1:return n.sent(),[2]}})})()}function $o(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,W.post(`/files?action=SetBatchData`,{data:JSON.stringify(e),type:4,path:t},{requestOptions:{loading:oa(`file.deleteController.deletingBatch`),successMessage:!0}})];case 1:return n.sent(),[2]}})})()}function es(e){return $n.includes(e.toLowerCase())}function ts(e){var t=e.toLowerCase();return er[t]||t.split(`.`).pop().toUpperCase()}function ns(e){return G(`file.contextMenu.archivePreviewWithType`,{type:ts(e)})}function rs(e){return e in hr}function is(e,t){var n=t.value.trim().toLowerCase();return mr[e].includes(n)}function as(e,t){return(t==null?void 0:t.name)||G(hr[e].labelKey)}function os(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return[4,Wr(e)];case 1:return t=n.sent(),t&&Da(t.row,void 0,t.softInfo),[2]}})})()}function ss(e,t){var n=as(e,t);if(!(t!=null&&t.install)){ba(e);return}if(ta(t)){os(e);return}Ta({name:e,title:n,admin:!0})}function cs(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return[4,Gr()];case 1:return t=n.sent().message,[2,(Array.isArray(t)?t:B(t)&&Array.isArray(t.list)?t.list:[]).find(function(t){return is(e,t)})]}})})()}function ls(e,t){return X(function(){var n;return Z(this,function(r){switch(r.label){case 0:return[4,dr({source:73})];case 1:return r.sent(),[4,cs(t)];case 2:return n=r.sent(),n!=null&&n.install?ta(n)?[4,os(t)]:[3,4]:(ss(t,n),[2]);case 3:return r.sent(),[2];case 4:return n.config?(Ls(e,t),[2]):(ss(t,n),[2])}})})()}function us(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,W.post(`/files?action=CheckExistsFiles`,{dfile:e,filename:t},{requestOptions:{isOriginalResult:!0}})];case 1:return[2,n.sent().message.length>0]}})})()}function ds(e,t,n){return X(function(){return Z(this,function(r){switch(r.label){case 0:return[4,W.post(`/files?action=SetBatchData`,{data:JSON.stringify(e),type:t,path:n},{requestOptions:{loading:G(`file.contextMenu.loading.batchSetting`),successMessage:!0}})];case 1:return[2,r.sent()]}})})()}function fs(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,W.post(`/files?action=CopyFile`,{sfile:e,dfile:t},{requestOptions:{loading:G(`file.contextMenu.loading.copying`),successMessage:!0}})];case 1:return[2,n.sent()]}})})()}function ps(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,W.post(`/files?action=BatchPaste`,{type:e,path:t},{requestOptions:{loading:G(`file.contextMenu.loading.pasting`),successMessage:!0}})];case 1:return[2,n.sent()]}})})()}function ms(e,t,n){return X(function(){return Z(this,function(r){switch(r.label){case 0:return[4,W.post(`/files?action=MvFile`,Ga({sfile:e,dfile:t},n),{requestOptions:{loading:G(`file.contextMenu.loading.moving`),successMessage:!0}})];case 1:return[2,r.sent()]}})})()}function hs(e,t){return ms(e,t,{rename:!0})}function gs(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return X(function(){var a;return Z(this,function(o){switch(o.label){case 0:return[4,W.post(`/files?action=`.concat(i?`ZipAndDownload`:`Zip`),{sfile:e,dfile:t,z_type:n,path:r},{requestOptions:{loading:G(`file.contextMenu.loading.compressing`),successMessage:!i}})];case 1:if(a=o.sent().message,i&&B(a)){if(a.task_id)return[2,a.msg];Lr(a.result)}return[2,``]}})})()}function _s(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,W.post(`/files?action=UnZip`,e,{requestOptions:{loading:G(`file.contextMenu.loading.decompressing`),successMessage:!0}})];case 1:return t.sent(),[2]}})})()}function vs(e,t){return t.map(function(t){return e[t]})}function ys(e,t){var n=e.fileList,r=e.choosedKeys,i=Qs(n.value,r.value)[0],a=[`share`,`favorite`,`permission`,`copy`,`copyPath`,`cut`,`rename`,`del`,`compression`,`attrs`];if(!i)return vs(t.value,[`refresh`,`upload`,`create`,`terminal`]);i.type==`dir`?a.unshift(`open`,`openNewWindow`):a.unshift(`edit`,`download`);var o=a.findIndex(function(e){return e===`permission`});if(a.splice(o,0,`uploadToCloud`),qs(i)&&(a.unshift(`preview`),a=a.filter(function(e){return e!==`edit`})),Ks(i.ext)&&(a.unshift(`playVideo`),a=a.filter(function(e){return e!==`edit`})),i.isFavorite){var s=a.findIndex(function(e){return e==`favorite`});a[s]=`unfavorite`}if(i.isShare){var c=a.findIndex(function(e){return e==`share`});a[c]=`unShare`}Ys(i.ext)&&(a.unshift(`decompress`),es(i.ext)&&a.splice(1,0,`compressionPreview`),a=a.filter(function(e){return e!==`edit`}));var l=vs(t.value,a),u=l.findIndex(function(e){return e.key===`compressionPreview`});return u>-1&&(l[u]=qa(Ga({},l[u]),{label:ns(i.ext)})),l}function bs(e){var t=e.choosedKeys,n=e.currentPath,r=e.fileList.value.find(function(e){return e.nm==t.value[0]});r&&Pi(r.path,n.value)}function xs(e){var t=e.choosedKeys,n=e.currentPath,r=e.fileList.value.find(function(e){return e.nm==t.value[0]});e.page.value=1,n.value=r.path,Q(e)}function Ss(e){return X(function(){var t,n,r,i;return Z(this,function(a){switch(a.label){case 0:t=e.choosedKeys,n=e.fileList,r=n.value.find(function(e){return e.nm==t.value[0]}),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,W.post(`/files?action=add_files_store`,{path:r.path},{requestOptions:{loading:G(`file.contextMenu.loading.addingToFavorites`),successMessage:!0}})];case 2:return a.sent(),no(e),Q(e),[3,4];case 3:return i=a.sent(),console.warn(i),[3,4];case 4:return[2]}})})()}function Cs(e){return X(function(){var t,n,r;return Z(this,function(i){return t=e.choosedKeys,n=e.fileList,r=Qs(n.value,t.value)[0],r&&_a({title:G(`file.favoriteListModal.cancelFavoriteTitle`),content:G(`file.favoriteListModal.cancelFavoriteMessage`,{name:r.nm}),onConfirm:function(){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,Zo(e,r.path)];case 1:return t.sent(),[2]}})})()}}),[2]})})()}function ws(e,t,n){return X(function(){var r,i,a,o,s,c,l;return Z(this,function(u){switch(u.label){case 0:return r=e.choosedKeys,i=e.fileList,a=e.fileCopyCache,o=e.waitForPaste,s=e.copiedFile,c=e.currentPath,r.value.length==1?(V.success(t),a.value=JSON.parse(JSON.stringify(r.value)),s.value=Qs(i.value,a.value)[0],o.value=!0,[3,4]):[3,1];case 1:return u.trys.push([1,3,,4]),[4,ds(r.value,n,c.value)];case 2:return u.sent().status==0&&(a.value=JSON.parse(JSON.stringify(r.value)),o.value=!0),[3,4];case 3:return l=u.sent(),console.warn(l),[3,4];case 4:return[2]}})})()}function Ts(e){return X(function(){var t,n,r,i,a;return Z(this,function(o){switch(o.label){case 0:return t=e.fileCopyCache,n=e.fileOperationFlag,r=e.currentPath,i=e.copiedFile,a=e.waitForPaste,t.value.length>1?[4,ps(n.value,r.value)]:[3,2];case 1:return o.sent(),[3,6];case 2:return t.value.length==1?n.value==1?[4,fs(i.value.path,r.value+`/`+i.value.nm)]:[3,4]:[3,6];case 3:return o.sent(),[3,6];case 4:return n.value==2?[4,ms(i.value.path,r.value+`/`+i.value.nm)]:[3,6];case 5:o.sent(),o.label=6;case 6:return Q(e),a.value=!1,[2]}})})()}function Es(e){return X(function(){var t,n;return Z(this,function(r){switch(r.label){case 0:return t=e.fileOperationFlag,n=e.waitForPaste,t.value=1,[4,ws(e,G(`file.contextMenu.messages.copySuccess`),1)];case 1:return r.sent(),n.value=!0,[2]}})})()}function Ds(e){return X(function(){var t,n,r;return Z(this,function(i){return t=e.choosedKeys,n=e.fileList,r=Qs(n.value,t.value)[0],r&&_r(r.path),[2]})})()}function Os(e){return X(function(){var t,n;return Z(this,function(r){switch(r.label){case 0:return t=e.fileOperationFlag,n=e.waitForPaste,t.value=2,[4,ws(e,G(`file.contextMenu.messages.cutSuccess`),2)];case 1:return r.sent(),n.value=!0,[2]}})})()}function ks(e){return X(function(){var t,n,r,i;return Z(this,function(a){switch(a.label){case 0:return t=e.fileCopyCache,n=e.currentPath,r=e.waitForPaste,r.value?(i=!1,t.value.length==1?[4,us(n.value,t.value[0])]:[3,2]):[2];case 1:return i=a.sent(),[3,4];case 2:return t.value.length>1?[4,us(n.value)]:[3,4];case 3:i=a.sent(),a.label=4;case 4:return i?t.value.length==1?$(e,`PasteSingleConfirm`,function(e){return e.value.open()}):t.value.length>1&&$(e,`PasteConfirm`,function(e){return e.value.open()}):Ts(e),[2]}})})()}function As(e){return X(function(){var t,n;return Z(this,function(r){return t=e.currentPath,n=e.choosedKeys,Lr(``.concat(t.value===`/`?``:t.value,`/`,n.value[0])),[2]})})()}function js(e){return X(function(){var t,n,r,i,a;return Z(this,function(o){return t=e.choosedKeys,n=e.fileList,r=e.currentFile,i=e.filesView,a=Qs(n.value,t.value)[0],r.value=a,i.value===`card`?(r.value.isRenameForCard=!0,r.value.editName=r.value.nm):(a.isCreate=!0,a.isRename=!0,a.editName=a.nm,Oi(uo)),[2]})})()}function Ms(e){$(e,`Compression`,function(e){return e.value.open()})}function Ns(e){var n=e.choosedKeys,r=e.fileList,i=Qs(r.value,n.value)[0];i&&Sa({title:G(`file.archivePreviewModal.titleWithTypeFile`,{type:ts(i.ext),name:i.nm}),width:720,height:560,footer:!1,data:{file:i,fileStore:e},component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.a})},void 0)})})}function Ps(e){var t=e.choosedKeys,n=e.fileList,r=Qs(n.value,t.value)[0];_o(e,r.path)}function Fs(e){return X(function(){var t,n,r,i;return Z(this,function(a){switch(a.label){case 0:return t=e.choosedKeys,n=e.fileList,r=Qs(n.value,t.value)[0],i=Number((r==null?void 0:r.isShare)||(r==null?void 0:r.durl)),i?[4,zi({id:i})]:[2];case 1:return a.sent(),Q(e),[2]}})})()}function Is(e){var t=e.choosedKeys,n=e.fileList,r=Qs(n.value,t.value)[0];vo(e,r)}function Ls(e,n){var r=hr[n];Sa({title:function(){return ni(`div`,{class:`flex items-center gap-8px`},[ni(`img`,{class:`inline-block h-18px max-h-18px max-w-18px w-18px object-contain align-middle`,src:r.icon,alt:``}),ni(`span`,G(r.labelKey))])},width:1100,height:686,footer:!1,data:{initialLocalPath:e.currentPath.value,providerKey:n},component:L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.i})},void 0)})})}function Rs(e,t){var n=t.menuShow;if(typeof e==`string`&&e.startsWith(`uploadToCloud:`)){var r=e.slice(14);rs(r)?ls(t,r):V.warning(G(`file.contextMenu.messages.cloudUploadNotConnected`)),n.value=!1;return}switch(e){case`edit`:bs(t);break;case`copy`:Es(t);break;case`copyPath`:Ds(t);break;case`cut`:Os(t);break;case`paste`:ks(t);break;case`permission`:$(t,`Permission`,function(e){return e.value.open()});break;case`compression`:Ms(t);break;case`decompress`:$(t,`Decompress`,function(e){return e.value.open()});break;case`compressionPreview`:Ns(t);break;case`conversion`:console.log(`conversion`);break;case`del`:kr(t);break;case`refresh`:Q(t);break;case`upload`:$(t,`UploadFile`,function(e){return e.value.open()});break;case`createFile`:Jo(t,G(`file.contextMenu.defaultNames.untitledFile`),`file`,`file`);break;case`createDir`:Jo(t,G(`file.contextMenu.defaultNames.untitledDirectory`),`dir`,`folder`);break;case`download`:As(t);break;case`terminal`:$(t,`Terminal`,function(e){return e.value.open()});break;case`open`:xs(t);break;case`share`:Oo(t);break;case`unShare`:Fs(t);break;case`favorite`:Ss(t);break;case`unfavorite`:Cs(t);break;case`rename`:js(t);break;case`attrs`:$(t,`Properties`,function(e){return e.value.open()});break;case`preview`:Ps(t);break;case`playVideo`:Is(t);break}n.value=!1}function zs(e){var t=e.type,n=e.list,r=e.path,i=[],a=!0,o=!1,s=void 0;try{for(var c=n[Symbol.iterator](),l;!(a=(l=c.next()).done);a=!0){var u=l.value;i.push(Bs({type:t,item:u,path:r}))}}catch(e){o=!0,s=e}finally{try{!a&&c.return!=null&&c.return()}finally{if(o)throw s}}return i}function Bs(e){var t=e.type,n=e.item,r=e.path,i=n.nm,a=n.sz,o=n.is_link,s=n.lnk,c=n.mt,l=n.ctime,u=n.atime,d=n.gid,f=n.uid,p=n.group,m=n.user,h=n.acc,g=n.rmk,_=n.durl,v=n.cmp,y=n.fav,b=n.top,x=n.sn;return{ext:Vs(n.nm,t),nm:i,sz:a,mt:c,acc:h,user:m,is_link:o?s:``,lnk:s,durl:_,cmp:v,fav:y,rmk:g,top:b,sn:x,path:Hs(r,i),ctime:l,atime:u,gid:d,uid:f,group:p,type:t}}function Vs(e,t){if(t===`dir`)return`folder`;var n=[`tar.gz`],r=e.toLowerCase(),i=!0,a=!1,o=void 0;try{for(var s=n[Symbol.iterator](),c;!(i=(c=s.next()).done);i=!0){var l=c.value;if(r.endsWith(l))return l}}catch(e){a=!0,o=e}finally{try{!i&&s.return!=null&&s.return()}finally{if(a)throw o}}var u=r.lastIndexOf(`.`);return u===-1?`file`:r.substring(u+1)}function Hs(e,t){return Us(``.concat(e,`/`,t))}function Us(e){return e.replace(/\/\//g,`/`)}function Ws(e){var t=[`folder`],n=[`txt`,`rtf`,`md`,`log`,`conf`],r=[`json`],i=[`htm`,`html`,`xhtml`],a=[`css`,`less`,`scss`],o=[`js`,`ts`],s=[`php`],c=[`pdf`,`pdfa`,`pdfx`,`pdfu`],l=[`doc`,`docx`,`docm`,`dot`,`dotx`,`dotm`],u=[`xlsx`,`xlsm`,`xltx`,`xltm`],d=`jpg.jpeg.png.gif.bmp.webp.tiff.tif.psd.ai.eps.cr2.cr3.nef.nrw.dng.svg.cdr.wmf.emf.apng.heic.ico.xbm.xpm.xcf.iff.pnm`.split(`.`),f=`py.java.js.ts.c.cpp.cs.php.rb.go.swift.kt.html.css.jsx.vue.scss.less.tsx.json.xml.yaml.yml.ini.properties.env.sql.pl.sh.bat.ps1.m.swift.kt.gradle.makefile.cmake.jar.war.exe.md.gitignore.dockerfile.yml.ipynb.asm.lua.rs.hs`.split(`.`);return t.includes(e)?`file-dir`:n.includes(e)?`file-txt`:r.includes(e)?`file-json`:i.includes(e)?`file-html`:a.includes(e)?`file-css`:o.includes(e)?`file-js`:s.includes(e)?`file-php`:l.includes(e)?`file-doc`:c.includes(e)?`file-pdf`:u.includes(e)?`file-excel`:d.includes(e)?`file-img`:f.includes(e)?`file-sh`:[`zip`,`rar`,`7z`,`tar`,`tar.gz`,`gz`,`tgz`,`tar.bz2`,`tar.xz`,`cab`,`iso`,`msi`,`rpm`,`deb`,`xz`,`zipx`,`lz4`,`zst`,`rar5`,`part1.rar`,`rar.part1`,`z01`,`z02`].includes(e)?`file-compression`:`file-unknown-file`}function Gs(e){return!![`file-txt`,`file-json`,`file-html`,`file-css`,`file-js`,`file-php`,`file-doc`,`file-sh`].includes(Ws(e.ext))}function Ks(e){return[`mp3`,`mp4`,`avi`,`mov`,`mkv`,`wmv`,`flv`,`3gp`,`3g2`,`vob`,`webm`,`ogv`].includes(e)}function qs(e){return Ws(e.ext)===`file-img`}function Js(e){return Ws(e)===`file-img`}function Ys(e){return Ws(e)===`file-compression`}function Xs(e,t,n){return X(function(){var r,i,a,o;return Z(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,W.post(`/files?action=GetDirNew`,Ga({path:e,is_operating:!0},n))];case 1:return r=s.sent().message,t&&t(r),i=zs({type:`dir`,list:r.dir,path:r.path}),a=zs({type:`file`,list:r.files,path:r.path}),i=i.map(function(e,t){return qa(Ga({},e),{protected:r.tamper_data.dirs&&r.tamper_data.dirs[t]?Number(r.tamper_data.dirs[t].split(`;`)[0]):0,protected_rule:r.tamper_data.dirs&&r.tamper_data.dirs[t]?Number(r.tamper_data.dirs[t].split(`;`)[1]):0})}),a=a.map(function(e,t){return qa(Ga({},e),{protected:r.tamper_data.files&&r.tamper_data.files[t]?Number(r.tamper_data.files[t].split(`;`)[0]):0,protected_rule:r.tamper_data.files&&r.tamper_data.files[t]?Number(r.tamper_data.files[t].split(`;`)[1]):0})}),[2,Ya(i).concat(Ya(a))];case 2:return o=s.sent(),console.warn(o),[2,[]];case 3:return[2]}})})()}function Zs(e,t,n,r,i,a){return X(function(){var o,s,c,l,u,d,f,p,m,h;return Z(this,function(g){switch(g.label){case 0:for(o=[],s=Math.ceil(e.size/n),c=0;c<s;c++)l=c*n,u=Math.min(l+n,e.size),d=e.slice(l,u),f=new FormData,f.append(`f_path`,r),f.append(`f_name`,e.name),f.append(`f_size`,``.concat(e.size)),f.append(`f_start`,``.concat(l)),f.append(`blob`,d),o.push(f);g.label=1;case 1:g.trys.push([1,6,,7]),p=0,g.label=2;case 2:return p<o.length?[4,W.post(t,o[p],{headers:{"Content-Type":`multipart/form-data`},requestOptions:{isOriginalResult:!0}})]:[3,5];case 3:m=g.sent(),typeof m.message==`number`&&a&&a(m),i(Math.round(p/o.length*100),m),g.label=4;case 4:return p++,[3,2];case 5:return i(100,null),[3,7];case 6:return h=g.sent(),console.log(h),[2,Promise.reject({msg:h.message})];case 7:return[2]}})})()}function Qs(e,t){return e.filter(function(e){return t.includes(e.nm)})}function $(e,t,n){return X(function(){var r,i,a,o;return Z(this,function(s){switch(s.label){case 0:return r=e.dynamicCmptObj,i=e.dynamicCmpt,a=e.dynamicCmptRef,o=r[t](),[4,o.__asyncLoader()];case 1:return s.sent(),i.value=o,Oi(function(){n&&n(a)}),[2]}})})()}function $s(e){var t=e.choosedKeys;t.value=[]}function ec(){var e=U(),n=U(`list`),r=U(`/www`),i=U([]),a=U(!1),o=U([]),s=U([]),c=U([]),l=U(),u=U(),d=U(),f=U([]),p=U([]),m=U({url:`http://`,path:r.value,filename:``}),h=U({reference:``,per:0,speed:`0`,used:`0`,except:`--`,total:0}),g=U(!1),_=U([]),v=U({text:``,exts:`html,php`,path:r.value,is_subdir:0,mode:0,isword:0,iscase:1,noword:0});function y(){v.value={text:``,exts:`html,php`,path:r.value,is_subdir:0,mode:0,isword:0,iscase:1,noword:0}}var b=U({}),x=U({files:0,times:0}),S=U([]),C=U([{label:ia(`file.favoriteListModal.management`),key:`management`,icon:`settings`}]);function w(){C.value=[{label:ia(`file.favoriteListModal.management`),key:`management`,icon:`settings`}]}var T=U([]),E=U({back_sub_dir:1,path:``,remark:``}),D=zr,O=Rr,ee=ka,te=gr,k={PasteConfirm:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.d})},void 0)})},PasteSingleConfirm:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.u})},void 0)})},UploadFile:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.D})},void 0)})},RemoteDownload:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.w})},void 0)})},SearchFileContent:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.C})},void 0)})},FavoriteList:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.T})},void 0)})},Backup:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.E})},void 0)})},Terminal:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.h})},void 0)})},Softlink:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.S})},void 0)})},Permission:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.l})},void 0)})},Properties:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.s})},void 0)})},Del:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.f})},void 0)})},Compression:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.m})},void 0)})},Decompress:function(){return L(function(){return A(function(){return t.import(`./view-files-legacy.js?v=1784873523001`).then(function(e){return e.p})},void 0)})}},ne=$i(null),re=U(),ie=U(!1),ae=U(!1),oe=U([]),se=U(!1),ce=U(!1),le=U(!1),ue=U(!1),de=U(),fe=U(!1),pe=M(function(){return i.value.filter(function(e){return qs(e)}).map(function(e){return e.path})}),me=M(function(){return i.value.filter(function(e){return Ks(e.ext)}).map(function(e){return{path:e.path,name:e.nm}})}),he=U(``),ge=U({path:``,name:``}),_e=U(!1),ve=U(!1),ye=U(1),be=U(0),xe=U(0),Se=U(1),Ce=U(100),we=function(){try{return JSON.parse(sessionStorage.getItem(`fileSortState`)||`{}`)}catch(e){return{}}}(),Te=U(we.sort||``),Ee=U(we.reverse||`False`),De=U(0),Oe=U(null),ke=U(),Ae=U([]),je=U(-1),Me=U(),Ne=U({reqEnd:!1,isSetup:!1,isBuy:!1});function Pe(){return X(function(){var e;return Z(this,function(t){switch(t.label){case 0:if(Ne.value.reqEnd)return[2];t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,Qr({sName:`disk_analysis`})];case 2:return e=t.sent().message,B(e)?(Ne.value={reqEnd:!0,isSetup:e.status&&e.setup&&e.endtime>-1,isBuy:e.endtime>-1},[2]):[3,5];case 3:return t.sent(),[3,5];case 4:return Ne.value.reqEnd=!0,[7];case 5:return[2]}})})()}return{mainRef:e,filesView:n,currentPath:r,fileList:i,tableLoading:a,normalTrList:o,trRectArr:s,choosedKeys:c,tableRef:l,dataTableRef:u,contextRef:d,normalCardList:f,cardRectArr:p,downloadFileFormData:m,downloadProgressData:h,downloadProgressShow:g,resourceManagerWindow:_,searchFileContentFormData:v,resetSearchFileContentFormData:y,searchRes:b,searchStatistics:x,favoriteList:S,favoriteOptions:C,resetFavoriteOptions:w,backupList:T,backupForm:E,fileOperationFlag:D,fileCopyCache:O,waitForPaste:ee,copiedFile:te,dynamicCmptObj:k,dynamicCmpt:ne,dynamicCmptRef:re,fileRecycle:ie,menuShow:ae,uploadFileList:oe,uploadShow:se,uploadComplete:ce,startUpload:le,fileConflictShow:ue,optionToolsRef:de,isMiniScreen:fe,imgWaitPreview:pe,videoWaitPreview:me,currentPreviewImg:he,currentPreviewVideo:ge,previewShow:_e,previewVideoShow:ve,operationType:ye,directoryCount:be,fileCount:xe,page:Se,size:Ce,sort:Te,reverse:Ee,total:De,currentFile:Oe,choosePathRef:ke,diskMountPoint:Ae,currentDirSize:je,dragUploadRef:Me,diskAnalysis:Ne,initDiskAnalysis:Pe}}function tc(e,t){return H(),P(`div`,Oe,[N(`div`,st,[N(`div`,Tt,[N(`div`,null,[N(`div`,Kt,K(e.$t(`fileEditor.shortcut.common.title`)),1),N(`div`,un,[N(`div`,Tn,[t[0]||(t[0]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`S`)],-1)),N(`div`,zn,K(e.$t(`fileEditor.shortcut.common.saveFile`)),1)]),N(`div`,Vn,[t[1]||(t[1]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`C`)],-1)),N(`div`,Hn,K(e.$t(`fileEditor.shortcut.common.copy`)),1)]),N(`div`,Be,[t[2]||(t[2]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`X`)],-1)),N(`div`,Ve,K(e.$t(`fileEditor.shortcut.common.cut`)),1)]),N(`div`,He,[t[3]||(t[3]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`V`)],-1)),N(`div`,Ue,K(e.$t(`fileEditor.shortcut.common.paste`)),1)]),N(`div`,We,[t[4]||(t[4]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`A`)],-1)),N(`div`,Ge,K(e.$t(`fileEditor.shortcut.common.selectAll`)),1)]),N(`div`,Ke,[t[5]||(t[5]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`Z`)],-1)),N(`div`,qe,K(e.$t(`fileEditor.shortcut.common.undo`)),1)]),N(`div`,Je,[t[6]||(t[6]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`Y`)],-1)),N(`div`,Ye,K(e.$t(`fileEditor.shortcut.common.redo`)),1)]),N(`div`,ht,[t[7]||(t[7]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`F`)],-1)),N(`div`,gt,K(e.$t(`fileEditor.shortcut.common.find`)),1)]),N(`div`,_t,[t[8]||(t[8]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`H`)],-1)),N(`div`,vt,K(e.$t(`fileEditor.shortcut.common.replace`)),1)]),N(`div`,yt,[t[9]||(t[9]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Esc`)],-1)),N(`div`,bt,K(e.$t(`fileEditor.shortcut.common.esc`)),1)])])]),N(`div`,xt,[N(`div`,St,K(e.$t(`fileEditor.shortcut.cursorMove.title`)),1),N(`div`,Ct,[t[14]||(t[14]=N(`div`,{class:`flex items-center`},[N(`div`,{class:`flex items-center flex-wrap gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Home`),F(` / `),N(`kbd`,null,`End`),F(` / `),N(`kbd`,null,`Up`),F(` / `),N(`kbd`,null,`Left`),F(` / `),N(`kbd`,null,`Down`),F(` / `),N(`kbd`,null,`Right`)])],-1)),N(`div`,wt,[t[10]||(t[10]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`Home`),F(` / `),N(`kbd`,null,`End`)],-1)),N(`div`,It,K(e.$t(`fileEditor.shortcut.cursorMove.docStartEnd`)),1)]),N(`div`,Lt,[t[11]||(t[11]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`P`)],-1)),N(`div`,Rt,K(e.$t(`fileEditor.shortcut.cursorMove.matchingTag`)),1)]),N(`div`,zt,[t[12]||(t[12]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`PageUp`),F(` / `),N(`kbd`,null,`PageDown`)],-1)),N(`div`,Bt,K(e.$t(`fileEditor.shortcut.cursorMove.pageUpDown`)),1)]),N(`div`,Vt,[t[13]||(t[13]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Alt`),F(` + `),N(`kbd`,null,`Left`),F(` / `),N(`kbd`,null,`Right`)],-1)),N(`div`,Ht,K(e.$t(`fileEditor.shortcut.cursorMove.lineStartEnd`)),1)])])])]),N(`div`,Ut,[N(`div`,null,[N(`div`,Wt,K(e.$t(`fileEditor.shortcut.selection.title`)),1),N(`div`,Gt,[N(`div`,$t,[N(`div`,en,[N(`kbd`,null,K(e.$t(`fileEditor.shortcut.selection.mouseBox`)),1),t[15]||(t[15]=F(` —— `,-1)),N(`kbd`,null,K(e.$t(`fileEditor.shortcut.selection.drag`)),1)])]),t[20]||(t[20]=Cr(`<div class="flex items-center" data-v-fccb0a32><div class="flex items-center flex-wrap gap-[6px] min-w-[260px] text-white" data-v-fccb0a32><kbd data-v-fccb0a32>Shift</kbd> + <kbd data-v-fccb0a32>Home</kbd> / <kbd data-v-fccb0a32>End</kbd> / <kbd data-v-fccb0a32>Up</kbd> / <kbd data-v-fccb0a32>Left</kbd> / <kbd data-v-fccb0a32>Down</kbd> / <kbd data-v-fccb0a32>Right</kbd></div></div>`,1)),N(`div`,tn,[t[16]||(t[16]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Shift`),F(` + `),N(`kbd`,null,`PageUp`),F(` / `),N(`kbd`,null,`PageDown`)],-1)),N(`div`,nn,K(e.$t(`fileEditor.shortcut.selection.pageSelect`)),1)]),N(`div`,rn,[t[17]||(t[17]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`Shift`),F(` + `),N(`kbd`,null,`Home`),F(` / `),N(`kbd`,null,`End`)],-1)),N(`div`,an,K(e.$t(`fileEditor.shortcut.selection.cursorToStartEnd`)),1)]),N(`div`,on,[N(`div`,sn,[t[18]||(t[18]=N(`kbd`,null,`Alt`,-1)),t[19]||(t[19]=F(` + `,-1)),N(`kbd`,null,K(e.$t(`fileEditor.shortcut.selection.mouseDrag`)),1)]),N(`div`,cn,K(e.$t(`fileEditor.shortcut.selection.blockSelect`)),1)])])]),N(`div`,ln,[N(`div`,hn,K(e.$t(`fileEditor.shortcut.edit.title`)),1),N(`div`,gn,[N(`div`,_n,[t[21]||(t[21]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`/`)],-1)),N(`div`,vn,K(e.$t(`fileEditor.shortcut.edit.toggleComment`)),1)]),N(`div`,yn,[t[22]||(t[22]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Tab`)],-1)),N(`div`,bn,K(e.$t(`fileEditor.shortcut.edit.indent`)),1)]),N(`div`,xn,[t[23]||(t[23]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Shift`),F(` + `),N(`kbd`,null,`Tab`)],-1)),N(`div`,Sn,K(e.$t(`fileEditor.shortcut.edit.outdent`)),1)]),N(`div`,Cn,[t[24]||(t[24]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Delete`)],-1)),N(`div`,wn,K(e.$t(`fileEditor.shortcut.edit.delete`)),1)]),N(`div`,kn,[t[25]||(t[25]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`D`)],-1)),N(`div`,An,K(e.$t(`fileEditor.shortcut.edit.deleteLine`)),1)]),N(`div`,jn,[t[26]||(t[26]=N(`div`,{class:`flex items-center flex-wrap gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Alt`),F(` + `),N(`kbd`,null,`Shift`),F(` + `),N(`kbd`,null,`Up`),F(` / `),N(`kbd`,null,`Down`)],-1)),N(`div`,Mn,K(e.$t(`fileEditor.shortcut.edit.copyLineUpDown`)),1)]),N(`div`,Nn,[t[27]||(t[27]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Alt`),F(` + `),N(`kbd`,null,`Delete`)],-1)),N(`div`,Pn,K(e.$t(`fileEditor.shortcut.edit.deleteRight`)),1)]),N(`div`,Fn,[t[28]||(t[28]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Alt`),F(` + `),N(`kbd`,null,`Up`),F(` / `),N(`kbd`,null,`Down`)],-1)),N(`div`,In,K(e.$t(`fileEditor.shortcut.edit.swapLineUpDown`)),1)]),N(`div`,Ln,[t[29]||(t[29]=N(`div`,{class:`flex items-center gap-[6px] min-w-[260px] text-white`},[N(`kbd`,null,`Ctrl`),F(` + `),N(`kbd`,null,`Shift`),F(` + `),N(`kbd`,null,`D`)],-1)),N(`div`,Rn,K(e.$t(`fileEditor.shortcut.edit.copyLineDown`)),1)])])])])])])}return e({$:jo,A:void 0,B:zo,C:Rs,D:void 0,E:ys,F:void 0,G:Vo,H:Yo,I:Xo,J:Io,K:Go,L:Mo,M:void 0,N:void 0,O:void 0,P:void 0,Q:Fo,R:Po,S:ls,T:ks,U:Ho,V:Bo,W:Uo,X:Ko,Y:void 0,Z:qo,_:fs,_t:void 0,a:Vs,at:void 0,b:bs,c:qs,ct:so,d:Zs,dt:fo,et:Co,f:ps,ft:void 0,g:Es,gt:Za,h:_s,ht:Qa,i:Qs,it:oo,j:void 0,k:void 0,l:zs,lt:_o,m:gs,mt:eo,n:ec,nt:To,o:Gs,ot:to,p:us,pt:$a,q:Lo,r:$,rt:wo,s:Ys,st:lo,t:void 0,tt:Q,u:Xs,ut:Eo,v:Ms,vt:void 0,w:xs,x:vs,y:Os,z:Zo}),{setters:[function(e){pe=e.r,me=e.a},function(e){x=e.mn,fr=e.jt,M=e.yn,N=e.bn,vr=e.xn,yr=e.Sn,P=e.Cn,Cr=e.Tn,F=e.En,I=e.Dn,L=e.On,R=e.kn,ni=e.jn,e.dr,e.Nn,e.on,e.Pr,z=e.nn,wi=e.mr,Di=e.In,Oi=e.Rn,ki=e.qr,Ai=e.Jr,ji=e.Vn,Mi=e.Wn,Ni=e.Gn,H=e.qn,Ii=e._r,U=e.yr,Vi=e.Yn,Xi=e.Qn,$i=e.xr,K=e.Zr,pa=e.Sr,ma=e.Tr,q=e.Er,va=e.y,Ca=e.nr,wa=e.d,Ea=e.ir,Oa=e.un,Aa=e.ar,ja=e.or,Y=e.sr,Ma=e.cr,Na=e.dn,Pa=e.fn},function(e){Or=e.f,na=e.p,ya=e.l},function(e){c=e.ht,l=e.lt,d=e.K,f=e.J,v=e.I,b=e.P,C=e.k,w=e.xt,O=e.X,ee=e.Q,te=e.b,k=e.et,ie=e._,ue=e.o,lr=e.nn,Hr=e.rn},function(e){j=e.If,nr=e.Ff,rr=e.mn,ir=e.xf,cr=e.ln,ur=e.Dn,dr=e.fa,pr=e.Df,_r=e.dn,Lr=e.np,Ur=e.Jf,Xr=e.sp,Zr=e.fp,ai=e.Lf,Ci=e.pp,B=e.gp,V=e.Pf,W=e.Tf,fa=e.Cf,ha=e.Zt,ga=e.kf,_a=e.Af,ba=e.Sa,xa=e.Oa,Sa=e.jf,Ta=e.Tn,Da=e.Ta},function(e){tr=e.Ki,or=e.qi,sr=e.Yi,Wr=e.qr,Qr=e._i,ta=e.Jr},function(e){br=e.Df,xr=e.Of,Ar=e.kf,Kr=e.Uf,qr=e.jf,Yr=e.Pf,Li=e.Ff,Ri=e.If,Bi=e.Lf,Zi=e.Wf,Qi=e.Rf},function(e){A=e.n,Si=e.r},function(e){ar=e.c},function(e){n=e.t,fe=e.l,Hi=e.u,Ui=e.c,Wi=e.a,Gi=e.o,Ki=e.s,qi=e.i,Ji=e.r,Yi=e.n},function(e){$r=e.o}],execute:function(){he=document.createElement(`style`),he.textContent=`.aceBox[data-v-4c9504bb]{border:1px solid var(--site-ace-editor-border);border-radius:4px;width:100%;line-height:1.4}.editor-title[data-v-3102b2b4]{color:#333;z-index:1;cursor:move;background-color:#fff;justify-content:space-between;align-items:center;height:42px;padding-left:16px;display:flex;position:relative;box-shadow:0 1px 4px rgba(0,0,0,.1)}.editor-title .title-left[data-v-3102b2b4]{font-size:14px}.editor-title .title-right[data-v-3102b2b4]{align-items:center;height:100%;display:flex}.editor-title .title-right .action-btn[data-v-3102b2b4]{cursor:pointer;justify-content:center;align-items:center;width:48px;height:100%;transition:background-color .2s;display:flex}.editor-title .title-right .action-btn div[data-v-3102b2b4]{color:#555;font-size:18px}.editor-title .title-right .action-btn[data-v-3102b2b4]:hover{background-color:#e5e5e5}.editor-title .title-right .action-btn.close-btn[data-v-3102b2b4]:hover{background-color:var(--color-error)}.editor-title .title-right .action-btn.close-btn:hover div[data-v-3102b2b4]{color:#fff}.toolbar-dialog[data-v-cd363012]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-cd363012]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog .fontsize-content[data-v-cd363012]{padding:16px}.toolbar-dialog .fontsize-input[data-v-cd363012]{flex:1}.toolbar-dialog .fontsize-input[data-v-cd363012] .n-input{--n-color:transparent;--n-color-focus:transparent;--n-border:1px solid #fff;--n-border-hover:1px solid #fff;--n-border-active:1px solid #fff;--n-border-focus:1px solid #fff;--n-text-color:#fff;--n-caret-color:#fff}.line-ending-select[data-v-3b563599]{padding:16px}.line-ending-item[data-v-3b563599]{cursor:pointer;--un-text-opacity:1;height:30px;color:rgba(255,255,255,var(--un-text-opacity)) ;justify-content:space-between;align-items:center;font-size:14px;display:flex}.line-ending-item[data-v-3b563599]:hover,.line-ending-item.active[data-v-3b563599]{background-color:#333}.toolbar-dialog[data-v-fd78c99a]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-fd78c99a]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog[data-v-0f74f1f1]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-0f74f1f1]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.setting-list[data-v-0f74f1f1]{padding:16px}.setting-item[data-v-0f74f1f1]{cursor:pointer;--un-text-opacity:1;height:30px;color:rgba(255,255,255,var(--un-text-opacity)) ;justify-content:space-between;align-items:center;font-size:14px;display:flex}.setting-item[data-v-0f74f1f1]:hover{background-color:#333}.toolbar-dialog[data-v-34b64179]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-34b64179]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog[data-v-9b2e7d57]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-9b2e7d57]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog[data-v-60c1d667]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-60c1d667]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog[data-v-55e56222]{background-color:#444}.toolbar-dialog .toolbar-title[data-v-55e56222]{color:#9e9e9e;border-bottom:1px solid #666;padding:12px 16px;font-size:14px}.toolbar-dialog .goto-content[data-v-55e56222]{padding:16px}.toolbar-dialog .goto-input[data-v-55e56222]{width:100%}.toolbar-dialog .goto-input[data-v-55e56222] .n-input{--n-color:transparent;--n-color-focus:transparent;--n-border:1px solid #fff;--n-border-hover:1px solid #fff;--n-border-active:1px solid #fff;--n-border-focus:1px solid #fff;--n-text-color:#fff;--n-caret-color:#fff}.toolbar-dialog .goto-hint[data-v-55e56222]{color:#fff;margin-top:12px;font-size:14px}.toolbar-wrapper[data-v-c822e0b3]{position:relative}.toolbar-list[data-v-c822e0b3]{color:#fff;background-color:#565656;align-items:center;height:32px;min-height:32px;display:flex}.tools-btn[data-v-c822e0b3]{cursor:pointer;border-right:1px solid #4c4c4c;justify-content:center;align-items:center;gap:4px;height:32px;padding:0 16px;font-size:13px;display:flex;position:relative}.tools-btn[data-v-c822e0b3]:hover{background-color:#2f2f2f}.breadcrumb-wrapper[data-v-54af520c]{color:#fff;background-color:#383838;align-items:center;height:40px;padding:0 16px;font-size:14px;display:flex}.action-wrapper[data-v-e49ff329]{color:#fff;background-color:#565656;justify-content:space-between;align-items:center;width:100%;height:32px;min-height:32px;display:flex}.action-wrapper.is-search-mode[data-v-e49ff329]{height:auto;min-height:auto;display:block}.action-btn[data-v-e49ff329]{cursor:pointer;color:#fff;justify-content:center;align-items:center;gap:4px;height:32px;padding:0 8px;font-size:12px;line-height:1.1;transition:all .2s;display:flex;position:relative}.action-btn[data-v-e49ff329]:hover{background-color:#2f2f2f}.action-btn i[data-v-e49ff329]{font-size:13px}.action-btn i.is-loading[data-v-e49ff329]{animation:1s linear infinite rotate-e49ff329}@keyframes rotate-e49ff329{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.search-panel[data-v-e49ff329]{flex-direction:column;padding:12px;display:flex}.search-title[data-v-e49ff329]{color:#aaa;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:13px;display:flex}.search-title .close-btn[data-v-e49ff329]{color:#f44336;cursor:pointer;align-items:center;gap:4px;display:flex}.search-title .close-btn[data-v-e49ff329]:hover{opacity:.8}.search-input-wrap[data-v-e49ff329]{margin-bottom:12px}.search-input-wrap[data-v-e49ff329] .n-input{--n-text-color:#333;--n-caret-color:#333;--n-border:1px solid transparent;--n-border-hover:1px solid transparent;--n-border-focus:1px solid transparent;--n-padding-right:0;background-color:#fff;border:none;border-radius:4px}.search-input-wrap[data-v-e49ff329] .n-input .n-input__suffix{color:#666;align-items:center;height:100%;margin-left:0;display:flex}.search-input-wrap[data-v-e49ff329] .n-input .search-icon-btn{cursor:pointer;border-left:1px solid #eee;justify-content:center;align-items:center;height:28px;padding:0 10px;display:flex}.search-input-wrap[data-v-e49ff329] .n-input .search-icon-btn:hover{background-color:#f5f5f5}.search-input-wrap[data-v-e49ff329] .n-input .search-icon-btn i{font-size:16px}.search-options .n-checkbox[data-v-e49ff329]{--n-text-color:#fff;--n-font-size:13px}.share-list-modal[data-v-6a33ff8a]{width:100%;padding:20px}.tree-wrapper[data-v-eae71705]{background-color:#222;flex:1;overflow:hidden}.n-tree[data-v-eae71705]{--n-node-text-color:#ccc;--n-node-color-hover:#37373d;--n-node-color-active:transparent;--n-arrow-color:#ccc;--n-loading-color:#ccc;--n-line-height:1.2;--n-bezier:cubic-bezier(.4, 0, .2, 1);--n-font-size:13px;background-color:transparent;height:100%;padding:6px;overflow:auto}.n-tree[data-v-eae71705] .n-tree-node{border-radius:4px}.n-tree[data-v-eae71705] .n-tree-node.n-tree-node--selected:hover{background-color:var(--n-node-color-hover)}.n-tree[data-v-eae71705] .n-tree-node .tree-icon{align-items:center;font-size:16px;font-style:normal;display:inline-flex}.n-tree[data-v-eae71705] .n-tree-node .n-tree-node-content__text{border-bottom:none;width:0}.n-tree[data-v-eae71705] .n-tree-node .n-tree-node-content{padding:0}.n-tree[data-v-eae71705] .n-tree-node .creating-node{align-items:center;width:100%;display:flex}.n-tree[data-v-eae71705] .n-tree-node .creating-node .creating-input{color:#000;background-color:#fff;border:1px solid #4caf50;border-radius:2px;outline:none;flex:1;width:120px;height:22px;padding:0 4px;line-height:22px}.n-tree[data-v-eae71705] .n-tree-node .creating-node i{cursor:pointer;margin-left:4px;font-size:16px;font-weight:700}.sidebar-wrapper[data-v-4a4cb5df]{flex-shrink:0;width:260px;height:100%;transition:width .3s cubic-bezier(.25,.8,.25,1);position:relative}.sidebar-wrapper.is-collapsed[data-v-4a4cb5df]{width:0}.sidebar-wrapper.is-collapsed .sidebar-content[data-v-4a4cb5df]{display:none}.sidebar-wrapper.is-collapsed .toggle-btn[data-v-4a4cb5df]:after{margin-left:-7px;transform:rotate(45deg)}.sidebar-content[data-v-4a4cb5df]{background-color:#2f2f2f;flex-direction:column;width:260px;height:100%;display:flex;overflow:hidden}.toggle-btn[data-v-4a4cb5df]{cursor:pointer;z-index:998;background-color:#222;border:1px solid #525252;border-left:none;border-radius:0 9999px 9999px 0;justify-content:center;align-items:center;width:14px;height:50px;transition:all .2s;display:flex;position:absolute;top:40%;right:-14px}.toggle-btn[data-v-4a4cb5df]:hover{background-color:#888}.toggle-btn[data-v-4a4cb5df]:after{content:"";border-top:2px solid #fff;border-bottom:none;border-left:none;border-right:2px solid #fff;width:10px;height:10px;margin-left:2px;display:block;transform:rotate(-135deg)}.editor-header-wrapper[data-v-7c07065c]{--un-bg-opacity:1;background-color:rgba(0,0,0,var(--un-bg-opacity)) ;width:100%;height:40px;overflow:hidden}.editor-header[data-v-7c07065c]{align-items:center;height:40px;display:flex}[data-v-7c07065c] .n-scrollbar{--n-scrollbar-color:#444;--n-scrollbar-color-hover:#444}.editor-tab[data-v-7c07065c]{cursor:pointer;--un-text-opacity:1;max-width:300px;height:100%;color:rgba(153,153,153,var(--un-text-opacity)) ;border-right:1px solid #222;flex-shrink:0;align-items:center;padding-left:10px;padding-right:36px;font-size:15px;display:flex;position:relative}.editor-tab[data-v-7c07065c]:hover,.editor-tab.active[data-v-7c07065c]{--un-bg-opacity:1;background-color:rgba(34,34,34,var(--un-bg-opacity)) ;--un-text-opacity:1;color:rgba(236,236,236,var(--un-text-opacity)) }.editor-tab.active[data-v-7c07065c]:before{content:"";background-color:var(--color-primary) ;height:2px;position:absolute;top:0;left:0;right:0}.editor-tab .tab-close[data-v-7c07065c]{position:absolute;right:10px}.editor-tab .tab-dirty[data-v-7c07065c]{background-color:#f4c26b;border-radius:50%;width:8px;height:8px;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.editor-tab .tree-icon[data-v-7c07065c]{align-items:center;margin-right:4px;font-size:16px;font-style:normal;display:inline-flex}.ace-editor[data-v-fd69013c] .ace_scrollbar::-webkit-scrollbar{width:14px;height:10px}.ace-editor[data-v-fd69013c] .ace_scrollbar::-webkit-scrollbar-thumb{background:#777;border-radius:0;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.ace-editor[data-v-fd69013c] .ace_scrollbar::-webkit-scrollbar-track{background:#333;border-radius:0;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.file-history[data-v-654b4dcd]{width:550px;padding:20px}.editor-footer[data-v-bf1270cf]{--un-bg-opacity:1;background-color:rgba(86,86,86,var(--un-bg-opacity)) ;--un-text-opacity:1;height:36px;color:rgba(255,255,255,var(--un-text-opacity)) ;justify-content:space-between;align-items:center;gap:16px;padding-left:16px;padding-right:16px;font-size:14px;display:flex}.editor-footer .footer-path[data-v-bf1270cf]{flex:1;min-width:0;max-width:50%}.editor-footer .footer-tools[data-v-bf1270cf]{align-items:center;height:100%;display:flex}.editor-footer .footer-item[data-v-bf1270cf]{cursor:pointer;border-right:1px solid #4c4c4c;align-items:center;height:100%;padding-left:16px;padding-right:16px;display:flex}.editor-footer .footer-item[data-v-bf1270cf]:hover{background-color:#2f2f2f}.editor-footer .readonly-badge[data-v-bf1270cf]{cursor:default;background-color:#eb7c20;border-right:none}.editor-footer .readonly-badge[data-v-bf1270cf]:hover{background-color:#eb7c20}.editor-footer.diff-footer[data-v-bf1270cf]{color:#fff;background-color:#eb7c20}.editor-footer.diff-footer .footer-tools .footer-item[data-v-bf1270cf]{background-color:transparent;border-right:none}.editor-footer.diff-footer .footer-tools .footer-item[data-v-bf1270cf]:hover{background-color:transparent}.editor-footer.diff-footer .diff-path[data-v-bf1270cf]{max-width:80%}.ace-diff-container[data-v-4b286035]{width:100%;height:100%}.ace-diff-container[data-v-4b286035] .ace_scrollbar::-webkit-scrollbar{width:14px;height:10px}.ace-diff-container[data-v-4b286035] .ace_scrollbar::-webkit-scrollbar-thumb{background:#777;border-radius:0;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.ace-diff-container[data-v-4b286035] .ace_scrollbar::-webkit-scrollbar-track{background:#333;border-radius:0;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.ace-diff-container[data-v-4b286035] .acediff__gutter{background-color:#333}.ace-diff-container[data-v-4b286035] .acediff__left .ace_content{background-color:rgba(255,0,0,.05)}.ace-diff-container[data-v-4b286035] .acediff__right .ace_content{background-color:rgba(0,255,0,.05)}kbd[data-v-fccb0a32]{--un-border-opacity:1;border-width:1px;border-color:rgba(119,119,119,var(--un-border-opacity));--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity)) ;background-color:transparent;border-style:solid;border-radius:2px;padding:4px 10px;font-family:inherit;font-size:13px;line-height:1;display:inline-block}.editor-container[data-v-5961e81f]{color:#fff;background-color:#292929;flex-direction:column;height:100%;display:flex}.editor-body[data-v-5961e81f]{flex:1;display:flex;overflow:hidden}
/*$vite$:1*/`,document.head.appendChild(he),z(),Ui(),Ki(),Gi(),Wi(),qi(),Ji(),Yi(),Me={style:{color:`var(--ace-editor-tip-color)`}},ot={key:0,class:`w-140px`},pi=R({__name:`index`,props:Di({height:{default:`100%`},showTips:{type:Boolean,default:!0},showEncoding:{type:Boolean,default:!1},lang:{default:`nginx`},theme:{default:`chrome`},init:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},load:{type:Boolean,default:!1}},{path:{default:``},pathModifiers:{},value:{default:``},valueModifiers:{},encoding:{default:`utf-8`},encodingModifiers:{}}),emits:Di([`saved`],[`update:path`,`update:value`,`update:encoding`]),setup:function(e,t){var n=t.expose,r=t.emit,i=na(fa()).theme,a=e,o=r,s=Ca(e,`path`),c=Ca(e,`value`),l=Ca(e,`encoding`),u=U({wrap:!0,showInvisibles:!1,showPrintMargin:!1,showFoldWidgets:!1,useSoftTabs:!0,tabSize:2,readOnly:a.readOnly}),d=[{label:`utf-8`,value:`utf-8`},{label:`GBK`,value:`GBK`},{label:`GB2312`,value:`GB2312`},{label:`BIG5`,value:`BIG5`}],f=function(e){(e.ctrlKey||e.metaKey)&&e.keyCode===83&&!a.readOnly&&(e.preventDefault(),_())},p=xa(),m=p.loading,h=p.setLoading,g=function(){return X(function(){var e;return Z(this,function(t){switch(t.label){case 0:return t.trys.push([0,,3,4]),h(!0),[4,Oi()];case 1:return t.sent(),[4,Kr({path:s.value})];case 2:return e=t.sent().message,B(e)&&(c.value=e.data,l.value=e.encoding),[3,4];case 3:return h(!1),[7];case 4:return[2]}})})()},_=function(){return X(function(){var e,t;return Z(this,function(n){switch(n.label){case 0:return s.value===``?[2]:[4,Zi({path:s.value,data:c.value,encoding:l.value})];case 1:return e=n.sent(),t=e.message,B(t)&&V.success(t.msg),o(`saved`,c.value),[2]}})})()};return a.init&&g(),n({getContent:g,saveFile:_}),function(t,n){var r=k,a=v,o=ie;return H(),P(`div`,null,[e.showTips?(H(),vr(a,{key:0,class:`items-center mb-8px`,justify:`space-between`},{default:Y(function(){return[N(`div`,Me,K(t.$t(`Component.Editor.index_1`)),1),e.showEncoding?(H(),P(`div`,ot,[I(r,{value:l.value,"onUpdate:value":n[0]||(n[0]=function(e){return l.value=e}),options:d},null,8,[`value`])])):yr(``,!0)]}),_:1})):yr(``,!0),I(o,{class:`h-full`,show:e.load||q(m)},{default:Y(function(){return[I(q(fe),{class:`aceBox`,value:c.value,"onUpdate:value":n[1]||(n[1]=function(e){return c.value=e}),lang:e.lang,theme:q(i)===`dark`?`monokai`:e.theme,options:q(u),style:Ai({height:q(Hr)(e.height)}),onKeydown:f},null,8,[`value`,`lang`,`theme`,`options`,`style`])]}),_:1},8,[`show`])])}}}),e(`vt`,pe({default:function(){return Qn}})),e(`_t`,Qn=j(pi,[[`__scopeId`,`data-v-4c9504bb`]])),Dr={supportedModes:{Apache_Conf:[`^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd`],CSS:[`css`],HTML:[`html|htm|xhtml|vue|we|wpy`],Java:[`java`],JavaScript:[`js|jsm|jsx`],JSON:[`json`],JSP:[`jsp`],Makefile:[`^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make`],Markdown:[`md|markdown`],MySQL:[`mysql`],Nginx:[`nginx|conf`],PHP:[`php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module`],Powershell:[`ps1`],Python:[`py`],SQL:[`sql`],SQLServer:[`sqlserver`],Text:[`txt`],XML:[`xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml`],YAML:[`yaml|yml`],images:[`icon|jpg|jpeg|png|bmp|gif|tif|emf`]},nameOverrides:{PHP_Laravel_blade:`PHP (Blade Template)`},encodingList:[`ASCII`,`UTF-8`,`GBK`,`GB2312`,`BIG5`],themeList:[`chrome`,`monokai`,`tomorrow_night_bright`],aceEditor:{editorTheme:`monokai`,fontSize:14,lineHeight:1.5,softLabel:!1,useSoftTabs:!0,tabSize:4,wrap:!0,indentedSoftWrap:!0,enableSnippets:!0,enableLiveAutocompletion:!0,enableBasicAutocompletion:!0,highlightActiveLine:!0,highlightSelectedWord:!0,animatedScroll:!1,showInvisibles:!0,showFoldWidgets:!0,showLineNumbers:!0,showGutter:!0,displayIndentGuides:!1},fontFamily:`'Consolas', 'Menlo', 'Monaco', 'Ubuntu Mono', 'source-code-pro', 'Courier New', monospace`,encoding:`utf-8`},z(),r=`/www/server/panel/BTPanel/static/ace/ace.editor.config.json`,Un=ai.global,da=Un.t,J=Or(`fileEditor`,function(){var e=U(!1),t=U(!1),n=U(null),i=U({show:!1,type:null,data:{}}),a=U([]),o=U(-1),s=U(`/www`),c=U(0),l=U(!1),u=U(fr(Dr)),d=U(null),f=U(!1),p=U(``),m=U(!1),h=M(function(){return o.value>=0&&o.value<a.value.length?a.value[o.value]:null}),g=function(e){var t=e.split(`/`).pop()||da(`fileEditor.store.untitled`);return{path:e,type:e.split(`.`).pop()||`text`,name:t,loading:!1,lineEnding:`LF`,content:``,originalContent:``,encoding:``,st_mtime:0,onlyRead:!1,history:[]}},_=function(e){return X(function(){var t,n,r,i,s,c;return Z(this,function(l){switch(l.label){case 0:return t=a.value.findIndex(function(t){return t.path===e}),t===-1?[4,qr({path:e})]:(o.value=t,[2]);case 1:return n=l.sent(),r=n.message,B(r)&&(i=g(e),s=o.value+1,a.value.splice(s,0,i),o.value=s,c=a.value[s],c.content=r.data,c.originalContent=r.data,c.encoding=r.encoding,c.st_mtime=Number(r.st_mtime),c.onlyRead=r.only_read,c.history=r.historys||[],c.onlyRead&&V.warning(da(`fileEditor.store.fileTooLarge`))),[2]}})})()},v=function(){var e=`__shortcut__`,t=a.value.findIndex(function(t){return t.path===e});if(t!==-1){o.value=t;return}var n={path:e,type:`shortcut`,name:da(`fileEditor.store.shortcutTabName`),loading:!1,lineEnding:`LF`,content:``,originalContent:``,encoding:`UTF-8`,st_mtime:0,onlyRead:!1,history:[]},r=o.value+1;a.value.splice(r,0,n),o.value=r},y=function(e,t){return X(function(){var n,r,i,s,c,l,u,d,f,p,m,h;return Z(this,function(g){switch(g.label){case 0:if(n=e.split(`/`).pop()||`Untitled`,r=`__diff__`.concat(e,`__`,t),i=a.value.findIndex(function(e){return e.path===r}),i!==-1)return o.value=i,[2];s={path:r,type:`diff`,name:``.concat(n,` <-> `,n),loading:!0,lineEnding:`LF`,content:``,originalContent:``,encoding:`UTF-8`,st_mtime:0,onlyRead:!0,history:[],originalPath:e,historyTime:t},c=o.value+1,a.value.splice(c,0,s),o.value=c,g.label=1;case 1:return g.trys.push([1,3,,4]),[4,Promise.all([qr({path:e}),Li({filename:e,history:t})])];case 2:return d=Ja.apply(void 0,[g.sent(),2]),f=d[0],p=d[1],m=a.value[o.value],f.message&&B(f.message)&&(m.rightContent=f.message.data,m.encoding=f.message.encoding),p.message&&B(p.message),m.leftContent=typeof p.message==`string`?p.message:(l=(u=p.message)==null?void 0:u.data)==null?``:l,m.loading=!1,[3,4];case 3:return g.sent(),h=a.value[o.value],h&&(h.loading=!1),[3,4];case 4:return[2]}})})()},b=function(e){return X(function(){var t,n,r;return Z(this,function(i){switch(i.label){case 0:return[4,qr({path:e})];case 1:return t=i.sent().message,B(t)&&(n=a.value.findIndex(function(t){return t.path===e}),n!==-1&&(r=a.value[n],r.content=t.data,r.originalContent=t.data,r.encoding=t.encoding,r.st_mtime=Number(t.st_mtime),r.history=t.historys||[])),[2]}})})()},x=function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return h.value&&h.value.type!==`shortcut`?[4,b(h.value.path)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})()},S=function(e){a.value.splice(e,1),o.value>=a.value.length&&(o.value=Math.max(0,a.value.length-1)),a.value.length===0&&(o.value=-1)},C=function(e,t){var n=a.value[e];n&&(n.content=t)},w=function(e){s.value=e},T=function(){var e=s.value,t=e.lastIndexOf(`/`);t>0?s.value=e.substring(0,t):s.value=`/`},E=function(){c.value++},D=function(e){f.value=e,e||(p.value=``,E())},O=function(e,t){p.value=e,m.value=t,E()},ee=function(e){l.value=e},te=function(){return X(function(){var e,t;return Z(this,function(n){switch(n.label){case 0:return[4,qr({path:r})];case 1:return e=n.sent().message,B(e)&&(t=JSON.parse(e.data),Object.assign(u.value,Ga({},Dr,t))),[2]}})})()},k=function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return[4,Qi({data:JSON.stringify({supportedModes:u.value.supportedModes,nameOverrides:u.value.nameOverrides,encodingList:u.value.encodingList,themeList:u.value.themeList,aceEditor:u.value.aceEditor,fontFamily:u.value.fontFamily,encoding:u.value.encoding}),path:r,encoding:u.value.encoding||`UTF-8`,force:1})];case 1:return e.sent(),[2]}})})()},ne=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return new Promise(function(r,i){return X(function(){var o,s,c,l;return Z(this,function(u){switch(u.label){case 0:if(o=a.value[e],o.type===`shortcut`)return r(),[2];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Qi({data:o.content,path:o.path,encoding:o.encoding,st_mtime:o.st_mtime,force:0},t)];case 2:return s=u.sent(),c=s.message,B(c)&&(c.status?(o.originalContent=o.content,o.history=c.historys||[],o.st_mtime=Number(c.st_mtime),n&&V.success(c.msg),r()):_a({title:da(`fileEditor.store.conflictTitle`),content:c.result||da(`fileEditor.store.conflictContentFallback`),confirmText:da(`fileEditor.store.forceSave`),confirmType:`warning`,onConfirm:function(){return X(function(){var e,t,a;return Z(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,Qi({data:o.content,path:o.path,encoding:o.encoding,st_mtime:o.st_mtime,force:1},!0)];case 1:return e=s.sent(),t=e.message,B(t)&&(o.originalContent=o.content,o.history=t.historys||[],o.st_mtime=Number(t.st_mtime),n&&V.success(t.msg),r()),[3,3];case 2:return a=s.sent(),i(a),[3,3];case 3:return[2]}})})()},onCancel:function(){return i(Error(`User cancelled override.`))}})),[3,4];case 3:return l=u.sent(),i(l),[3,4];case 4:return[2]}})})()})},re=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return X(function(){return Z(this,function(r){switch(r.label){case 0:return[4,ne(e,t,n)];case 1:return r.sent(),S(e),[2]}})})()},ie=function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return!h.value||h.value.content===h.value.originalContent?[2]:[4,ne(o.value)];case 1:return e.sent(),[2]}})})()},ae=function(){return X(function(){var e,t;return Z(this,function(n){switch(n.label){case 0:e=V.loading(da(`fileEditor.store.saveAllLoading`)),n.label=1;case 1:return n.trys.push([1,,4,5]),t=a.value.map(function(e,t){return e.content!==e.originalContent&&e.type!==`shortcut`?ne(t,!1,!1):null}).filter(Boolean),t.length>0?[4,Promise.all(t)]:[3,3];case 2:n.sent(),V.success(da(`fileEditor.store.saveAllSuccess`)),n.label=3;case 3:return[3,5];case 4:return e.close(),[7];case 5:return[2]}})})()},oe=function(e,t){return t===`CRLF`?e.replace(/\r?\n/g,`\r
`):t===`LF`?e.replace(/\r\n/g,`
`):e};return{isOpen:e,isMinimize:t,unminimize:n,toolsModal:i,currentPath:s,fileList:a,currentFileIndex:o,currentFile:h,refreshKey:c,isLoading:l,editorConfig:u,creatingType:d,isSearchMode:f,searchWord:p,searchAll:m,openFile:_,openShortcutTab:v,openDiffTab:y,closeTab:S,updateTabContent:C,setCurrentPath:w,goToParent:T,refreshFileList:E,setLoading:ee,getEditorConfig:te,saveEditorConfig:k,saveFileContent:ne,saveFileContentAndClose:re,saveCurrentFileContent:ie,saveAllFile:ae,getFileContent:b,changeLineEnding:function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return!h.value||h.value.type===`shortcut`?[2]:(h.value.content=oe(h.value.content,e),[4,ie()]);case 1:return t.sent(),h.value.lineEnding=e,[2]}})})()},changeEncoding:function(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return!h.value||h.value.type===`shortcut`?[2]:(t=h.value.path,u.value.aceEditor.encoding=e,[4,k()]);case 1:return n.sent(),h.value.encoding=e,[4,ne(o.value,!0,!0)];case 2:return n.sent(),b(t),[2]}})})()},changeTheme:function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return u.value.aceEditor.editorTheme=e,[4,k()];case 1:return t.sent(),[2]}})})()},toggleSetting:function(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return t=u.value.aceEditor,t[e]=!t[e],[4,k()];case 1:return n.sent(),[2]}})})()},updateTabSettings:function(e,t){return X(function(){return Z(this,function(n){switch(n.label){case 0:return u.value.aceEditor.useSoftTabs=e!==`tab`,u.value.aceEditor.tabSize=t,[4,k()];case 1:return n.sent(),V.success(da(`fileEditor.store.tabSettingsRefreshed`)),[2]}})})()},getCurrentFileContent:x,startCreateNewItem:function(e){d.value=e},cancelCreateNewItem:function(){d.value=null},confirmCreateNewItem:function(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return e.trim()?(t=d.value,t===`file`?[4,xr({path:``.concat(s.value,`/`,e)})]:[3,2]):(V.warning(da(`fileEditor.store.nameRequired`)),[2]);case 1:return n.sent(),[3,4];case 2:return t===`folder`?[4,br({path:``.concat(s.value,`/`,e)})]:[3,4];case 3:n.sent(),n.label=4;case 4:return V.success(da(`fileEditor.store.createSuccess`,{type:da(t===`file`?`fileEditor.store.newFile`:`fileEditor.store.newFolder`)})),d.value=null,E(),[2]}})})()},toggleSearchMode:D,executeSearch:O,openToolsModal:function(e,t){i.value={show:!0,type:e,data:t||{}}},closeToolsModal:function(){i.value={show:!1,type:null,data:{}}}}}),z(),je={class:`title-left`},at={class:`title-right`},Dt=[`title`],Qt=[`title`],mn={key:0,class:`i-ant-design-switcher-outlined`},On={key:1,class:`i-ant-design-border-outlined`},Bn=[`title`],fi=R({__name:`index`,props:{isMinimize:{type:Boolean},isMaximize:{type:Boolean}},emits:[`minimize`,`maximize`,`close`],setup:function(e,t){var n=t.emit,r=e,i=n,a=J(),o=U(null),s=function(){i(`minimize`);var e=!r.isMinimize;o.value&&Oi(function(){var t=Zr(o.value,`n-dialog`);if(t)if(!e)t.style.left=``,t.style.top=``;else{var n=document.documentElement.clientHeight,r=t.offsetHeight,i=216,a=n-r-68,s=parseFloat(t.style.left)||0,c=parseFloat(t.style.top)||0;t.style.left=``.concat(s+i-t.offsetLeft,`px`),t.style.top=``.concat(c+a-t.offsetTop,`px`)}})},c=function(){i(`maximize`),!r.isMaximize&&o.value&&Oi(function(){var e=Zr(o.value,`n-dialog`);e&&(e.style.left=``,e.style.top=``)})},l=function(){i(`close`)};return Mi(function(){a.unminimize=function(){r.isMinimize&&s()}}),Ni(function(){a.unminimize=null}),function(t,n){var r=Xi(`modal-drag`);return Ma((H(),P(`div`,{ref_key:`titleRef`,ref:o,class:`editor-title`},[N(`div`,je,[N(`span`,null,K(t.$t(`fileEditor.title.onlineTextEditor`)),1)]),N(`div`,at,[!e.isMaximize&&!e.isMinimize?(H(),P(`div`,{key:0,class:`action-btn`,title:t.$t(`fileEditor.title.minimize`),onClick:s},Ya(n[1]||(n[1]=[N(`div`,{class:`i-ant-design-minus-outlined`},null,-1)])),8,Dt)):yr(``,!0),N(`div`,{class:`action-btn`,title:e.isMinimize?t.$t(`fileEditor.title.restore`):e.isMaximize?t.$t(`fileEditor.title.restoreDown`):t.$t(`fileEditor.title.maximize`),onClick:n[0]||(n[0]=function(t){return e.isMinimize?s():c()})},[e.isMinimize||e.isMaximize?(H(),P(`div`,mn)):(H(),P(`div`,On))],8,Qt),N(`div`,{class:`action-btn close-btn`,onClick:l,title:t.$t(`fileEditor.title.close`)},Ya(n[2]||(n[2]=[N(`div`,{class:`i-ant-design-close-outlined`},null,-1)])),8,Bn)])])),[[r]])}}}),se=j(fi,[[`__scopeId`,`data-v-3102b2b4`]]),z(),Ae={class:`toolbar-dialog`},it={class:`toolbar-title`},Ft={class:`fontsize-content flex items-center gap-16px`},di=R({__name:`index`,props:{currentSize:{type:Number,default:14},onChange:{type:Function}},emits:[`close`],setup:function(e,t){var n=t.emit,r=e,i=n,a=U(r.currentSize),o=U(null),s=function(){var e=Number(a.value);if(!isNaN(e)&&e>0){var t;(t=r.onChange)==null||t.call(r,e),i(`close`)}};return Mi(function(){var e;(e=o.value)==null||e.focus()}),function(e,t){var n=C,r=c;return H(),P(`div`,Ae,[N(`div`,it,K(e.$t(`fileEditor.dialogs.fontSizeTitle`)),1),N(`div`,Ft,[I(n,{ref_key:`inputRef`,ref:o,value:q(a),"onUpdate:value":t[0]||(t[0]=function(e){return wi(a)?a.value=e:null}),"show-button":!1,class:`fontsize-input`,onKeyup:Na(s,[`enter`])},null,8,[`value`]),I(r,{type:`primary`,class:`fontsize-btn`,onClick:s},{default:Y(function(){return[F(K(e.$t(`fileEditor.common.save`)),1)]}),_:1})])])}}}),y=j(di,[[`__scopeId`,`data-v-cd363012`]]),z(),ke={class:`line-ending-select`},rt=[`onClick`],Pt={key:0,class:`i-fa6-solid-check`},D=R({__name:`LineSelect`,props:{value:{type:[String,Number,Array],default:``},options:{type:Array,default:function(){return[]}},onUpdateValue:[Function,Array],"onUpdate:value":[Function,Array]},setup:function(e){var t=e,n=function(e,n){var r=t.onUpdateValue,i=t[`onUpdate:value`];r&&lr(r,e,n),i&&lr(i,e,n)};return function(t,r){return H(),P(`div`,ke,[(H(!0),P(x,null,Vi(e.options,function(t){return H(),P(`div`,{key:t.value,class:ki([`line-ending-item`,{active:e.value===t.value}]),onClick:function(e){return n(t.value,t)}},[N(`span`,null,K(t.label),1),e.value===t.value?(H(),P(`i`,Pt)):yr(``,!0)],10,rt)}),128))])}}}),E=j(D,[[`__scopeId`,`data-v-3b563599`]]),z(),De={class:`toolbar-dialog`},nt={class:`toolbar-title`},ui=R({__name:`index`,props:{theme:{type:String,default:`monokai`},onChange:{type:Function}},setup:function(e){var t=ya().t,n=na(J()).editorConfig,r=e,i=U(r.theme||`monokai`),a=M(function(){return{chrome:t(`fileEditor.dialogs.theme.chrome`),monokai:t(`fileEditor.dialogs.theme.monokai`)}}),o=M(function(){return n.value.themeList.map(function(e){return{label:a.value[e]||e,value:e}})}),s=function(e){var t;(t=r.onChange)==null||t.call(r,e)};return function(e,t){return H(),P(`div`,De,[N(`div`,nt,K(e.$t(`fileEditor.dialogs.themeTitle`)),1),I(E,{value:q(i),"onUpdate:value":[t[0]||(t[0]=function(e){return wi(i)?i.value=e:null}),s],options:q(o)},null,8,[`value`,`options`])])}}}),oe=j(ui,[[`__scopeId`,`data-v-fd78c99a`]]),z(),Ee={class:`toolbar-dialog`},tt={class:`toolbar-title`},Nt={class:`setting-list`},Zt=[`onClick`],pn={key:0,class:`i-fa6-solid-check`},li=R({__name:`index`,setup:function(e){var t=ya().t,n=J(),r=na(n).editorConfig,i=M(function(){return r.value.aceEditor}),a=M(function(){return[{key:`wrap`,label:t(`fileEditor.dialogs.setting.wrap`)},{key:`enableLiveAutocompletion`,label:t(`fileEditor.dialogs.setting.enableLiveAutocompletion`)},{key:`enableSnippets`,label:t(`fileEditor.dialogs.setting.enableSnippets`)},{key:`showInvisibles`,label:t(`fileEditor.dialogs.setting.showInvisibles`)},{key:`showLineNumbers`,label:t(`fileEditor.dialogs.setting.showLineNumbers`)}]}),o=function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,n.toggleSetting(e)];case 1:return t.sent(),[2]}})})()};return function(e,t){return H(),P(`div`,Ee,[N(`div`,tt,K(e.$t(`fileEditor.dialogs.settingTitle`)),1),N(`div`,Nt,[(H(!0),P(x,null,Vi(a.value,function(e){return H(),P(`div`,{key:e.key,class:`setting-item`,onClick:function(t){return o(e.key)}},[N(`span`,null,K(e.label),1),i.value[e.key]?(H(),P(`i`,pn)):yr(``,!0)],8,Zt)}),128))])])}}}),ne=j(li,[[`__scopeId`,`data-v-0f74f1f1`]]),z(),Te={class:`toolbar-dialog`},et={class:`toolbar-title`},xi=R({__name:`index`,props:{fileName:{type:String,default:``},lineEnding:{type:String,default:`LF`},onChange:{type:Function}},emits:[`close`],setup:function(e,t){var n=t.emit,r=e,i=ya().t,a=n,o=U(r.lineEnding),s=[{label:`CRLF`,value:`CRLF`},{label:`LF`,value:`LF`}],c=function(e){_a({title:i(`fileEditor.dialogs.lineEndingChangeTitle`),confirmText:i(`fileEditor.common.save`),content:function(){return I(x,null,[I(`div`,null,[i(`fileEditor.dialogs.lineEndingChangeContent1`,{file:r.fileName||``,from:o.value,to:e})]),I(`div`,{class:`mt-8px`},[i(`fileEditor.dialogs.lineEndingChangeContent2`,{save:i(`fileEditor.common.save`)})])])},onConfirm:function(){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return[4,(t=r.onChange)==null?void 0:t.call(r,e)];case 1:return n.sent(),a(`close`),[2]}})})()}})};return function(e,t){return H(),P(`div`,Te,[N(`div`,et,K(e.$t(`fileEditor.dialogs.lineEndingTitle`)),1),I(E,{value:q(o),options:s,"onUpdate:value":c},null,8,[`value`])])}}}),T=j(xi,[[`__scopeId`,`data-v-34b64179`]]),z(),we={class:`toolbar-dialog`},$e={class:`toolbar-title`},Mt={class:`toolbar-title`},bi=R({__name:`index`,props:{useSoftTabs:{type:String,default:`tab`},tabSize:{type:Number,default:4},onChange:{type:Function}},setup:function(e){var t=ya().t,n=e,r=U(n.useSoftTabs),i=U(n.tabSize),a=M(function(){return[{label:t(`fileEditor.dialogs.tabSize.useSpaces`),value:`space`},{label:t(`fileEditor.dialogs.tabSize.useTabs`),value:`tab`}]}),o=[{label:`1`,value:1},{label:`2`,value:2},{label:`3`,value:3},{label:`4`,value:4},{label:`5`,value:5},{label:`6`,value:6}],s=function(){l()},c=function(){l()},l=function(){var e;(e=n.onChange)==null||e.call(n,r.value,i.value)};return function(e,t){return H(),P(`div`,we,[N(`div`,$e,K(e.$t(`fileEditor.dialogs.tabSizeTitle`)),1),I(E,{value:q(r),"onUpdate:value":[t[0]||(t[0]=function(e){return wi(r)?r.value=e:null}),s],options:q(a)},null,8,[`value`,`options`]),N(`div`,Mt,K(e.$t(`fileEditor.dialogs.tabSizeLengthTitle`)),1),I(E,{value:q(i),"onUpdate:value":[t[1]||(t[1]=function(e){return wi(i)?i.value=e:null}),c],options:o},null,8,[`value`])])}}}),ae=j(bi,[[`__scopeId`,`data-v-9b2e7d57`]]),z(),Ce={class:`toolbar-dialog`},Qe={class:`toolbar-title`},yi=R({__name:`index`,props:{encoding:{type:String,default:`UTF-8`},onChange:{type:Function}},setup:function(e){var t,n=na(J()).editorConfig,r=e,i=U(((t=r.encoding)==null?void 0:t.toUpperCase())||`UTF-8`),a=M(function(){return n.value.encodingList.map(function(e){return{label:e.toUpperCase(),value:e.toUpperCase()}})}),o=function(e){var t;(t=r.onChange)==null||t.call(r,e)};return function(e,t){return H(),P(`div`,Ce,[N(`div`,Qe,K(e.$t(`fileEditor.dialogs.encodingTitle`)),1),I(E,{value:q(i),"onUpdate:value":[t[0]||(t[0]=function(e){return wi(i)?i.value=e:null}),o],options:q(a)},null,8,[`value`,`options`])])}}}),p=j(yi,[[`__scopeId`,`data-v-60c1d667`]]),z(),Se={class:`toolbar-dialog`},mt={class:`toolbar-title`},jt={class:`goto-content`},Xt={class:`goto-hint`},vi=R({__name:`index`,props:{currentLine:{type:Number,default:1},currentColumn:{type:Number,default:1},maxLine:{type:Number,default:1},onChange:{type:Function}},emits:[`close`],setup:function(e,t){var n=t.expose,r=t.emit,i=e,a=r,o=U(i.currentLine),s=U(null),c=function(){var e=Number(o.value);if(!isNaN(e)&&e>=1&&e<=i.maxLine){var t;(t=i.onChange)==null||t.call(i,e),a(`close`)}};return Mi(function(){var e;(e=s.value)==null||e.focus()}),n({onClose:function(){a(`close`)}}),function(t,n){return H(),P(`div`,Se,[N(`div`,mt,K(t.$t(`fileEditor.dialogs.goToLineTitle`)),1),N(`div`,jt,[I(q(C),{value:o.value,"onUpdate:value":n[0]||(n[0]=function(e){return o.value=e}),ref_key:`inputRef`,ref:s,"show-button":!1,class:`goto-input`,placeholder:``,onKeydown:Na(c,[`enter`])},null,8,[`value`]),N(`div`,Xt,K(t.$t(`fileEditor.dialogs.goToLineHint`,{line:e.currentLine,column:e.currentColumn,max:e.maxLine})),1)])])}}}),S=j(vi,[[`__scopeId`,`data-v-55e56222`]]),z(),xe={class:`toolbar-list`},pt=[`onClick`],_i=R({__name:`index`,emits:[`action`],setup:function(e,t){var n=t.emit,r=ya().t,i=J(),a=na(i),o=a.editorConfig,s=a.toolsModal,c=Ea(`toolbarWrapperRef`),l=M(function(){var e;return(e=c.value)==null?void 0:e}),u=M(function(){switch(s.value.type){case`fontSize`:return y;case`theme`:return oe;case`setting`:return ne;case`lineEnding`:return T;case`tabSize`:return ae;case`encoding`:return p;case`goToLine`:return S;default:return}}),d=M(function(){switch(s.value.type){case`fontSize`:return{currentSize:Number(o.value.aceEditor.fontSize),onChange:g};case`theme`:return{theme:o.value.aceEditor.editorTheme,onChange:_};case`setting`:return{};case`lineEnding`:case`tabSize`:case`encoding`:case`goToLine`:return s.value.data;default:return{}}}),f=M(function(){return[{key:`save`,label:r(`fileEditor.toolbar.save`),icon:`i-ep-select`},{key:`saveAll`,label:r(`fileEditor.toolbar.saveAll`),icon:`i-ep-document-copy`},{key:`refresh`,label:r(`fileEditor.toolbar.refresh`),icon:`i-ep-refresh-right`},{key:`search`,label:r(`fileEditor.toolbar.search`),icon:`i-ep-search`},{key:`replace`,label:r(`fileEditor.toolbar.replace`),icon:`i-ep-document`},{key:`goToLine`,label:r(`fileEditor.toolbar.jumpLine`),icon:`i-ep-location`},{key:`fontSize`,label:r(`fileEditor.toolbar.fontSize`),icon:`i-ep-monitor`},{key:`theme`,label:r(`fileEditor.toolbar.theme`),icon:`i-ep-operation`},{key:`setting`,label:r(`fileEditor.toolbar.setting`),icon:`i-ep-setting`},{key:`shortcut`,label:r(`fileEditor.toolbar.shortcut`),icon:`i-ep-question-filled`}]}),m=function(e){switch(e){case`save`:i.saveCurrentFileContent();break;case`saveAll`:i.saveAllFile();break;case`refresh`:h();break;case`search`:case`replace`:n(`action`,e);break;case`goToLine`:n(`action`,e);break;case`fontSize`:case`theme`:case`setting`:i.openToolsModal(e);break;case`shortcut`:i.openShortcutTab();break}},h=function(){return X(function(){var e;return Z(this,function(t){switch(t.label){case 0:e=V.loading(r(`fileEditor.toolbar.refreshing`)),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,i.getCurrentFileContent()];case 2:return t.sent(),V.success(r(`fileEditor.toolbar.refreshed`)),[3,4];case 3:return e.close(),[7];case 4:return[2]}})})()},g=function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return o.value.aceEditor.fontSize=e,[4,i.saveEditorConfig()];case 1:return t.sent(),V.success(r(`fileEditor.toolbar.fontSizeSaved`)),i.closeToolsModal(),[2]}})})()},_=function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,i.changeTheme(e)];case 1:return t.sent(),i.closeToolsModal(),[2]}})})()};return function(e,t){var n=ir;return H(),P(`div`,{ref_key:`toolbarWrapperRef`,ref:c,class:`toolbar-wrapper`},[N(`div`,xe,[(H(!0),P(x,null,Vi(q(f),function(e){return H(),P(`div`,{key:e.key,class:`tools-btn`,onClick:function(t){return m(e.key)}},[N(`i`,{class:ki(e.icon)},null,2),N(`span`,null,K(e.label),1)],8,pt)}),128))]),I(n,{show:q(s).show,"onUpdate:show":t[0]||(t[0]=function(e){return q(s).show=e}),component:q(u),data:q(d),to:q(l),width:420,footer:!1,"show-mask":!1,"hide-close":!0,"mask-closable":!0},null,8,[`show`,`component`,`data`,`to`])],512)}}}),ce=j(_i,[[`__scopeId`,`data-v-c822e0b3`]]),z(),be={class:`breadcrumb-wrapper`},ft={class:`flex-1 w-0`},s=R({__name:`Breadcrumb`,setup:function(e){var t=na(J()).currentPath;return function(e,n){var r=f;return H(),P(`div`,be,[N(`div`,null,K(e.$t(`fileEditor.fileExplorer.directory`))+``,1),N(`div`,ft,[I(r,null,{default:Y(function(){return[F(K(q(t)),1)]}),_:1})])])}}}),o=j(s,[[`__scopeId`,`data-v-54af520c`]]),z(),ye={class:`action-btn`},dt={key:1,class:`search-panel`},At={class:`search-title`},Yt={class:`title-text`},fn={class:`search-input-wrap`},Dn={class:`search-options`},a=R({__name:`Action`,setup:function(e){var t=ya().t,n=J(),r=na(n),i=r.isLoading,a=r.creatingType,o=function(e){return function(){return ni(`i`,{class:[`tree-icon`,e],style:`font-size: 16px; font-style: normal; display: inline-flex; align-items: center;`})}},s=M(function(){return[{label:t(`fileEditor.fileExplorer.newFolder`),key:`folder`,icon:o(`folder-icon`)},{label:t(`fileEditor.fileExplorer.newFile`),key:`file`,icon:o(`text-icon`)}]}),c=function(e){n.startCreateNewItem(e)},u=function(){var e=n.currentPath,t=e.substring(0,e.lastIndexOf(`/`))||`/`;n.setCurrentPath(t===``?`/`:t)},f=function(){n.refreshFileList()},p=U(n.searchWord),m=U(n.searchAll),h=function(){p.value=n.searchWord,m.value=n.searchAll,n.toggleSearchMode(!0)},g=function(){n.toggleSearchMode(!1),p.value=``,m.value=!1},_=function(){n.executeSearch(p.value,m.value)};return function(e,t){var r=d,o=w,v=l;return H(),P(`div`,{class:ki([`action-wrapper`,{"is-search-mode":q(n).isSearchMode}])},[q(n).isSearchMode?(H(),P(`div`,dt,[N(`div`,At,[N(`span`,Yt,K(e.$t(`fileEditor.fileExplorer.searchPanelTitle`)),1),N(`span`,{class:`close-btn`,onClick:g},[t[5]||(t[5]=N(`i`,{class:`i-ep-close`},null,-1)),F(` `+K(e.$t(`fileEditor.fileExplorer.close`)),1)])]),N(`div`,fn,[I(o,{value:q(p),"onUpdate:value":t[0]||(t[0]=function(e){return wi(p)?p.value=e:null}),placeholder:e.$t(`fileEditor.fileExplorer.searchPlaceholder`),onKeydown:Na(_,[`enter`])},{suffix:Y(function(){return[N(`div`,{class:`search-icon-btn`,onClick:_},Ya(t[6]||(t[6]=[N(`i`,{class:`i-ep-search`},null,-1)])))]}),_:1},8,[`value`,`placeholder`])]),N(`div`,Dn,[I(v,{checked:q(m),"onUpdate:checked":t[1]||(t[1]=function(e){return wi(m)?m.value=e:null})},{default:Y(function(){return[F(K(e.$t(`fileEditor.fileExplorer.includeSubdir`)),1)]}),_:1},8,[`checked`])])])):(H(),P(x,{key:0},[N(`div`,{class:`action-btn`,onClick:u},[t[2]||(t[2]=N(`i`,{class:`i-ep-top`},null,-1)),N(`span`,null,K(e.$t(`fileEditor.fileExplorer.up`)),1)]),N(`div`,{class:`action-btn`,onClick:f},[N(`i`,{class:ki([`i-ep-refresh-right`,{"is-loading":q(i)}])},null,2),N(`span`,null,K(e.$t(`fileEditor.fileExplorer.refresh`)),1)]),I(r,{trigger:`click`,disabled:q(a)!==null,options:q(s),placement:`bottom`,"show-arrow":!0,"arrow-point-to-center":!0,onSelect:c},{default:Y(function(){return[N(`div`,ye,[t[3]||(t[3]=N(`i`,{class:`i-ep-plus`},null,-1)),N(`span`,null,K(e.$t(`fileEditor.fileExplorer.new`)),1)])]}),_:1},8,[`disabled`,`options`]),N(`div`,{class:`action-btn`,onClick:h},[t[4]||(t[4]=N(`i`,{class:`i-ep-search`},null,-1)),N(`span`,null,K(e.$t(`fileEditor.fileExplorer.search`)),1)])],64))],2)}}}),i=j(a,[[`__scopeId`,`data-v-e49ff329`]]),z(),z(),Si(),e(`ft`,Pi=function(e,t){var n=J();if(n.isOpen){n.openFile(e),n.unminimize&&n.unminimize();return}Sa({width:`1440px`,height:`80vh`,bgColor:`transparent`,hideClose:!0,showMask:!1,data:{filePath:e,currentPath:t},component:L(function(){return A(function(){return Promise.resolve().then(function(){return h})},void 0)})})}),z(),Si(),Er=va(function(e){return Co(e)},100),Wn=ai.global,ua=Wn.t,e(`at`,va(function(e,t){var n=e.choosedKeys;if(t.type==`dir`)n.value=[t.nm],xs(e);else return},200)),Gn=ai.global,la=Gn.t,ti=function(e){return W.post(`/files?action=get_download_url_list`,e)},Sr=function(e){return W.post(`/files?action=create_download_url`,e,{requestOptions:{loading:la(`file.shareModal.creatingShareLink`)}})},zi=function(e){return W.post(`/files?action=remove_download_url`,e,{requestOptions:{loading:la(`file.shareModal.deletingShare`),successMessage:!0}})},ei=function(e){return W.post(`/files?action=get_download_url_find`,e)},z(),ve={class:`share-list-modal`},ut={class:`flex justify-end items-center mb-10px`},kt={class:`mt-10px flex justify-end items-center`},gi=R({__name:`index`,props:{fileStore:{}},setup:function(e){var t=e,n=ya().t,r=M(function(){return t.fileStore}),i=U([]),a=U(``),o=U(1),s=U(12),c=U(0),l=U(!1),u=function(){return X(function(){var e,t;return Z(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),l.value=!0,e=a.value.trim(),[4,ti(Ga({p:o.value,row:s.value},e?{filename:e}:{}))];case 1:return t=n.sent().message,i.value=t.data,c.value=Xr(t.page),[3,3];case 2:return l.value=!1,[7];case 3:return[2]}})})()};function d(){o.value=1,Oi(function(){u()})}var f=U([{key:`ps`,title:n(`file.shareListModal.shareName`)},{key:`filename`,title:n(`file.shareListModal.shareAddress`)},{key:`expire`,title:n(`file.shareListModal.expirationDate`),render:function(e){return Ur(e.expire)}},ha({width:120,options:function(e){return[{label:n(`Public.Btn.Details`),onClick:function(){m(e)}},{label:n(`Public.Btn.Delete`),onClick:function(){p(e)}}]}})]);function p(e){var t=r.value;_a({title:n(`file.shareListModal.cancelShareTitle`),content:n(`file.shareListModal.cancelShareMessage`,{filename:e.filename}),onConfirm:function(){return X(function(){return Z(this,function(n){switch(n.label){case 0:return[4,zi({id:e.id})];case 1:return n.sent(),t?[4,Q(t)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[4,u()];case 4:return n.sent(),[2]}})})()}})}function m(e){return X(function(){return Z(this,function(t){return ko(e,r.value),[2]})})()}return Mi(u),function(e,t){var r=ar,p=or,m=sr;return H(),P(`section`,ve,[N(`div`,ut,[I(r,{value:q(a),"onUpdate:value":t[0]||(t[0]=function(e){return wi(a)?a.value=e:null}),width:`240`,clearable:``,placeholder:q(n)(`file.shareListModal.searchPlaceholder`),onSearch:d,onClear:d},null,8,[`value`,`placeholder`])]),I(p,{loading:q(l),data:q(i),columns:q(f)},null,8,[`loading`,`data`,`columns`]),N(`div`,kt,[I(m,{page:q(o),"onUpdate:page":t[1]||(t[1]=function(e){return wi(o)?o.value=e:null}),"page-size":q(s),"onUpdate:pageSize":t[2]||(t[2]=function(e){return wi(s)?s.value=e:null}),"item-count":q(c),"show-size-picker":!1,"show-quick-jumper":!1,onRefresh:u},null,8,[`page`,`page-size`,`item-count`])])])}}}),ea=j(gi,[[`__scopeId`,`data-v-6a33ff8a`]]),z(),ze={class:`p-20px`},Pr=R({__name:`details`,props:{detail:{},fileStore:{}},emits:[`close`],setup:function(e,t){var n=t.expose,r=t.emit,i=e,a=r,o=ya().t,s=``.concat(window.location.origin,`/down/`),l=M(function(){return i.fileStore}),u=i.detail,d=U({filename:``,ps:``,token:``,expire:``,total:0,password:``,addtime:0,id:0});function f(e){return!!(e.filename&&e.ps&&e.token)}function p(e){d.value={filename:e.filename,ps:e.ps,token:e.token,expire:Ur(e.expire),total:e.total,password:e.password,addtime:e.addtime,id:e.id}}function m(e){return X(function(){var t;return Z(this,function(n){switch(n.label){case 0:return[4,ei({id:e})];case 1:return t=n.sent().message,p(t),[2]}})})()}function h(){if(u){if(f(u)){p(u);return}u.id&&m(u.id)}}h();function g(){return X(function(){return Z(this,function(e){return _a({title:o(`file.shareModal.cancelSharing`),content:o(`file.shareModal.confirmStopSharing`,{filename:d.value.filename}),onConfirm:function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return[4,zi({id:d.value.id})];case 1:return e.sent(),a(`close`),l.value&&Q(l.value),[2]}})})()}}),[2,!1]})})()}var _=M(function(){return``.concat(s,d.value.token)});function v(){_r(_.value)}function y(){_r(o(`file.shareModal.linkAndCode`,{link:_.value,code:d.value.password}))}return n({onConfirm:g}),function(e,t){var n=w,r=b,i=nr,a=c,s=tr,l=cr;return H(),P(`div`,ze,[I(s,null,{default:Y(function(){return[I(r,{label:q(o)(`file.shareModal.shareName`)},{default:Y(function(){return[I(n,{value:q(d).ps,"onUpdate:value":t[0]||(t[0]=function(e){return q(d).ps=e})},null,8,[`value`])]}),_:1},8,[`label`]),I(r,{label:q(o)(`file.shareModal.shareChain`)},{default:Y(function(){return[I(n,{class:`mr-10px`,readonly:!0,value:q(_)},null,8,[`value`]),I(a,{type:`primary`,onClick:v},{icon:Y(function(){return[I(i,{name:`common-copy`,size:`16`})]}),_:1})]}),_:1},8,[`label`]),q(d).password?(H(),vr(r,{key:0,label:q(o)(`file.shareModal.extractionCode`)},{default:Y(function(){return[I(n,{class:`mr-10px`,value:``.concat(q(d).password),readonly:``},null,8,[`value`]),I(a,{type:`primary`,onClick:y},{default:Y(function(){return[F(K(q(o)(`file.shareModal.copyLinkAndCode`)),1)]}),_:1})]}),_:1},8,[`label`])):yr(``,!0),I(r,{label:q(o)(`file.shareModal.expirationDate`)},{default:Y(function(){return[F(K(q(d).expire),1)]}),_:1},8,[`label`])]}),_:1}),I(l,null,{default:Y(function(){return[N(`li`,null,K(q(o)(`file.shareModal.securityTip`)),1)]}),_:1})])}}}),Nr=Pr,z(),Re={class:`p-20px`},Tr=R({__name:`create`,props:{file:{},fileStore:{}},setup:function(e,t){var n=t.expose,r=e,i=ya().t,a=M(function(){return r.fileStore}),o=r.file,s=U({filename:(o==null?void 0:o.path)||``,ps:(o==null?void 0:o.nm)||``,password:``,expire:24});function l(){return X(function(){var e;return Z(this,function(t){switch(t.label){case 0:return[4,Sr(pa(s.value))];case 1:return e=t.sent().message,B(e)?(ko(e,a.value),a.value&&Q(a.value),[2]):[2,!1]}})})()}function u(){s.value.password=$r(8)}return n({onConfirm:l}),function(e,t){var n=w,r=b,a=ee,o=O,l=c,d=tr,f=cr;return H(),P(`div`,Re,[I(d,null,{default:Y(function(){return[I(r,{label:q(i)(`file.shareModal.shareName`)},{default:Y(function(){return[I(n,{value:q(s).ps,"onUpdate:value":t[0]||(t[0]=function(e){return q(s).ps=e})},null,8,[`value`])]}),_:1},8,[`label`]),I(r,{label:q(i)(`file.shareModal.expirationDate`)},{default:Y(function(){return[I(o,{value:q(s).expire,"onUpdate:value":t[1]||(t[1]=function(e){return q(s).expire=e})},{default:Y(function(){return[I(a,{value:24},{default:Y(function(){return[F(K(q(i)(`file.shareModal.aDay`)),1)]}),_:1}),I(a,{value:168},{default:Y(function(){return[F(K(q(i)(`file.shareModal.aWeek`)),1)]}),_:1}),I(a,{value:1130800},{default:Y(function(){return[F(K(q(i)(`file.shareModal.permanent`)),1)]}),_:1})]}),_:1},8,[`value`])]}),_:1},8,[`label`]),I(r,{label:q(i)(`file.shareModal.extractionCode`)},{default:Y(function(){return[I(n,{value:q(s).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(s).password=e})},null,8,[`value`]),I(l,{class:`ml-10px`,type:`primary`,onClick:u},{default:Y(function(){return[F(K(q(i)(`file.shareModal.random`)),1)]}),_:1})]}),_:1},8,[`label`])]}),_:1}),I(f,null,{default:Y(function(){return[N(`li`,null,K(q(i)(`file.shareModal.securityTip`)),1)]}),_:1})])}}}),wr=Tr,Kn=ai.global,ca=Kn.t,z(),Si(),qn=ai.global,sa=qn.t,e(`Y`,Fi=function(e){$(e,`FavoriteList`,function(e){e.value.open()})}),z(),Jn=ai.global,oa=Jn.t,e(`F`,kr=function(e,t){return e.fileRecycle.value?Mr(e,t):jr(e,t)}),Mr=function(e,t){return new Promise(function(n){var r=e.currentPath,i=e.choosedKeys,a=e.fileList,o=t||a.value.filter(function(e){return i.value.includes(e.nm)});_a({title:o.length===1?oa(`file.deleteController.deleteSingleFileTitle`,{name:o[0].nm}):oa(`file.deleteController.batchDeleteTitle`),content:oa(`file.deleteController.recycleBinMessage`),width:400,onConfirm:function(){return X(function(){var i,a;return Z(this,function(s){switch(s.label){case 0:return o.length===1?[4,Qo(o[0].path,o[0].type)]:[3,2];case 1:return s.sent(),[3,4];case 2:return i=r.value,t&&o.length>0&&(a=o[0].path.lastIndexOf(`/`),a!==-1&&(i=o[0].path.substring(0,a))),[4,$o(o.map(function(e){return e.nm}),i)];case 3:s.sent(),s.label=4;case 4:return Q(e),n(),[2]}})})()}})})},jr=function(e,t){return new Promise(function(n){var r=e.currentPath,i=e.choosedKeys,a=e.fileList,o=t||a.value.filter(function(e){return i.value.includes(e.nm)});ga({title:o.length===1?oa(`file.deleteController.deleteSingleFileTitle`,{name:o[0].nm}):oa(`file.deleteController.batchDeleteTitle`),content:function(){return I(`span`,{class:`text-error`},[oa(`file.deleteController.permanentDeleteMessage`)])},width:400,onConfirm:function(){return X(function(){var i,a;return Z(this,function(s){switch(s.label){case 0:return o.length===1?[4,Qo(o[0].path,o[0].type)]:[3,2];case 1:return s.sent(),[3,4];case 2:return i=r.value,t&&o.length>0&&(a=o[0].path.lastIndexOf(`/`),a!==-1&&(i=o[0].path.substring(0,a))),[4,$o(o.map(function(e){return e.nm}),i)];case 3:s.sent(),s.label=4;case 4:return Q(e),n(),[2]}})})()}})})},e(`P`,hr={ftp:{key:`ftp`,labelKey:`file.contextMenu.cloudStorage.ftp`,icon:`/static/img/soft_ico/ico-ftp.png`,defaultPath:`/`,capabilities:{canUpload:!0,canCreateFolder:!0,canSearch:!0,canDelete:!0}},aws_s3:{key:`aws_s3`,labelKey:`file.contextMenu.cloudStorage.awsS3`,icon:`/static/img/soft_ico/ico-aws_s3.png`,defaultPath:`/`,capabilities:{canUpload:!0,canCreateFolder:!0,canSearch:!0,canDelete:!0}},gdrive:{key:`gdrive`,labelKey:`file.contextMenu.cloudStorage.gdrive`,icon:`/static/img/soft_ico/ico-gdrive.png`,defaultPath:`/`,capabilities:{canUpload:!0,canCreateFolder:!0,canSearch:!0,canDelete:!1}},gcloud_storage:{key:`gcloud_storage`,labelKey:`file.contextMenu.cloudStorage.gcloudStorage`,icon:`/static/img/soft_ico/ico-gcloud_storage.png`,defaultPath:`/`,capabilities:{canUpload:!0,canCreateFolder:!0,canSearch:!0,canDelete:!1}}}),Yn=ai.global,aa=Yn.t,Gr=function(){return W.post(`/mod/cloud_storage/cloud_storage/GetProviders`)},e(`A`,function(e){return W.post(`/mod/cloud_storage/cloud_storage/List`,e)}),e(`D`,function(e){return W.post(`/mod/cloud_storage/cloud_storage/CreateFolder`,e,{requestOptions:{loading:aa(`file.buttonGroup.loading.creatingDirectory`),successMessage:!0}})}),e(`O`,function(e){return W.post(`/mod/cloud_storage/cloud_storage/Delete`,qa(Ga({},e),{items:JSON.stringify(e.items)}),{requestOptions:{loading:aa(`file.deleteController.deletingSingle`)}})}),e(`N`,function(e){var t;return W.post(`/mod/cloud_storage/cloud_storage/UploadLocal`,qa(Ga({},e),{local_paths:JSON.stringify(e.local_paths),background:(t=e.background)==null||t}),{requestOptions:{loading:aa(`file.uploadModal.statusUploading`)}})}),e(`M`,function(e,t){return W.post(`/mod/cloud_storage/cloud_storage/file_upload`,e,{headers:{"Content-Type":`multipart/form-data`},onUploadProgress:function(e){t==null||t(e)}})}),e(`k`,function(e){var t,n;return W.post(`/mod/cloud_storage/cloud_storage/DownloadToLocal`,qa(Ga({},e),{items:JSON.stringify(e.items),background:(t=e.background)==null||t}),{requestOptions:{loading:aa(`file.uploadModal.statusUploading`),successMessage:!((n=e.background)==null||n)}})}),e(`j`,function(){return W.post(`/mod/cloud_storage/cloud_storage/TaskStatus`)}),z(),Si(),Xn=ai.global,G=Xn.t,er={zip:`ZIP`,rar:`RAR`,gz:`GZ`,"tar.gz":`GZ`,tgz:`GZ`},$n=Object.keys(er),mr={ftp:[`ftp`],aws_s3:[`aws_s3`],gdrive:[`gdrive`],gcloud_storage:[`gcloud_storage`,`gcloud`,`google_cloud`,`google_cloud_storage`]},z(),z(),Rr=U([]),ka=U(!1),gr=U(null),zr=U(1),z(),Si(),ia=ai.global.t,ra={Apache_Conf:[`^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd`],BatchFile:[`bat|cmd`],C_Cpp:[`cpp|c|cc|cxx|h|hh|hpp|ino`],CSharp:[`cs`],CSS:[`css`],Dockerfile:[`^Dockerfile`],golang:[`go`],HTML:[`html|htm|xhtml|vue|we|wpy`],Java:[`java`],JavaScript:[`js|jsm|jsx`],JSON:[`json`],JSP:[`jsp`],LESS:[`less`],Lua:[`lua`],Makefile:[`^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make`],Markdown:[`md|markdown`],MySQL:[`mysql`],Nginx:[`nginx|conf`],INI:[`ini|conf|cfg|prefs`],ObjectiveC:[`m|mm`],Perl:[`pl|pm`],Perl6:[`p6|pl6|pm6`],pgSQL:[`pgsql`],PHP_Laravel_blade:[`blade.php`],PHP:[`php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module`],Powershell:[`ps1`],Python:[`py`],R:[`r`],Ruby:[`rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile`],Rust:[`rs`],SASS:[`sass`],SCSS:[`scss`],SH:[`sh|bash|^.bashrc`],SQL:[`sql`],SQLServer:[`sqlserver`],Swift:[`swift`],Text:[`txt`],Typescript:[`ts|typescript|str`],VBScript:[`vbs|vb`],Verilog:[`v|vh|sv|svh`],XML:[`xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml`],YAML:[`yaml|yml`],Compress:[`tar|zip|7z|rar|gz|arj|z`],images:[`icon|jpg|jpeg|png|bmp|gif|tif|emf`]},Jr=function(e){var t=e.match(/\.([0-9A-z]*)$/),n=Array.isArray(t)?t[1]:`text`;for(var r in ra)for(var i=ra[r][0].split(`|`),a=r.toLowerCase(),o=0;o<i.length;o++)if(n.toLowerCase()==i[o].toLowerCase())return{name:r,mode:a};return{name:`Text`,mode:`text`}},z(),Le={class:`tree-wrapper`},de=R({__name:`Tree`,setup:function(e){var t=ya().t,n=ec(),r=J(),i=na(r),a=i.currentPath,o=i.refreshKey,s=i.fileList,c=i.creatingType,l=i.isSearchMode,u=i.searchWord,p=i.searchAll,m=i.currentFile,h=U([]),g=U(``),_=U([]),v=U(null),y=U(null),b=U(null),x=U(``),S=U(null),C=U(!1),w=U(0),T=U(0),E=U([]),D=U(null),O=function(e,t){return function(){return I(`i`,{class:[e,t,`text-16px`]},null)}},ee=[{label:t(`fileEditor.tree.rename`),key:`rename`,icon:O(`i-lucide-text-cursor-input`,`text-gray-500`)},{label:t(`fileEditor.tree.download`),key:`download`,icon:O(`i-lucide-arrow-down`,`text-[#2080f0]`)},{label:t(`fileEditor.tree.delete`),key:`delete`,icon:O(`i-lucide-x`,`text-[#d03050]`)}],te=[{label:t(`fileEditor.tree.refresh`),key:`refresh`,icon:O(`i-lucide-refresh-cw`,`text-gray-500`)},{label:t(`fileEditor.tree.openDir`),key:`open_dir`,icon:O(`i-lucide-search`,`text-[#2080f0]`)},{label:t(`fileEditor.tree.newFolder`),key:`new_folder`,icon:O(`i-lucide-folder-plus`,`text-[#f0a020]`)},{label:t(`fileEditor.tree.newFile`),key:`new_file`,icon:O(`i-lucide-file-plus`,`text-gray-500`)},{label:t(`fileEditor.tree.rename`),key:`rename`,icon:O(`i-lucide-text-cursor-input`,`text-gray-500`)},{label:t(`fileEditor.tree.delete`),key:`delete`,icon:O(`i-lucide-x`,`text-[#d03050]`)}],k=function(e){if(C.value=!1,D.value)switch(e){case`refresh`:_e(D.value);break;case`download`:Lr(D.value.key);break;case`rename`:se();break;case`delete`:ne();break;case`new_folder`:ie(`folder`);break;case`new_file`:ie(`file`);break;case`open_dir`:r.setCurrentPath(D.value.key);break}},ne=function(){return X(function(){var e,t;return Z(this,function(i){switch(i.label){case 0:return D.value?(e={path:D.value.key,type:D.value.type===`dir`||D.value.type===`folder`?`dir`:`file`,nm:D.value.label},t=le(h.value,e.path),[4,kr(n,[e])]):[2];case 1:return i.sent(),s.value.map(function(e,t){return{path:e.path,index:t}}).filter(function(t){return t.path===e.path||t.path.startsWith(``.concat(e.path,`/`))}).sort(function(e,t){return t.index-e.index}).forEach(function(e){r.closeTab(e.index)}),t?_e(t):ve(),[2]}})})()},re=function(){C.value=!1},ie=function(e){return X(function(){var t,n,r;return Z(this,function(i){switch(i.label){case 0:return t=D.value,t?!t.children&&t.type===`dir`?[4,_e(t)]:[3,2]:[2];case 1:i.sent(),i.label=2;case 2:return n=t.key,_.value.includes(n)||_.value.push(n),ae(),v.value=e,y.value=t,g.value=``,r={key:`__local_creating__`,label:``,type:e,isLeaf:!0,isCreating:!0,__isLocal:!0},t.children||(t.children=[]),t.children.unshift(r),[2]}})})()},ae=function(){y.value&&y.value.children&&(y.value.children=y.value.children.filter(function(e){return e.key!==`__local_creating__`})),v.value=null,y.value=null},oe=function(){return X(function(){var e,n,i,a;return Z(this,function(o){switch(o.label){case 0:if(e=g.value,!e.trim())return V.warning(t(`fileEditor.store.nameRequired`)),[2];if(n=v.value,i=y.value,!i)return[2];a=``.concat(i.key,`/`,e),o.label=1;case 1:return o.trys.push([1,,7,8]),r.setLoading(!0),n===`file`?[4,xr({path:a})]:[3,3];case 2:return o.sent(),[3,5];case 3:return n===`folder`?[4,br({path:a})]:[3,5];case 4:o.sent(),o.label=5;case 5:return V.success(t(`fileEditor.store.createSuccess`,{type:t(n===`file`?`fileEditor.store.newFile`:`fileEditor.store.newFolder`)})),ae(),[4,_e(i)];case 6:return o.sent(),[3,8];case 7:return r.setLoading(!1),[7];case 8:return[2]}})})()},se=function(){if(D.value){var e=D.value.key;if(s.value.some(function(t){return t.path===e||t.path.startsWith(``.concat(e,`/`))})){V.warning(t(`fileEditor.tree.renameOpenedWarning`));return}b.value=e,x.value=D.value.label,S.value=le(h.value,b.value)}},ce=function(){b.value=null,x.value=``,S.value=null},le=function(e,t){var n=!0,r=!1,i=void 0;try{for(var a=e[Symbol.iterator](),o;!(n=(o=a.next()).done);n=!0){var s=o.value;if(s.children){if(s.children.some(function(e){return e.key===t}))return s;var c=le(s.children,t);if(c)return c}}}catch(e){r=!0,i=e}finally{try{!n&&a.return!=null&&a.return()}finally{if(r)throw i}}return null},de=function(){return X(function(){var e,n,i,a,o;return Z(this,function(s){switch(s.label){case 0:if(e=x.value,!e.trim())return V.warning(t(`fileEditor.store.nameRequired`)),[2];if(!b.value)return[2];if(n=b.value,i=n.lastIndexOf(`/`),a=``.concat(n.substring(0,i),`/`,e),n===a)return ce(),[2];s.label=1;case 1:return s.trys.push([1,,7,8]),r.setLoading(!0),[4,Bi({sfile:n,dfile:a})];case 2:return s.sent(),o=S.value,ce(),o?[4,_e(o)]:[3,4];case 3:return s.sent(),[3,6];case 4:return[4,ve()];case 5:s.sent(),s.label=6;case 6:return[3,8];case 7:return r.setLoading(!1),[7];case 8:return[2]}})})()},fe=M(function(){return s.value.map(function(e){return e.path})}),pe=function(e,t,n){var r=(e||[]).map(function(e){var t=(n===`/`?`/`:``.concat(n,`/`))+e.nm;return{label:e.nm,key:t,type:`dir`,isLeaf:!1}}),i=(t||[]).map(function(e){var t=(n===`/`?`/`:``.concat(n,`/`))+e.nm;return{label:e.nm,key:t,type:`file`,isLeaf:!0}});return Ya(r).concat(Ya(i))},me=function(e){var t=e.option;if(t.type===`dir`||t.type===`folder`)return I(`i`,{class:`tree-icon folder-icon`},null);var n=b.value===t.key,r=Jr(``.concat(t.isCreating?g.value:n?x.value:t.label)).mode;return I(`i`,{class:[`tree-icon`,``.concat(r,`-icon`)]},null)},A=function(e){var n=e.option,i=e.selected,a=b.value===n.key;return n.isCreating||a?I(`div`,{class:`creating-node`},[I(`input`,{class:`creating-input`,value:a?x.value:g.value,onInput:function(e){return a?x.value=e.target.value:g.value=e.target.value},onKeyup:function(e){e.key===`Enter`?(e.stopPropagation(),a?de():n.__isLocal?oe():r.confirmCreateNewItem(g.value)):e.key===`Escape`&&(e.stopPropagation(),a?ce():n.__isLocal?ae():r.cancelCreateNewItem())},onClick:function(e){return e.stopPropagation()},placeholder:n.type===`file`?t(`fileEditor.tree.newFilePlaceholder`):t(`fileEditor.tree.newFolderPlaceholder`),ref:function(e){e&&setTimeout(function(){return e.focus()},50)}},null),I(`i`,{class:`i-ep-check text-primary`,onClick:function(e){e.stopPropagation(),a?de():n.__isLocal?oe():r.confirmCreateNewItem(g.value)}},null),I(`i`,{class:`i-ep-close text-error`,onClick:function(e){e.stopPropagation(),a?ce():n.__isLocal?ae():r.cancelCreateNewItem()}},null)]):I(f,{class:i?`text-[#cca700]`:``},{default:function(){return[n.label]}})},he=function(e){return e.option.type===`dir`?`toggleExpand`:`default`},ge=function(e){var t=e.option;return{onClick:function(){t.type===`file`&&!t.isCreating&&r.openFile(t.key)},onContextmenu:function(e){e.preventDefault(),C.value=!1,Oi(function(){D.value=t,w.value=e.clientX,T.value=e.clientY,t.type===`dir`||t.type===`folder`?E.value=te:E.value=ee,C.value=!0})}}},_e=function(e){return X(function(){var t,n;return Z(this,function(r){switch(r.label){case 0:return r.trys.push([0,,2,3]),e.isLoading=!0,t=e.key,[4,Yr({path:t,p:1,showRow:99999,sort:`name`,reverse:`False`})];case 1:return n=r.sent().message,B(n)&&(e.children=pe(n.dir,n.files,n.path),(!n.dir||n.dir.length===0)&&(e.hideSwitcher=!0)),[3,3];case 2:return e.isLoading=!1,[7];case 3:return[2]}})})()},ve=function(){return X(function(){var e,t;return Z(this,function(i){switch(i.label){case 0:r.setLoading(!0),i.label=1;case 1:return i.trys.push([1,,3,4]),e={path:a.value,p:1,showRow:99999,sort:`name`,reverse:`False`},l.value&&u.value&&(e.search=u.value,p.value&&(e.all=`True`)),[4,Yr(e)];case 2:return t=i.sent().message,B(t)&&(n.fileRecycle.value=t.file_recycle,h.value=pe(t.dir,t.files,t.path),c.value&&ye()),[3,4];case 3:return r.setLoading(!1),[7];case 4:return[2]}})})()},ye=function(){if(c.value&&!h.value.find(function(e){return e.key===`__creating__`})){g.value=``;var e={key:`__creating__`,label:``,type:c.value,isLeaf:!0,isCreating:!0};h.value.unshift(e)}},be=function(){h.value=h.value.filter(function(e){return e.key!==`__creating__`})};Aa(c,function(e){e?ye():be()}),Aa([a,o],function(){ve()}),Aa(l,function(e){e&&(h.value=[])});var xe=function(){m.value&&Oi(function(){setTimeout(function(){var e=document.querySelector(`.tree-wrapper .n-tree-node--selected`);e&&e.scrollIntoView({behavior:`smooth`,block:`center`})},500)})};return Mi(function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return[4,ve()];case 1:return e.sent(),[4,Oi()];case 2:return e.sent(),xe(),[2]}})})()}),function(e,t){var n=ue,r=d;return H(),P(`div`,Le,[I(n,{ref:`treeRef`,"block-line":``,data:q(h),"on-load":_e,"expand-on-click":``,selectable:``,"expanded-keys":q(_),"onUpdate:expandedKeys":t[0]||(t[0]=function(e){return wi(_)?_.value=e:null}),"render-prefix":me,"render-label":A,"override-default-node-click-behavior":he,"selected-keys":q(fe),"node-props":ge},null,8,[`data`,`expanded-keys`,`selected-keys`]),I(r,{trigger:`manual`,placement:`bottom-start`,show:q(C),options:q(E),x:q(w),y:q(T),onSelect:k,onClickoutside:re},null,8,[`show`,`options`,`x`,`y`])])}}}),le=j(de,[[`__scopeId`,`data-v-eae71705`]]),z(),Ie={class:`sidebar-content`},hi=R({__name:`index`,setup:function(e){var t=U(!1),n=function(){t.value=!t.value};return function(e,r){return H(),P(`aside`,{class:ki([`sidebar-wrapper`,{"is-collapsed":q(t)}])},[N(`div`,Ie,[I(o),I(i),I(le)]),N(`div`,{class:`toggle-btn`,onClick:n})],2)}}}),g=j(hi,[[`__scopeId`,`data-v-4a4cb5df`]]),z(),Fe={class:`editor-header-wrapper`},lt=[`title`,`onClick`,`onContextmenu`],Ot=[`onClick`],Jt=[`onClick`],ii=R({__name:`header`,props:Di({data:{default:function(){return[]}},save:{}},{value:{},valueModifiers:{}}),emits:Di([`select`,`close`],[`update:value`]),setup:function(e,t){var n=t.emit,r=e,i=Ca(e,`value`),a=ya().t,o=n,s=Ea(`headerRef`),c=function(){Oi(function(){setTimeout(function(){if(s.value){var e=s.value.querySelector(`.editor-tab.active`);e&&e.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}},100)})};Aa(i,function(){c()}),Mi(function(){c()});var l=function(e){i.value=e,o(`select`,e)},u=function(e){var t=Jr(e).mode;return``.concat(t,`-icon`)},p=function(e){i.value!==void 0&&e<i.value&&--i.value,o(`close`,e)},m=function(e){_a({title:a(`fileEditor.editorHeader.tipTitle`),content:a(`fileEditor.editorHeader.modifiedSaveConfirm`),confirmText:a(`fileEditor.common.save`),cancelText:a(`fileEditor.editorHeader.dontSave`),onConfirm:function(){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,r.save(e)];case 1:return t.sent(),p(e),[2]}})})()},onCancel:function(){p(e)}})},h=function(e){return e.type===`shortcut`||e.type===`diff`||e.onlyRead?!1:e.content!==e.originalContent},g=U(!1),_=U(0),v=U(0),y=U(-1),b=[{label:a(`fileEditor.editorHeader.close`),key:`close`},{label:a(`fileEditor.editorHeader.closeOthers`),key:`closeOthers`},{label:a(`fileEditor.editorHeader.closeAll`),key:`closeAll`}],S=function(e,t){g.value=!1,Oi(function(){g.value=!0,_.value=e.clientX,v.value=e.clientY,y.value=t})},C=function(){g.value=!1},w=function(e){g.value=!1;var t=y.value;if(t!==-1){if(e===`close`){var n=r.data[t];h(n)?m(t):p(t)}else if(e===`closeOthers`){for(var i=r.data.length-1;i>=0;i--)if(i!==t){var a=r.data[i];h(a)||p(i)}}else if(e===`closeAll`)for(var o=r.data.length-1;o>=0;o--){var s=r.data[o];h(s)||p(o)}}};return function(t,n){var r=f,a=te,o=d;return H(),P(`div`,Fe,[I(a,{"x-scrollable":``,trigger:`none`},{default:Y(function(){return[N(`div`,{class:`editor-header`,ref_key:`headerRef`,ref:s},[(H(!0),P(x,null,Vi(e.data,function(e,t){return H(),P(`div`,{key:t,class:ki([`editor-tab`,{active:i.value===t}]),title:e.path,onClick:function(e){return l(t)},onContextmenu:Pa(function(e){return S(e,t)},[`prevent`])},[N(`div`,{class:ki([`tree-icon tab-icon`,u(e.name)])},null,2),I(r,{class:`mx-10px`},{default:Y(function(){return[N(`span`,null,K(e.name),1)]}),_:2},1024),h(e)?(H(),P(`div`,{key:0,class:`tab-dirty`,onClick:Pa(function(e){return m(t)},[`stop`])},null,8,Ot)):(H(),P(`div`,{key:1,class:`tab-close i-ep-close-bold`,onClick:Pa(function(e){return p(t)},[`stop`])},null,8,Jt))],42,lt)}),128))],512)]}),_:1}),I(o,{placement:`bottom-start`,trigger:`manual`,x:q(_),y:q(v),options:b,show:q(g),"on-clickoutside":C,onSelect:w},null,8,[`x`,`y`,`show`])])}}}),ri=j(ii,[[`__scopeId`,`data-v-7c07065c`]]),z(),oi=me(Hi(),1),Ei=R({__name:`main`,props:Di({mode:{type:String,default:`Text`}},{value:{},valueModifiers:{}}),emits:Di([`cursor-change`],[`update:value`]),setup:function(e,t){var n=t.expose,r=t.emit,i=e,a=r,o=J(),s=na(o),c=s.editorConfig,l=s.currentFile,u=Ca(e,`value`),d=Ea(`editorRef`),f=null,p=new Map,m=function(e){return new Promise(function(t){oi.default.config.loadModule(e,function(){return t()})})},h=function(){var e,t;if(f){var n=(e=l.value)==null?void 0:e.path;if(n){var r=o.fileList.map(function(e){return e.path}),a=!0,s=!1,d=void 0;try{for(var m=p.keys()[Symbol.iterator](),h;!(a=(h=m.next()).done);a=!0){var g=h.value;r.includes(g)||p.delete(g)}}catch(e){s=!0,d=e}finally{try{!a&&m.return!=null&&m.return()}finally{if(s)throw d}}var _=p.get(n);if(!_){var v;_=oi.default.createEditSession((v=u.value)==null?``:v,f.session.getMode()),_.setUndoManager(new oi.default.UndoManager);var y=c.value.aceEditor,b=y.useSoftTabs,x=y.tabSize,S=y.wrap;_.setUseSoftTabs(b),_.setTabSize(x),_.setUseWrapMode(S),p.set(n,_)}if(_.setMode(`ace/mode/`.concat((t=i.mode)==null?void 0:t.toLocaleLowerCase())),f.getSession()!==_){var C;f.setSession(_),f.setReadOnly(((C=l.value)==null?void 0:C.onlyRead)||!1);var w=c.value.aceEditor,T=w.useSoftTabs,E=w.tabSize,D=w.wrap;_.setUseSoftTabs(T),_.setTabSize(E),_.setUseWrapMode(D)}}}};Aa(function(){var e;return(e=l.value)==null?void 0:e.path},function(){h()}),Aa(function(){return u.value},function(e){if(f){var t=f.getValue();if(e!==void 0&&e!==t){var n=f.getSession(),r=n.selection.getCursor(),i=n.getScrollTop(),a=n.getScrollLeft();f.setValue(e,-1),f.moveCursorToPosition(r),n.setScrollTop(i),n.setScrollLeft(a)}}});var g=function(){return X(function(){var e,t,n,r,o,s,p,g,v,y,b,x,S,C,w,T,E,D,O,ee,te,k,ne,re,ie;return Z(this,function(ae){switch(ae.label){case 0:return oi.default.config.set(`basePath`,`/static/ace`),[4,m(`ace/ext/language_tools`)];case 1:return ae.sent(),d.value?(n=c.value.aceEditor.editorTheme,r=`ace/theme/`.concat(n),[4,m(r)]):[2];case 2:return ae.sent(),d.value?(o=c.value.aceEditor,s=o.fontSize,p=o.lineHeight,g=o.fontFamily,v=o.showInvisibles,y=o.showLineNumbers,b=o.useSoftTabs,x=o.tabSize,S=o.keyboardHandler,C=o.enableLiveAutocompletion,w=o.enableSnippets,T=o.enableBasicAutocompletion,E=o.wrap,D=o.indentedSoftWrap,O=o.highlightActiveLine,ee=o.highlightSelectedWord,te=o.animatedScroll,k=o.showFoldWidgets,ne=o.showGutter,re=o.displayIndentGuides,f=oi.default.edit(d.value,{value:u.value,theme:r,mode:`ace/mode/`.concat((e=i.mode)==null?void 0:e.toLocaleLowerCase()),fontSize:s,fontFamily:g,showInvisibles:v,showLineNumbers:y,useSoftTabs:b,tabSize:x,showPrintMargin:!1,keyboardHandler:S,enableLiveAutocompletion:C,enableSnippets:w,enableBasicAutocompletion:T,wrap:E,indentedSoftWrap:D,highlightActiveLine:O,highlightSelectedWord:ee,animatedScroll:te,showFoldWidgets:k,showGutter:ne,displayIndentGuides:re,readOnly:((t=l.value)==null?void 0:t.onlyRead)||!1}),f.container.style.lineHeight=p,f.renderer.updateFontSize(),ie=function(){if(f){var e=f.getCursorPosition();a(`cursor-change`,{line:e.row+1,column:e.column+1})}},h(),ie(),f.selection.on(`changeCursor`,function(){ie()}),f.on(`change`,function(){u.value=f==null?void 0:f.getValue()}),_(f),[2]):[2]}})})()},_=function(e){e.commands.addCommand({name:`saveFile`,bindKey:{win:`Ctrl-S`,mac:`Command-S`},readOnly:!0,exec:function(){o.saveCurrentFileContent()}}),e.commands.addCommand({name:`saveAllFile`,bindKey:{win:`Ctrl-Shift-S`,mac:`Command-Shift-S`},readOnly:!0,exec:function(){o.saveAllFile()}}),e.commands.addCommand({name:`closeFile`,bindKey:{win:`Alt-W`,mac:`Option-W`},readOnly:!0,exec:function(){o.closeTab(o.currentFileIndex)}}),e.commands.addCommand({name:`undo`,bindKey:{win:`Ctrl-Z`,mac:`Command-Z`},readOnly:!0,exec:function(){e.undo()}})};return ja(function(){var e=c.value.aceEditor,t=e.editorTheme,n=e.fontSize,r=e.lineHeight,i=e.fontFamily,a=e.showInvisibles,o=e.showLineNumbers,s=e.useSoftTabs,u=e.tabSize,d=e.keyboardHandler,p=e.enableLiveAutocompletion,m=e.enableSnippets,h=e.enableBasicAutocompletion,g=e.wrap,_=e.indentedSoftWrap,v=e.highlightActiveLine,y=e.highlightSelectedWord,b=e.animatedScroll,x=e.showFoldWidgets,S=e.showGutter,C=e.displayIndentGuides;if(f){var w;f.setTheme(`ace/theme/`.concat(t)),f.setOptions({fontSize:n,fontFamily:i,showInvisibles:a,showLineNumbers:o,useSoftTabs:s,tabSize:u,keyboardHandler:d,enableLiveAutocompletion:p,enableSnippets:m,enableBasicAutocompletion:h,wrap:g,indentedSoftWrap:_,highlightActiveLine:v,highlightSelectedWord:y,animatedScroll:b,showFoldWidgets:x,showGutter:S,displayIndentGuides:C,readOnly:((w=l.value)==null?void 0:w.onlyRead)||!1}),f.container.style.lineHeight=r,f.renderer.updateFontSize()}}),Mi(function(){g()}),n({execCommand:function(e){f&&f.execCommand(e)},jumpToLine:function(e){f.gotoLine(e,0,!0),requestAnimationFrame(function(){f.focus()})}}),function(e,t){return H(),P(`div`,{ref_key:`editorRef`,ref:d,class:`ace-editor w-full h-full`},null,512)}}}),Ti=j(Ei,[[`__scopeId`,`data-v-fd69013c`]]),z(),Pe={class:`file-history`},mi=R({__name:`index`,emits:[`close`],setup:function(e,t){var n=t.emit,r=ya().t,i=n,a=J(),o=na(a).currentFile,s=M(function(){var e=o.value;return e?e.history.map(function(t){return{time:t,path:e.path}}):[]}),c=[{key:`time`,title:r(`fileEditor.dialogs.fileHistory.time`),render:function(e){return Ur(e.time)}},ha({title:r(`fileEditor.dialogs.fileHistory.actions`),width:210,options:function(e){return[{label:r(`fileEditor.dialogs.fileHistory.diff`),onClick:function(){i(`close`),a.openDiffTab(e.path,e.time)}},{label:r(`fileEditor.dialogs.fileHistory.recover`),onClick:function(){_a({title:r(`fileEditor.dialogs.fileHistory.recoverTitle`),content:r(`fileEditor.dialogs.fileHistory.recoverContent`,{time:Ur(e.time)}),onConfirm:function(){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,Ri({filename:e.path,history:e.time})];case 1:return t.sent(),V.success(r(`fileEditor.dialogs.fileHistory.fileContentUpdated`)),a.getFileContent(e.path),[2]}})})()}})}},{label:r(`fileEditor.dialogs.fileHistory.delete`),onClick:function(){_a({title:r(`fileEditor.dialogs.fileHistory.deleteTitle`),content:r(`fileEditor.dialogs.fileHistory.deleteContent`,{time:Ur(e.time)}),onConfirm:function(){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,Ar({filename:e.path,history:e.time})];case 1:return t.sent(),u(e.path),[2]}})})()}})}}]}})],l=U(!1),u=function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),l.value=!0,[4,a.getFileContent(e)];case 1:return t.sent(),[3,3];case 2:return l.value=!1,[7];case 3:return[2]}})})()};return function(e,t){var n=or;return H(),P(`div`,Pe,[I(n,{loading:q(l),columns:c,data:q(s),"max-height":400},null,8,[`loading`,`data`])])}}}),_=j(mi,[[`__scopeId`,`data-v-654b4dcd`]]),z(),Ne={key:0,class:`footer-path`},ct={key:1,class:`footer-path diff-path`},Et={class:`mr-6px`},qt={key:2,class:`footer-tools`},dn={class:`footer-item`},En={key:0,class:`footer-item readonly-badge`},Vr=R({__name:`footer`,props:{filePath:{default:``},encoding:{default:`UTF-8`},lineEnding:{default:`LF`},cursor:{default:function(){return{line:1,column:1}}},tabSize:{default:4},useSoftTabs:{type:Boolean,default:!0},language:{default:`Text`}},emits:[`jump-line`],setup:function(e,t){var n=t.emit,r=e,i=n,a=J(),o=na(a),s=o.currentFile,c=o.editorConfig,l=ya().t,u=M(function(){return s.value?s.value.history.length:0}),d=M(function(){var e;return((e=s.value)==null?void 0:e.onlyRead)||!1}),p=function(){Sa({title:l(`fileEditor.dialogs.fileHistory.title`),component:_})},m=function(){a.openToolsModal(`lineEnding`,{lineEnding:r.lineEnding,onChange:function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,a.changeLineEnding(e)];case 1:return t.sent(),[2]}})})()}})},h=function(){a.openToolsModal(`tabSize`,{useSoftTabs:r.useSoftTabs?`space`:`tab`,tabSize:r.tabSize,onChange:function(e,t){a.updateTabSettings(e,t)}})},g=function(){a.openToolsModal(`encoding`,{encoding:c.value.aceEditor.encoding,onChange:function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,a.changeEncoding(e)];case 1:return t.sent(),[2]}})})()}})},v=function(){var e,t,n;a.openToolsModal(`goToLine`,{currentLine:(e=r.cursor)==null?void 0:e.line,currentColumn:(t=r.cursor)==null?void 0:t.column,maxLine:(n=s.value)!=null&&n.content?s.value.content.split(`
`).length:1,onChange:function(e){i(`jump-line`,e)}})},y=function(){if(!(!s.value||s.value.type!==`diff`)){var e={path:s.value.originalPath,time:s.value.historyTime};_a({title:l(`fileEditor.dialogs.fileHistory.recoverTitle`),content:l(`fileEditor.dialogs.fileHistory.recoverContent`,{time:Ur(e.time)}),onConfirm:function(){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,Ri({filename:e.path,history:e.time})];case 1:return t.sent(),V.success(l(`fileEditor.dialogs.fileHistory.fileContentUpdated`)),a.getFileContent(e.path),a.closeTab(a.currentFileIndex),[2]}})})()}})}};return function(t,n){var r,i,a,o,c,l=f,_=rr;return H(),P(`div`,{class:ki([`editor-footer`,{"diff-footer":((r=q(s))==null?void 0:r.type)===`diff`}])},[((i=q(s))==null?void 0:i.type)===`diff`?(H(),P(`div`,ct,[N(`span`,Et,K(t.$t(`fileEditor.editorFooter.readOnlyHistory`,{path:(a=q(s))==null?void 0:a.originalPath,time:q(Ur)((o=q(s))==null?void 0:o.historyTime)})),1),I(_,{onClick:y},{default:Y(function(){return[F(K(t.$t(`fileEditor.editorFooter.clickRecoverLeft`)),1)]}),_:1})])):(H(),P(`div`,Ne,[I(l,null,{default:Y(function(){return[F(K(t.$t(`fileEditor.editorFooter.fileLocation`,{path:e.filePath})),1)]}),_:1})])),((c=q(s))==null?void 0:c.type)===`diff`?yr(``,!0):(H(),P(`div`,qt,[N(`span`,{class:`footer-item`,onClick:m},K(e.lineEnding),1),N(`span`,{class:`footer-item`,onClick:v},K(t.$t(`fileEditor.editorFooter.lineColumn`,{line:e.cursor.line,column:e.cursor.column})),1),N(`span`,{class:`footer-item`,onClick:p},K(t.$t(`fileEditor.editorFooter.historyCount`,{count:q(u)})),1),N(`span`,{class:`footer-item`,onClick:h},K(t.$t(`fileEditor.editorFooter.tabSize`,{size:e.tabSize})),1),N(`span`,{class:`footer-item`,onClick:g},K(t.$t(`fileEditor.editorFooter.encoding`,{encoding:e.encoding})),1),N(`span`,dn,K(t.$t(`fileEditor.editorFooter.language`,{language:e.language})),1),q(d)?(H(),P(`span`,En,K(t.$t(`fileEditor.editorFooter.readOnlyMode`)),1)):yr(``,!0)]))],2)}}}),Br=j(Vr,[[`__scopeId`,`data-v-bf1270cf`]]),z(),Ir=R({__name:`diff`,props:{mode:{type:String,default:`Text`}},setup:function(e){var t=e,r=na(J()),i=r.editorConfig,a=r.currentFile,o=Ea(`diffRef`),s=null,c=function(e){return new Promise(function(t){oi.default.config.loadModule(e,function(){return t()})})},l=function(){return X(function(){var e,r,l,u,d,f,p,m,h,g,_,v,y,b;return Z(this,function(x){switch(x.label){case 0:return oi.default.config.set(`basePath`,`/static/ace`),[4,c(`ace/ext/language_tools`)];case 1:return x.sent(),o.value?(u=i.value.aceEditor.editorTheme,d=`ace/theme/`.concat(u),[4,c(d)]):[2];case 2:return x.sent(),o.value?(f=i.value.aceEditor,p=f.fontSize,m=f.fontFamily,h=f.showInvisibles,g=f.showLineNumbers,_=f.useSoftTabs,v=f.tabSize,y=`ace/mode/`.concat((e=t.mode)==null?void 0:e.toLocaleLowerCase()),s=new n({ace:oi.default,element:o.value,theme:d,mode:y,left:{content:((r=a.value)==null?void 0:r.leftContent)||``,editable:!1,copyLinkEnabled:!1},right:{content:((l=a.value)==null?void 0:l.rightContent)||``,editable:!1,copyLinkEnabled:!1}}),b=s.getEditors(),[b.left,b.right].forEach(function(e){e.setOptions({fontSize:p,fontFamily:m,showInvisibles:h,showLineNumbers:g,useSoftTabs:_,tabSize:v,showPrintMargin:!1,wrap:!0,indentedSoftWrap:!0})}),Aa(function(){var e;return(e=a.value)==null?void 0:e.leftContent},function(e){s&&s.getEditors().left.setValue(e||``,-1)}),Aa(function(){var e;return(e=a.value)==null?void 0:e.rightContent},function(e){s&&s.getEditors().right.setValue(e||``,-1)}),[2]):[2]}})})()};return Mi(function(){l()}),ji(function(){s&&s.destroy()}),ja(function(){var e=i.value.aceEditor,t=e.editorTheme,n=e.fontSize,r=e.fontFamily,a=e.showInvisibles,o=e.showLineNumbers,c=e.useSoftTabs,l=e.tabSize;if(s){var u=s.getEditors();[u.left,u.right].forEach(function(e){e.setTheme(`ace/theme/`.concat(t)),e.setOptions({fontSize:n,fontFamily:r,showInvisibles:a,showLineNumbers:o,useSoftTabs:c,tabSize:l})})}}),function(e,t){return H(),P(`div`,{ref_key:`diffRef`,ref:o,class:`ace-diff-container w-full h-full`},null,512)}}}),Fr=j(Ir,[[`__scopeId`,`data-v-4b286035`]]),z(),Zn={},Oe={class:`flex-1 bg-[#262626] overflow-y-auto w-full h-full text-[#ccc]`},st={class:`flex gap-60px max-w-[1200px] mx-auto py-30px px-50px justify-center`},Tt={class:`flex-1`},Kt={class:`text-[20px] text-[#e0e0e0] mb-[24px] pl-[12px] border-l-[3px] border-l-solid border-l-primary`},un={class:`flex flex-col gap-[14px] text-[14px]`},Tn={class:`flex items-center`},zn={class:`text-[#a4a4a4] ml-[16px]`},Vn={class:`flex items-center`},Hn={class:`text-[#a4a4a4] ml-[16px]`},Be={class:`flex items-center`},Ve={class:`text-[#a4a4a4] ml-[16px]`},He={class:`flex items-center`},Ue={class:`text-[#a4a4a4] ml-[16px]`},We={class:`flex items-center`},Ge={class:`text-[#a4a4a4] ml-[16px]`},Ke={class:`flex items-center`},qe={class:`text-[#a4a4a4] ml-[16px]`},Je={class:`flex items-center`},Ye={class:`text-[#a4a4a4] ml-[16px]`},ht={class:`flex items-center`},gt={class:`text-[#a4a4a4] ml-[16px]`},_t={class:`flex items-center`},vt={class:`text-[#a4a4a4] ml-[16px]`},yt={class:`flex items-center`},bt={class:`text-[#a4a4a4] ml-[16px]`},xt={class:`mt-[40px]`},St={class:`text-[20px] text-[#e0e0e0] mb-[24px] pl-[12px] border-l-[3px] border-l-solid border-l-primary`},Ct={class:`flex flex-col gap-[14px] text-[14px]`},wt={class:`flex items-center`},It={class:`text-[#a4a4a4] ml-[16px]`},Lt={class:`flex items-center`},Rt={class:`text-[#a4a4a4] ml-[16px]`},zt={class:`flex items-center`},Bt={class:`text-[#a4a4a4] ml-[16px]`},Vt={class:`flex items-center`},Ht={class:`text-[#a4a4a4] ml-[16px]`},Ut={class:`flex-1`},Wt={class:`text-[20px] text-[#e0e0e0] mb-[24px] pl-[12px] border-l-[3px] border-l-solid border-l-primary`},Gt={class:`flex flex-col gap-[14px] text-[14px]`},$t={class:`flex items-center`},en={class:`flex items-center gap-[6px] min-w-[260px] text-white`},tn={class:`flex items-center`},nn={class:`text-[#a4a4a4] ml-[16px]`},rn={class:`flex items-center`},an={class:`text-[#a4a4a4] ml-[16px]`},on={class:`flex items-center`},sn={class:`flex items-center gap-[6px] min-w-[260px] text-white`},cn={class:`text-[#a4a4a4] ml-[16px]`},ln={class:`mt-[40px]`},hn={class:`text-[20px] text-[#e0e0e0] mb-[24px] pl-[12px] border-l-[3px] border-l-solid border-l-primary`},gn={class:`flex flex-col gap-[14px] text-[14px]`},_n={class:`flex items-center`},vn={class:`text-[#a4a4a4] ml-[16px]`},yn={class:`flex items-center`},bn={class:`text-[#a4a4a4] ml-[16px]`},xn={class:`flex items-center`},Sn={class:`text-[#a4a4a4] ml-[16px]`},Cn={class:`flex items-center`},wn={class:`text-[#a4a4a4] ml-[16px]`},kn={class:`flex items-center`},An={class:`text-[#a4a4a4] ml-[16px]`},jn={class:`flex items-center`},Mn={class:`text-[#a4a4a4] ml-[16px]`},Nn={class:`flex items-center`},Pn={class:`text-[#a4a4a4] ml-[16px]`},Fn={class:`flex items-center`},In={class:`text-[#a4a4a4] ml-[16px]`},Ln={class:`flex items-center`},Rn={class:`text-[#a4a4a4] ml-[16px]`},re=j(Zn,[[`render`,tc],[`__scopeId`,`data-v-fccb0a32`]]),z(),_e={class:`flex-1 flex flex-col h-full bg-[#1e1e1e] overflow-hidden`},Ze={class:`flex-1 overflow-hidden relative`},ci=R({__name:`index`,setup:function(e,t){var n=t.expose,r=J(),i=na(r),a=i.fileList,o=i.currentFileIndex,s=i.currentFile,c=i.editorConfig,l=r.saveFileContentAndClose,u=r.closeTab,d=r.updateTabContent,f=Ea(`editorMainRef`),p=M({get:function(){var e;return((e=s.value)==null?void 0:e.content)||``},set:function(e){o.value!==-1&&d(o.value,e)}}),m=Ii({line:1,column:1}),h=M(function(){return Number(c.value.aceEditor.tabSize)}),g=M(function(){return c.value.aceEditor.useSoftTabs}),_=M(function(){var e;return((e=s.value)==null?void 0:e.encoding)||``}),v=M(function(){var e=new Map,t=Object.entries(c.value.supportedModes||{}),n=!0,r=!1,i=void 0;try{for(var a=t[Symbol.iterator](),o;!(n=(o=a.next()).done);n=!0){var s=Ja(o.value,2),l=s[0],u=s[1][0].split(`|`),d=!0,f=!1,p=void 0;try{for(var m=u[Symbol.iterator](),h;!(d=(h=m.next()).done);d=!0){var g=h.value;e.set(g,l)}}catch(e){f=!0,p=e}finally{try{!d&&m.return!=null&&m.return()}finally{if(f)throw p}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return!=null&&a.return()}finally{if(r)throw i}}return e}),y=M(function(){var e,t=(e=s.value)==null?void 0:e.type;return t&&v.value.get(t)||`Text`}),b=M(function(){var e,t,n=y.value;return(e=(t=c.value.nameOverrides)==null?void 0:t[n])==null?n:e}),S=function(e){return X(function(){return Z(this,function(t){switch(t.label){case 0:return[4,l(e)];case 1:return t.sent(),[2]}})})()},C=function(e){u(e)},w=function(e){m.line=e.line,m.column=e.column},T=function(e){if(e===`search`){var t;(t=f.value)==null||t.execCommand(`find`)}else if(e===`replace`){var n;(n=f.value)==null||n.execCommand(`replace`)}else if(e===`goToLine`){var i;r.openToolsModal(`goToLine`,{currentLine:m.line,currentColumn:m.column,maxLine:(i=s.value)!=null&&i.content?s.value.content.split(`
`).length:1,onChange:function(e){var t;(t=f.value)==null||t.jumpToLine(e)}})}},E=function(e){var t;(t=f.value)==null||t.jumpToLine(e)};return n({handleToolbarAction:T}),r.getEditorConfig(),function(e,t){return H(),P(`div`,_e,[I(ri,{value:q(o),"onUpdate:value":t[0]||(t[0]=function(e){return wi(o)?o.value=e:null}),data:q(a),save:S,onClose:C},null,8,[`value`,`data`]),q(s)?(H(),P(x,{key:0},[N(`div`,Ze,[q(s).type===`shortcut`?(H(),vr(re,{key:0})):q(s).type===`diff`?(H(),vr(Fr,{key:1,mode:q(y)},null,8,[`mode`])):(H(),vr(Ti,{key:2,ref_key:`editorMainRef`,ref:f,value:q(p),"onUpdate:value":t[1]||(t[1]=function(e){return wi(p)?p.value=e:null}),mode:q(y),onCursorChange:w},null,8,[`value`,`mode`]))]),q(s).type===`shortcut`?yr(``,!0):(H(),vr(Br,{key:0,"file-path":q(s).path,encoding:q(_),"line-ending":q(s).lineEnding,cursor:q(m),"tab-size":q(h),"use-soft-tabs":q(g),language:q(b),onJumpLine:E},null,8,[`file-path`,`encoding`,`line-ending`,`cursor`,`tab-size`,`use-soft-tabs`,`language`]))],64)):yr(``,!0)])}}}),u=ci,z(),ge={class:`editor-container`},Xe={class:`editor-body`},si=R({__name:`index`,props:{filePath:{type:String,required:!0},currentPath:{type:String,required:!0},onClose:{type:Function,required:!0},onMaximize:{type:Function,required:!0},onMinimize:{type:Function,required:!0}},setup:function(e){var t=e,n=Ea(`codeEditorRef`),r=ya().t,i=J(),a=na(i).isMinimize,o=function(e){if(e.key===`F5`||e.key===`r`&&(e.metaKey||e.ctrlKey)){e.preventDefault(),V.info(r(`fileEditor.messages.noRefresh`));return}};i.setCurrentPath(t.currentPath),Mi(function(){window.addEventListener(`keydown`,o,{capture:!0}),i.isOpen=!0,i.openFile(t.filePath)}),Ni(function(){window.removeEventListener(`keydown`,o,{capture:!0}),i.isOpen=!1,i.isMinimize=!1,i.fileList=[],i.currentFileIndex=-1,i.currentPath=``,i.creatingType=null,i.isSearchMode=!1,i.closeToolsModal()});var s=U(!1),c=M({get:function(){return a.value},set:function(e){a.value=e}}),l=function(e){n.value&&n.value.handleToolbarAction(e)},d=function(){c.value=!c.value,t.onMinimize()},f=function(){s.value=!s.value,t.onMaximize()},p=function(){var e=i.fileList.some(function(e){return e.content!==e.originalContent&&e.type!==`shortcut`}),n=function(){pr(),t.onClose&&t.onClose()};e?_a({title:r(`fileEditor.editorHeader.tipTitle`),content:r(`fileEditor.editorHeader.modifiedSaveConfirm`),confirmText:r(`fileEditor.common.save`),cancelText:r(`fileEditor.editorHeader.dontSave`),onConfirm:function(){return X(function(){return Z(this,function(e){switch(e.label){case 0:return[4,i.saveAllFile()];case 1:return e.sent(),n(),[2]}})})()},onCancel:function(){n()}}):n()};return function(e,t){return H(),P(`div`,ge,[I(se,{"is-minimize":q(c),"is-maximize":q(s),onMinimize:d,onMaximize:f,onClose:p},null,8,[`is-minimize`,`is-maximize`]),Ma(I(ce,{onAction:l},null,512),[[Oa,!q(c)]]),Ma(N(`main`,Xe,[I(g),I(u,{ref_key:`codeEditorRef`,ref:n},null,512)],512),[[Oa,!q(c)]])])}}}),e(`t`,h=pe({default:function(){return m}})),m=j(si,[[`__scopeId`,`data-v-5961e81f`]])}}})})();