← Back
Editing: store-legacy.js
!function(){function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,u,o=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw r}}return o}}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function n(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(t){s(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function a(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,a,r,i){var u=a&&a.prototype instanceof c?a:c,s=Object.create(u.prototype);return o(s,"_invoke",function(n,a,r){var i,u,o,c=0,s=r||[],f=!1,p={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return i=t,u=0,o=e,p.n=n,l}};function v(n,a){for(u=n,o=a,t=0;!f&&c&&!r&&t<s.length;t++){var r,i=s[t],v=p.p,h=i[2];n>3?(r=h===a)&&(o=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=v&&((r=n<2&&v<i[1])?(u=0,p.v=a,p.n=i[1]):v<h&&(r=n<3||i[0]>a||a>h)&&(i[4]=n,i[5]=a,p.n=h,u=0))}if(r||n>1)return l;throw f=!0,a}return function(r,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&v(s,h),u=s,o=h;(t=u<2?e:o)||!f;){i||(u?u<3?(u>1&&(p.n=-1),v(u,o)):p.n=o:p.v=o);try{if(c=2,i){if(u||(r="next"),t=i[r]){if(!(t=t.call(i,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(o=TypeError("The iterator does not provide a '"+r+"' method"),u=1);i=e}else if((t=(f=p.n<0)?o:n.call(a,p))!==l)break}catch(t){i=e,u=1,o=t}finally{c=1}}return{value:t,done:f}}}(n,r,i),!0),s}var l={};function c(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][a]?t(t([][a]())):(o(t={},a,function(){return this}),t),v=f.prototype=c.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,o(e,r,"GeneratorFunction")),e.prototype=Object.create(v),e}return s.prototype=f,o(v,"constructor",f),o(f,"constructor",s),s.displayName="GeneratorFunction",o(f,r,"GeneratorFunction"),o(v),o(v,r,"Generator"),o(v,a,function(){return this}),o(v,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:h}})()}function o(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}o=function(e,t,n,a){function i(t,n){o(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},o(e,t,n,a)}function l(e,t,n,a,r,i,u){try{var o=e[i](u),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(a,r)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){var i=e.apply(t,n);function u(e){l(i,a,r,u,o,"next",e)}function o(e){l(i,a,r,u,o,"throw",e)}u(void 0)})}}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=f(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./files-legacy.js?v=1765440387","./validator-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./store-legacy2.js?v=1765440387"],function(t,r){"use strict";var i,o,l,p,v,h,d,m,g,b,y,w,k,S,_,C,L,x,E,T,D,N,F,I,R,O,A,j,P,M,z,q,B,H,V,G,W,U,J,$,K,Y,X,Q,Z,ee,te,ne,ae,re,ie,ue,oe,le,ce,se,fe,pe,ve,he,de,me,ge,be,ye,we,ke,Se,_e,Ce,Le,xe,Ee,Te,De,Ne,Fe,Ie,Re,Oe,Ae,je,Pe,Me,ze,qe,Be,He,Ve,Ge,We,Ue,Je,$e,Ke,Ye,Xe,Qe,Ze,et,tt,nt,at,rt,it,ut,ot,lt,ct,st,ft,pt,vt,ht,dt,mt,gt,bt,yt,wt,kt,St,_t,Ct,Lt,xt,Et,Tt,Dt,Nt,Ft,It,Rt,Ot,At,jt,Pt,Mt,zt,qt,Bt,Ht,Vt,Gt,Wt,Ut,Jt,$t,Kt,Yt,Xt,Qt,Zt,en,tn,nn,an,rn,un,on,ln,cn,sn,fn;return{setters:[function(e){i=e.at,o=e.b,l=e.K,p=e.j,v=e.u,h=e.L,d=e.M,m=e.l,g=e.bT,b=e.o,y=e.R,w=e.cl,k=e.bS,S=e.v,_=e.N,C=e.cm,L=e.cn,x=e.co,E=e.S,T=e.A,D=e.cp,N=e.w,F=e.aq,I=e.p,R=e.cq,O=e.H,A=e.e,j=e.cr,P=e.a5,M=e.ai,z=e.m,q=e.a,B=e.cj,H=e.cs,V=e.q,G=e.aA,W=e.aj,U=e.ck,J=e.I},function(e){$=e.r,K=e.n,Y=e.c,X=e.w,Q=e.aG,Z=e.G,ee=e.H,te=e.I,ne=e.q,ae=e.v,re=e.e,ie=e.O,ue=e.Q,oe=e.y,le=e.j,ce=e.d,se=e.t,fe=e.k,pe=e.U,ve=e.b5,he=e.aA,de=e.s,me=e.aC,ge=e.B,be=e.ak,ye=e.aj,we=e.i,ke=e.g,Se=e._,_e=e.as,Ce=e.p,Le=e.M,xe=e.A,Ee=e.J,Te=e.K,De=e.x,Ne=e.z,Fe=e.C,Ie=e.N,Re=e.aN,Oe=e.a1,Ae=e.a4,je=e.E,Pe=e.o},function(e){Me=e.e,ze=e.f,qe=e.s,Be=e.h,He=e.a,Ve=e.i,Ge=e.j,We=e.k,Ue=e.l,Je=e.m,$e=e.n,Ke=e.o,Ye=e.p,Xe=e.q,Qe=e.r,Ze=e.z,et=e.t,tt=e.u,nt=e.v,at=e.w,rt=e.x,it=e.y,ut=e.A,ot=e.B,lt=e.D,ct=e.E,st=e.F,ft=e.G,pt=e.H,vt=e.I,ht=e.J,dt=e.K,mt=e.L,gt=e.M,bt=e.N,yt=e.O,wt=e.P,kt=e.Q,St=e.R,_t=e.S,Ct=e.T,Lt=e.U,xt=e.V,Et=e.W,Tt=e.X,Dt=e.Y,Nt=e.Z,Ft=e._,It=e.b,Rt=e.$,Ot=e.a0,At=e.a1,jt=e.a2,Pt=e.a3,Mt=e.a4,zt=e.a5,qt=e.a6,Bt=e.a7,Ht=e.a8,Vt=e.a9,Gt=e.aa,Wt=e.d,Ut=e.ab,Jt=e.ac,$t=e.ad,Kt=e.ae,Yt=e.af,Xt=e.ag,Qt=e.ah,Zt=e.ai,en=e.aj},function(e){tn=e.l,nn=e.f,an=e.q,rn=e.k,un=e.p},function(e){on=e.g},function(e){ln=e.a,cn=e.u,sn=e.c},function(e){fn=e.default}],execute:function(){var pn={exports:{}};function vn(e){return e&&"object"===f(e)&&!Array.isArray(e)&&null!==e}!function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,a,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=r;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===a&&(a=!0);var u=a,o=this.diff_commonPrefix(e,n),l=e.substring(0,o);e=e.substring(o),n=n.substring(o),o=this.diff_commonSuffix(e,n);var c=e.substring(e.length-o);e=e.substring(0,e.length-o),n=n.substring(0,n.length-o);var s=this.diff_compute_(e,n,u,i);return l&&s.unshift(new t.Diff(0,l)),c&&s.push(new t.Diff(0,c)),this.diff_cleanupMerge(s),s},t.prototype.diff_compute_=function(e,a,r,i){var u;if(!e)return[new t.Diff(1,a)];if(!a)return[new t.Diff(n,e)];var o=e.length>a.length?e:a,l=e.length>a.length?a:e,c=o.indexOf(l);if(-1!=c)return u=[new t.Diff(1,o.substring(0,c)),new t.Diff(0,l),new t.Diff(1,o.substring(c+l.length))],e.length>a.length&&(u[0][0]=u[2][0]=n),u;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,a)];var s=this.diff_halfMatch_(e,a);if(s){var f=s[0],p=s[1],v=s[2],h=s[3],d=s[4],m=this.diff_main(f,v,r,i),g=this.diff_main(p,h,r,i);return m.concat([new t.Diff(0,d)],g)}return r&&e.length>100&&a.length>100?this.diff_lineMode_(e,a,i):this.diff_bisect_(e,a,i)},t.prototype.diff_lineMode_=function(e,a,r){var i=this.diff_linesToChars_(e,a);e=i.chars1,a=i.chars2;var u=i.lineArray,o=this.diff_main(e,a,!1,r);this.diff_charsToLines_(o,u),this.diff_cleanupSemantic(o),o.push(new t.Diff(0,""));for(var l=0,c=0,s=0,f="",p="";l<o.length;){switch(o[l][0]){case 1:s++,p+=o[l][1];break;case n:c++,f+=o[l][1];break;case 0:if(c>=1&&s>=1){o.splice(l-c-s,c+s),l=l-c-s;for(var v=this.diff_main(f,p,!1,r),h=v.length-1;h>=0;h--)o.splice(l,0,v[h]);l+=v.length}s=0,c=0,f="",p=""}l++}return o.pop(),o},t.prototype.diff_bisect_=function(e,a,r){for(var i=e.length,u=a.length,o=Math.ceil((i+u)/2),l=o,c=2*o,s=new Array(c),f=new Array(c),p=0;p<c;p++)s[p]=-1,f[p]=-1;s[l+1]=0,f[l+1]=0;for(var v=i-u,h=v%2!=0,d=0,m=0,g=0,b=0,y=0;y<o&&!((new Date).getTime()>r);y++){for(var w=-y+d;w<=y-m;w+=2){for(var k=l+w,S=(E=w==-y||w!=y&&s[k-1]<s[k+1]?s[k+1]:s[k-1]+1)-w;E<i&&S<u&&e.charAt(E)==a.charAt(S);)E++,S++;if(s[k]=E,E>i)m+=2;else if(S>u)d+=2;else if(h){if((L=l+v-w)>=0&&L<c&&-1!=f[L])if(E>=(C=i-f[L]))return this.diff_bisectSplit_(e,a,E,S,r)}}for(var _=-y+g;_<=y-b;_+=2){for(var C,L=l+_,x=(C=_==-y||_!=y&&f[L-1]<f[L+1]?f[L+1]:f[L-1]+1)-_;C<i&&x<u&&e.charAt(i-C-1)==a.charAt(u-x-1);)C++,x++;if(f[L]=C,C>i)b+=2;else if(x>u)g+=2;else if(!h){if((k=l+v-_)>=0&&k<c&&-1!=s[k]){var E;S=l+(E=s[k])-k;if(E>=(C=i-C))return this.diff_bisectSplit_(e,a,E,S,r)}}}}return[new t.Diff(n,e),new t.Diff(1,a)]},t.prototype.diff_bisectSplit_=function(e,t,n,a,r){var i=e.substring(0,n),u=t.substring(0,a),o=e.substring(n),l=t.substring(a),c=this.diff_main(i,u,!1,r),s=this.diff_main(o,l,!1,r);return c.concat(s)},t.prototype.diff_linesToChars_=function(e,t){var n=[],a={};function r(e){for(var t="",r=0,u=-1,o=n.length;u<e.length-1;){-1==(u=e.indexOf("\n",r))&&(u=e.length-1);var l=e.substring(r,u+1);(a.hasOwnProperty?a.hasOwnProperty(l):void 0!==a[l])?t+=String.fromCharCode(a[l]):(o==i&&(l=e.substring(r),u=e.length),t+=String.fromCharCode(o),a[l]=o,n[o++]=l),r=u+1}return t}n[0]="";var i=4e4,u=r(e);return i=65535,{chars1:u,chars2:r(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var a=e[n][1],r=[],i=0;i<a.length;i++)r[i]=t[a.charCodeAt(i)];e[n][1]=r.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,a=Math.min(e.length,t.length),r=a,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:a=r,r=Math.floor((a-n)/2+n);return r},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,a=Math.min(e.length,t.length),r=a,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:a=r,r=Math.floor((a-n)/2+n);return r},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,a=t.length;if(0==n||0==a)return 0;n>a?e=e.substring(n-a):n<a&&(t=t.substring(0,n));var r=Math.min(n,a);if(e==t)return r;for(var i=0,u=1;;){var o=e.substring(r-u),l=t.indexOf(o);if(-1==l)return i;u+=l,0!=l&&e.substring(r-u)!=t.substring(0,u)||(i=u,u++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,a=e.length>t.length?t:e;if(n.length<4||2*a.length<n.length)return null;var r=this;function i(e,t,n){for(var a,i,u,o,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,s="";-1!=(c=t.indexOf(l,c+1));){var f=r.diff_commonPrefix(e.substring(n),t.substring(c)),p=r.diff_commonSuffix(e.substring(0,n),t.substring(0,c));s.length<p+f&&(s=t.substring(c-p,c)+t.substring(c,c+f),a=e.substring(0,n-p),i=e.substring(n+f),u=t.substring(0,c-p),o=t.substring(c+f))}return 2*s.length>=e.length?[a,i,u,o,s]:null}var u,o,l,c,s,f=i(n,a,Math.ceil(n.length/4)),p=i(n,a,Math.ceil(n.length/2));return f||p?(u=p?f&&f[4].length>p[4].length?f:p:f,e.length>t.length?(o=u[0],l=u[1],c=u[2],s=u[3]):(c=u[0],s=u[1],o=u[2],l=u[3]),[o,l,c,s,u[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var a=!1,r=[],i=0,u=null,o=0,l=0,c=0,s=0,f=0;o<e.length;)0==e[o][0]?(r[i++]=o,l=s,c=f,s=0,f=0,u=e[o][1]):(1==e[o][0]?s+=e[o][1].length:f+=e[o][1].length,u&&u.length<=Math.max(l,c)&&u.length<=Math.max(s,f)&&(e.splice(r[i-1],0,new t.Diff(n,u)),e[r[i-1]+1][0]=1,i--,o=--i>0?r[i-1]:-1,l=0,c=0,s=0,f=0,u=null,a=!0)),o++;for(a&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o<e.length;){if(e[o-1][0]==n&&1==e[o][0]){var p=e[o-1][1],v=e[o][1],h=this.diff_commonOverlap_(p,v),d=this.diff_commonOverlap_(v,p);h>=d?(h>=p.length/2||h>=v.length/2)&&(e.splice(o,0,new t.Diff(0,v.substring(0,h))),e[o-1][1]=p.substring(0,p.length-h),e[o+1][1]=v.substring(h),o++):(d>=p.length/2||d>=v.length/2)&&(e.splice(o,0,new t.Diff(0,p.substring(0,d))),e[o-1][0]=1,e[o-1][1]=v.substring(0,v.length-d),e[o+1][0]=n,e[o+1][1]=p.substring(d),o++),o++}o++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var a=e.charAt(e.length-1),r=n.charAt(0),i=a.match(t.nonAlphaNumericRegex_),u=r.match(t.nonAlphaNumericRegex_),o=i&&a.match(t.whitespaceRegex_),l=u&&r.match(t.whitespaceRegex_),c=o&&a.match(t.linebreakRegex_),s=l&&r.match(t.linebreakRegex_),f=c&&e.match(t.blanklineEndRegex_),p=s&&n.match(t.blanklineStartRegex_);return f||p?5:c||s?4:i&&!o&&l?3:o||l?2:i||u?1:0}for(var a=1;a<e.length-1;){if(0==e[a-1][0]&&0==e[a+1][0]){var r=e[a-1][1],i=e[a][1],u=e[a+1][1],o=this.diff_commonSuffix(r,i);if(o){var l=i.substring(i.length-o);r=r.substring(0,r.length-o),i=l+i.substring(0,i.length-o),u=l+u}for(var c=r,s=i,f=u,p=n(r,i)+n(i,u);i.charAt(0)===u.charAt(0);){r+=i.charAt(0),i=i.substring(1)+u.charAt(0),u=u.substring(1);var v=n(r,i)+n(i,u);v>=p&&(p=v,c=r,s=i,f=u)}e[a-1][1]!=c&&(c?e[a-1][1]=c:(e.splice(a-1,1),a--),e[a][1]=s,f?e[a+1][1]=f:(e.splice(a+1,1),a--))}a++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var a=!1,r=[],i=0,u=null,o=0,l=!1,c=!1,s=!1,f=!1;o<e.length;)0==e[o][0]?(e[o][1].length<this.Diff_EditCost&&(s||f)?(r[i++]=o,l=s,c=f,u=e[o][1]):(i=0,u=null),s=f=!1):(e[o][0]==n?f=!0:s=!0,u&&(l&&c&&s&&f||u.length<this.Diff_EditCost/2&&l+c+s+f==3)&&(e.splice(r[i-1],0,new t.Diff(n,u)),e[r[i-1]+1][0]=1,i--,u=null,l&&c?(s=f=!0,i=0):(o=--i>0?r[i-1]:-1,s=f=!1),a=!0)),o++;a&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var a,r=0,i=0,u=0,o="",l="";r<e.length;)switch(e[r][0]){case 1:u++,l+=e[r][1],r++;break;case n:i++,o+=e[r][1],r++;break;case 0:i+u>1?(0!==i&&0!==u&&(0!==(a=this.diff_commonPrefix(l,o))&&(r-i-u>0&&0==e[r-i-u-1][0]?e[r-i-u-1][1]+=l.substring(0,a):(e.splice(0,0,new t.Diff(0,l.substring(0,a))),r++),l=l.substring(a),o=o.substring(a)),0!==(a=this.diff_commonSuffix(l,o))&&(e[r][1]=l.substring(l.length-a)+e[r][1],l=l.substring(0,l.length-a),o=o.substring(0,o.length-a))),r-=i+u,e.splice(r,i+u),o.length&&(e.splice(r,0,new t.Diff(n,o)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,u=0,i=0,o="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var a,r=0,i=0,u=0,o=0;for(a=0;a<e.length&&(1!==e[a][0]&&(r+=e[a][1].length),e[a][0]!==n&&(i+=e[a][1].length),!(r>t));a++)u=r,o=i;return e.length!=a&&e[a][0]===n?o:o+(t-u)},t.prototype.diff_prettyHtml=function(e){for(var t=[],a=/&/g,r=/</g,i=/>/g,u=/\n/g,o=0;o<e.length;o++){var l=e[o][0],c=e[o][1].replace(a,"&").replace(r,"<").replace(i,">").replace(u,"¶<br>");switch(l){case 1:t[o]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[o]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[o]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],a=0;a<e.length;a++)e[a][0]!==n&&(t[a]=e[a][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,a=0,r=0,i=0;i<e.length;i++){var u=e[i][0],o=e[i][1];switch(u){case 1:a+=o.length;break;case n:r+=o.length;break;case 0:t+=Math.max(a,r),a=0,r=0}}return t+=Math.max(a,r)},t.prototype.diff_toDelta=function(e){for(var t=[],a=0;a<e.length;a++)switch(e[a][0]){case 1:t[a]="+"+encodeURI(e[a][1]);break;case n:t[a]="-"+e[a][1].length;break;case 0:t[a]="="+e[a][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,a){for(var r=[],i=0,u=0,o=a.split(/\t/g),l=0;l<o.length;l++){var c=o[l].substring(1);switch(o[l].charAt(0)){case"+":try{r[i++]=new t.Diff(1,decodeURI(c))}catch(p){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var s=parseInt(c,10);if(isNaN(s)||s<0)throw new Error("Invalid number in diff_fromDelta: "+c);var f=e.substring(u,u+=s);"="==o[l].charAt(0)?r[i++]=new t.Diff(0,f):r[i++]=new t.Diff(n,f);break;default:if(o[l])throw new Error("Invalid diff operation in diff_fromDelta: "+o[l])}}if(u!=e.length)throw new Error("Delta length ("+u+") does not equal source text length ("+e.length+").");return r},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(t),r=this;function i(e,a){var i=e/t.length,u=Math.abs(n-a);return r.Match_Distance?i+u/r.Match_Distance:u?1:i}var u=this.Match_Threshold,o=e.indexOf(t,n);-1!=o&&(u=Math.min(i(0,o),u),-1!=(o=e.lastIndexOf(t,n+t.length))&&(u=Math.min(i(0,o),u)));var l,c,s=1<<t.length-1;o=-1;for(var f,p=t.length+e.length,v=0;v<t.length;v++){for(l=0,c=p;l<c;)i(v,n+c)<=u?l=c:p=c,c=Math.floor((p-l)/2+l);p=c;var h=Math.max(1,n-c+1),d=Math.min(n+c,e.length)+t.length,m=Array(d+2);m[d+1]=(1<<v)-1;for(var g=d;g>=h;g--){var b=a[e.charAt(g-1)];if(m[g]=0===v?(m[g+1]<<1|1)&b:(m[g+1]<<1|1)&b|(f[g+1]|f[g])<<1|1|f[g+1],m[g]&s){var y=i(v,g-1);if(y<=u){if(u=y,!((o=g-1)>n))break;h=Math.max(1,2*n-o)}}}if(i(v+1,n)>u)break;f=m}return o},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var a=n.substring(e.start2,e.start2+e.length1),r=0;n.indexOf(a)!=n.lastIndexOf(a)&&a.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,a=n.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var i=n.substring(e.start2-r,e.start2);i&&e.diffs.unshift(new t.Diff(0,i));var u=n.substring(e.start2+e.length1,e.start2+e.length1+r);u&&e.diffs.push(new t.Diff(0,u)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+u.length,e.length2+=i.length+u.length}},t.prototype.patch_make=function(e,a,r){var i,u;if("string"==typeof e&&"string"==typeof a&&void 0===r)i=e,(u=this.diff_main(i,a,!0)).length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(e&&"object"==f(e)&&void 0===a&&void 0===r)u=e,i=this.diff_text1(u);else if("string"==typeof e&&a&&"object"==f(a)&&void 0===r)i=e,u=a;else{if("string"!=typeof e||"string"!=typeof a||!r||"object"!=f(r))throw new Error("Unknown call format to patch_make.");i=e,u=r}if(0===u.length)return[];for(var o=[],l=new t.patch_obj,c=0,s=0,p=0,v=i,h=i,d=0;d<u.length;d++){var m=u[d][0],g=u[d][1];switch(c||0===m||(l.start1=s,l.start2=p),m){case 1:l.diffs[c++]=u[d],l.length2+=g.length,h=h.substring(0,p)+g+h.substring(p);break;case n:l.length1+=g.length,l.diffs[c++]=u[d],h=h.substring(0,p)+h.substring(p+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&u.length!=d+1?(l.diffs[c++]=u[d],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,v),o.push(l),l=new t.patch_obj,c=0,v=h,s=p)}1!==m&&(s+=g.length),m!==n&&(p+=g.length)}return c&&(this.patch_addContext_(l,v),o.push(l)),o},t.prototype.patch_deepCopy=function(e){for(var n=[],a=0;a<e.length;a++){var r=e[a],i=new t.patch_obj;i.diffs=[];for(var u=0;u<r.diffs.length;u++)i.diffs[u]=new t.Diff(r.diffs[u][0],r.diffs[u][1]);i.start1=r.start1,i.start2=r.start2,i.length1=r.length1,i.length2=r.length2,n[a]=i}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var a=this.patch_addPadding(e);t=a+t+a,this.patch_splitMax(e);for(var r=0,i=[],u=0;u<e.length;u++){var o,l,c=e[u].start2+r,s=this.diff_text1(e[u].diffs),f=-1;if(s.length>this.Match_MaxBits?-1!=(o=this.match_main(t,s.substring(0,this.Match_MaxBits),c))&&(-1==(f=this.match_main(t,s.substring(s.length-this.Match_MaxBits),c+s.length-this.Match_MaxBits))||o>=f)&&(o=-1):o=this.match_main(t,s,c),-1==o)i[u]=!1,r-=e[u].length2-e[u].length1;else if(i[u]=!0,r=o-c,s==(l=-1==f?t.substring(o,o+s.length):t.substring(o,f+this.Match_MaxBits)))t=t.substring(0,o)+this.diff_text2(e[u].diffs)+t.substring(o+s.length);else{var p=this.diff_main(s,l,!1);if(s.length>this.Match_MaxBits&&this.diff_levenshtein(p)/s.length>this.Patch_DeleteThreshold)i[u]=!1;else{this.diff_cleanupSemanticLossless(p);for(var v,h=0,d=0;d<e[u].diffs.length;d++){var m=e[u].diffs[d];0!==m[0]&&(v=this.diff_xIndex(p,h)),1===m[0]?t=t.substring(0,o+v)+m[1]+t.substring(o+v):m[0]===n&&(t=t.substring(0,o+v)+t.substring(o+this.diff_xIndex(p,h+m[1].length))),m[0]!==n&&(h+=m[1].length)}}}}return[t=t.substring(a.length,t.length-a.length),i]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,a="",r=1;r<=n;r++)a+=String.fromCharCode(r);for(r=0;r<e.length;r++)e[r].start1+=n,e[r].start2+=n;var i=e[0],u=i.diffs;if(0==u.length||0!=u[0][0])u.unshift(new t.Diff(0,a)),i.start1-=n,i.start2-=n,i.length1+=n,i.length2+=n;else if(n>u[0][1].length){var o=n-u[0][1].length;u[0][1]=a.substring(u[0][1].length)+u[0][1],i.start1-=o,i.start2-=o,i.length1+=o,i.length2+=o}if(0==(u=(i=e[e.length-1]).diffs).length||0!=u[u.length-1][0])u.push(new t.Diff(0,a)),i.length1+=n,i.length2+=n;else if(n>u[u.length-1][1].length){o=n-u[u.length-1][1].length;u[u.length-1][1]+=a.substring(0,o),i.length1+=o,i.length2+=o}return a},t.prototype.patch_splitMax=function(e){for(var a=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=a)){var i=e[r];e.splice(r--,1);for(var u=i.start1,o=i.start2,l="";0!==i.diffs.length;){var c=new t.patch_obj,s=!0;for(c.start1=u-l.length,c.start2=o-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==i.diffs.length&&c.length1<a-this.Patch_Margin;){var f=i.diffs[0][0],p=i.diffs[0][1];1===f?(c.length2+=p.length,o+=p.length,c.diffs.push(i.diffs.shift()),s=!1):f===n&&1==c.diffs.length&&0==c.diffs[0][0]&&p.length>2*a?(c.length1+=p.length,u+=p.length,s=!1,c.diffs.push(new t.Diff(f,p)),i.diffs.shift()):(p=p.substring(0,a-c.length1-this.Patch_Margin),c.length1+=p.length,u+=p.length,0===f?(c.length2+=p.length,o+=p.length):s=!1,c.diffs.push(new t.Diff(f,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var v=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==v&&(c.length1+=v.length,c.length2+=v.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=v:c.diffs.push(new t.Diff(0,v))),s||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var a=[];if(!e)return a;for(var r=e.split("\n"),i=0,u=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<r.length;){var o=r[i].match(u);if(!o)throw new Error("Invalid patch string: "+r[i]);var l=new t.patch_obj;for(a.push(l),l.start1=parseInt(o[1],10),""===o[2]?(l.start1--,l.length1=1):"0"==o[2]?l.length1=0:(l.start1--,l.length1=parseInt(o[2],10)),l.start2=parseInt(o[3],10),""===o[4]?(l.start2--,l.length2=1):"0"==o[4]?l.length2=0:(l.start2--,l.length2=parseInt(o[4],10)),i++;i<r.length;){var c=r[i].charAt(0);try{var s=decodeURI(r[i].substring(1))}catch(f){throw new Error("Illegal escape in patch_fromText: "+s)}if("-"==c)l.diffs.push(new t.Diff(n,s));else if("+"==c)l.diffs.push(new t.Diff(1,s));else if(" "==c)l.diffs.push(new t.Diff(0,s));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+s)}i++}}return a},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],a=0;a<this.diffs.length;a++){switch(this.diffs[a][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[a+1]=e+encodeURI(this.diffs[a][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0}(pn);var hn={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"},dn=hn,mn=hn;var gn,bn=pn.exports,yn=function e(t,n){return vn(t)&&vn(n)&&Object.keys(n).forEach(function(a){vn(n[a])?(t[a]&&vn(t[a])||(t[a]=n[a]),e(t[a],n[a])):Object.assign(t,s({},a,n[a]))}),t},wn=function(e,t){var n=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null,i=!0;return function(){for(var u=arguments.length,o=new Array(u),l=0;l<u;l++)o[l]=arguments[l];var c=function(){e.apply(n,o),r=null};a&&i&&(i=!1,c()),r||(r=setTimeout(c,t))}},kn=function(e,t){var n,a=this;return function(){for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];var o=a;clearTimeout(n),n=setTimeout(function(){return e.apply(o,i)},t)}},Sn=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n")},_n=function(e,t,n,a){var r=e+(n-e)/2;return"M ".concat(e," ").concat(t," C ").concat(r,",").concat(t," ").concat(r,",").concat(a," ").concat(n,",").concat(a)},Cn=function(e,t){var n=e.options.mode;return t===dn.EDITOR_LEFT&&null!==e.options.left.mode&&(n=e.options.left.mode),t===dn.EDITOR_RIGHT&&null!==e.options.right.mode&&(n=e.options.right.mode),n},Ln=function(e,t){var n=e.options.theme;return t===mn.EDITOR_LEFT&&null!==e.options.left.theme&&(n=e.options.left.theme),t===mn.EDITOR_RIGHT&&null!==e.options.right.theme&&(n=e.options.right.theme),n},xn=function(e,t){return e.ace.getSession().doc.getLine(t)},En=function(e){return document.getElementById(e.options.left.id).offsetHeight},Tn=function(e){var t=document.createElement("div"),n={class:e.className,style:"top:".concat(e.topOffset,"px"),title:e.tooltip,"data-diff-index":e.diffIndex};for(var a in n)t.setAttribute(a,n[a]);return t.innerHTML=e.arrowContent,t},Dn=function(e,t){var n=Math.random().toString(36).substr(2,5),a="js-".concat(t,"-").concat(n),r=e.querySelector(".".concat(t));if(r)return r.id=r.id||a,r.id;var i=document.createElement("div");return e.appendChild(i),i.className=t,i.id=a,i.id},Nn={on:function(e,t,n,a){var r="document"===e?document:document.querySelector(e);r.addEventListener(t,function(e){for(var t=r.querySelectorAll(n),i=e.target,u=0,o=t.length;u<o;u+=1)for(var l=i,c=t[u];l&&l!==r;)l===c&&a.call(c,e),l=l.parentNode})}},Fn=hn;function In(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof In))return new In(e);var t=this;t.options=yn({ace:window?window.ace:void 0,mode:null,theme:null,element:null,diffGranularity:Fn.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},e);var n=t.options.ace;if(!n){return new Error("No ace editor found nor supplied - `options.ace` or `window.ace` is missing")}if(gn=function(e){if(e.Range)return e.Range;var t=e.acequire||e.require;return!!t&&t("ace/range")}(n),!gn){return new Error("Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff")}if(null===t.options.element){return new Error("You need to specify an element for Ace-diff - `options.element` is missing")}if(t.options.element instanceof HTMLElement?t.el=t.options.element:t.el=document.body.querySelector(t.options.element),!t.el){var a="Can't find the specified element ".concat(t.options.element);return new Error(a)}t.options.left.id=Dn(t.el,"acediff__left"),t.options.classes.gutterID=Dn(t.el,"acediff__gutter"),t.options.right.id=Dn(t.el,"acediff__right"),t.el.innerHTML='<div class="acediff__wrap">'.concat(t.el.innerHTML,"</div>"),t.editors={left:{ace:n.edit(t.options.left.id),markers:[],lineLengths:[]},right:{ace:n.edit(t.options.right.id),markers:[],lineLengths:[]},editorHeight:null},t.editors.left.ace.getSession().setMode(Cn(t,Fn.EDITOR_LEFT)),t.editors.right.ace.getSession().setMode(Cn(t,Fn.EDITOR_RIGHT)),t.editors.left.ace.setReadOnly(!t.options.left.editable),t.editors.right.ace.setReadOnly(!t.options.right.editable),t.editors.left.ace.setTheme(Ln(t,Fn.EDITOR_LEFT)),t.editors.right.ace.setTheme(Ln(t,Fn.EDITOR_RIGHT)),t.editors.left.ace.setValue(Sn(t.options.left.content),-1),t.editors.right.ace.setValue(Sn(t.options.right.content),-1),t.editors.editorHeight=En(t),setTimeout(function(){t.lineHeight=t.editors.left.ace.renderer.lineHeight,function(e){e.editors.left.ace.getSession().on("changeScrollTop",wn(function(){Pn(e)},16)),e.editors.right.ace.getSession().on("changeScrollTop",wn(function(){Pn(e)},16));var t=e.diff.bind(e);e.editors.left.ace.on("change",t),e.editors.right.ace.on("change",t),e.options.left.copyLinkEnabled&&Nn.on("#".concat(e.options.classes.gutterID),"click",".".concat(e.options.classes.newCodeConnectorLink),function(t){On(e,t,Fn.LTR)});e.options.right.copyLinkEnabled&&Nn.on("#".concat(e.options.classes.gutterID),"click",".".concat(e.options.classes.deletedCodeConnectorLink),function(t){On(e,t,Fn.RTL)});var n=kn(function(){e.editors.availableHeight=document.getElementById(e.options.left.id).offsetHeight,e.diff()},250);window.addEventListener("resize",n),Rn=function(){window.removeEventListener("resize",n)}}(t),function(e){e.copyRightContainer=document.createElement("div"),e.copyRightContainer.setAttribute("class",e.options.classes.copyRightContainer),e.copyLeftContainer=document.createElement("div"),e.copyLeftContainer.setAttribute("class",e.options.classes.copyLeftContainer),document.getElementById(e.options.classes.gutterID).appendChild(e.copyRightContainer),document.getElementById(e.options.classes.gutterID).appendChild(e.copyLeftContainer)}(t),Gn(t),t.diff()},1)}In.prototype={setOptions:function(e){yn(this.options,e),this.diff()},getNumDiffs:function(){return this.diffs.length},getEditors:function(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff:function(){var e=this,t=new bn,n=this.editors.left.ace.getSession().getValue(),a=this.editors.right.ace.getSession().getValue(),r=t.diff_main(a,n);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=An(this.editors.left),this.editors.right.lineLengths=An(this.editors.right);var i=[],u={left:0,right:0};r.forEach(function(t,n,a){var o=t[0],l=t[1];a[n+1]&&l.endsWith("\n")&&a[n+1][1].startsWith("\n")&&(l+="\n",r[n][1]=l,r[n+1][1]=r[n+1][1].replace(/^\n/,"")),0!==l.length&&(o===Fn.DIFF_EQUAL?(u.left+=l.length,u.right+=l.length):o===Fn.DIFF_DELETE?(i.push(zn(e,Fn.DIFF_DELETE,u.left,u.right,l)),u.right+=l.length):o===Fn.DIFF_INSERT&&(i.push(zn(e,Fn.DIFF_INSERT,u.left,u.right,l)),u.left+=l.length))},this),this.diffs=function(e,t){var n=[];function a(t){return e.options.diffGranularity===Fn.DIFF_GRANULARITY_SPECIFIC?t<1:t<=1}t.forEach(function(e,t){if(0!==t){for(var r=!1,i=0;i<n.length;i+=1)if(a(Math.abs(e.leftStartLine-n[i].leftEndLine))&&a(Math.abs(e.rightStartLine-n[i].rightEndLine))){n[i].leftStartLine=Math.min(e.leftStartLine,n[i].leftStartLine),n[i].rightStartLine=Math.min(e.rightStartLine,n[i].rightStartLine),n[i].leftEndLine=Math.max(e.leftEndLine,n[i].leftEndLine),n[i].rightEndLine=Math.max(e.rightEndLine,n[i].rightEndLine),r=!0;break}r||n.push(e)}else n.push(e)});var r=[];return n.forEach(function(e){e.leftStartLine===e.leftEndLine&&e.rightStartLine===e.rightEndLine||r.push(e)}),r}(this,i),this.diffs.length>this.options.maxDiffs||(Mn(this),Un(this))},destroy:function(){var e=this.editors.left.ace.getValue();this.editors.left.ace.destroy();var t=this.editors.left.ace.container,n=t.cloneNode(!1);n.textContent=e,t.parentNode.replaceChild(n,t);var a=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),(n=(t=this.editors.right.ace.container).cloneNode(!1)).textContent=a,t.parentNode.replaceChild(n,t),document.getElementById(this.options.classes.gutterID).innerHTML="",Rn()}};var Rn=function(){};function On(e,t,n){var a,r,i,u,o,l,c=parseInt(t.target.getAttribute("data-diff-index"),10),s=e.diffs[c];n===Fn.LTR?(a=e.editors.left,r=e.editors.right,i=s.leftStartLine,u=s.leftEndLine,o=s.rightStartLine,l=s.rightEndLine):(a=e.editors.right,r=e.editors.left,i=s.rightStartLine,u=s.rightEndLine,o=s.leftStartLine,l=s.leftEndLine);for(var f="",p=i;p<u;p+=1)f+="".concat(xn(a,p),"\n");var v=r.ace.getSession().getScrollTop();r.ace.getSession().replace(new gn(o,0,l,0),f),r.ace.getSession().setScrollTop(parseInt(v,10)),e.diff()}function An(e){var t=e.ace.getSession().doc.getAllLines(),n=[];return t.forEach(function(e){n.push(e.length+1)}),n}function jn(e,t,n,a,r){var i=e.editors[t];a<n&&(a=n);var u="".concat(r," ").concat(a>n?"lines":"targetOnly");i.markers.push(i.ace.session.addMarker(new gn(n,0,a-1,1),u,"fullLine"))}function Pn(e){Mn(e),Un(e),function(e){var t=e.editors.left.ace.getSession().getScrollTop(),n=e.editors.right.ace.getSession().getScrollTop();e.copyRightContainer.style.cssText="top: ".concat(-t,"px"),e.copyLeftContainer.style.cssText="top: ".concat(-n,"px")}(e)}function Mn(e){e.editors.left.markers.forEach(function(t){e.editors.left.ace.getSession().removeMarker(t)},e),e.editors.right.markers.forEach(function(t){e.editors.right.ace.getSession().removeMarker(t)},e)}function zn(e,t,n,a,r){var i={},u=/^\n/.test(r);if(t===Fn.DIFF_INSERT){var o=qn(e.editors.left,n,r),l=Hn(e.editors.right,a),c=Bn(e.editors.right,l),s=Bn(e.editors.left,o.startLine),f=l;0===Bn(e.editors.left,o.startLine)&&u&&(u=!1),0===o.startChar&&Vn(e.editors.right,a,u)&&(f=l+1);var p=o.startLine===o.endLine,v=0;(o.startChar>0||p&&r.length<s)&&c>0&&o.startChar<s&&v++,i={leftStartLine:o.startLine,leftEndLine:o.endLine+1,rightStartLine:f,rightEndLine:f+v}}else{o=qn(e.editors.right,a,r),l=Hn(e.editors.left,n),c=Bn(e.editors.left,l);var h=Bn(e.editors.right,o.startLine),d=l;0===Bn(e.editors.right,o.startLine)&&u&&(u=!1),0===o.startChar&&Vn(e.editors.left,n,u)&&(d=l+1);p=o.startLine===o.endLine,v=0;(o.startChar>0||p&&r.length<h)&&c>0&&o.startChar<h&&v++,i={leftStartLine:d,leftEndLine:d+v,rightStartLine:o.startLine,rightEndLine:o.endLine+1}}return i}function qn(e,t,n){var a={startLine:0,startChar:0,endLine:0,endChar:0},r=t+n.length,i=0,u=!1,o=!1;e.lineLengths.forEach(function(e,n){i+=e,!u&&t<i&&(a.startLine=n,a.startChar=t-i+e,u=!0),!o&&r<=i&&(a.endLine=n,a.endChar=r-i+e,o=!0)}),a.startChar>0&&Bn(e,a.startLine)===a.startChar&&(a.startLine++,a.startChar=0),0===a.endChar&&a.endLine--;var l=/\n$/.test(n);return a.startChar>0&&l&&a.endLine++,a}function Bn(e,t){return xn(e,t).length}function Hn(e,t){for(var n=e.ace.getSession().doc.getAllLines(),a=0,r=0,i=0;i<n.length;i+=1)if(t<=(r+=n[i].length+1)){a=i;break}return a}function Vn(e,t,n){for(var a=e.ace.getSession().doc.getAllLines(),r=0,i=0;i<a.length;i+=1){var u=r+=a[i].length+1;if(n&&(u-=1),t===u)break}return Vn}function Gn(e){e.gutterHeight=document.getElementById(e.options.classes.gutterID).clientHeight,e.gutterWidth=document.getElementById(e.options.classes.gutterID).clientWidth;var t=Wn(e,Fn.EDITOR_LEFT),n=Wn(e,Fn.EDITOR_RIGHT),a=Math.max(t,n,e.gutterHeight);e.gutterSVG=document.createElementNS(Fn.SVG_NS,"svg"),e.gutterSVG.setAttribute("width",e.gutterWidth),e.gutterSVG.setAttribute("height",a),document.getElementById(e.options.classes.gutterID).appendChild(e.gutterSVG)}function Wn(e,t){return(t===Fn.EDITOR_LEFT?e.editors.left:e.editors.right).ace.getSession().getLength()*e.lineHeight}function Un(e){!function(e){document.getElementById(e.options.classes.gutterID).removeChild(e.gutterSVG),Gn(e)}(e),function(e){e.copyLeftContainer.innerHTML="",e.copyRightContainer.innerHTML=""}(e),e.diffs.forEach(function(t,n){e.options.showDiffs&&(jn(e,Fn.EDITOR_LEFT,t.leftStartLine,t.leftEndLine,e.options.classes.diff),jn(e,Fn.EDITOR_RIGHT,t.rightStartLine,t.rightEndLine,e.options.classes.diff),e.options.showConnectors&&function(e,t,n,a,r){var i=e.editors.left.ace.getSession().getScrollTop(),u=e.editors.right.ace.getSession().getScrollTop();e.connectorYOffset=1;var o=t*e.lineHeight-i+.5,l=e.gutterWidth+1,c=a*e.lineHeight-u+.5,s=n*e.lineHeight-i+e.connectorYOffset+.5,f=e.gutterWidth+1,p=r*e.lineHeight-u+e.connectorYOffset+.5,v=_n(-1,o,l,c),h=_n(f,p,-1,s),d="L".concat(l,",").concat(c," ").concat(f,",").concat(p),m="L".concat(-1,",").concat(s," ").concat(-1,",").concat(o),g="".concat(v," ").concat(d," ").concat(h," ").concat(m),b=document.createElementNS(Fn.SVG_NS,"path");b.setAttribute("d",g),b.setAttribute("class",e.options.classes.connector),e.gutterSVG.appendChild(b)}(e,t.leftStartLine,t.leftEndLine,t.rightStartLine,t.rightEndLine),function(e,t,n){if(t.leftEndLine>t.leftStartLine&&e.options.left.copyLinkEnabled){var a=Tn({className:e.options.classes.newCodeConnectorLink,topOffset:t.leftStartLine*e.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:e.options.classes.newCodeConnectorLinkContent});e.copyRightContainer.appendChild(a)}if(t.rightEndLine>t.rightStartLine&&e.options.right.copyLinkEnabled){var r=Tn({className:e.options.classes.deletedCodeConnectorLink,topOffset:t.rightStartLine*e.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:e.options.classes.deletedCodeConnectorLinkContent});e.copyLeftContainer.appendChild(r)}}(e,t,n))},e)}var Jn=on(In),$n=o(),Kn=t("ac",$("")),Yn=t("ap",$([])),Xn=$(null),Qn=t("aj",$(null)),Zn=t("am",$([])),ea=t("af",$(!1)),ta=t("ar",$(!0)),na=t("ah",$(null)),aa=t("at",$(null)),ra=$(null),ia=function(){Xn.value=null,Qn.value=null,ea.value=!1},ua=t("ao",function(){var e=c(u().m(function e(t,n,a){var r,i,o,l,c;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return r={p:1,showRow:500,sort:"name",reverse:"False",path:t,search:n||""},a&&(r.all=a),e.p=1,e.n=2,Me(r);case 2:return i=e.v,o=i.data,l=[],c=[],o.dir.forEach(function(e){l.push(Bu("dir",e,void 0,o.path))}),o.files.forEach(function(e){c.push(Bu("file",e,void 0,o.path))}),e.a(2,[].concat(l,c));case 3:return e.p=3,e.v,e.a(2,[])}},e,null,[[1,3]])}));return function(t,n,a){return e.apply(this,arguments)}}()),oa=function(){var e=c(u().m(function e(t,n,a){var r,i,o,l,c;return u().w(function(e){for(;;)switch(e.n){case 0:if(!t.data.isNew){e.n=1;break}return e.a(2,n([]));case 1:if(r=Ya(Sa.id||""),Zn.value=Zn.value.filter(function(e){return".Recycle_bin"!==e}),".Recycle_bin"!==t.data.fileName){e.n=2;break}return $n.error("此为回收站目录,请在右上角按【回收站】按钮打开"),n([]),e.a(2);case 2:if(0!==t.level){e.n=4;break}return i=(null==r?void 0:r.path)||a.path,(o=i.split("/")).pop(),e.n=3,ua(o.join("/")||"/www");case 3:return l=e.v,Yn.value=l,e.a(2,n(l));case 4:if(!(t.level>0)){e.n=6;break}return e.n=5,ua(t.data.path);case 5:return c=e.v,e.a(2,n(c));case 6:if(!t.upper){e.n=7;break}return e.a(2,n(t.upper));case 7:return e.a(2)}},e)}));return function(t,n,a){return e.apply(this,arguments)}}(),la=(t("ad",c(u().m(function e(){var t,n,a,r;return u().w(function(e){for(;;)switch(e.n){case 0:if(Zn.value.length=0,"/"!==(t=Kn.value)){e.n=1;break}return $n.error("已经是根目录了"),e.a(2);case 1:return(n=t.split("/")).pop(),(a=n.join("/"))||(a="/"),Kn.value=a,e.n=2,ua(a);case 2:r=e.v,Yn.value=r,ia();case 3:return e.a(2)}},e)}))),t("aq",function(){var e=c(u().m(function e(t,n,a){var r,i;return u().w(function(e){for(;;)switch(e.n){case 0:if(Qn.value||(Xn.value=n),t.isFile){e.n=1;break}return e.a(2);case 1:if(null==t||null===(r=t.path)||void 0===r||!r.includes("/dev/pts")){e.n=2;break}return $n.error("系统目录文件不支持编辑"),e.a(2);case 2:if("text"===hu(null===(i=t.fileName)||void 0===i?void 0:i.split(".").pop())){e.n=3;break}return $n.error("暂不支持该类型文件编辑"),e.a(2);case 3:bu(t);case 4:return e.a(2)}},e)}));return function(t,n,a){return e.apply(this,arguments)}}()),function(e,t,n){e.preventDefault(),e.stopPropagation(),Qn.value=t||null,n.value.show(e),ea.value=!1}),ca=t("as",function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ua(Kn.value,null!=t?t:"");case 1:n=e.v,Yn.value=n,ia();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),sa=t("ai",function(e,t,n){var a=n.value.getNode(t);if(a)if(a.childNodes&&a.childNodes.length>0){var r=a.childNodes[0];n.value.insertBefore(e,r.data)}else n.value.append(e,a.data);else n.value.data.unshift(e),n.value.updateKeyChildren(null,n.value.data);K(function(){setTimeout(function(){var e,t,n;null===(e=ra.value)||void 0===e||null===(e=e.$el)||void 0===e||e.focus(),t=ra,n=aa,K(function(){var e,a=null===(e=t.value)||void 0===e?void 0:e.$el,r=n.value;if(a&&r){var i=a.getBoundingClientRect(),u=r.getBoundingClientRect();(i.top<u.top||i.bottom>u.bottom)&&(r.scrollTop+=i.top-u.top-(r.clientHeight/2-i.height/2))}})},100)}),ia()}),fa=(t("ae",c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,Zn.value.length=0,ia(),e.n=1,ca();case 1:$n.success("刷新成功"),e.n=3;break;case 2:e.p=2,t=e.v,i(t);case 3:return e.a(2)}},e,null,[[0,2]])}))),function(e){var t=e.data,n=t.path;return t.isFile?n.replace(/\/[^\/]*$/,""):n}),pa=t("ag",function(e){var t=Xn.value,n=Qn.value?Qn.value.path:t?fa(t):Kn.value,a=t?function(e){return e.data.isFile?fa(e):e.data.path}(t):null,r={icon:"icon-".concat(e),ext:"",fileName:"",time:"",ps:"",size:0,type:e,user:"root",rootLevel:"0",isLink:"",isShare:!1,isTop:!1,isFav:!1,isOsPs:!1,isSearch:!1,isReName:!0,isNew:!0,isSync:"",isLock:!1,path:"".concat(n,"/"),tamperProofId:0,isFile:"dir"!==e};return ea.value=!0,{newFile:r,dataPathFileName:a}}),va=function(){Zn.value.length=0},ha=Y({__name:"index",props:{rowData:{type:Object,default:function(){return{}}},refreshData:{type:Function,default:function(){}},value:{type:Object,default:function(){return{}}}},emits:["update:value"],setup:function(e,t){var n=t.expose,a=t.emit,r=o(),i=e,s=a,f=$(i.rowData),v="",h=function(e,t){var n=e.match(/^(.*\/)/),a=n?n[1]:"";return"".concat(a).concat(t)},d=function(e){e.stopPropagation(),e.preventDefault(),f.value.fileName=e.target.value,b({row:f.value})},m=function(){b({row:f.value})},g=function(){if(f.value.isReName=!1,f.value.isNew){var e,t=na.value.getNode(null===(e=f.value)||void 0===e?void 0:e.path);na.value.remove(t.data)}ea.value=!1},b=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:if(""!==(n=t.row).fileName){e.n=1;break}return r.error("文件名不能为空"),e.a(2);case 1:if(!Ki(n.fileName)){e.n=2;break}return r.error('文件名不能包含以下字符:\\ / : * ? " < > |'),e.a(2);case 2:if(!n.isNew){e.n=4;break}return a="".concat(n.path,"/").concat(n.fileName),e.n=3,l({loading:"正在新建文件,请稍候...",request:ze({path:a.replace(/\/\//g,"/"),type:n.type}),message:!0,success:function(e){e.status&&(n.isReName=!1,ea.value=!1,i.refreshData())}});case 3:e.n=6;break;case 4:if(n.fileName!==v){e.n=5;break}return r.error("文件名没有变化"),e.a(2);case 5:return e.n=6,l({loading:"正在重命名,请稍候...",request:qe({sfile:h(n.path,v),dfile:h(n.path,n.fileName),rename:!0}),message:!0,success:function(e){e.status&&(n.isReName=!1,ea.value=!1,i.refreshData())}});case 6:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return X(function(){return i.rowData},function(){i.rowData&&(f.value=i.rowData,s("update:value",f.value))},{immediate:!0}),Q(function(){f.value.isReName&&K(function(){v=f.value.fileName}),ea.value=f.value.isReName}),n({reNameInputRef:ra}),function(e,t){var n=p,a=Z("focus");return ee((ne(),ae("div",{class:"flex items-center !w-[100%] pr-[.5rem]",onClick:t[2]||(t[2]=ue(function(){},["stop"]))},[ee(re(n,{ref_key:"reNameInputRef",ref:ra,class:"rename-input h-[20px] ml-2px",width:"auto",modelValue:f.value.fileName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return f.value.fileName=e}),onKeydown:t[1]||(t[1]=ie(ue(function(){},["stop"]),["native"])),onKeyup:ie(d,["enter","native"])},null,8,["modelValue"]),[[a]]),oe("span",{class:"svgtofont-el-select ml-[.5rem] !text-[2rem] font-800",style:{color:"#20a53a"},onClick:ue(m,["stop"])}),oe("span",{class:"svgtofont-el-close-bold ml-[.5rem] !text-[2rem] font-800",style:{color:"#f34a4a"},onClick:ue(g,["stop"])})],512)),[[te,f.value.isReName]])}}}),da=t("ab",le("FILES-ACE-STORE",function(){var e,t=v(),n=t.routerActive,i=t.mainHeight,o=$u().bindKeydown,s=$(),f=$(),p=$(!0),g=$(!0),b=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return va(),Aa(),e.n=1,f.value;case 1:null==(t=e.v)||t.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),y=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,yr();case 1:if(!e.v){e.n=2;break}return document.querySelector(".bt-dialog-header .svgtofont-icon-minmax-black")&&(null===(t=document.querySelector(".bt-dialog-header .svgtofont-icon-minmax-black"))||void 0===t||t.click()),Ui(b),e.a(2,!1);case 2:localStorage.removeItem("aceEditor"),pr(),b();case 3:return e.a(2,!1)}},e)}));return function(){return e.apply(this,arguments)}}(),w=$([{title:"保存",icon:"svgtofont-el-select",click:function(){k()&&dr(Sa)}},{title:"全部保存",icon:"svgtofont-icon-minmax-black",click:function(){k()&&br()}},{title:"刷新",icon:"svgtofont-el-refresh-right",click:(e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:k()&&ur(Sa,!0);case 1:return e.a(2)}},e)})),function(){return e.apply(this,arguments)})},{title:"搜索",icon:"svgtofont-el-search",click:function(){k()&&wa.value.execCommand("find")}},{title:"替换",icon:"svgtofont-icon-log",click:function(){k()&&wa.value.execCommand("replace")}},{title:"跳转行",icon:"svgtofont-icon-login-address",click:function(){k()&&V("jump")}},{title:"字体大小",icon:"svgtofont-left-xterm",click:function(){k()&&V("font")}},{title:"主题",icon:"svgtofont-icon-drag",click:function(){k()&&V("theme")}},{title:"设置",icon:"svgtofont-left-config",click:function(){k()&&V("set")}},{title:"快捷键",icon:"svgtofont-el-question-filled",click:function(){var e=La.value.find(function(e){return"快捷键"===e.title});if(e)return cr(e.id),void V("shortcutKey");ir({type:"custom",title:"快捷键",component:ce(function(){return h(function(){return r.import("./index-legacy225.js?v=1765440387")},void 0,r.meta.url)})})}}]),k=function(){return!(!Qa()||"custom"===Sa.type)||(d.error("当前页面不支持该操作"),!1)},S=$(0),_=$(!1),C=$(null),L=$(""),x=function(){var e=c(u().m(function e(){var t,n,r,i;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,_.value=!1,Kn.value===L.value){e.n=2;break}return L.value=Kn.value,e.n=1,l({request:Me({p:1,showRow:500,sort:"name",reverse:"False",path:Kn.value})});case 1:t=e.v,n=t.data,r=n.dir.map(function(e){return Bu("dir",e,void 0,n.path)}),i=n.files.map(function(e){return Bu("file",e,void 0,n.path)}),Yn.value=[].concat(a(r),a(i)),Kn.value=n.path;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}(),E=$("btn"),T=$(!1),D=$(""),N=$([]),F=$(""),I=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ua(Kn.value,D.value,T.value?"True":void 0);case 1:if(t=e.v,ta.value=!1,t){e.n=2;break}return e.a(2);case 2:Yn.value=t,ia();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),R=$(null),O=$(null),A=$(),j=function(){var e=c(u().m(function e(t,n){return u().w(function(e){for(;;)switch(e.n){case 0:oa(t,n,s.value);case 1:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),P=function(e){var t=na.value.getNode(e);t&&e.isNew&&na.value.remove(t),t&&e.isReName&&(e.isReName=!1),ea.value=!1},M=function(e,t){P(A.value),la(e,t,O)},z=function(e){return La.value.some(function(t){return t.path===e.path})?"text-[#cca700]":""},q=$(),B=$(),H=$(!1),V=function(e){_a.value=e,H.value=""!==e,e&&window.addEventListener("click",G)},G=function(){_a.value="",window.removeEventListener("click",G)},W=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Pa();case 1:return e.n=2,qa(t);case 2:wa.value=e.v,de(ba.aceEditor);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:Ba(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,W(q.value);case 1:if(!s.value){e.n=2;break}return e.n=2,ir({title:s.value.fileName,type:s.value.type||"editor",path:s.value.path,size:s.value.size});case 2:return U(B.value),e.n=3,Be({name:s.value.fileName,path:s.value.path});case 3:return e.n=4,Oa();case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Y=$(null),X=$(null),Q=$({}),Z=function(e,t){if(cr(e),t){var n=t.currentTarget||t.currentTarget,a=Y.value,r=a.offsetWidth,i=n.offsetLeft-r/2+n.offsetWidth/2;a.scroll({left:i,behavior:"smooth"})}},ee=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:or(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),te=function(e){e.preventDefault();var t=e.deltaY;Y.value.scrollLeft+=t},ne=se(ba.aceEditor),ae=ne.fontSize,ie=ne.tabSize,ue=ne.editorTheme,oe=ne.useSoftTabs,le=$(Sa.encoding),pe=$(0),ve=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return Sa.state=1,Sa.encoding=t,e.n=1,Ma();case 1:return e.n=2,dr(Sa);case 2:le.value=t;case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),he=fe({line:123,column:321,historys:[],tabsData:{type:"nbsp",number:4},encoding:"utf-8",only_read:!1,mode:"text"}),de=function(e){e&&(he.tabsData.number=e.tabSize,he.tabsData.type=e.useSoftTabs?"tab":"nbsp")},me=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Fa(Ta.value);case 1:return e.n=2,ur(Ta.value,!0);case 2:Ta.value={};case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,br();case 1:localStorage.removeItem("aceEditor"),pr(),t&&t();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),be=$(),ye=function(e){La.value=La.value.filter(function(t){return t.id===e}),ya.value=ya.value.filter(function(t){return t.id===e}),rr(e);var t=Ua(e);wa.value.setSession(t),nr(wa.value),er(be.value.item.isReadOnly),tr()},we=function(){La.value.forEach(function(e){var t=Ua(e.id);t&&t.destroy()}),La.value=[],ya.value=[],wa.value.setSession(null)},ke=function(){var e=c(u().m(function e(){var t,n,a;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:e.p=0,a=be.value.type,e.n="close"===a?1:"other"===a?3:"all"===a?5:7;break;case 1:return e.n=2,dr(be.value.item);case 2:return or(be.value.item),e.a(3,7);case 3:if(t=be.value.item.id,!((n=La.value.filter(function(e){return e.id!==t&&1===e.state})).length>0)){e.n=4;break}return e.n=4,Promise.all(n.map(function(e){return dr(e)}));case 4:return ye(t),e.a(3,7);case 5:return e.n=6,br();case 6:return we(),e.a(3,7);case 7:e.n=9;break;case 8:e.p=8,e.v;case 9:return e.a(2,!0)}},e,null,[[0,8]])}));return function(){return e.apply(this,arguments)}}();return{instance:f,fileItem:s,routerActive:n,btnShow:p,catalogueShow:g,onLeave:function(){p.value=!1,setTimeout(function(){p.value=!0},500)},close:b,onCancel:y,column:w,openPopup:function(e){Qa?e.click():d.error("当前页面不支持该操作")},mainHeight:i,operSize:S,changeOpertion:function(e){S.value="search"===e?76:0},isShow:_,inputRef:C,inputFocus:function(){_.value=!0,K(function(){var e;null===(e=C.value)||void 0===e||e.focus()})},originalPath:L,changeCurrentPath:x,type:E,isCheck:T,searchValue:D,changeValue:function(e){Zn.value.length=0,D.value="","search"===e?(N.value=Yn.value,F.value=Kn.value,Yn.value=[],ta.value=!0):(Yn.value=N.value,""===Kn.value&&(L.value=F.value),Kn.value=F.value)},searchFile:I,handleCommand:function(e){var t,n,a=pa(e),r=a.newFile,i=a.dataPathFileName||(null!==(t=Qn.value)&&void 0!==t&&t.isFile||null===(n=Qn.value)||void 0===n?void 0:n.path);if(i){var u=na.value.getNode(i);u&&(u.expanded=!0)}sa(r,i,na)},closeSearch:function(){E.value="btn",ia()},contextRef:O,treeProps:{label:"fileName",key:"path",isLeaf:"isFile"},initSidebarList:function(){K(function(){var e=(s.value.path||"/www").split("/");e.pop(),""===Kn.value&&(L.value=e.join("/")),Kn.value=e.join("/")})},loadNode:j,renderTree:function(e,t){t.node;var n=t.data,a=(t.store,Ka(n.fileName).mode);return re("span",{class:"flex flex-1 items-center w-full ".concat(n.isReName?"newFiles":"defaultFiles"),onContextmenu:function(e){e.preventDefault(),M(e,n)}},[re("span",{class:"icon-editor-left ".concat(n.isFile?"ace-".concat(a,"-icon ace-text-icon"):"ace-folder-icon")},null),n.isReName?re(ha,{class:"el-tree-node__label",title:n.fileName,rowData:n,refreshData:ca,modelValue:A,"onUpdate:modelValue":function(e){return A=e},ref:R},null):re("span",{class:"el-tree-node__label ".concat(z(n)),title:n.fileName},[n.fileName])])},handleExpandChange:function(e){null!=e&&e.path&&!Zn.value.includes(e.path)&&Zn.value.push(e.path)},handleCollapseChange:function(e){var t=Zn.value.indexOf(null==e?void 0:e.path);-1!==t&&Zn.value.splice(t,1),P(A.value)},editorRef:q,editorDiffRef:B,showToolbar:H,watchEditorCustomToolbar:V,closeToolbar:G,initContent:J,resizeEditor:function(){wa.value&&K(function(){wa.value.resize()})},tabsElement:Y,contextmenu:X,headerRightRow:Q,changeTab:Z,getDataChangeTab:function(){K(function(){var e,t=La.value[La.value.length-1],n=null===(e=Y.value)||void 0===e?void 0:e.children[La.value.length-1];Z(t.id,{currentTarget:n})})},closeTab:ee,openContextMenu:function(e){X.value.show(e),Q.value=Sa},initContentHeader:function(){K(function(){Y.value.addEventListener("wheel",te)})},$resetContentHeader:function(){Y.value&&Y.value.removeEventListener("wheel",te)},fontSize:ae,tabSize:ie,editorTheme:ue,useSoftTabs:oe,encodingData:le,line:pe,tool:[{title:"跳转到指定行",type:"jump"},{title:"设置编辑器字体大小",type:"font"},{title:"设置编辑器主题",type:"theme"},{title:"编辑器设置",type:"set"},{title:"设置文件保存编码格式",type:"encode"},{title:"设置文件保存空格设置",type:"encode"},{title:"设置文件保存行结束符",type:"lineBreak"}],set:[{title:"自动换行",type:"wrap"},{title:"代码自动完成",type:"enableLiveAutocompletion"},{title:"启用代码段",type:"enableSnippets"},{title:"显示隐藏字符",type:"showInvisibles"},{title:"显示行号",type:"showLineNumbers"}],tabData:[{title:"使用空格缩进",type:"nbsp"},{title:"使用制表符缩进",type:"tab"}],unTitleArr:["shortcutKey","","tab"],saveFont:function(){ba.aceEditor.fontSize>45||ba.aceEditor.fontSize<12?d.error("字体设置范围超过12-45"):(wa.value.setFontSize(ba.aceEditor.fontSize),Ma())},jumpLine:function(){pe.value%1==0?wa.value.gotoLine(pe.value):d.error("请输入整数")},setCode:ve,setTabType:function(e){"string"==typeof e?(oe.value="tab"===e,ba.aceEditor.useSoftTabs="tab"===e):(ie.value=e,ba.aceEditor.tabSize=e),Ma()},setTheme:function(e){ue.value=e,wa.value.setTheme("ace/theme/"+e),ba.aceEditor.editorTheme=e,Ma()},seting:function(e){ba.aceEditor[e]=!ba.aceEditor[e],wa.value.setOption(e,ba.aceEditor[e]),Ma(),de(ba.aceEditor)},fileInfo:he,openHistory:function(){m({title:"文件历史版本",area:55,component:function(){return h(function(){return r.import("./index-legacy226.js?v=1765440387")},void 0,r.meta.url)},compData:{editorTabsActive:Sa,callback:function(){ur(Sa,!0)}}})},watchAceEditor:de,diffReHistory:me,onConfirmCheckFile:ge,onCancelCheckFile:function(e){localStorage.removeItem("aceEditor"),pr(),e&&e.onUnmount&&e.onUnmount()},compDataClose:be,onConfirmClose:ke,onCancelClose:function(e){switch(be.value.type){case"close":be.value.item.state=0,or(be.value.item);break;case"other":ye(be.value.item.id);break;case"all":we()}e&&e.onUnmount&&e.onUnmount()},init:function(){window.addEventListener("keydown",Na)},$reset:function(){window.removeEventListener("keydown",Na),o()}}})),ma=o(),ga="/www/server/panel/BTPanel/static/editor/ace.editor.config.json",ba=t("az",fe({supportedModes:{},nameOverrides:{},encodingList:[],themeList:[],aceEditor:{fontFamily:"Monaco, Menlo, 'Courier New', monospace",editorTheme:"monokai",fontSize:14,softLabel:!0,useSoftTabs:!0,tabSize:4,wrap:!0,enableSnippets:!0,enableLiveAutocompletion:!0,highlightActiveLine:!0,highlightSelectedWord:!0,animatedScroll:!0,showInvisibles:!1,showFoldWidgets:!0,showLineNumbers:!0,showGutter:!0,displayIndentGuides:!0}})),ya=pe([]),wa=pe(null),ka=pe(null),Sa=t("an",ve({id:"",type:"editor",title:"",path:"",mode:"",modeText:"",isReadOnly:!1,stTime:0,state:0,encoding:"UTF-8",historys:[],lineBreak:"LF"})),_a=t("ax",pe("")),Ca=t("ay",ve({row:1,column:0,count:1})),La=t("ak",$([])),xa=function(){return window.ace},Ea=function(){return Jn},Ta=t("aB",$()),Da=$(null),Na=function(e){if("F5"===e.key||"r"===e.key&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void ma.msg({customClass:"no-icon",message:"编辑器模式下无法刷新网页,请关闭后重试",type:"info",duration:3e3})},Fa=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,b({title:"恢复历史文件",width:"35rem",content:"是否恢复历史文件 ".concat(y(Number(t.st_mtime)),"?恢复历史文件后,当前文件内容将会被替换!")});case 1:return e.n=2,w({filename:t.path,history:t.st_mtime});case 2:(n=e.v).status?(ma.success("恢复成功"),a=Xa(Sa.id),La.value.splice(a,1),ur(t)):ma.request(n),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(t){return e.apply(this,arguments)}}(),Ia=function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:if(!document.querySelector(".bt-dialog-header .svgtofont-icon-minmax-black")){e.n=1;break}return null===(n=document.querySelector(".bt-dialog-header .svgtofont-icon-minmax-black"))||void 0===n||n.click(),t&&ir(t),e.a(2);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ra=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ma.load("正在获取文件内容,请稍候...");case 1:Da.value=e.v;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Oa=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:Da.value&&Da.value.close();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Aa=t("aM",function(){La.value.some(function(e){return 1===e.state})||(window.onbeforeunload=null)}),ja=function(){var e=c(u().m(function e(t,n){var a,r,i;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return a=ma.load("正在加载,请稍候..."),e.p=1,e.n=2,vr(t,"reverse",n);case 2:return r=e.v,i=r.data,e.a(2,i);case 3:e.p=3,e.v;case 4:return e.p=4,a&&a.close(),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(t,n){return e.apply(this,arguments)}}(),Pa=function(){var e=c(u().m(function e(){var t,n,a,r;return u().w(function(e){for(;;)switch(e.n){case 0:return t=sessionStorage.getItem("aceConfig"),n={},t&&(n=JSON.parse(t)),e.n=1,vr(ga);case 1:a=e.v,(r=a.data).data&&(n=JSON.parse(r.data),sessionStorage.setItem("aceConfig",JSON.stringify(n))),ba.supportedModes=n.supportedModes,ba.nameOverrides=n.nameOverrides,ba.encodingList=n.encodingList,ba.themeList=n.themeList,ba.aceEditor=n.aceEditor,ba.aceEditor.fontFamily="12px/normal 'Consolas', 'Menlo', 'Monaco', 'Ubuntu Mono', 'source-code-pro', 'Courier New', monospace";case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Ma=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return t=JSON.stringify(ba),e.n=1,hr({data:t,path:ga,force:1});case 1:return e.a(2,e.v)}},e)}));return function(){return e.apply(this,arguments)}}(),za=function(){return ba.aceEditor},qa=function(){var e=c(u().m(function e(t){var n,a,r,i,o,l,c,s,f,p,v,h,d;return u().w(function(e){for(;;)if(0===e.n)return n=xa(),a=za(),r=a.editorTheme,i=a.fontSize,o=a.fontFamily,l=a.showInvisibles,c=a.useSoftTabs,s=a.tabSize,f=a.keyboardHandler,p=a.enableLiveAutocompletion,v=a.enableSnippets,h=a.enableBasicAutocompletion,n.config.set("basePath","/static/editor"),n.require("/ace/ext/language_tools"),d=n.edit(t,{theme:"ace/theme/".concat(r),fontSize:i,fontFamily:o,showInvisibles:l,useSoftTabs:c,tabSize:s,showPrintMargin:!1,keyboardHandler:f,enableLiveAutocompletion:p,enableSnippets:v,enableBasicAutocompletion:h}),fr(d),e.a(2,d)},e)}));return function(t){return e.apply(this,arguments)}}(),Ba=function(e){ka.value=e},Ha=t("aR",function(){var e=c(u().m(function e(t){var a,r,i,o,l,c,s,f,p,v,h;return u().w(function(e){for(;;)if(0===e.n)return a=za(),r=a.editorTheme,i=t.theme,o=void 0===i?"ace/theme/".concat(r):i,l=t.mode,c=void 0===l?"":l,s=t.left,f=void 0===s?{}:s,p=t.right,v=void 0===p?{}:p,h={element:ka.value,theme:o,mode:c,left:n({content:"",editable:!1,copyLinkEnabled:!1},f),right:n({content:"",editable:!1,copyLinkEnabled:!1},v)},Va(h),e.a(2,h)},e)}));return function(t){return e.apply(this,arguments)}}()),Va=function(e){return new(Ea())(e)},Ga=function(e,t){var n=xa(),a=za().wrap,r=n.createEditSession(t,"ace/mode/".concat(e));return r.setOptions({wrap:a,readOnly:!1}),sr(r),r},Wa=function(e){wa.value.setSession(e)},Ua=t("aP",function(e){var t;return e?null===(t=ya.value.find(function(t){return t.id===e}))||void 0===t?void 0:t.session:wa.value.getSession()}),Ja=function(e){return e?ya.value.find(function(t){return t.id===e}):wa.value.getSession()},$a=function(e){return e?ya.value.findIndex(function(t){return t.id===e}):-1},Ka=function(e){var t=e.match(/\.([0-9A-z]*)$/);for(var n in t=Array.isArray(t)?t[1]:"text",ba.supportedModes)for(var a=ba.supportedModes[n][0].split("|"),r=n.toLowerCase(),i=0;i<a.length;i++)if(t.toLowerCase()==a[i].toLowerCase())return{name:n,mode:r};return{name:"Text",mode:"text"}},Ya=function(e){return La.value.find(function(t){return t.id===e})},Xa=function(e){return La.value.findIndex(function(t){return t.id===e})},Qa=t("aD",function(){return La.value.length>0}),Za=function(e,t){var a=da().getDataChangeTab;delete e.session;var r=n(n({},{id:"",type:"editor",title:"",path:"",mode:"",modeText:"",isReadOnly:!1,stTime:0,state:0}),e);return La.value.push(r),a(),"editor"===e.type&&t&&ya.value.push({id:r.id,session:t}),r},er=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];wa.value.setReadOnly(e)},tr=function(){wa.value.focus()},nr=function(e){Ca.count=e.session.getLength()},ar=function(e){return La.value.filter(function(t){return t.path===e})},rr=function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:(n=Ya(t))&&(Sa.id=t,Sa.type=n.type,Sa.title=n.title,"editor"===n.type?(Sa.path=n.path,Sa.mode=n.mode,Sa.modeText=n.modeText,Sa.isReadOnly=n.isReadOnly,Sa.stTime=n.stTime,Sa.state=n.state,Sa.encoding=n.encoding,Sa.historys=n.historys,Sa.next=n.next,Sa.pagination=n.pagination,Sa.lineBreak=n.lineBreak):Sa.component=n.component);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ir=t("aQ",function(){var e=c(u().m(function e(t){var a,r,i,o,l,c,s,f,p,v,h,d,m,b,y;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,a={},"editor"!==t.type){e.n=3;break}if(!(r=ar(t.path)).length){e.n=1;break}return e.a(2,cr(r[0].id));case 1:return e.n=2,vr(t.path);case 2:i=e.v,o=i.data,l=i.status,c=i.msg,s=o,l?(c&&"success"!==c&&ma.warn(c),t.size>3145728&&ma.warn("抱歉!文件大小超过3M,暂不支持在线编辑!"),p=t.filename||(null===(f=t.path)||void 0===f?void 0:f.split("/").pop()),v="",h=Ka(p),d=h.mode,m=h.name,v=d,t.mode&&(v=t.mode),b=Sr(s.data),y=Ga(v,s.data),a=Za({id:g(10),path:t.path,type:"editor",title:p,mode:v,modeText:m,state:0,encoding:s.encoding,stTime:Number(s.st_mtime),isReadOnly:s.only_read,historys:s.historys||[],next:(null==s?void 0:s.next)||!1,pagination:1,lineBreak:b},y),Wa(y),er(s.only_read)):ma.error(c),e.n=4;break;case 3:a=Za(n(n({},t),{},{id:g(10),state:0}));case 4:rr(a.id),e.n=6;break;case 5:e.p=5,e.v;case 6:return e.a(2)}},e,null,[[0,5]])}));return function(t){return e.apply(this,arguments)}}()),ur=function(){var e=c(u().m(function e(t){var n,a,r,i,o,l=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],"editor"===t.type){e.n=1;break}return e.a(2);case 1:return a=ma.load("获取文件内容中,请稍候..."),e.p=2,r=Ya(t.id||""),e.n=3,vr(t.path);case 3:i=e.v,o=i.data,n&&wa.value.session.setValue(o.data),r.stTime=Number(o.st_mtime),r.encoding=o.encoding,r.state=0,Sa.state=0,r.isReadOnly=o.only_read,r.historys=o.historys||[],ma.msg({message:"文件内容已更新!",type:"success"}),rr(r.id),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,a&&a.close(),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),or=t("au",function(e){var t=e.id,n=Xa(t),a=La.value[n]||null,r=Ua(t),i=$a(t);if(e.state)return lr(e);if(a&&"editor"===a.type&&(null==r||r.destroy()),La.value.length>1){var u=La.value[n+1]?n+1:n-1,o=La.value[u].id;cr(o,!0)}La.value.splice(n,1),"editor"===a.type&&r&&(ya.value[i].session.destroy(),ya.value.splice(i,1))}),lr=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:try{Ji("close",t)}catch(n){}case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Xa(Sa.id||""),a=Xa(e),r=La.value[a],i=Ja(e);if("editor"===r.type){var u;if(Sa.id===e&&t)null!==(u=ya.value[n])&&void 0!==u&&u.session&&(ya.value[n].session=Ua());i&&(Wa(i.session),nr(i)),er(r.isReadOnly),tr()}rr(e)},sr=function(e){Ca.count=e.getLength(),e.on("change",function(){var e=Ya(Sa.id||"");0===e.state&&(e.state=1,Sa.state=1,window.onbeforeunload=function(){return"您有未保存的更改,确定要离开吗?"})}),e.selection.on("changeCursor",function(){var t=wa.value.getCursorPosition();Ca.count=e.getLength(),Ca.row=t.row+1,Ca.column=t.column}),e.on("changeScrollTop",he(function(){var t=c(u().m(function t(n){var a,r,i,o,l,c,s,f;return u().w(function(t){for(;;)switch(t.n){case 0:if(a=e.selection.session,r=a.getScrollTop(),i=a.getScreenLength()*wa.value.renderer.lineHeight,o=wa.value.renderer.$size.scrollerHeight,!(r+o>=i-100)){t.n=2;break}if(!(l=Ya(Sa.id)).next){t.n=2;break}return t.n=1,ja(l.path,l.pagination);case 1:c=t.v,l.next=c.next,null!=c&&c.next&&(l.pagination&&l.pagination++,f=null===(s=Ua(l.id))||void 0===s?void 0:s.getValue(),wa.value.session.setValue(f+c.data));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()),500)},fr=function(e){var t=da().watchEditorCustomToolbar;e.commands.addCommand({name:"saveFile",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:function(){var e=Ya(Sa.id||"");dr(e)}}),e.commands.addCommand({name:"saveAllFile",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){br()}}),e.commands.addCommand({name:"closeFile",bindKey:{win:"Ctrl-W",mac:"Command-W"},exec:function(){or(Sa.id)}}),e.commands.addCommand({name:"closeAllFile",bindKey:{win:"Ctrl-Shift-W",mac:"Command-Shift-W"},exec:function(){La.value.forEach(function(e){or(e.id)})}}),e.commands.addCommand({name:"goToLine",bindKey:{win:"Ctrl-I",mac:"Command-I"},exec:function(){Qa()&&"custom"!==Sa.type?t("jump"):ma.error("当前页面不支持该操作")},readonly:!1}),e.commands.addCommand({name:"undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(){e.undo()}})},pr=function(){wa.value=null,Sa.id="",Sa.title="",Sa.path="",Sa.mode="",Sa.modeText="",Sa.isReadOnly=!1,Sa.stTime=0,Sa.state=0,Sa.encoding="UTF-8",Sa.historys=[],La.value=[],ya.value=[]},vr=t("aS",function(){var e=c(u().m(function e(t,n,a){var r;return u().w(function(e){for(;;)switch(e.n){case 0:return r={path:t,mode:n,p:a},n||delete r.mode,a||delete r.p,e.n=1,He(r);case 1:return e.a(2,e.v)}},e)}));return function(t,n,a){return e.apply(this,arguments)}}()),hr=function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return n={path:t.path,data:t.data,encoding:t.encoding||"UTF-8",st_mtime:t.st_mtime,force:t.force||0,skip_conf_check:t.skip_conf_check||!1},t.skip_conf_check||delete n.skip_conf_check,e.n=1,k(n);case 1:return e.a(2,e.v)}},e)}));return function(t){return e.apply(this,arguments)}}(),dr=function(){var e=c(u().m(function e(t){var n,a,r,i,o,l,c,s,f,p,v=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=v.length>1&&void 0!==v[1]?v[1]:0,a=v.length>2&&void 0!==v[2]&&v[2],0!==t.state){e.n=1;break}return e.a(2,ma.msg({customClass:"no-icon",message:"文件未修改,无需保存!",type:"info"}));case 1:return r=ma.load("保存中,请稍候..."),e.p=2,i=Ua(t.id),o=i.getValue(),l=t.path,c=t.encoding,s=t.stTime,f={path:l,data:o,st_mtime:s,encoding:c,force:n},a&&(f.skip_conf_check=!0),t.state=3,e.n=3,hr(f);case 3:if((p=e.v).status){e.n=6;break}if(null==p||!p.conf_check){e.n=4;break}return e.a(2,gr(t,p.msg));case 4:return e.a(2,mr(t,p.msg));case 5:e.n=7;break;case 6:ma.request(p);case 7:return Aa(),e.n=8,ur(t,!1);case 8:e.n=10;break;case 9:e.p=9,e.v;case 10:return e.p=10,r&&r.close(),e.f(10);case 11:return e.a(2)}},e,null,[[2,9,10,11]])}));return function(t){return e.apply(this,arguments)}}(),mr=function(){var e=c(u().m(function e(t,n){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return a=n.substr(0,n.length-1)+",或选择强制保存。",t.state=1,e.n=1,b({title:"提示",width:"35rem",icon:"warning",content:a});case 1:return e.n=2,b({title:"是否强制保存",width:"35rem",icon:"warning",isHtml:!0,content:'<span style="color:#333">检测到文件已被修改,强制保存将会<span style="color:red">覆盖文件内容</span>,请谨慎操作!</span>'});case 2:return e.n=3,dr(t,1);case 3:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),gr=function(){var e=c(u().m(function e(t,n){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return a=n.substr(0,n.length-1)+",或选择强制保存。",t.state=1,e.n=1,b({title:"提示",width:60,isHtml:!0,content:'<div class="custom-message-error-html">\n\t\t\t\t\t'.concat(a,'\n\t\t\t\t\t<div class="leading-[1.6rem] mt-1rem">请确认您要保存的配置文件内容无误与提示信息无关,注本次保存不会重载nginx/apache配置</div>\n\t\t\t\t</div>'),confirmText:"继续保存"});case 1:return e.n=2,dr(t,0,!0);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),br=function(){var e=c(u().m(function e(){var t,n,a,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:for(t=ma.load("保存中,请稍候..."),e.p=1,n=[],a=0;a<La.value.length;a++)1===(r=La.value[a]).state&&n.push(dr(r,0));return e.n=2,Promise.all(n);case 2:Aa(),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,t&&t.close(),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}(),yr=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)if(0===e.n)return t=!1,La.value.length>0&&(t=La.value.some(function(e){return 1===e.state})),e.a(2,t)},e)}));return function(){return e.apply(this,arguments)}}(),wr=t("av",function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:n=t.id,La.value.filter(function(e){return e.id!==n&&1===e.state}).length>0?Ji("other",t):(La.value=La.value.filter(function(e){return e.id===n}),ya.value=ya.value.filter(function(e){return e.id===n}),rr(n),a=Ua(n),wa.value.setSession(a),nr(wa.value),er(t.isReadOnly),tr());case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),kr=t("aw",c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,yr();case 1:if(e.v)try{Ji("all")}catch(t){}else La.value.forEach(function(e){var t=Ua(e.id);t&&t.destroy()}),La.value=[],ya.value=[],wa.value.setSession(null);case 2:return e.a(2)}},e)}))),Sr=function(e){return e&&-1!==(e.length>2e4?e.substring(0,2e4):e).indexOf("\r\n")?"CRLF":"LF"},_r=t("aA",function(e,t){var n=Ya(e);if(n&&n.lineBreak!==t){var a,r="CRLF"===t?"CRLF":"LF",i="CRLF"===n.lineBreak?"CRLF":"LF";b({title:"更改行结束符",isHtml:!0,content:'<div class="custom-message-error-html">\n\t\t\t\t\t确定要将文件 "'.concat(n.title,'" 的行结束符从 ').concat(i,' 更改为<span style="color:red">').concat(r,'</span> 吗?\n\t\t\t\t\t<div class="leading-[1.6rem]">\n\t\t\t\t\t\t此操作将修改文件中所有的行结束符,并在<span style="color:red">保存</span>后生效。\n\t\t\t\t\t</div>\n\t\t\t\t</div>'),confirmText:"保存",cancelText:"取消",onConfirm:(a=c(u().m(function e(){var a,i;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,a=Ua(n.id)){e.n=1;break}return e.a(2,!0);case 1:return i=a.getValue(),"CRLF"===t&&"LF"===n.lineBreak?i=i.replace(/\n/g,"\r\n"):"LF"===t&&"CRLF"===n.lineBreak&&(i=i.replace(/\r\n/g,"\n")),a.setValue(i),n.lineBreak=t,0===n.state&&(n.state=1),e.n=2,dr(n);case 2:return ma.success("已将行结束符更改为 ".concat(r)),e.a(2,!0);case 3:return e.p=3,e.v,ma.error("更改行结束符失败"),e.a(2,!1)}},e,null,[[0,3]])})),function(){return a.apply(this,arguments)})}).catch(function(){})}}),Cr=t("aC",function(){ya.value.forEach(function(e){return e.destroy()}),ya.value=[]}),Lr=Object.freeze(Object.defineProperty({__proto__:null,editorCustomToolbar:_a,editorDiffExample:ka,editorExample:wa,editorOption:ba,editorRowColumnCount:Ca,editorSeesion:ya,editorTabs:La,editorTabsActive:Sa,enableRefresh:Aa,handleKeyDown:Na,handleScroll:ja,minimizeEvent:Ia,reHistoryRow:Ta,recoverEvent:Fa,useAce:xa,useCheckFileChange:yr,useCheckFileCompatibility:function(e){var t=Ka(e).mode;return ba.supportedModes[t]},useCheckTabsEmpty:Qa,useCloseAllTabs:kr,useCloseOtherTabs:wr,useCreateAceEditorExample:qa,useCreateAceEditorSession:Ga,useCreateDiffEditorExample:Ba,useCreateDiffEditorView:Va,useCreateEditorTabs:ir,useCreateTabsItem:Za,useCutEditorTabs:cr,useDestroyAllEditorSession:Cr,useDestroyEditorData:pr,useDetectLineBreakType:Sr,useDiffAce:Ea,useEditorLoading:Ra,useEditorPathFilter:ar,useEditorUnLoading:Oa,useEventMount:fr,useFindIndexTabs:Xa,useFindTabsData:Ya,useGetAceEditorSession:Ua,useGetAceEditorSessionData:Ja,useGetAceEditorSessionIndex:$a,useGetAceOptions:za,useGetEditorOptions:Pa,useGetEditorTabsLineCount:nr,useGetFileBody:vr,useGetFileMode:Ka,useInsertAceEditorSession:Wa,useMonitorMount:sr,useRandomId:function(){return g(10)},useRefreshFileContent:ur,useRemoveEditorCheckTabs:lr,useRemoveEditorTabs:or,useSaveAllFiles:br,useSaveEditorOptions:Ma,useSaveFileBody:hr,useSaveFiles:dr,useSetDiffEditorOptions:Ha,useSetEditorTabsActive:rr,useSetEditorTabsFocus:tr,useSetEditorTabsReadOnly:er,useSetLineBreak:_r,useforcedSaveConfig:gr},Symbol.toStringTag,{value:"Module"}));t("aU",Lr);var xr=t("aL",le("FILES-BATCH-SET-AUTH-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,n=e.refreshFilesList,a=$([]),r=fe({owner:[],group:[],public:[],auth:0,user:"root",isDir:!0,checkNumber:""}),i=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({request:Ve({filename:"".concat(t.value.param.path)}),success:function(e){if(e.status){var t=e.data;r.auth=t.chmod,r.user=t.chown,o(Number(t.chmod))}else d.error(e.msg)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),o=function(e){256&(e=parseInt(e.toString(),8))?r.owner.push("r"):r.owner=r.owner.filter(function(e){return"r"!==e}),128&e?r.owner.push("w"):r.owner=r.owner.filter(function(e){return"w"!==e}),64&e?r.owner.push("x"):r.owner=r.owner.filter(function(e){return"x"!==e}),32&e?r.group.push("r"):r.group=r.group.filter(function(e){return"r"!==e}),16&e?r.group.push("w"):r.group=r.group.filter(function(e){return"w"!==e}),8&e?r.group.push("x"):r.group=r.group.filter(function(e){return"x"!==e}),4&e?r.public.push("r"):r.public=r.public.filter(function(e){return"r"!==e}),2&e?r.public.push("w"):r.public=r.public.filter(function(e){return"w"!==e}),1&e?r.public.push("x"):r.public=r.public.filter(function(e){return"x"!==e}),r.owner=Array.from(new Set(r.owner)),r.group=Array.from(new Set(r.group)),r.public=Array.from(new Set(r.public))},s=function(){var e=c(u().m(function e(i){var o;return u().w(function(e){for(;;)switch(e.n){case 0:if(!((o=r.auth.toString()).length>3)){e.n=1;break}return d.error("请输入正确权限"),e.a(2);case 1:if(!r.checkNumber.match(/\D/g)){e.n=2;break}return d.error("请输入正确权限"),e.a(2);case 2:if(!o.match(/\D/g)){e.n=3;break}return d.error("请输入正确权限"),e.a(2);case 3:for(;o.length<3;)o="0"+o;return e.n=4,l({loading:"正在设置文件权限,请稍后...",request:Ge({user:r.user,access:o,all:r.isDir?"True":"False",type:"3",path:t.value.param.path,data:JSON.stringify(a.value)}),message:!0,success:function(e){e.status&&(n(),i&&i())}});case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return{checkList:r,fileList:a,ownerOptions:[{label:"root",value:"root"},{label:"www",value:"www"},{label:"mysql",value:"mysql"}],reversePermission:function(){var e=0,t=function(t,n,a,r){t.includes("r")&&(e|=n),t.includes("w")&&(e|=a),t.includes("x")&&(e|=r)};for(t(r.owner,256,128,64),t(r.group,32,16,8),t(r.public,4,2,1),r.auth=e.toString(8);r.auth.length<3;)r.auth="0"+r.auth},checkNumber:function(e){r.checkNumber=e;var t=String(e).replace(/[^\d]/g,"").slice(0,3);r.auth=t,o(Number(r.auth))},changeUser:function(e){r.user=e},setFileAuths:s,getFileAuths:i,$reset:function(){Object.assign(r,{owner:[],group:[],public:[],auth:0,user:"root",isDir:!0,checkNumber:""}),a.value=[]}}})),Er=t("aK",le("FILES-CLOUD-STORAGE-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,n=e.refreshFilesList,a=e.getRealTask,r=$(),i=$(),o=$(),s=$(!1),f=$([]),p=$(!0),v=$(""),h=$([]),m=$(""),g=$([]),b=$([]),w=$([ln({key:"name"}),{label:"文件名",prop:"name",width:"300",render:function(e){return re("span",{class:[null===e.type?"bt-open-dir folder-open-icon":"bt-open-dir file-text-icon"]},[re("i",{class:"icon"},null),re("span",{onClick:function(t){null===e.type&&k((""===m.value?"":m.value+"/")+e.name)}},[e.name])])}},{label:"大小",prop:"size",render:function(e){var t=null!==e.size?S(Number(e.size)):"-";return null===e.type&&(t="-"),me("span",t)}},{label:"更新时间",prop:"time",render:function(e){return""===e.type?"<span>"+y(e.time)+"</span>":"-"}}]),k=function(e){m.value!==e&&(m.value=e,_())},_=function(){var e=c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,s.value=!0,e.n=1,We({path:m.value,pname:r.value.pname});case 1:if(n=e.v,s.value=!1,n.status){e.n=2;break}return E(),d.msg({message:"请先配置云存储",type:"warning"}),tn({name:r.value.pname}),e.a(2);case 2:f.value=(null===(t=n.data)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.sort(function(e,t){return null===e.type?-1:null===t.type?1:0}))||[],x(f.value),n.data.hasOwnProperty("path")&&C(n.data.path),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}));return function(){return e.apply(this,arguments)}}(),C=function(e){var t="";m.value=e,g.value=[{title:"根目录",path:"",type:"dir"}],""!==e?(e&&"/"===e[e.length-1]&&(e=e.slice(0,-1)),e.split("/").forEach(function(e,n){t+="/".concat(e).replace(/\/\//g,"/"),g.value.push({title:""===e&&0==n?"根目录":e,path:t,type:"dir"})}),h.value=g.value):h.value=g.value};$(!1);var L=function(){var e=c(u().m(function e(){var i,o,c,s,f;return u().w(function(e){for(;;)switch(e.n){case 0:if(i=r.value,o=i.pname,c=i.type,s={},"down"!=c){e.n=2;break}if(0!==b.value.length){e.n=1;break}return d.error("请选择勾选需要下载的文件"),e.a(2);case 1:s={name:o,url:b.value[0].download,path:t.value.param.path,filename:b.value[0].name},e.n=3;break;case 2:s={name:o,filename:r.value.rowData.path,object_name:m.value};case 3:return e.n=4,l({loading:"正在执行中,请稍后...",request:Ue(s,c),message:!0,success:function(e){e.status&&(a(),n())}});case 4:return f=e.v,e.a(2,f.status)}},e)}));return function(){return e.apply(this,arguments)}}(),x=function(e){K(function(){var t=document.querySelectorAll(".oss-table .el-table__body-wrapper .el-checkbox");"down"===r.value.type?t.forEach(function(t,n){null===e[n].type?t.style.display="none":t.style.display="block"}):t.forEach(function(e,t){e.style.display="none"})})},E=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.value;case 1:null==(t=e.v)||t.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{compData:r,instance:i,ossTable:o,isTagMode:p,temporaryPath:v,showPathList:h,tableColumns:w,tableData:f,loading:s,handleSelectionChange:function(e){e.length>1?(o.value.getTable().clearSelection(),o.value.getTable().toggleRowSelection(e.pop())):b.value=e},temporaryBlur:function(){p.value=!0,v.value=""},temporaryFocus:function(){p.value=!1,v.value=m.value},temporaryEnter:function(e){var t,n=null===(t=e.target)||void 0===t?void 0:t.value;"/"!==(n=n.replace(/\/+/g,"/"))&&(n=n.replace(/\/+$/g,"")),n!==v.value&&(m.value=n,_()),e.target.blur()},goBack:function(){var e;1!==g.value.length&&(m.value=(null===(e=g.value[g.value.length-2])||void 0===e?void 0:e.path)||"/",_())},watchTableData:x,getDirList:_,filePathJump:k,onConfirm:L,$reset:function(){p.value=!0,v.value="",m.value="",f.value=[],h.value=[],g.value=[],b.value=[]}}})),Tr=t("a9",le("FILES-COMPRESS-PREVIEW-STORE",function(){var t,n,r,i=$u(),o=de(i).fileTabActiveData,s=i.refreshFilesList,p=$(""),v=$(),h=$(),m=fe({file:{data:{},path:"当前压缩包"},isDblclick:!1,addList:[]}),g=$(!1),y=$(!0),w=fe({visible:!1,form:{filename:"",path:"/"}}),k=$(!1),_=$(!1),C=fe({tableBatchData:[{label:"批量解压",value:"decompress",isRefBatch:!0,event:function(){}},{label:"批量删除",value:"delete",isRefBatch:!0,event:function(){}}],batchConfig:{isRecurrence:!1,describe:{title:"",th:"",message:"",propsValue:"name"},tableDisplayConfig:{label:"状态",prop:"status",render:function(e){return me("span",{})}}},decompressTableColumn:[{label:"文件名",prop:"filename"},{label:"大小",prop:"file_size",width:70,render:function(e){return me("span",{},e.file_size?S(e.file_size):"--")}}],selectList:[]}),L=$(),x=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:nn({type:"file",path:w.form.path,change:function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:return n=m.file.path.split("/").slice(1).join("/").replace("当前压缩包",""),g.value=!0,m.addList=[t],a="zip"===v.value.ext?Je:$e,e.n=1,l({loading:"正在添加文件,请稍后...",request:a({data:JSON.stringify({sfile:v.value.path,r_path:n?"/".concat(n):"",f_list:m.addList})}),message:!0,success:P});case 1:g.value=!1;case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),E=function(e){m.isDblclick=!0,e.date_time||(m.file.path="".concat(m.file.path,"/").concat(e.filename),setTimeout(function(){m.isDblclick=!1},200))},T=function(){var e=c(u().m(function e(t,n,a){return u().w(function(e){for(;;)switch(e.n){case 0:a.stopPropagation(),a.preventDefault(),Object.assign(w,{visible:!0,form:{filename:t.filename,path:o.value.param.path||"/"}});case 1:return e.a(2)}},e)}));return function(t,n,a){return e.apply(this,arguments)}}(),D=function(e){return e.shift(),e.join("/")},N=function(e){if(0===C.selectList.length){var t=e.findIndex(function(e){return e.filename===w.form.filename});return[e[t].uploadName]}return C.selectList.map(function(e){return e.uploadName})},F=function(){var e=c(u().m(function e(n,a){var r,i,o,c;return u().w(function(e){for(;;)switch(e.n){case 0:return r=JSON.parse(JSON.stringify(a)),i={data:JSON.stringify({zip_path:D(r),sfile:v.value.path,extract_path:w.form.path+"/",filenames:N(n)})},o="zip"===v.value.ext?Ke:Ye,e.n=1,l({loading:"正在解压文件,请稍后...",request:o(i)});case 1:if(!(c=e.v).status){e.n=3;break}if(!c.type){e.n=2;break}return Vi(c.data,i,"zip"===v.value.ext?Ke:Ye),w.visible=!1,e.a(2);case 2:d.success("解压成功"),s(),e.n=4;break;case 3:d.request(c);case 4:t&&t(),w.visible=!1;case 5:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),I=function(){var e=c(u().m(function e(t,n,a){var r,i,o,c,s;return u().w(function(e){for(;;)switch(e.n){case 0:if(a.stopPropagation(),a.preventDefault(),"text"===hu(null===(r=t.fileName)||void 0===r?void 0:r.split(".").pop())){e.n=1;break}return d.error("暂不支持该类型文件编辑"),e.a(2);case 1:return i=m.file.path.split("/").filter(function(e){return""!==e}),o={data:JSON.stringify({sfile:v.value.path,filename:(i.length>1?i.join("/").replace("当前压缩包/","")+"/":"")+t.filename})},c="zip"===v.value.ext?Xe:Qe,e.n=2,l({loading:"正在获取文件,请稍后...",request:c(o)});case 2:(s=e.v).status?zi(s.data,v.value,t.filename,i.length>1?i.join("/").replace("当前压缩包",""):""):d.request(s);case 3:return e.a(2)}},e)}));return function(t,n,a){return e.apply(this,arguments)}}(),R=function(t){var n=[];return Object.entries(t).forEach(function(t){var a=e(t,2),r=(a[0],a[1]);if("object"===f(r))if(r.is_dir)n.push("".concat(r.filename,"/"));else if(r.hasOwnProperty("fullpath"))n.push("".concat(r.fullpath));else{var i=R(r);n=n.concat(i)}}),n},O=function(e){var t=[];return C.selectList.forEach(function(e){if(e.uploadName.includes("/dddir")){var n=R(e);t=t.concat(n)}else e.is_dir?t.push("".concat(e.filename,"/")):t.push("".concat(e.fullpath))}),t},A=function(){var e=c(u().m(function e(n,r){var i,o,c,s,f,p,h;return u().w(function(e){for(;;)switch(e.n){case 0:if((i=m.file.path.split("/").filter(function(e){return""!==e})).join("/").replace("当前压缩包/","").replace("当前压缩包",""),o=i.length>1?i.join("/").replace("当前压缩包/","")+"/":"",!(0===C.selectList.length)){e.n=1;break}return e.n=1,b({title:"删除文件【".concat(n.filename,"】"),content:"您真的要删除文件【".concat(n.filename,"】吗?")});case 1:return c=[],s=[],0!==n.is_dir&&0===C.selectList.length&&(c=R(n)),s=C.selectList.length>0?O():[].concat(a(c),["".concat(o).concat(n.filename).concat(0!==n.is_dir?"/":"")]),f={data:JSON.stringify({sfile:v.value.path,filenames:s})},p="zip"===v.value.ext?Ze:et,k.value=!0,e.n=2,l({loading:"正在删除文件,请稍后...",request:p(f),message:!0,success:function(e){C.selectList=[],e.status&&(P(),_.value=!1)}});case 2:return h=e.v,t&&t(),k.value=!1,e.a(2,h.status)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),j=$([ln({key:"filename"}),{label:"名称",prop:"filename",render:function(e){return re("div",{class:"flex items-center cursor-pointer",onClick:function(t){e.date_time||(t.stopPropagation(),E(e))}},[re("img",{class:"mr-[.5rem] w-[2.5rem] h-[2.5rem]",src:"/static/images/file_icon/".concat(e.date_time?"file":"folder_win10",".png")},null),re("span",{class:"hover:text-[#20a53a]"},[e.filename])])}},{label:"大小",prop:"file_size",width:100,render:function(e){return me("span",{class:"cursor-pointer"},e.file_size?S(e.file_size):"--")}},{label:"修改时间",prop:"date_time",width:270,render:function(e){return me("span",{class:"cursor-pointer"},e.date_time?e.date_time:"--")}},cn([{onClick:I,isHide:function(e){var t=e.filename.split(".").pop()||"file";return"text"!==hu(t)||0!==e.is_dir},title:"编辑"},{onClick:T,title:"解压"},{onClick:A,title:"删除"}])]),P=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return t="zip"===v.value.ext?tt:nt,e.n=1,l({loading:g,request:t({data:JSON.stringify({sfile:v.value.path})}),success:function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:if(t.status){e.n=2;break}return d.request(t),e.n=1,h.value;case 1:null==(n=e.v)||n.unmount();case 2:m.file.data=t.data,y.value&&(K(function(){L.value.getTable().toggleAllSelection()}),y.value=!1);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),M=[{label:"解压",value:"decompress",event:(r=c(u().m(function e(n,a,r,i,o){return u().w(function(e){for(;;)switch(e.n){case 0:C.selectList=r.value,Object.assign(w,{visible:!0,form:{filename:"",path:"/"}}),t=o;case 1:return e.a(2)}},e)})),function(e,t,n,a,i){return r.apply(this,arguments)})},{label:"删除",value:"delete",event:(n=c(u().m(function e(n,a,r,i,o){return u().w(function(e){for(;;)switch(e.n){case 0:C.selectList=r.value,_.value=!0,t=o;case 1:return e.a(2)}},e)})),function(e,t,a,r,i){return n.apply(this,arguments)})}];return{instance:h,compressData:m,deCompressPopupData:w,fileItem:v,tableColumn:j,loading:g,fileTableRef:L,batch:C,batchOptions:M,batchDeletePopup:_,delEvent:A,confirmDeCompress:F,openPathDialog:function(){nn({type:"dir",path:w.form.path,change:function(e){w.form.path=e}})},cellDblclick:E,goPath:function(e){for(var t=m.file.path.split("/").filter(function(e){return""!==e}),n="",a=0;a<=e;a++)n+="/".concat(t[a]);m.file.path=n,"/当前压缩包"===n&&L.value.getTable().toggleAllSelection()},addFile:x,init:function(){p.value=v.value.path||"",P(),w.form.path=o.value.param.path||"/"},$reset:function(){y.value=!0,k.value=!1,_.value=!1,Object.assign(m,{file:{data:{},path:"当前压缩包"},isDblclick:!1,addList:[]})}}})),Dr=t("Z",le("FILES-CREATE-SYMBOLIC-LINK-STORE",function(){var e=$u().refreshFilesList,t=fe({path:"",filename:"",disable:!1}),n=$(),a=fe({path:[{validator:function(e,t,n){""===t?n(new Error("请选择正确的文件地址!")):n()},trigger:["blur","change"]}],filename:[{validator:function(e,t,n){""===t?n(new Error("请输入新文件名!")):Ki(t)?n(new Error('文件名不能包含 /\\:*?"<>|符号!')):n()},trigger:["blur"]}]}),r=function(){var a=c(u().m(function a(r){var i;return u().w(function(a){for(;;)switch(a.p=a.n){case 0:return a.p=0,i={sfile:t.path,dfile:Yi(t.filename)},a.n=1,n.value.validate();case 1:return t.disable=!0,a.n=2,l({loading:"正在创建软链接...",request:at(i),message:!0,success:function(t){t.status&&(e(),r())}});case 2:a.n=4;break;case 3:a.p=3,a.v;case 4:return a.p=4,t.disable=!1,a.f(4);case 5:return a.a(2)}},a,null,[[0,3,4,5]])}));return function(e){return a.apply(this,arguments)}}();return{quickFormRef:n,quickForm:t,quickRules:a,openFile:function(){nn({type:"all",change:function(e){t.path=e}})},onConfirm:r,$reset:function(){Object.assign(t,{path:"",filename:"",disable:!1})}}})),Nr=t("_",le("FILES-FAVORITES-MANAGE-STORE",function(){var e=$u(),t=de(e).favoriteList,a=e.refreshFilesList,r=$(),i=$(t.value),o=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,b({title:"删除收藏",content:"即将删除收藏路径【".concat(t.name,"】")});case 1:l({loading:"正在删除收藏路径,请稍后...",request:rt({path:t.path}),message:!0,success:function(e){e.status&&Pu()}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),s=fe({loading:!1,data:[]}),f=function(){var e=c(u().m(function e(t){var a,i;return u().w(function(e){for(;;)switch(e.n){case 0:return"dir"===t.type?Qi(t.path):(a=n(n({},t),{},{fileName:t.name,ext:t.ext||t.name.split(".").pop()}),ku(a)),e.n=1,r.value;case 1:null==(i=e.v)||i.unmount();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),p=$([{label:"路径",prop:"path"},cn([{onClick:f,title:"打开"},{onClick:o,title:"删除"}])]);return{instance:r,tableColumn:p,favoriteList:t,favTableData:s,onCancel:function(){i.value.length!==t.value.length&&a()},$reset:function(){Object.assign(s,{loading:!1,data:[]})}}}));function Fr(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!we(e)}var Ir=t("a8",le("FILES-FORMAT-CONVERSION-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,a=e.refreshFilesList,r=$(),i=$(),o=$("conver"),s=$("执行转换"),f=$(!1),p=fe({fileList:[],selectList:[],path:"",del:!1,allKey:""}),v=$(!1),h=fe({all:[],audio:[],image:[],video:[]}),m=$([ln({key:"fileName"}),{label:"文件名",prop:"fileName"},{label:"格式类型",prop:"ext",width:80},{label:"转换为",prop:"status",width:190,renderHeader:function(){var e,t;return re("div",{class:"items-center inline-flex !w-[190px]"},[re("span",null,[ge("转换为")]),re(be,{class:"!w-[8rem] ml-4px",modelValue:p.allKey||(null===(e=h.all[0])||void 0===e?void 0:e.value),onChange:function(e){p.allKey=e,p.fileList=p.fileList.map(function(t){return n(n({},t),{},{format:e})})}},Fr(t=h.all.map(function(e){return re(ye,{key:e.value,label:e.label,value:e.value},null)}))?t:{default:function(){return[t]}})])},render:function(e,t){var n=null;return["audio","image","video"].forEach(function(t){var a,r,i;h[t].map(function(e){return e.value}).includes(e.ext)&&(e.format=e.format||(null===(a=h[t].at(0))||void 0===a?void 0:a.value),n=re("div",null,[re(be,{class:"!w-[12rem]",style:{display:e.isCustom?"none":"block"},modelValue:e.format||(null===(r=h[t].at(0))||void 0===r?void 0:r.value),onChange:function(t){e.format=t}},Fr(i=h[t].map(function(e){return re(ye,{key:e.value,label:e.label,value:e.value},null)}))?i:{default:function(){return[i]}})]))}),n||(n=me("span",{class:"text-[red]"},"不支持转换")),n}},{label:"执行状态",prop:"status",width:90,render:function(e,t){var n=null;return h.all.map(function(e){return e.value}).includes(e.ext)&&(n=me("span",{},["待转换","转换中","转换成功","转换失败"][e.status])),n||(n=me("span",{class:"text-[red]"},"无法转换")),n}},cn([{onClick:function(e){p.fileList=p.fileList.filter(function(t){return t.path!==e.path})},title:"取消"}])]),g=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:if(t=[],p.selectList.forEach(function(e){if(0===e.status){var n=e.name.split(".");n.pop(),t.push({input_file:e.path,output_file:"".concat(p.path,"/").concat(n,".").concat(e.format)})}}),t.length){e.n=1;break}return e.a(2,d.error("没有需要转换的文件"));case 1:return s.value="转换中",f.value=!0,e.n=2,l({loading:"正在转换中,请稍后...",request:ut({is_save:p.del?1:0,pdata:JSON.stringify(t)}),success:function(e){_(e.data)?(e.data.forEach(function(e){e.msg=e.msg||(e.status?"转换成功":"转换失败")}),a(),C(),Gu({title:"转换结果",resultData:e.data})):(s.value="执行转换",f.value=!1,d.error(e.msg))}});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({loading:v,request:lt(),data:{all:[Array,function(e){return e.map(function(e){return{key:e,label:e}})}],audio:[Array,function(e){return e.map(function(e){return{key:e,label:e}})}],image:[Array,function(e){return e.map(function(e){return{key:e,label:e}})}],video:[Array,function(e){return e.map(function(e){return{key:e,label:e}})}]},success:function(e){Object.keys(e).forEach(function(t){e[t]=e[t].map(function(e){return{value:e.key,label:e.label}})}),h.all=e.all,h.audio=e.audio,h.image=e.image,h.video=e.video}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),w=fe({fileList:[],p:1,limit:10}),k=$([{label:"操作时间",prop:"time",width:160,render:function(e){return me("span",{},y(e.time))}},{label:"操作类型",prop:"type",width:80},{label:"操作日志",prop:"operation"},{label:"操作结果",prop:"status",width:160}]),S=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({request:ot({p:w.p,limit:w.limit}),success:function(e){if(e.status){var t=e.data.msg.data;w.fileList="string"==typeof t?[]:t}else d.error(e.msg)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),C=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.value;case 1:null==(t=e.v)||t.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{instance:i,fileItem:r,activeName:o,tableColumn:m,loading:v,formatData:p,subLoad:f,btnText:s,addFile:function(){var e;nn({type:"file",change:(e=c(u().m(function e(t){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,it({filename:t});case 1:(a=e.v).status?p.fileList.push(n(n({status:0,ext:a.data.st_type},a.data),{},{path:t,fileName:a.data.name})):d.error(a.msg);case 2:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)})})},openFile:function(e){nn({type:"dir",change:function(e){p.path=e}})},goConversion:g,handleSelectionChange:function(e){p.selectList=e},logTableColumn:k,tableData:w,getData:S,handleTabEvent:function(e){"conver"===e?b():S()},init:function(){var e,a;b(),p.fileList=Array.isArray(r.value)?null===(e=r.value)||void 0===e?void 0:e.map(function(e){return n(n({status:0},e),{},{name:e.fileName})}):[n(n({status:0},r.value),{},{name:null===(a=r.value)||void 0===a?void 0:a.fileName})],p.path=t.value.param.path},$reset:function(){f.value=!1,v.value=!1,Object.assign(p,{fileList:[],selectList:[],path:"",del:!1,allKey:""}),Object.assign(w,{fileList:[],p:1,limit:10}),Object.assign(h,{all:[],audio:[],image:[],video:[]}),s.value="执行转换"}}})),Rr=t("aN",le("FILES-OVERLAY-TIPS-STORE",function(){var e=v().getGlobalInfo,t=$u(),n=de(t),a=n.fileTabActiveData,r=n.copyFilesData,i=t.refreshFilesList,o=t.getRealTask,s=$(),f=$(""),p=$(),h=$([{type:"selection",width:40},{prop:"filename",label:"文件名"},{prop:"size",label:"大小",render:function(e){return re("span",null,[e.is_dir?"--":S(e.size)])}},{prop:"mtime",width:136,label:"最后修改时间",render:function(e){return y(Number(e.mtime))}}]),m=fe({addend1:0,addend2:0,sum:0}),g=$(!1),w=$(),k=$([]),_=$([]),C=function(e){if(e.endsWith(".tar.gz")){var t=e.substring(0,e.length-7);return"".concat(t,"-副本.tar.gz")}var n=e.lastIndexOf(".");if(-1===n)return"".concat(e,"-副本");var a=e.substring(0,n),r=e.substring(n);return"".concat(a,"-副本").concat(r)},L=fe({type:"",size:0,filename:"",mtime:0,is_dir:!1}),x=fe({name:[{validator:function(e,t,n){"rename"===L.type&&t===s.value.fileData[0].filename&&n(new Error("名称重复,请输入新文件名!")),""===t?n(new Error("请输入新文件名!")):n()},trigger:["blur"]}]}),E=function(){L.type="rename",L.size=s.value.fileData[0].size,L.filename=C(s.value.fileData[0].filename),L.mtime=s.value.fileData[0].mtime,L.is_dir=s.value.fileData[0].is_dir},T=function(){var e=c(u().m(function e(t){var n,c,f,p,v;return u().w(function(e){for(;;)switch(e.n){case 0:if("single"!==s.value.type){e.n=4;break}return n={path:a.value.param.path,name:L.filename},e.n=1,ct(n);case 1:if(c=e.v,!(c.data.length>0)){e.n=2;break}return e.n=2,b({title:"覆盖文件",content:"检测到同名文件,您确定要覆盖当前【".concat(L.filename,"】文件?")});case 2:return f={sfile:r.value.files[0].path,dfile:a.value.param.path+"/"+L.filename},"rename"===L.type&&(f.rename=!0),p="copy"===r.value.type?st:ft,e.n=3,l({loading:"正在处理文件,请稍后...",request:p(f),success:function(e){e.status&&(e.msg="文件覆盖成功!",i(),su()),d.request(e),o(),t()}});case 3:case 7:return e.a(2);case 4:if(m.sum!==m.addend1+m.addend2){e.n=6;break}return v=[k.value.map(function(e){return e.filename})],e.n=5,l({loading:"正在处理文件,请稍后...",request:pt({type:"copy"===r.value.type?1:2,path:a.value.param.path,skip:v}),message:!0,success:function(e){e.status&&(i(),su()),o(),t()}});case 5:e.n=7;break;case 6:return d.error("请输入正确的计算结果"),e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),D=function(){var t=c(u().m(function t(){var n;return u().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e();case 1:n=t.v,f.value=(null==n?void 0:n.sites_path)||"";case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),N=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return _.value="batch"==s.value.type?s.value.fileData:[],e.n=1,D();case 1:m.sum=void 0,m.addend1=Math.round(9*Math.random()+1),m.addend2=Math.round(9*Math.random()+1),"batch"==s.value.type?(_.value=s.value.fileData,p.value.getTable().toggleAllSelection()):E();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{compData:s,fileTabActiveData:a,sitesPath:f,overlayFormRef:w,overlayForm:L,tableLoading:g,quickRules:x,calcData:m,tableColumns:h,tableData:_,handleSelectionChange:function(e){k.value=e},watchType:function(e){"single"===s.value.type&&(L.filename="over"===e?s.value.fileData[0].filename:C(s.value.fileData[0].filename))},fileFormat:C,onConfirm:T,init:N,$reset:function(){_.value=[],k.value=[]}}})),Or=t("aH",le("FILES-TAMPER-STORE",function(){var e=$u().refreshFilesList,t=$(),n=$("关闭"),a=$("文件"),r=$(""),i=fe({fileName:!0,ext:!1}),o=function(){var n=c(u().m(function n(a){var r,o,c,s,f;return u().w(function(n){for(;;)switch(n.n){case 0:return r=t.value.data.path,o=[],t.value.data.isFile&&(-1!==(c=r.lastIndexOf("/"))&&(r=r.substring(0,c)),i.fileName&&(s=t.value.data.path.split("/"),f=s.length>=2?s[s.length-2]:"",o.push("".concat(f,"/").concat(t.value.data.fileName))),i.ext&&o.push("."+t.value.data.fileName.split(".").pop())),n.n=1,l({loading:"正在创建目录保护,请稍后...",request:ht({path:r,exts:JSON.stringify(o)}),message:!0,success:function(t){t.status&&(e(),a&&a())}});case 1:return n.a(2)}},n)}));return function(e){return n.apply(this,arguments)}}(),s=function(){var n=c(u().m(function n(){var a,c,s,f,p,v;return u().w(function(n){for(;;)switch(n.n){case 0:if(i.ext||i.fileName){n.n=1;break}return d.error("请至少选择一项"),n.a(2);case 1:if(a={pid:t.value.data.tamperProofId,settings:[]},c=t.value.data.path,"create"!==r.value||0!=t.value.data.tamperProofId){n.n=2;break}return o(close),n.a(2);case 2:return t.value.data.isFile?null!==(s=t.value.data)&&void 0!==s&&s.isLock?(i.fileName&&(a.settings.push({key:"remove_bf",values:[c]}),a.settings.push({key:"add_wf",values:[c]})),i.ext&&a.settings.push({key:"remove_bf",values:["."+t.value.data.fileName.split(".").pop()]})):(i.fileName&&(a.settings.push({key:"add_bf",values:[c]}),a.settings.push({key:"remove_wf",values:[c]})),i.ext&&a.settings.push({key:"add_bf",values:["."+t.value.data.fileName.split(".").pop()]})):null!==(f=t.value.data)&&void 0!==f&&f.isLock?(p=r.value,-1!=t.value.data.path.indexOf("/www/server/panel/class")&&(p="add_wd"),a.settings.push({key:p,values:[t.value.data.path]})):a.settings.push({key:r.value,values:[c]}),a.settings=JSON.stringify(a.settings),n.n=3,l({loading:"正在执行中,请稍后...",request:vt(a),message:!0,success:function(t){t.status&&e()}});case 3:return v=n.v,n.a(2,v.status)}},n)}));return function(){return n.apply(this,arguments)}}(),f=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({request:dt({path:t.value.data.path}),success:function(e){r.value=e.data.data.action[0]}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{isStart:n,isFile:a,compData:t,checkList:i,onConfirm:s,init:function(){var e;n.value=null!==(e=t.value.data)&&void 0!==e&&e.isLock?"关闭":"开启",a.value="file"===t.value.data.type?"文件":"目录",f()},$reset:function(){r.value="",Object.assign(i,{fileName:!0,ext:!1})}}})),Ar=t("X",le("FILES-TASK-STORE",function(){var e=$u().refreshFilesList,t=$(),n=null,a=$([]),r=function(){var t=c(u().m(function t(){var o,l;return u().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,C({status:-3});case 1:if(0!==(o=t.v).data.length){t.n=2;break}return clearInterval(n),e(),s(),t.a(2);case 2:a.value=o.data,n=setTimeout(r,2e3),t.n=4;break;case 3:t.p=3,l=t.v,i(l);case 4:return t.a(2)}},t,null,[[0,3]])}));return function(){return t.apply(this,arguments)}}(),o=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,b({title:"删除任务",content:"您真的要删除当前任务【".concat(t.name,":").concat(t.shell,"】吗?")});case 1:l({loading:"正在删除,请稍后...",request:L({id:t.id}),message:!0,success:r});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),s=function(){var e=c(u().m(function e(){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t.value;case 1:null==(n=e.v)||n.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{instance:t,taskData:a,getLog:r,cancel:o,$reset:function(){a.value=[],clearInterval(n)}}})),jr=t("aF",le("FILES-IMAGE-PREVIEW-STORE",function(){var e=de($u()),t=e.fileTabActiveData,n=e.imageList,a=$(),r=window.location.protocol+"//"+window.location.host+"/download?filename=",i=$(""),o=$([]),l=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:o.value=n.value.map(function(e){return"".concat(r).concat(t.value.param.path,"/").concat(e[0])});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{fileItem:a,image:i,imagesArr:o,init:function(){i.value="".concat(r).concat(a.value.path),l()},$reset:function(){o.value=[]}}})),Pr=t("aE",le("FILES-IMPORT-DATABASE-STORE",function(){var e=$(),t=fe({name:""}),n=$(!1),a=$(),r=fe({name:[{validator:function(e,t,n){""===t?n(new Error("请选择压缩路径")):n()},trigger:["blur"]}]}),i=$([]),o=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({request:x({table:"databases"}),success:function(e){e.status&&(i.value=e.data.data.map(function(e){return{label:e.name,value:e.id}}),i.value.length>0&&(t.name=i.value[0].value))}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),s=function(){var n=c(u().m(function n(){var r,o;return u().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,b({title:"导入数据库",content:"是否将【".concat(e.value.fileName,"】文件,导入【").concat(i.value.find(function(e){return e.value==t.name}).label,"】数据库中,是否继续?")});case 1:return r={name:i.value.find(function(e){return e.value==t.name}).label,file:e.value.path},n.n=2,a.value.validate();case 2:return n.n=3,l({loading:"正在导入数据库,请稍后...",request:mt(r),message:!0});case 3:return o=n.v,n.a(2,o.status)}},n)}));return function(){return n.apply(this,arguments)}}();return{fileItem:e,quickFormRef:a,quickForm:t,quickRules:r,disable:n,databaseOptions:i,onConfirm:s,toggleName:function(e){t.name=e},getOptions:o,$reset:function(){Object.assign(t,{name:""}),n.value=!1,i.value=[]}}})),Mr=t("aI",le("FILES-VIDEO-STORE",function(){var e=de($u()).fileTabActiveData,t=$(""),n=$([]),a=e.value.param.path,r=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({request:gt({path:a}),data:[Array,n]});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{currentPath:a,videoList:n,videoUrl:t,playVideo:function(e){t.value=a+"/"+e},getList:r,$reset:function(){t.value="",n.value=[]}}})),zr=t("a0",le("FILES-SHARE-LIST-STORE",function(){var e=$({}),t=$u().refreshFilesList,n=$(!1),a=$([]),r=fe({total:0,p:1,limit:12,file_name:""}),i=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:l({loading:n,request:bt({p:r.p,filename:r.file_name||""}),data:{data:[Array,a],page:E(r)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),o=function(){var e=c(u().m(function e(n){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,b({title:"取消分享",content:"是否取消分享该文件【".concat(n.ps,"】,是否继续?")});case 1:l({loading:"正在取消文件分享,请稍后...",request:yt({id:n.id}),message:!0,success:function(e){e.status&&(i(),t())}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),s=$([{label:"分享名称",prop:"ps"},{label:"文件地址",prop:"filename"},{label:"过期时间",prop:"expire"},cn([{onClick:function(e){_i(e,!0)},title:"详情"},{onClick:o,title:"关闭"}])]);return{compData:e,isLoading:n,tableData:a,shareTableData:r,tableColumn:s,getShareData:i,searchSubmit:function(e){r.file_name=e,i()},$reset:function(){n.value=!1,a.value=[],Object.assign(r,{total:0,p:1,limit:12,file_name:""})}}})),qr=t("a1",le("FILES-SHARE-STORE",function(){var e=$u().refreshFilesList,t=$(),n=fe({ps:"",expire:24,password:""}),a=$(!1),r=$(),i=fe({ps:[{validator:function(e,t,n){""===t?n(new Error("请输入分享名称")):n()},trigger:["blur"]}]}),o=function(){var i=c(u().m(function i(o){var c;return u().w(function(i){for(;;)switch(i.n){case 0:return c={filename:Yi(t.value.fileName),ps:n.ps,password:n.password,expire:n.expire},i.n=1,r.value.validate();case 1:return i.n=2,l({loading:a,request:wt(c),success:function(t){return t.status?(d.success("分享成功"),o.unmount()):d.error(t.message),e(),_i(t.data)}});case 2:return i.a(2)}},i)}));return function(e){return i.apply(this,arguments)}}(),s=$(),f=fe({name:"",link:"",code:"",time:""}),p=$({}),v=$(!1),h=$(!1),m=$(),g=fe({}),y=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:if(!s.value.isShareList){e.n=1;break}return p.value=s.value,f.name=s.value.ps,f.link=location.origin+"/down/"+s.value.token,f.code=s.value.password||"",f.time=s.value.expire,f.qrcode=location.origin+"/down/"+s.value.token+"?fname="+s.value.ps+"&down=true",e.a(2);case 1:return e.n=2,l({loading:"正在获取分享详情,请稍后...",request:kt({id:Number(s.value.isShare|s.value.id)}),success:function(e){p.value=e.data,f.name=e.data.ps,f.link=location.origin+"/down/"+e.data.token,f.code=e.data.password||"",f.time=e.data.expire,f.qrcode=location.origin+"/down/"+e.data.token+"?fname="+e.data.ps+"&down=true"}});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),w=function(){var t=c(u().m(function t(){var n,a;return u().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,m.value.validate();case 1:return t.n=2,b({title:"取消分享【".concat(p.value.ps,"】"),content:"您真的要取消分享【".concat(p.value.ps,"】吗?")});case 2:return n={id:p.value.id},t.n=3,l({loading:"正在取消文件分享,请稍后...",request:yt(n),message:!0,success:function(t){t.status&&((0,zr().getShareData)(),e())}});case 3:return a=t.v,t.a(2,a.status);case 4:t.p=4,t.v;case 5:return t.a(2)}},t,null,[[0,4]])}));return function(){return t.apply(this,arguments)}}();return{fileItem:t,quickFormRef:r,quickForm:n,quickRules:i,disable:a,help:[{isHtml:!0,content:'<span class="text-[#ef0808]">注意:生成的外链分享链接具有一定的风险,请仅与可信任的人分享链接,避免敏感信息泄露</span>'}],compData:s,detail:p,detailFormRef:m,detailForm:f,detailRules:g,isDisabled:h,helpList:[{content:'<span class="text-[#ef0808]">注意:生成的外链分享链接具有一定的风险,请仅与可信任的人分享链接,避免敏感信息泄露</span>',isHtml:!0}],showQrcode:v,copyAll:function(e){T({value:"链接:".concat(f.link," 提取码:").concat(f.code)})},copyLink:function(e){T({value:f.link})},onConfirm:o,onConfirmDetail:w,initDetail:function(){v.value=!1,Object.assign(f,{name:"",link:location.origin+"/down/"+s.value.token,code:"",time:s.value.expire}),y()},init:function(){a.value=!1,Object.assign(n,{ps:t.value.fileName,expire:24,password:""})}}})),Br=t("a7",le("FILES-SEND-EMAIL-STORE",function(){var e=$(),t=fe({email:"",msg:""}),a=$(!1),i=$(),o=fe({email:[{validator:function(e,t,n){if(""===t)n(new Error("请输入接受者邮箱"));else{var a=t.trim().split(",").filter(function(e){return""!==e}),r=!1;a.forEach(function(e){D(e)||(r=!0)}),r?n(new Error("请输入正确的邮箱")):n()}},trigger:["blur"]}],fileName:[{validator:function(t,n,a){e.value.size>52428800?a(new Error("请选择小于50M的附件")):a()}}]}),s=function(){var e=c(u().m(function e(){var t,a;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,St();case 1:t=e.v,a=t.data,f(a)&&an(n(n({},{title:"发送者配置",type:"mail"}),{},{callback:function(){}}));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),f=function(e){return 0===Object.keys(e).length},p=function(){var n=c(u().m(function n(){var o,c;return u().w(function(n){for(;;)switch(n.n){case 0:return o={to_email:t.email,msg:t.msg,flist:[Yi(e.value.fileName)]},n.n=1,i.value.validate();case 1:return n.n=2,l({loading:a,request:_t({data:JSON.stringify(o)}),success:function(e){var t=e.data;if(t.msg&&""!=t.msg)return d.error(t.msg),null;var n=[];Object.keys(t.list).forEach(function(e){var a=f(t.list[e].error),r=[];a||Object.keys(t.list[e].error).forEach(function(n){r.push(n+":"+t.list[e].error[n])}),n.push({name:e,msg:a?"发送成功":r.join("<br>"),status:!!a})}),m({title:"发送至邮箱-结果",area:50,component:function(){return h(function(){return r.import("./index-legacy108.js?v=1765440387")},void 0,r.meta.url)},compData:{resultData:n,resultTitle:"发送至邮箱",resultColumn:[{label:"邮箱",prop:"name"},{label:"结果",width:80,render:function(e){return me("span",{class:e.status?"text-primary":"text-danger"},e.status?"操作成功":"操作失败")}},{label:"信息",render:function(e){return me("span",{class:e.status?"":"text-danger"},e.msg)}}]}})}});case 2:return c=n.v,n.a(2,c.data.status)}},n)}));return function(){return n.apply(this,arguments)}}();return{fileItem:e,quickFormRef:i,quickForm:t,quickRules:o,disable:a,getDetail:s,onConfirm:p,$reset:function(){a.value=!1,Object.assign(t,{email:"",msg:""})}}})),Hr=t("a5",le("FILES-SPLIT-STORE",function(){var e,t=$u(),n=de(t).fileTabActiveData,a=t.refreshFilesList,r=$(),i=fe({type:"size",size:1024,num:5,path:(null===(e=n.value)||void 0===e?void 0:e.param.path)||""}),o=$(!1),s=$(),f=fe({size:[{validator:function(e,t,n){"size"===i.type?""===t?n(new Error("请输入拆分大小")):1024*Number(t)*1024>=r.value.size/2?n(new Error("拆分大小不能大于文件大小一半")):n():n()},trigger:["blur"]}],num:[{validator:function(e,t,n){"num"===i.type&&(""===t||Number(t)<2)?n(new Error("拆分数量不能小于2个")):n()},trigger:["blur"]}],path:[{validator:function(e,t,n){""===t?n(new Error("请选择存放目录")):n()},trigger:["blur"]}]}),p=function(){var e=c(u().m(function e(t){var n,o;return u().w(function(e){for(;;)switch(e.n){case 0:return n={file_path:Yi(r.value.fileName),save_path:i.path},"size"===i.type?n.split_size=Number(i.size):n.split_num=Number(i.num),e.n=1,s.value.validate();case 1:return e.n=2,l({loading:"正在拆分文件,请稍后...",request:Ct(n),message:!0,success:function(e){d.request({status:e.status,msg:e.status?"拆分成功":"拆分失败"}),a()}});case 2:return o=e.v,e.a(2,o.status)}},e)}));return function(t){return e.apply(this,arguments)}}();return{fileItem:r,quickFormRef:s,quickForm:i,quickRules:f,disable:o,help:[{content:"拆分后会在存放目录(默认当前目录)下创建一个xxx_split文件夹,存放配置文件以及拆分文件"}],openFile:function(){nn({type:"dir",change:function(e){i.path=e}})},onConfirm:p,init:function(){var e;o.value=!1,Object.assign(i,{type:"size",size:1024,num:5,path:(null===(e=n.value)||void 0===e?void 0:e.param.path)||""})}}})),Vr=t("aJ",le("FILES-TERMINAL-STORE",function(){var e=de($u()).fileTabActiveData,t=$(),n=$(),a=function(){return n.value},r=function(){var e=c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=a(),n=null==t?void 0:t.socketInfo(),e.p=1,e.n=2,b({title:"确定要关闭SSH会话吗?",content:"关闭SSH会话后,当前命令行会话正在执行的命令可能被中止,确定关闭吗?"});case 2:i(),n.close(),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),i=function(){var e=c(u().m(function e(){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t.value;case 1:null==(n=e.v)||n.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{instance:t,filesTerminalRef:n,init:function(){K(function(){var t=a(),n=null==t?void 0:t.socketInfo(),r=null==t?void 0:t.terminal;n.send("\r\nclear\r"),n.send("cd ".concat(e.value.param.path,"\r")),null==r||r.focus()})},onCancel:function(){return r(),!1}}})),Gr=t("a6",le("FILES-MERGE-STORE",function(){var e,t=$u(),n=de(t).fileTabActiveData,a=t.refreshFilesList,r=$(),i=fe({path:(null===(e=n.value)||void 0===e?void 0:e.param.path)||"",disable:!1,file:{}}),o=$(!1),s=$(),f=fe({path:[{validator:function(e,t,n){""===t?n(new Error("请选择存放目录")):n()},trigger:["blur"]}]}),p=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,l({loading:o,request:Lt({file_path:r.value.path}),success:function(e){var t;Object.assign(i,{path:(null===(t=n.value)||void 0===t?void 0:t.param.path)||"",disable:!1,file:e.data})}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return n={file_path:Yi(r.value.fileName),save_path:i.path},e.n=1,s.value.validate();case 1:return e.n=2,l({loading:o,request:xt(n),message:!0,success:function(e){a(),e.status&&t&&t()}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return{fileItem:r,loading:o,quickFormRef:s,quickForm:i,quickRules:f,openFile:function(){nn({type:"dir",change:function(e){i.path=e}})},getFile:p,onConfirm:v}})),Wr=t("aG",le("FILES-EDIT-STORE",function(){var e=$(),t=$(!1),n=fe({data:""}),a=function(){var t=c(u().m(function t(a){var r,i;return u().w(function(t){for(;;)switch(t.n){case 0:return r={sfile:e.value.fileItem.path,filename:(""!=e.value.path?e.value.path+"/":"")+e.value.name,data:n.data},i="zip"===e.value.fileItem.ext?Et:Tt,t.n=1,l({loading:"正在保存,请稍后...",request:i({data:JSON.stringify(r)}),message:!0,success:function(e){e.status&&a&&a()}});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return{compData:e,config:{mode:"ace/mode/nginx"},load:t,cmdForm:n,onConfirm:a,init:function(){n.data=e.value.data.data}}})),Ur=t("a4",le("FILES-DECOMPRESSION-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,n=e.refreshFilesList,a=e.getRealTask,r=Tr(),i=de(r).instance,o=$(),s=fe({fileName:"",path:t.value.param.path||"",coding:"UTF-8",password:"",auth:"755"}),f=$(!1),p=$(),v=fe({path:[{validator:function(e,t,n){""===t?n(new Error("请选择解压路径")):n()},trigger:["blur"]}],auth:[{validator:function(e,t,n){""===t||isNaN(Number(t))||t.length>3?n(new Error("请输入正确的权限")):n()},trigger:["blur"]}]}),h=function(){var e=c(u().m(function e(){var t,r;return u().w(function(e){for(;;)switch(e.n){case 0:return t={sfile:o.value.path,dfile:s.path,type:"tar.gz"===o.value.ext?"tar":"zip",coding:s.coding,password:s.password,power:s.auth},e.n=1,p.value.validate();case 1:return f.value=!0,e.n=2,l({loading:"正在解压文件,请稍后...",request:Dt(t),message:!0,success:function(){var e=c(u().m(function e(t){var r;return u().w(function(e){for(;;)switch(e.n){case 0:return n(),a(),e.n=1,i.value;case 1:null==(r=e.v)||r.unmount();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 2:return r=e.v,f.value=!1,e.a(2,r.status)}},e)}));return function(){return e.apply(this,arguments)}}();return{fileItem:o,quickFormRef:p,quickForm:s,quickRules:v,codeOptions:[{label:"UTF-8",value:"UTF-8"},{label:"GBK",value:"GBK"}],disable:f,openFile:function(){nn({type:"dir",change:function(e){s.path=e}})},toggleCode:function(e){s.coding=e},init:function(){Object.assign(s,{fileName:o.value.fileName,path:t.value.param.path||"",coding:"UTF-8",password:"",auth:"755"})},onConfirm:h}})),Jr=t("a3",le("FILES-COMPRESS-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,a=e.refreshFilesList,r=e.getRealTask,o=$(),s=fe({type:"tar.gz",path:"",download:!1}),f=$(!1),p=$(),v=fe({path:[{validator:function(e,t,n){""===t?n(new Error("请选择压缩路径")):n()},trigger:["blur"]}]}),h=function(){var e=c(u().m(function e(){var n,i,c;return u().w(function(e){for(;;)switch(e.n){case 0:return n=Array.isArray(o.value),i={sfile:n?o.value.map(function(e){return e.fileName}):o.value.fileName,dfile:s.path,z_type:s.type,path:t.value.param.path+"/"},e.n=1,p.value.validate();case 1:return c=s.download?Nt:Ft,e.n=2,l({loading:"正在压缩文件,请稍后...",request:c(i),success:function(e){e.status?(s.download?window.open(e.data.msg):d.success("压缩成功"),r(),setTimeout(function(){a()},1e3)):d.error(e.msg)}});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),m=$(),g=$(),b=$([]),y=$(null),w=function(){var e=c(u().m(function e(t){var r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,r=g.value.params,e.n=1,Dt(n(n({},r),t));case 1:e.v.status&&y.value.tableSelectList.forEach(function(e){b.value.forEach(function(t,a){if(e.zip_file_path===t.zip_file_path){var r=n(n({},t),{},{status:"执行成功"});b.value.splice(a,1,r)}})}),b.value.find(function(e){return void 0===e.status})||(C(),d.success("解压成功"),a()),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=c(u().m(function e(t){var r,o;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,r=g.value.params,e.n=1,g.value.callback(n(n({},r),t));case 1:e.v.status&&y.value.tableSelectList.forEach(function(e){b.value.forEach(function(t,a){if(e.zip_file_path===t.zip_file_path){var r=n(n({},t),{},{status:"执行成功"});b.value.splice(a,1,r)}})}),b.value.find(function(e){return void 0===e.status})||(C(),d.success("解压成功"),a()),e.n=3;break;case 2:e.p=2,o=e.v,i(o);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),_=pe([ln({key:"file_path"}),{label:"文件名",prop:"name",minWidth:150},{label:"大小",prop:"size",width:150,render:function(e){return e.file_size===e.zip_file_size?re("span",{class:"text-primary"},[ge("无变化")]):re("div",null,[re("div",{class:"text-blue-500"},[ge("解压文件: "),re("span",{class:"text-danger"},[S(e.zip_file_size)])]),re("div",{class:"text-blue-500"},[ge("目标文件: "),re("span",{class:"text-danger"},[S(e.file_size)])])])}},{label:"修改时间",prop:"time",width:200,render:function(e){return e.file_mtime===e.zip_file_mtime?re("span",{class:"text-primary"},[ge("无变化")]):re("div",null,[re("div",{class:"text-blue-500"},[ge("解压文件: "),re("span",{class:"text-danger"},[e.zip_file_mtime])]),re("div",{class:"text-blue-500"},[ge("目标文件: "),re("span",{class:"text-danger"},[e.file_mtime])])])}},{label:"执行结果",prop:"action",fixed:"right",render:function(e){return e.status?re("span",{class:"text-primary"},[e.status]):re("span",{class:"text-blue-500"},[ge("-")])}}]),C=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.value;case 1:null==(t=e.v)||t.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{fileItem:o,quickFormRef:p,quickForm:s,quickRules:v,disable:f,compressOptions:[{label:"tar.gz (推荐)",value:"tar.gz"},{label:"zip (通用格式)",value:"zip"},{label:"rar (WinRAR对中文兼容较好)",value:"rar"},{label:"7z (压缩率极高的压缩格式)",value:"7z"}],openFile:function(){nn({type:"dir",change:function(e){s.path=e+"/"+o.value.fileName+"_"+N(5)+"."+s.type}})},toggleType:function(e){s.type=e,s.path=t.value.param.path+"/"+(Array.isArray(o.value)?t.value.label:o.value.fileName)+"_"+N(5)+"."+s.type},onConfirm:h,init:function(){Object.assign(s,{type:"tar.gz",path:("/"==t.value.param.path?"":t.value.param.path)+"/"+(Array.isArray(o.value)?t.value.label:o.value.fileName)+"_"+N(5)+".tar.gz"||"",download:!1})},instance:m,compData:g,tableColumn:_,tableList:b,jump:function(){if(0!==y.value.tableSelectList.length){var e=y.value.tableSelectList.map(function(e){return{zip_file_path:e.zip_file_path,file_path:e.file_path}});if(g.value.callback){var t=g.value.params,a=JSON.parse(t.data).extract_path.split("/");return a.pop(),void k({data:JSON.stringify(n(n({},JSON.parse(t.data)),{},{extract_path:a.join("/"),filenames:e,type:0}))})}w({filenames:JSON.stringify(e),type1:0})}else d.error("请选择文件")},cover:function(){if(0!==y.value.tableSelectList.length){var e=y.value.tableSelectList.map(function(e){return{zip_file_path:e.zip_file_path,file_path:e.file_path}});if(g.value.callback){var t=g.value.params,a=JSON.parse(t.data).extract_path.split("/");return a.pop(),void k({data:JSON.stringify(n(n({},JSON.parse(t.data)),{},{extract_path:a.join("/"),filenames:e,type:1}))})}w({filenames:JSON.stringify(e),type1:1})}else d.error("请选择文件")},rename:function(){if(0!==y.value.tableSelectList.length){var e=y.value.tableSelectList.map(function(e){return{zip_file_path:e.zip_file_path,file_path:e.file_path}});if(g.value.callback){var t=g.value.params,a=JSON.parse(t.data).extract_path.split("/");return a.pop(),void k({data:JSON.stringify(n(n({},JSON.parse(t.data)),{},{extract_path:a.join("/"),filenames:e,type:2}))})}w({filenames:JSON.stringify(e),type1:2})}else d.error("请选择文件")},initCover:function(){b.value=g.value.data.data},$reset:function(){b.value=[]},TableRef:y}})),$r=t("a2",le("FILES-DETAIL-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,a=e.refreshFilesList,r=$(),i=$("routine"),o=$(!1),s=function(){var e=c(u().m(function e(){var a,i;return u().w(function(e){for(;;)switch(e.n){case 0:return o.value=!0,e.n=1,it({filename:r.value.path});case 1:return(a=e.v).status?(r.value=n(n({},r.value),a.data),o.value=!1):d.error(a.msg),e.n=2,It({path:t.value.param.path+"/"+r.value.fileName});case 2:i=e.v,r.value.st_size=i.data,p();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),f=$([]),p=function(){f.value=[{title:"文件名",value:r.value.name},{title:"类型",value:r.value.st_type||"未知文件"},{title:"文件路径",value:"".concat(r.value.path,"/").concat(r.value.name)},{title:"文件大小",value:"".concat(r.value.st_size)},{title:"访问时间",value:y(r.value.st_atime)},{title:"修改时间",value:y(r.value.st_mtime)},{title:"元数据修改时间",value:y(r.value.st_ctime)},{title:"文件MD5",value:r.value.md5},{title:"文件sha1",value:r.value.sha1},{title:"所属用户",value:r.value.user},{title:"所属组",value:r.value.group},{title:"文件权限",value:r.value.mode},{title:"特殊权限",value:r.value.lsattr||"无"},{title:"用户id",value:r.value.st_uid},{title:"用户组id",value:r.value.st_gid},{title:"inode的链接数",value:r.value.st_nlink},{title:"inode的节点号",value:r.value.st_ino},{title:"inode保护模式",value:r.value.st_mode},{title:"inode驻留设备",value:r.value.st_dev}]},v=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,b({title:"恢复历史文件",content:"是否恢复历史文件 ".concat(y(r.value.st_mtime),"?恢复历史文件后,当前文件内容将会被替换!")});case 1:l({loading:"正在恢复历史文件,请稍后...",request:Rt({filename:"".concat(r.value.path,"/").concat(r.value.name),history:t.st_mtime}),success:function(e){e.data.status?(d.success("恢复成功"),a()):d.error("恢复失败")}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),h=fe({owner:[],group:[],public:[],auth:0,user:"root",isDir:!0,checkNumber:""}),m=function(){var e=c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ve({filename:"".concat(r.value.path+"/"+r.value.fileName)});case 1:(t=e.v).status?(n=t.data,h.auth=n.chmod,h.user=n.chown,g(Number(n.chmod))):d.error(t.msg);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),g=function(e){256&(e=parseInt(e.toString(),8))?h.owner.push("r"):h.owner=h.owner.filter(function(e){return"r"!==e}),128&e?h.owner.push("w"):h.owner=h.owner.filter(function(e){return"w"!==e}),64&e?h.owner.push("x"):h.owner=h.owner.filter(function(e){return"x"!==e}),32&e?h.group.push("r"):h.group=h.group.filter(function(e){return"r"!==e}),16&e?h.group.push("w"):h.group=h.group.filter(function(e){return"w"!==e}),8&e?h.group.push("x"):h.group=h.group.filter(function(e){return"x"!==e}),4&e?h.public.push("r"):h.public=h.public.filter(function(e){return"r"!==e}),2&e?h.public.push("w"):h.public=h.public.filter(function(e){return"w"!==e}),1&e?h.public.push("x"):h.public=h.public.filter(function(e){return"x"!==e}),h.owner=Array.from(new Set(h.owner)),h.group=Array.from(new Set(h.group)),h.public=Array.from(new Set(h.public))},w=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:if(!((t=h.auth.toString()).length>3)){e.n=1;break}return d.error("请输入正确权限"),e.a(2);case 1:if(!h.checkNumber.match(/\D/g)){e.n=2;break}return d.error("请输入正确权限"),e.a(2);case 2:if(!t.match(/\D/g)){e.n=3;break}return d.error("请输入正确权限"),e.a(2);case 3:for(;t.length<3;)t="0"+t;return e.n=4,l({loading:"正在设置文件权限,请稍后...",request:Ot({filename:"".concat(r.value.path,"/").concat(r.value.name),user:h.user,access:t,all:h.isDir?"True":"False"}),message:!0,success:a});case 4:e.v.status||setTimeout(function(){m()},500);case 5:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{activeName:i,fileItem:r,load:o,getFileItem:s,$reset:function(){f.value=[],Object.assign(h,{owner:[],group:[],public:[],auth:0,user:"root",isDir:!0,checkNumber:""})},attrList:f,watchFileItem:p,showHistory:function(e){},recoverHistory:v,checkList:h,ownerOptions:[{label:"root",value:"root"},{label:"www",value:"www"},{label:"mysql",value:"mysql"}],checkNumber:function(e){h.checkNumber=e;var t=String(e).replace(/[^\d]/g,"").slice(0,3);h.auth=t,g(Number(h.auth))},changeUser:function(e){h.user=e},setFileAuths:w,reversePermission:function(){var e=0,t=function(t,n,a,r){t.includes("r")&&(e|=n),t.includes("w")&&(e|=a),t.includes("x")&&(e|=r)};for(t(h.owner,256,128,64),t(h.group,32,16,8),t(h.public,4,2,1),h.auth=e.toString(8);h.auth.length<3;)h.auth="0"+h.auth},getFileAuths:m}})),Kr=t("aO",le("FILES-RECYCLE-BIN-STORE",function(){var e,t,a=$u(),i=de(a).recyclingBinStatus,o=a.getRealTask,s=$("all"),f=$(!1),p=$(null),v=$(null),g=fe({data:{},status:!1,statusDB:!1,type:"all",p:1,limit:10,search:"",time:[]}),w=$(),k=$(!1),_=function(){var e=c(u().m(function e(t,n){return u().w(function(e){for(;;)switch(e.n){case 0:if(s.value=t,M.p=1,E.value=[],D.value="",g.type=s.value,g.time=[],g.search="","db"!==t){e.n=2;break}return K.value="all",e.n=1,q({type:"db"});case 1:e.n=3;break;case 2:return K.value=t,e.n=3,q({type:t});case 3:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),C=function(){var e,t,n,a,r,i="db"===s.value;w.value={list:(null===(e=g.data)||void 0===e?void 0:e.list)||[],type:i||"db"!==g.type?g.type||"db":K.value,num:void 0===(null===(t=g.data)||void 0===t?void 0:t.search_num)?null===(n=g.data)||void 0===n?void 0:n[i?s.value:K.value]:null===(a=g.data)||void 0===a?void 0:a.search_num,size:(null===(r=g.data)||void 0===r?void 0:r.all_size)||0},x.value=i?g.statusDB:g.status},L=function(){var e=c(u().m(function e(t){var a,r,o,l=arguments;return u().w(function(e){for(;;)switch(e.n){case 0:return a=!(l.length>1&&void 0!==l[1])||l[1],t&&t.time_search&&(g.time=t.time_search),t&&t.search?g.search=t.search:t&&""===t.search&&(g.search=""),t&&t.type&&(g.type=t.type),r=n({type:g.type,p:g.p,limit:g.limit,search:g.search,time_search:g.time},t),a&&(f.value=!0),e.n=1,qt(r);case 1:o=e.v,f.value=!1,g.data=o.data,g.status=o.data.status,i.value=o.data.status,g.statusDB=o.data.status_db,C();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),x=$(!1),E=$([]),T=$(""),D=$(""),N=$(!1),F=fe({resultData:[],resultColumn:[{label:"数据库",prop:"file"}],resultTitle:""}),I=$(),R=fe({disabledDate:function(e){var t=new Date;t.setHours(23,59,59,999);var n=t.getTime();return e.getTime()>n}}),O=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:return n={},t&&(n.db=1),e.n=1,At(n);case 1:a=e.v,d.request(a.data),L();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=c(u().m(function e(){var t,n,a,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=null,e.p=1,e.n=2,b({title:"清空回收站",type:"input",input:{content:"清空回收站"},isHtml:!0,content:'<span class="text-[red]">清空回收站后,回收站'.concat("db"===s.value?"【所有数据库】":"【所有暂存文件】","将彻底消失,无法恢复,是否继续操作?</span>")});case 2:return t=d.load("正在清空回收站,请稍候..."),e.n=3,jt({type:"db"===s.value?"db":"files"});case 3:n=e.v,(a=n.fail_list)&&(null==a?void 0:a.length)>0&&"db"===s.value?(r=a.map(function(e){return{file:e}}),F.resultData=r,F.resultTitle=n.msg,k.value=!0,N.value=!0):d.request(n),o(),q(),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t&&t.close(),e.f(5);case 6:return e.a(2)}},e,null,[[1,4,5,6]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,jt({type:"db",force:1});case 1:t=e.v,d.request(t),o(),L(),N.value=!1;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),P=$(),M=fe({loading:!1,p:1,limit:10}),z=function(){var e=c(u().m(function e(t,n){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return a="db"===w.value.type?"数据库":"文件",e.n=1,b({title:"删除".concat(a),type:"input",input:{content:"删除".concat(a)},isHtml:!0,content:"风险操作,删除后,".concat(a,"将彻底消失,无法恢复,是否继续操作?")});case 1:return e.n=2,l({loading:"正在批量删除,请稍后...",request:Bt({path_list:t.map(function(e){return e.rname})}),success:function(e){var t=[];e.success.forEach(function(e){t.push({name:e,msg:"删除成功",status:!0})}),Object.keys(e.error).forEach(function(n){t.push({name:n,msg:e.error[n],status:!1})}),Gu({resultData:t,resultTitle:"删除"}),n(),q()}});case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),q=function(){var e=c(u().m(function e(t){var a,r,i=arguments;return u().w(function(e){for(;;)switch(e.n){case 0:return a=!(i.length>1&&void 0!==i[1])||i[1],r="","db"===s.value?(K.value="all",r="db"):r=K.value,e.n=1,L(n({p:M.p,limit:M.limit,type:r},t),a);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if("db"!==w.value.type){e.n=3;break}return e.n=1,b({title:"恢复数据库".concat(t.name),content:"您确定要恢复数据库【".concat(t.name,"】,是否继续?")});case 1:return e.n=2,l({loading:"正在恢复数据库,请稍后...",request:Pt({path:t.rname}),message:!0,success:function(e){e.status&&q()}});case 2:e.n=4;break;case 3:Y.value=t,m({title:"恢复文件".concat(t.name),area:41,btn:"确定",component:function(){return h(function(){return r.import("./index-legacy227.js?v=1765440387")},void 0,r.meta.url)},onConfirm:te});case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:return n="db"===w.value.type?"数据库":"文件",e.n=1,b({title:"删除".concat(n).concat(t.name),type:"input",input:{content:"删除".concat(n)},content:"风险操作,删除后,".concat(n,"将彻底消失,无法恢复,是否继续操作?")});case 1:return e.n=2,l({loading:"正在删除,请稍后...",request:Mt({path:t.rname}),success:function(e){1===e.tag?(F.resultData=[{file:t.rname}],F.resultTitle=e.msg,k.value=!1,N.value=!0):(d.request(e),q())}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:if(!k.value){e.n=1;break}return j(),e.a(2);case 1:return e.n=2,Mt({path:F.resultData[0].file,force:1});case 2:t=e.v,d.request(t),N.value=!1,q();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,zt({name:t.name,rname:t.rname});case 1:n=e.v,(a=n.data).status?window.open("/download?filename=".concat(a.msg.path)):d.error(a.msg);case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),W=function(){var e=c(u().m(function e(t){var n,a,r,i;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,zt({name:t.name,rname:t.rname});case 1:if(n=e.v,"string"!=typeof(a=n.data).msg||!a.msg.includes("找不到文件")){e.n=2;break}return d.error("当前文件不可预览"),e.a(2);case 2:r=a.msg.file.nm.split(".").pop(),"images"===hu(r)?(i={path:a.msg.path},Mi(i)):wu(a.msg);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),U=$([ln({key:"rname"}),{label:"文件名",prop:"fileName",minWidth:150,render:function(e){return re("span",{class:"flex items-center"},[re("span",{class:["icon-bg",e.is_dir?"folder-icon":Object.keys(di).includes(vu(e.name,"file"))?di[vu(e.name,"file")]+"-icon":"file-icon"]},null),re("span",{class:"truncate w-[26rem]"},[e.name])])}},{label:"原位置",prop:"dname",showOverflowTooltip:!0,render:function(e){return re("span",{class:"truncate"},[e.dname])}},{label:"大小",width:90,render:function(e){return S(e.size)}},{label:"删除时间",width:145,render:function(e){return y(e.time)}},cn([{title:"下载",isHide:function(e){return e.is_dir},onClick:G},{title:"查看",isHide:function(e){return e.is_dir},onClick:W},{title:"恢复",onClick:B},{title:"删除",onClick:H}])]),J=[{label:"恢复",value:"recover",event:(t=c(u().m(function e(t,n,a,r,i){var o;return u().w(function(e){for(;;)switch(e.n){case 0:return o=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Pt({path:t.rname});case 1:return e.a(2,e.v)}},e)}));return function(t){return e.apply(this,arguments)}}(),e.n=1,t({title:"批量恢复",content:"批量恢复选中后,被删除将会恢复,是否继续操作?",column:[{prop:"rname",label:"名称"},sn()],onConfirm:function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n(o);case 1:return q(),e.a(2,!1)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)})),function(e,n,a,r,i){return t.apply(this,arguments)})},{label:"删除",value:"delete",event:(e=c(u().m(function e(t,n,a,r,i){return u().w(function(e){for(;;)switch(e.n){case 0:z(a.value,i);case 1:return e.a(2)}},e)})),function(t,n,a,r,i){return e.apply(this,arguments)})}],K=$("all"),Y=$(),X=fe({type:"before",path:""}),Q=$(!1),Z=$(),ee=fe({path:[{validator:function(e,t,n){""===t&&"path"===X.type?n(new Error("请选择恢复目录")):n()},trigger:["blur"]}]}),te=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Z.value.validate();case 1:return e.n=2,l({loading:Q,request:Pt({path:Y.value.rname,rpath:"path"===X.type?"".concat(X.path,"/").concat(Y.value.name):Y.value.dname}),message:!0,success:function(e){e.status&&q()}});case 2:return t=e.v,e.a(2,t.status)}},e)}));return function(){return e.apply(this,arguments)}}();return{activeName:s,loading:f,binData:g,compData:w,watchBinData:C,handleTabChange:_,statusSwitch:x,time:E,popupData:F,showPopup:N,searchName:D,pickerOptions:R,formatDate:T,onCancel:function(){N.value=!1},showPlayer:function(){I.value.focus()},cleanBin:A,clearTime:function(){E.value=[]},setStatus:O,goSearch:function(){L({search:D.value})},changeClearCheck:j,watchTime:function(){var e,t={time_search:[]};2===(null===(e=E.value)||void 0===e?void 0:e.length)?(E.value[0]=new Date(E.value[0]).setHours(0,0,0,0),E.value[1]=new Date(E.value[1]).setHours(23,59,59,0),t.time_search=JSON.stringify([E.value[0]/1e3,E.value[1]/1e3])):(T.value="",t.time_search=JSON.stringify([])),L(t,!1)},dbTableRef:p,tableRef:P,fileTableRef:v,tableData:M,tableColumn:U,tableBatchOptions:J,deleteClearCheck:V,refresh:q,tabActive:K,config:[{type:"all",label:"全部",icon:"svgtofont-left-soft"},{type:"dir",label:"文件夹",icon:"svgtofont-left-files"},{type:"file",label:"文件",icon:"svgtofont-file-text"},{type:"image",label:"图片",icon:"svgtofont-icon-term"},{type:"ont_text",label:"文档",icon:"svgtofont-el-document"}],toggleType:function(e){M.p=1,K.value=e,q({type:e},!1)},rowData:Y,isCmdLoading:Q,cmdForm:X,cmdFormRef:Z,cmdRules:ee,openFile:function(){nn({type:"dir",change:function(e){X.path=e}})},clearSpace:function(e){X.path=X.path.replace(/\s+/g,"")},init:function(){g.type=s.value,_(s.value)},$reset:function(){s.value="all",f.value=!1,Object.assign(g,{data:{},status:!1,statusDB:!1,type:"all",p:1,limit:10,search:"",time:[]}),x.value=!1,E.value=[],T.value="",D.value="",N.value=!1,Object.assign(F,{resultData:[],resultColumn:[{label:"数据库",prop:"file"}],resultTitle:""}),Object.assign(M,{loading:!1,p:1,limit:10}),K.value="all"},$resetCmdForm:function(){Q.value=!1,Object.assign(X,{type:"before",path:""})}}})),Yr=t("j",le("FILES-LIST-VIEW-STORE",function(){var e=$u(),t=de(e),n=t.mainHeight,r=t.authType,i=t.fileTabActiveData,o=t.navBtnHeight,l=t.imageList,s=t.imgPathItem,f=t.isNoCreteItem,p=t.createListType,v=t.globalTamperStatus,h=t.dataList,m=t.fileBatchNum,g=t.diskAnalysis,y=e.refreshFilesList,w=e.watchCreateListType,k=e.watchDeleteFileData,S=window.location.protocol+"//"+window.location.host+"/download?filename=",_=$([{label:"文件名称",id:"fileName",width:"42",sort:"",sortable:!0,class:"cursor-pointer"},{label:"企业级防篡改",width:"12"},{label:"权限/所有者",width:"15"},{label:"大小",width:"10",id:"size",sort:"",sortable:!0,class:"cursor-pointer"},{width:"16",label:"修改时间",id:"time",sort:"",sortable:!0,class:"cursor-pointer"},{label:"备注",width:"20"},{label:"操作",type:"operation",width:"30.4",class:"custom-operate custom-operate-head",style:{"justify-content":"flex-end","padding-right":" 2.8rem",display:"flex",position:"sticky",right:0,background:"#F6F6F6",flex:1}}]),C=$(null),L=$(!1),x=$(null);pe([]);var E=$([]),T=$(!1),D=$([]),N=$(0),O=$(!0),A=$(null),j=$(0),P=$(0),M=function(){var e=c(u().m(function e(t){var n,a,r;return u().w(function(e){for(;;)switch(e.n){case 0:if(!Ki(t.fileName)){e.n=1;break}return d.error('文件名不能包含以下字符:\\ / : * ? " < > |'),t.isReName=!0,f.value=!0,e.a(2);case 1:if(f.value=!1,!t.isNew){e.n=6;break}if(p.value="",w(""),""!==t.fileName){e.n=2;break}return k(t),e.a(2);case 2:return e.n=3,ze({path:Yi(t.fileName),type:t.type});case 3:if(!(n=e.v).status){e.n=5;break}return e.n=4,y();case 4:t.isReName=!1,"file"===t.type&&setTimeout(function(){var e=h.value.find(function(e){return e.fileName===t.fileName});e&&ku(e)},100);case 5:k(t),d.request(n),e.n=9;break;case 6:if(t.fileName!==t.oldName){e.n=7;break}return t.isReName=!1,e.a(2);case 7:return a=d.load("正在重命名,请稍候..."),e.n=8,qe({sfile:Yi(t.oldName),dfile:Yi(t.fileName),rename:!0});case 8:r=e.v,a.close(),r.status?(t.isReName=!1,d.success(r.msg)):d.error(r.msg),y();case 9:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),z=function(e){M(e)},q=function(){var e=c(u().m(function e(t,n){return u().w(function(e){for(;;)switch(e.n){case 0:if(!n.isOsPs){e.n=1;break}return e.a(2);case 1:t.target.children[1].contains(document.activeElement)||(n.isPsEdit=!1);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),B=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:if(t.ps===t.oldPs){e.n=2;break}return n=d.load("正在设置备注,请稍候..."),e.n=1,Ht({filename:t.path,ps_type:0,ps_body:t.ps});case 1:(a=e.v).status?(t.isPsEdit=!1,d.success(a.msg)):d.error(a.msg),n.close(),e.n=3;break;case 2:t.isPsEdit=!1;case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),H=null,V=function(e){var t=Array.from(e.target.classList);return!(t.includes("checkbox--icon")||t.includes("size-link")||t.includes("svgtofont-el-loading")||t.includes("el-input__inner"))},G=function(){var e=c(u().m(function e(t,n){var a,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a={top:"置顶",favorite:"收藏",share:"分享"},e.p=1,!("share"!=n)){e.n=2;break}return e.n=2,b({title:"提示",isHtml:!0,content:"取消【".concat(t.fileName,"】的").concat(a[n],",是否继续?")});case 2:r=n,e.n="top"===r?3:"favorite"===r?4:"share"===r?5:6;break;case 3:return lu(t,t.isTop?"unset":"set"),e.a(3,6);case 4:return ou(t,function(){return t.isFav=!1}),e.a(3,6);case 5:return _i(t),e.a(3,6);case 6:e.n=8;break;case 7:e.p=7,e.v;case 8:return e.a(2)}},e,null,[[1,7]])}));return function(t,n){return e.apply(this,arguments)}}(),W=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:if("ltd"!==r.value){e.n=6;break}if(!v.value.status){e.n=1;break}qi(t),e.n=5;break;case 1:return e.n=2,F({sName:"tamper_core"});case 2:if(n=e.v,(a=n.data).setup){e.n=4;break}return e.n=3,rn({name:a.name,type:"i",pluginInfo:a});case 3:e.n=5;break;case 4:I(v.value.tip)?d.error("企业级防篡改未安装或版本较低,请检查插件状态。"):d.error("“".concat(v.value.tip,"”请前往【企业级防篡改】启动服务。"));case 5:e.n=7;break;case 6:un({sourceId:71});case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),U=null,J={top:0,left:0},Y={top:0,left:0},X=0,Q=function(e){if(2!==e.button&&!e.target.closest(".el-input__inner")){var t=document.getElementById("drugBox");if(t&&t.remove(),U){var n=U.getBoundingClientRect().top,a=U.getBoundingClientRect().left;J={top:e.clientY-n,left:e.clientX-a}}document.addEventListener("mousemove",Z),document.addEventListener("mouseup",ee)}},Z=function(e){var t=document.getElementById("drugBox");if(t&&t.remove(),U){var n,r=U.getBoundingClientRect().top,i=U.getBoundingClientRect().left;Y={top:e.clientY-r>0&&e.clientY-r<U.offsetHeight?e.clientY-r:e.clientY-(r+U.offsetHeight)>1?U.offsetHeight:0,left:e.clientX-i>0&&e.clientX-i<U.offsetWidth?e.clientX-i:e.clientX-(i+U.offsetWidth)>1?U.offsetWidth:0};var u=(null===(n=U)||void 0===n?void 0:n.scrollTop)||0,o={top:Y.top>J.top?J.top+u:Y.top+u,left:Y.left>J.left?J.left:Y.left},l=Math.min(Math.abs(Y.left-J.left),i+U.offsetWidth-o.left),c=Math.min(Math.abs(Y.top-J.top),r+U.offsetHeight-o.top+u);if(e.clientY-r<0){var s=Math.abs(e.clientY-r);U.scrollTop-=s,0!=U.scrollTop&&(X+=s),c+=X}if(e.clientY-(r+U.offsetHeight)>1){var f=e.clientY-(r+U.offsetHeight);U.scrollTop+=f,U.scrollHeight-U.scrollTop!=U.clientHeight&&(X+=f),c+=X,o.top-=X}if(J.top==Y.top||J.left==Y.left)return!0;var p=document.createElement("div");p.classList.add("absolute","border","top-0","border-[#072246]","bg-[#cce8ff]","opacity-[0.15]","overflow-hidden"),p.id="drugBox",U.appendChild(p),p.style.left=o.left+"px",p.style.top=o.top+"px",p.style.width=l+"px",p.style.height=c+"px";var v=document.getElementById("drugBox");if(U&&v){var d=v.offsetTop,m=v.offsetTop+v.offsetHeight,g=[];ne.value.forEach(function(e,t){var n=e.offsetTop,a=e.offsetTop+e.offsetHeight,r=h.value[t];a>=d&&n<=m&&g.push(r.path)});var b=new Set(g),y=new Set(E.value);b.size===y.size&&a(b).every(function(e){return y.has(e)})||(E.value=a(b),fe()),E.value.length>0&&E.value.length===h.value.length?ie.value=!0:ie.value=!1}}},ee=function(e){e.preventDefault(),e.stopPropagation(),document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",ee);var t=document.getElementById("drugBox");t&&t.remove()},te=function(e){E.value=e.map(function(e){return e.path}),fe()},ne=$([]),ae=function(){ne.value=[];for(var e=0;e<h.value.length;e++)ne.value.push({offsetTop:36*e,offsetHeight:36});ne.value.length&&(P.value=ne.value[ne.value.length-1].offsetTop,P.value<=n.value-(o.value||64)-266?O.value=!1:O.value=!0)},re=function(){K(function(){for(var e=function(){var e=l.value[t];h.value.forEach(function(t){t.fileName===e[0]&&e[1]&&(t.isSmallImage=e[1])})},t=0;t<l.value.length;t++)e();D.value=h.value.filter(function(e){return void 0!==e.isSmallImage}).map(function(e){return"".concat(S).concat(e.path)})})},ie=$(!1),ue=function(e){var t;(2===e.button&&"INPUT"===e.target.tagName&&e.preventDefault(),e.target.closest(".scrollTable")||e.target.closest(".v-contextmenu"))||(null===(t=C.value)||void 0===t||t.hide())},oe=$(0),le=$(null),ce=$(null),se=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,F({sName:"disk_analysis"});case 1:((t=e.v).data.status||"ltd"===r.value)&&rn({name:t.data.name,type:"i",pluginInfo:t.data,softData:t.data}),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=h.value.filter(function(e){return E.value.includes(e.path)});m.value=e},ve=function(){K(function(){var e;null===(e=U=document.querySelector(".scrollTable"))||void 0===e||e.addEventListener("mousedown",Q)})};return{mainHeight:n,authType:r,diskAnalysis:g,headData:_,dataList:h,selectList:E,fileBatchNum:m,checkedAll:ie,imgPathItem:s,imgIndex:N,showViewer:T,imgList:D,scrollHeight:j,scrollHeightBottom:P,isShowShadow:O,context:C,contextRow:x,isBatch:L,scrollRef:A,imageList:l,navBtnHeight:o,fileTabActiveData:i,bindMouseDown:ve,buyPlugin:function(){g.value.isBuy||"ltd"===r.value?se():un({sourceId:140,disablePro:!0})},clickName:function(e){if("dir"===e.type)Qi(e.path);else{var t={"查看图片":["jpg","png","gif","jpeg"],"播放视频":["mp4","avi","mov","rmvb","rm","flv","3gp","wmv","mkv","mpeg","mpg","ts","webm","vob","swf"],"解压文件":["zip","rar","gz","war","tgz","7z","tar.gz","tar"],"播放音频":["mp3","wav","wma","ogg","ape","flac","aac","m4a"]},n=e.ext,a="查看文档";for(var r in t)if(t[r].includes(n)){a=r;break}H&&H.close(),H=d.msg({customClass:"no-icon !z-10",message:"双击".concat(a),type:"info"})}},handleBlurCheck:function(){var e=h.value.find(function(e){return e.isReName});z(e)},handleEvent:function(e,t){var n;if(null===(n=C.value)||void 0===n||n.hide(),!(R()&&e instanceof MouseEvent)){var a,r,i=(new Date).getTime(),u=i-oe.value;u<300&&u>0&&ce.value===t?(null!==le.value&&clearTimeout(le.value),a=e,r=t,H&&H.close(),V(a)&&(r.isPs||r.isReName||ku(r))):(ce.value=t,le.value=window.setTimeout(function(){!function(e,t){var n=Array.from(e.target.classList);V(e)&&(n.includes("fileName")||(E.value=[t.path],fe()))}(e,t)},300)),oe.value=i}},handleRightClick:function(e,t){var n;e.preventDefault(),e.stopPropagation();var a,r=t?t.path:null;if((t&&(a=r,!E.value.find(function(e){return e===a}))||0===e.button)&&(E.value=[],E.value.push(r),fe()),E.value.length>1&&t&&2===e.button){var i;L.value=!0;var u=[];return h.value.forEach(function(e){E.value.includes(e.path)&&u.push(e)}),x.value=u,void(null===(i=C.value)||void 0===i||i.show(e))}L.value=!1,x.value=t||null,t||(E.value=[],fe()),null===(n=C.value)||void 0===n||n.show(e)},handleCheckFile:function(e){new Set(E.value).has(e.path)?E.value=E.value.filter(function(t){return t!==e.path}):E.value.push(e.path),ie.value=E.value.length===h.value.length,fe()},handleCheckAll:function(e){te(e?h.value:[]),ie.value=e},handleFileLock:W,handleEnPsView:function(e){e.isOsPs||(e.oldPs=e.ps,e.isPsEdit=!0)},handleLvPsView:q,handleSetPs:B,handleReName:function(e){e.oldName=e.fileName,e.isReName=!0},openImgView:function(e){N.value=D.value.findIndex(function(t){return t==="".concat(S).concat(e.path)}),T.value=!0},opearationIconClick:G,onReNameKeyup:z,sortTable:function(e){e.sortable&&(_.value.forEach(function(t){t.id!==e.id&&(t.sort="")}),"asc"===e.sort?e.sort="desc":"desc"===e.sort?e.sort="":e.sort="asc",i.value.param.sort=""!=e.sort?e.id:"",i.value.param.reverse="asc"==e.sort?"False":"True",y())},calcFileListHeightFn:ae,setSmallImage:re,closeImgPreView:function(){T.value=!1},findCurrentImgIndex:function(e){N.value=D.value.findIndex(function(t){return t===e}),T.value=!0},watchDataList:function(e){E.value=[],ie.value=!1,e.length&&(ae(),re()),fe(),K(function(){var e;null===(e=A.value)||void 0===e||e.scrollToPosition(0)})},init:function(){var e;ae(),ve(),A.value.$el.addEventListener("scroll",function(){j.value=A.value.$el.scrollTop+(n.value-(o.value||64)-266),0===A.value.$el.scrollTop&&(j.value=0)}),(e=_.value.find(function(e){return e.id===i.value.param.sort}))&&(e.sort="False"==i.value.param.reverse?"asc":"desc"),document.addEventListener("mousedown",ue)},$reset:function(){var e;null===(e=U)||void 0===e||e.removeEventListener("mousemove",Z),document.removeEventListener("mousedown",ue)},calcFileListHeight:ne,watchSelectListLength:fe}})),Xr=le("FILES-ACE-MOBILE-STORE",function(){var e,t,n=v().mainHeight,a=$(),r=$(),i=$(null),o=function(e,t){if(cr(e),t){var n=t.currentTarget||t.currentTarget,a=i.value,r=a.offsetWidth,u=n.offsetLeft-r/2+n.offsetWidth/2;a.scroll({left:u,behavior:"smooth"})}},l=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:or(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),s=function(e){e.preventDefault();var t=e.deltaY;i.value.scrollLeft+=t},f=$(),p=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Pa();case 1:return e.n=2,qa(t);case 2:wa.value=e.v;case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,p(f.value);case 1:if(!a){e.n=2;break}return e.n=2,ir({title:a.value.fileName,type:"editor",path:a.value.path,size:a.value.size});case 2:return e.n=3,Be({name:a.value.fileName,path:a.value.path});case 3:return e.n=4,Oa();case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),m=$(!1),g=$(null),b=$(!1),y=$(null),w=$([{title:"保存",icon:"svgtofont-el-select",click:function(){_()&&dr(Sa)}},{title:"全部保存",icon:"svgtofont-icon-minmax-black",click:function(){_()&&br()}},{title:"刷新",icon:"svgtofont-el-refresh-right",click:(t=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:_()&&ur(Sa,!0);case 1:return e.a(2)}},e)})),function(){return t.apply(this,arguments)})},{title:"搜索",icon:"svgtofont-el-search",click:function(){_()&&wa.value.execCommand("find")}},{title:"替换",icon:"svgtofont-icon-log",click:function(){_()&&wa.value.execCommand("replace")}},{title:"文件足迹",icon:"svgtofont-left-crontab",click:function(){ji()}},{title:"退出",icon:"svgtofont-el-close",click:function(){S()}}]),k=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:va(),Aa(),P();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),S=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,yr();case 1:return e.v?Ui(k):(localStorage.removeItem("aceEditor"),pr(),k()),e.a(2,!1)}},e)}));return function(){return e.apply(this,arguments)}}(),_=function(){return!(!Qa()||"custom"===Sa.type)||(d.error("当前页面不支持该操作"),!1)},C=$(null),L=$({}),x=function(){var e=c(u().m(function e(t,n){return u().w(function(e){for(;;)switch(e.n){case 0:oa(t,n,a.value);case 1:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),E=function(e){var t=na.value.getNode(e);t&&e.isNew&&na.value.remove(t),t&&e.isReName&&(e.isReName=!1),ea.value=!1},T=function(e,t){E(L.value),la(e,t,C)},D=function(e){return La.value.some(function(t){return t.path===e.path})?"text-[#cca700]":""},N=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:K(function(){var e=(a.value.path||"/www").split("/");e.pop(),Kn.value=e.join("/")});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),F=$("btn"),I=$(!1),R=$(""),O=$([]),A=$(""),j=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ua(Kn.value,R.value,I.value?"True":void 0);case 1:if(t=e.v,ta.value=!1,t){e.n=2;break}return e.a(2);case 2:Yn.value=t,ia();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=c(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.value;case 1:null==(t=e.v)||t.unmount();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return{fileItem:a,instance:r,tabsElement:i,changeTab:o,getDataChangeTab:function(){K(function(){var e=La.value[La.value.length-1],t=i.value.children[La.value.length-1];o(e.id,{currentTarget:t})})},closeTab:l,initHeader:function(){K(function(){i.value.addEventListener("wheel",s)})},$resetHeader:function(){i.value&&i.value.removeEventListener("wheel",s)},editorRef:f,mainHeight:n,createEditorView:p,initContent:h,isShow:m,dropdownMenu:g,handleClickOutside:function(e){g.value&&!g.value.contains(e.target)&&(m.value=!1)},isShowTool:b,dropdownMenuRef:y,column:w,checkOperationAvailable:_,handleClickOutsideEvent:function(e){y.value&&!y.value.contains(e.target)&&(b.value=!1)},openPopup:function(e){Qa?(b.value=!1,e.click()):d.error("当前页面不支持该操作")},treeProps:{label:"fileName",key:"path",isLeaf:"isFile"},loadNode:x,renderTree:function(e,t){t.node;var n=t.data,a=(t.store,Ka(n.fileName).mode),r=[e("span",{class:(n.isFile?"ace-".concat(a,"-icon ace-text-icon"):"ace-folder-icon")+" icon-editor-left",style:{"font-size":"4rem"}}),n.isReName?e():e("span",{class:"el-tree-node__label "+D(n),attrs:{title:n.fileName}},n.fileName)];return e("span",{class:"flex items-center ".concat(n.isReName?"newFiles":"defaultFiles"),on:{contextmenu:function(e){e.preventDefault(),T(e,n)}}},r)},handleExpandChange:function(e){null!=e&&e.path&&!Zn.value.includes(e.path)&&Zn.value.push(e.path)},handleCollapseChange:function(e){var t=Zn.value.indexOf(null==e?void 0:e.path);-1!==t&&Zn.value.splice(t,1),E(L.value)},initList:N,type:F,isCheck:I,searchValue:R,changeValue:function(e){Zn.value.length=0,R.value="","search"===e?(O.value=Yn.value,A.value=Kn.value,Yn.value=[],ta.value=!0):(Yn.value=O.value,Kn.value=A.value)},searchFile:j,closeSearch:function(){F.value="btn",ia()},close:P,init:function(){K(function(){e=setInterval(function(){var e=document.querySelector(".el-overlay-dialog"),t=null==e?void 0:e.querySelector(".el-dialog__body");t&&(e&&(e.style.alignItems="flex-start",e.style.paddingTop="1vh",e.style.paddingBottom="1vh"),t.style.maxHeight="90vh",t.style.height="auto",t.style.overflowY="auto",t.style.WebkitOverflowScrolling="touch")},1e3)})},$reset:function(){clearInterval(e)}}}),Qr={class:"dialog-btn-group"},Zr=["title","data-state"],ei={class:"bt-dialog-content"},ti={key:1,class:"bt-dialog-footer"},ni=Y({__name:"index",props:{title:{type:[String,Boolean],default:!1},area:{default:function(){return["40%","40%"]}},modal:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},component:{default:""},compData:{default:function(){return{}}},fullscreen:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},zIndex:{default:999},customClass:{default:""},closeBtn:{default:"one"},onClose:{type:Function,default:function(){}},onCancel:{type:Function,default:function(){}},onConfirm:{type:Function,default:function(){}},cancelText:{default:"取消"},confirmText:{default:"确定"}},setup:function(t){var n=t,r=$(),i=$(!1),u=$(!1),o=$(n.fullscreen),l=$({x:0,y:0}),c=$({x:!1,y:!1}),s=$([0,0]),f=$({x:0,y:0}),p=$(!1),v=$(!1),h=$([0,0]),d=ke(function(){var t=e(n.area,2),a=t[0],r=t[1];return p.value?["100%","100%"]:v.value?["300px","44px"]:[a,r].map(function(e){return"number"==typeof e?"".concat(e,"rem"):e})}),m=ke(function(){return p.value?{x:0,y:0}:v.value?i.value?c.value:{x:"190px",y:"90%"}:c.value}),g=ke(function(){return o.value||u.value?"two":n.closeBtn}),b=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=r.value,n=t.clientWidth,a=t.clientHeight,i=(window.innerWidth-n)/2,u=(window.innerHeight-a)/2;c.value={x:"".concat(i,"px"),y:"".concat(u,"px")},e&&(s.value=[n,a],h.value=[s.value[0],s.value[1]])},y=function(e){if(!p.value){var t=e.clientX,n=e.clientY,a=r.value.getBoundingClientRect();if(!i.value&&v.value){var u=a.left,o=a.top;f.value={x:u,y:o},c.value={x:"".concat(u,"px"),y:"".concat(o,"px")}}i.value||(i.value=!0);var s=t-a.left,h=n-a.top,d=function(e){var t=e.clientX-s,n=e.clientY-h,r=window.innerWidth-a.width,i=window.innerHeight-a.height;t<0&&(t=0),n<0&&(n=0),t>r&&(t=r),n>i&&(n=i);var u=t-l.value.x,o=n-l.value.y;f.value={x:u,y:o},c.value={x:"".concat(u,"px"),y:"".concat(o,"px")}},m=function(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",m)}},w=function(e){v.value=!0,i.value=!1},k=function(e){p.value=!0},S=function(e){p.value=!1,v.value=!1,K(function(){b()})};return Se("fullData",_e(p)),Ce(function(){var e;b(!0),e=he(function(e){if(!p.value){var t=e[0].contentRect,n=t.height,a=t.width;if(u.value=n<=s.value[1],i.value){var r=a-(f.value.x+s.value[0]/2),o=n-(f.value.y+s.value[1]/2);r<0&&(f.value.x+=Number(r.toFixed(0)),c.value.x="".concat(f.value.x,"px")),o<0&&(f.value.y+=Number(o.toFixed(0)),c.value.y="".concat(f.value.y,"px"))}else b()}},100),Oe(document.body,e)}),function(e,i){var u=O;return ne(),Le(Re,{name:"dialog-fade"},{default:xe(function(){return[oe("div",{ref_key:"dialog",ref:r,class:Ee("bt-dialog-v2 ".concat(t.customClass)),style:Te({zIndex:t.zIndex,width:De(d)[0],height:De(d)[1],left:De(m).x,top:De(m).y})},[t.title?(ne(),ae("header",{key:0,class:"bt-dialog-header",onMousedown:y},[oe("span",null,Ne(t.title),1),oe("div",Qr,[De(v)||De(p)?Fe("",!0):(ne(),ae("span",{key:0,class:"icon",title:"最小化",onClick:ue(w,["stop","prevent"])},a(i[2]||(i[2]=[oe("i",{class:"svgtofont-el-semi-select"},null,-1)])))),De(p)||De(v)?Fe("",!0):(ne(),ae("span",{key:1,class:"icon",title:"全屏",onClick:ue(k,["stop","prevent"])},a(i[3]||(i[3]=[oe("i",{class:"svgtofont-icon-max-black"},null,-1)])))),De(p)||De(v)?(ne(),ae("span",{key:2,class:"icon",title:De(p)?"退出全屏":"恢复视图大小","data-state":De(p)?"fullscreen":"minimize",onClick:ue(S,["stop","prevent"])},a(i[4]||(i[4]=[oe("i",{class:"svgtofont-icon-minmax-black"},null,-1)])),8,Zr)):Fe("",!0),"one"===De(g)?(ne(),ae("span",{key:3,class:"ico-close-one",title:"关闭视图",onClick:i[0]||(i[0]=ue(function(){return t.onClose&&t.onClose.apply(t,arguments)},["stop","prevent"]))},a(i[5]||(i[5]=[oe("i",{class:"absolute w-3rem h-3rem top-0 left-0 origin-center close-popup-btn"},null,-1)])))):Fe("",!0),"two"===De(g)?(ne(),ae("span",{key:4,class:"icon",title:"关闭视图",onClick:i[1]||(i[1]=ue(function(){return t.onClose&&t.onClose.apply(t,arguments)},["stop","prevent"]))},a(i[6]||(i[6]=[oe("i",{class:"!text-[2.4rem] svgtofont-el-close icon-group"},null,-1)])))):Fe("",!0)])],32)):Fe("",!0),ee(oe("article",ei,[(ne(),Le(Ie(n.component)))],512),[[te,!De(v)]]),t.footer?ee((ne(),ae("footer",ti,[re(u,{onClick:t.onCancel},{default:xe(function(){return[ge(Ne(t.cancelText),1)]}),_:1},8,["onClick"]),re(u,{type:"primary",onClick:t.onConfirm},{default:xe(function(){return[ge(Ne(t.confirmText),1)]}),_:1},8,["onClick"])],512)),[[te,!De(v)]]):Fe("",!0)],6)]}),_:1})}}}),ai=A(ni,[["__scopeId","data-v-68933552"]]),ri=function(e){return _(e)?e.map(function(e){return P(e)&&(e="".concat(e,"rem")),M(e)&&e.match(/[A-z\%]+/)?e:"".concat(e,"rem")}):P(e)?["".concat(e,"rem")]:M(e)&&(e.includes("rem")||e.includes("px")||e.includes("vw"))?[e]:["".concat(e,"rem")]},ii=function(e){var t=e.confirmText,n=e.cancelText;return(null!=e&&e.footer||null!=e&&e.confirm)&&(t=t||"确认",n=n||"取消"),{footer:(null==e?void 0:e.footer)||!1,confirmText:t,cancelText:n}},ui=function(e,t){e.unmount(),t&&document.body.removeChild(t)},oi=function(e,t){z(e),q(e),document.body.appendChild(t),e.mount(t),e.directive("loading",je.directive)},li=function(e){if(e.modal){var t=document.createElement("div");t.classList.add("dialog-mask"),t.style.zIndex="999",document.body.appendChild(t)}},ci=function(){var e=c(u().m(function e(t){var a,r,i,o,l,s,f,p;return u().w(function(e){for(;;)switch(e.n){case 0:if(a=document.createElement("div"),r=ri(t.area),i=ii(t),o=i.footer,l=i.cancelText,s=i.confirmText,"function"!=typeof t.component){e.n=3;break}if(f=null==t?void 0:t.component(),!j(f)){e.n=2;break}return e.n=1,t.component();case 1:t.component=e.v.default,e.n=3;break;case 2:f.default?t.component=f.default:t.component=f;case 3:return p=Ae(ai,n(n({},t),{},{area:r,footer:o,cancelText:l,confirmText:s,modelValue:!0,onConfirm:function(){var e=c(u().m(function e(){var n;return u().w(function(e){for(;;)switch(e.n){case 0:if(null==t||!t.onConfirm){e.n=2;break}return e.n=1,null==t?void 0:t.onConfirm(p);case 1:return(n=e.v)&&ui(p,a),e.a(2,n);case 2:return ui(p,a),e.a(2,!0)}},e)}));return function(){return e.apply(this,arguments)}}(),onCancel:function(){t.onCancel&&t.onCancel(p),t.onClose&&t.onClose(p),t.onCancel||t.onClose||ui(p,a)},onClose:function(){t.onCancel&&t.onCancel(p),t.onClose&&t.onClose(p),t.onCancel||t.onClose||ui(p,a)}})),li(t),oi(p,a),e.a(2,p)}},e)}));return function(t){return e.apply(this,arguments)}}(),si=o(),fi=t("v",new Map([["/etc","PS: 系统主要配置文件目录"],["/home","PS: 用户主目录"],["/tmp","PS: 公共的临时文件存储点"],["/root","PS: 系统管理员的主目录"],["/home","PS: 用户主目录"],["/usr","PS: 系统应用程序目录"],["/boot","PS: 系统启动核心目录"],["/lib","PS: 系统资源文件类库目录"],["/mnt","PS: 存放临时的映射文件系统"],["/www","PS: 宝塔面板程序目录"],["/bin","PS: 存放二进制可执行文件目录"],["/dev","PS: 存放设备文件目录"],["/www/wwwlogs","PS: 默认网站日志目录"],["/www/server","PS: 宝塔软件安装目录"],["/www/wwwlogs","PS: 网站日志目录"],["/www/Recycle_bin","PS: 回收站目录,勿动"],["/www/server/panel","PS: 宝塔主程序目录,勿动"],["/www/server/panel/plugin","PS: 宝塔插件安装目录"],["/www/server/panel/BTPanel","PS: 宝塔面板前端文件"],["/www/server/panel/BTPanel/static","PS: 宝塔面板前端静态文件"],["/www/server/panel/BTPanel/templates","PS: 宝塔面板前端模板文件"],[B("backup_path"),"PS: 默认备份目录"],[B("sites_path"),"PS: 默认建站目录"]])),pi=t("T",$([{name:"收藏夹",ename:"favorite",callback:function(){return vi("favorite")}},{name:"文件分享",ename:"fileShare",callback:function(){return vi("fileShare")}},{name:"文件同步",ename:"fileSync",callback:function(){return vi("fileSync")}},{name:"企业级防篡改",ename:"tamperProof",callback:function(){return vi("tamperProof")}},{name:"文件内容搜索",ename:"fileSearch",callback:function(){return vi("fileSearch")}}])),vi=function(e){var t=$u().openPlugin;switch(e){case"favorite":wi();break;case"fileShare":ki();break;case"fileSync":t("rsync",70);break;case"tamperProof":t("tamper_core",75);break;case"fileSearch":bi()}},hi=["folder","folder-unempty","sql","c","cpp","cs","flv","css","js","htm","html","java","log","mht","php","url","xml","ai","bmp","cdr","gif","ico","jpeg","jpg","JPG","png","psd","webp","ape","avi","mkv","mov","mp3","mp4","mpeg","mpg","rm","rmvb","swf","wav","webm","wma","wmv","rtf","docx","fdf","potm","pptx","txt","xlsb","xlsx","7z","cab","iso","rar","zip","gz","war","bt","tgz","file","apk","bookfolder","folder-empty","fromchromefolder","documentfolder","fromphonefolder","mix","musicfolder","picturefolder","videofolder","sefolder","access","mdb","accdb","fla","doc","docm","dotx","dotm","dot","pdf","ppt","pptm","pot","xls","csv","xlsm","py","sh","json","lua","bt_split","bt_split_json"],di={sql:"sql",css:"css",js:"js",html:"html",java:"java",php:"php",xml:"xml",bmp:"bmp",cdr:"cdr",gif:"gif",ico:"ico",jpeg:"jpeg",jpg:"jpg",JPG:"jpg",png:"png",webp:"webp",avi:"avi",mkv:"mkv",mov:"mov",mp3:"mp4",mp4:"mp4",mpeg:"mpeg",mpg:"mpg",rm:"rm",rmvb:"rmvb",swf:"swf",webm:"webm",wma:"wma",wmv:"wmv","7z":"compress",rar:"compress",zip:"compress",gz:"compress",war:"compress",tgz:"compress","tar.gz":"compress",iso:"iso",apk:"apk",access:"access",doc:"doc",pdf:"pdf",ppt:"ppt",xls:"xls",bt_split:"split",bt_split_json:"join",javascript:"js",json:"json",log:"log",lua:"lua",py:"py",python:"py",recycle:"recycle",flac:"flac",sh:"sh"},mi={images:["jpg","jpeg","png","bmp","gif","tiff","ico","JPG","webp"],compress:["zip","rar","gz","war","tgz","7z","tar.gz","tar"],video:["mp4","mp3","mpeg","mpg","mov","avi","webm","mkv","mkv","mp3","rmvb","wma","wmv","flac","mov"],ont_text:["iso","xlsx","xls","doc","docx","tiff","exe","so","bz","dmg","apk","pptx","ppt","xlsb","pdf"]},gi=function(){var e=de(Ar()).instance;return e.value=m({title:"实时任务队列",area:51,component:function(){return h(function(){return r.import("./index-legacy228.js?v=1765440387")},void 0,r.meta.url)},modal:!1}),e.value},bi=t("b",function(){return m({title:"文件内容搜索",area:105,component:function(){return h(function(){return r.import("./index-legacy229.js?v=1765440387")},void 0,r.meta.url)}})}),yi=t("Q",function(){var e=Dr().onConfirm;return m({title:"创建软链接",area:50,btn:["确认","关闭"],component:function(){return h(function(){return r.import("./index-legacy230.js?v=1765440387")},void 0,r.meta.url)},onConfirm:e})}),wi=t("M",function(){var e=Nr(),t=de(e).instance;return t.value=m({title:"管理收藏夹",area:85,component:function(){return h(function(){return r.import("./index-legacy231.js?v=1765440387")},void 0,r.meta.url)}}),t.value}),ki=t("S",function(){return m({title:"分享列表",area:85,component:function(){return h(function(){return r.import("./index-legacy232.js?v=1765440387")},void 0,r.meta.url)}})}),Si=function(e){var t=qr(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"设置分享文件[ ".concat(e.fileName," ]"),area:45,btn:"生成外链",component:function(){return h(function(){return r.import("./index-legacy233.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})},_i=function(e,t){var a=qr(),i=de(a).compData,u=a.onConfirmDetail;return i.value=n(n({},e),{},{isShareList:t}),m({title:"外链分享-[".concat(e.path?e.path:e.filename,"]"),btn:"关闭分享外链",confirmBtnType:"danger",area:55,component:function(){return h(function(){return r.import("./detail-legacy.js?v=1765440387")},void 0,r.meta.url)},onConfirm:u})},Ci=function(e){var t=fn();return de(t).compData.value={row:e},m({title:"【".concat(e.path,"】设置数据同步"),area:56,component:function(){return h(function(){return r.import("./index-legacy234.js?v=1765440387")},void 0,r.meta.url)},compData:{row:e}})},Li=t("d",function(){return m({title:"文件操作记录",area:80,component:function(){return h(function(){return r.import("./index-legacy235.js?v=1765440387")},void 0,r.meta.url)},compData:{}})}),xi=function(e,t){var n=de($r()),a=n.activeName,i=n.fileItem;return a.value=t,i.value=e,m({title:"[ ".concat(e.fileName," ] - 文件属性"),area:58,component:function(){return h(function(){return r.import("./index-legacy236.js?v=1765440387")},void 0,r.meta.url)}})},Ei=function(e){var t=Jr(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"压缩文件",area:48,btn:"压缩",component:function(){return h(function(){return r.import("./index-legacy237.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})},Ti=t("aa",function(e){var t=Ur(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"解压文件[ ".concat(e.fileName," ]"),area:48,btn:"解压",component:function(){return h(function(){return r.import("./index-legacy238.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})}),Di=function(e){var t=Hr(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"【".concat(e.fileName,"】文件拆分"),area:55,btn:"确定",component:function(){return h(function(){return r.import("./index-legacy239.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})},Ni=function(e){var t=Gr(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"合并【".concat(e.fileName,"】文件"),area:44,btn:"确定",component:function(){return h(function(){return r.import("./index-legacy240.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})},Fi=function(e){var t=Br(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"发送至邮箱",area:50,btn:"发送",component:function(){return h(function(){return r.import("./index-legacy241.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})},Ii=function(e){var t=Ir(),n=de(t).instance;return n.value=m({title:"文件格式转换",area:78,component:function(){return h(function(){return r.import("./index-legacy242.js?v=1765440387")},void 0,r.meta.url)}}),n.value},Ri=t("q",function(e){var t=Tr(),n=de(t),a=n.fileItem,i=n.instance;a.value=e,i.value=m({title:"压缩预览 --【".concat(e.fileName,"】"),area:74,component:function(){return h(function(){return r.import("./index-legacy243.js?v=1765440387")},void 0,r.meta.url)}})}),Oi=function(){var e=document.getElementById("layout-footer"),t=null==e?void 0:e.getBoundingClientRect(),n=(null==t?void 0:t.width)||0,a=document.getElementById("layout-main"),r=null==a?void 0:a.getBoundingClientRect(),i=(null==r?void 0:r.width)||0;return(n||i)-32},Ai=function(){var e=c(u().m(function e(t,n){var a,i,o,l,c,s,f,p,v,d,m,g,b;return u().w(function(e){for(;;)switch(e.n){case 0:a=de(da()),i=a.fileItem,o=a.instance,l=da(),c=l.onCancel,s=de(Xr()),f=s.fileItem,p=s.instance,v=Oi(),i.value=t,f.value=t,d=document.querySelectorAll(".el-overlay"),m=d[d.length-1],g=m?window.getComputedStyle(m).zIndex:null,b=ci({title:"在线文本编辑器",area:v<1280?"100vw":143,customClass:"dialog-editor",zIndex:g?parseInt(g)+1:2012,component:function(){return h(function(){return r.import("./index-legacy244.js?v=1765440387")},void 0,r.meta.url)},fullscreen:!0,compData:{data:t,callback:n},onCancel:c}),o.value=b,p.value=b;case 1:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ji=t("e",function(){return m({title:"文件历史版本",area:75,component:function(){return h(function(){return r.import("./index-legacy245.js?v=1765440387")},void 0,r.meta.url)}})}),Pi=t("w",function(e){var t=Pr(),n=de(t).fileItem,a=t.onConfirm;return n.value=e,m({title:"导入数据库",area:40,btn:"确定",component:function(){return h(function(){return r.import("./index-legacy246.js?v=1765440387")},void 0,r.meta.url)},onConfirm:a})}),Mi=function(e){return de(jr()).fileItem.value=e,m({area:75,component:function(){return h(function(){return r.import("./index-legacy247.js?v=1765440387")},void 0,r.meta.url)}})},zi=function(e,t,n,a){var i=Wr(),u=de(i).compData,o=i.onConfirm;return u.value={data:e,fileItem:t,name:n,path:a},m({title:"在线编辑",area:65,btn:"保存",component:function(){return h(function(){return r.import("./index-legacy248.js?v=1765440387")},void 0,r.meta.url)},onConfirm:o})},qi=function(e,t){var n=Or(),a=de(n).compData,i=n.onConfirm;return a.value={data:e,temp_data:t},m({title:"【".concat(e.path,"】配置"),area:40,btn:!0,component:function(){return h(function(){return r.import("./index-legacy249.js?v=1765440387")},void 0,r.meta.url)},onConfirm:i})},Bi=t("R",function(e){return de(Mr()).videoUrl.value=e.path,m({title:"视频播放",area:89,component:function(){return h(function(){return r.import("./index-legacy250.js?v=1765440387")},void 0,r.meta.url)}})}),Hi=t("C",function(){var e=de(Vr()).instance;return e.value=m({title:"宝塔终端",area:[80,50],component:function(){return h(function(){return r.import("./index-legacy251.js?v=1765440387")},void 0,r.meta.url)}}),e.value}),Vi=function(e,t,n){var a=Jr(),i=de(a),u=i.compData,o=i.instance;return u.value={data:e,params:t,callback:n},o.value=m({title:!1,area:70,component:function(){return h(function(){return r.import("./index-legacy252.js?v=1765440387")},void 0,r.meta.url)}}),o.value},Gi=t("t",function(e){var t=Er(),n=de(t),a=n.compData,i=n.instance,u=t.onConfirm;return a.value=e,i.value=m({title:"".concat("upload"===e.type?"上传到"+e.zName:"从"+e.zName+"下载【勾选需要下载的文件】"),area:70,btn:["upload"===e.type?"上传":"下载","取消"],component:function(){return h(function(){return r.import("./index-legacy253.js?v=1765440387")},void 0,r.meta.url)},onConfirm:u}),i.value}),Wi=t("N",function(e){var t=xr(),n=de(t).fileList,a=t.setFileAuths;return n.value=e.map(function(e){return e.fileName}),m({title:"设置权限【批量】",area:45,component:function(){return h(function(){return r.import("./index-legacy254.js?v=1765440387")},void 0,r.meta.url)},btn:!0,onConfirm:a})}),Ui=function(e){var t=da(),n=t.onConfirmCheckFile,a=t.onCancelCheckFile;return m({title:"温馨提示",area:[35,9],btn:["保存","不保存"],component:function(){return h(function(){return r.import("./index-legacy255.js?v=1765440387")},void 0,r.meta.url)},separationCancelClose:!0,onConfirm:function(t){n(),e()},onCancel:function(t){a(t),e()}})},Ji=function(e,t){var n=da(),a=de(n).compDataClose,i=n.onConfirmClose,u=n.onCancelClose;return a.value={type:e,item:t},m({title:"温馨提示",area:[35,9],btn:["保存","不保存"],component:function(){return h(function(){return r.import("./index-legacy256.js?v=1765440387")},void 0,r.meta.url)},separationCancelClose:!0,onConfirm:i,onCancel:u})},$i=t("a",function(e,t){var n=e.path,a=e.name,r=$u(),i=de(r),u=i.fileTabList,o=i.fileTabActive,l=i.disabledCutTab,c=i.fileTabActiveData;if(n&&!l.value){var s=n,f=n;"/"===s?s="根目录":("/"===f[f.length-1]&&(f=f.slice(0,f.length-1)),s=n.split("/").pop()),a&&(s=a);var p={id:N(),label:s,type:c.value.type,loading:!1,total:0,list:[],param:{p:1,showRow:500,path:f}};l.value=!0,u.value.push(p),o.value=u.value.length-1,K(function(){r.updateTabActiveData(),r.refreshFilesList(),t&&t(p)})}}),Ki=function(e){return RegExp(/[\*\|\:\\\"\/\<\>\?]+/).test(e)},Yi=t("i",function(e){var t=de($u()).fileTabActiveData;return Xi(t.value.param.path+"/"+e)}),Xi=function(e){return e.replace("//","/")},Qi=t("p",function(){var e=c(u().m(function e(t){var n,a,r,i,o;return u().w(function(e){for(;;)switch(e.n){case 0:if(n=t.replace(/\/+$/,"")||"/",a=Zi(n),"/.Recycle_bin"!==t&&"/www/.Recycle_bin"!==t){e.n=1;break}return si.error("此为回收站目录,请在右上角按【回收站】按钮打开"),e.a(2,!1);case 1:return r=$u(),i=de(r),o=i.fileTabActiveData,i.searchVal,o.value.param.p=1,r.updateTabActiveData({param:{path:a,search:""}}),r.refreshFilesList(),e.a(2,a)}},e)}));return function(t){return e.apply(this,arguments)}}()),Zi=function(e){return"/"===(e=(e=e.replace(/\\/g,"/")).replace("//","/"))?e:e=e.replace(/\/+$/g,"")},eu=t("al",function(e){return"dir"===e?"文件夹":"文件"}),tu=function(e,t){e.isReName=!0,t&&t(e)},nu=function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML},au=t("E",function(){var e=c(u().m(function e(t,n){var a,r,i,o,c,s,f;return u().w(function(e){for(;;)switch(e.n){case 0:if(a=$u(),r=de(a),i=r.recyclingBinStatus,o=a.watchDeleteFileData,null!==i.value){e.n=2;break}return e.n=1,qt({type:"all",search:"",time_search:JSON.stringify([])});case 1:c=e.v,s=c.data,i.value=s.status;case 2:return f=i.value?"删除【".concat(nu(t.fileName),"】").concat("file"===t.type?"文件":"文件夹","后,该文件将迁移至文件回收站,如需彻底删除请前往文件回收站,是否继续操作?"):"风险操作,当前未开启文件回收站,删除的【".concat(nu(t.fileName),"】").concat("file"===t.type?"文件":"文件夹","将彻底删除,无法恢复,是否继续操作?"),e.n=3,b({title:"删除".concat(eu(t.type),"【").concat(nu(t.fileName),"】"),isHtml:!0,type:i.value?"default":"calc",content:'<div class="break-all">'+f+"<div>"+(t.isShare?'<span class="text-danger">当前文件已开启【外链分享】,请谨慎操作!</span>':"")});case 3:return e.n=4,l({loading:"正在删除,请稍后...",request:Wt({path:Yi(t.fileName),type:t.type}),message:!0,success:function(e){e.status&&o(t),n&&n()}});case 4:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),ru=t("k",function(){var e=c(u().m(function e(t,n){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ut({path:Yi(t.fileName)});case 1:(a=e.v).status?(si.success(a.msg),n&&n()):si.error(a.msg),Pu();case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),iu=$(null),uu=t("o",function(){var e=de($u()).fileTabActiveData;"/"!==e.value.param.path?iu.value=m({title:"上传文件到【".concat(e.value.param.path,"】 --支持断点续传"),area:"72",component:function(){return h(function(){return r.import("./index-legacy105.js?v=1765440387")},void 0,r.meta.url)},compData:{path:e.value.param.path},onCancel:function(){iu.value=null}}):si.error("不能直接上传文件到系统根目录!")}),ou=t("l",function(){var e=c(u().m(function e(t,n){var a;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,rt({path:Yi(t.fileName)});case 1:(a=e.v).status?(si.success(a.msg),n&&n()):si.error(a.msg),Pu();case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),lu=t("n",function(){var e=c(u().m(function e(t,n){var a,r;return u().w(function(e){for(;;)switch(e.n){case 0:return a=$u(),e.n=1,Jt({path:Yi(t.fileName),type:n});case 1:(r=e.v).status?si.success(r.msg):si.error(r.msg),a.refreshFilesList();case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),cu=t("J",function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.n){case 0:return n=$u(),e.n=1,$t({path:Yi(t.fileName)});case 1:(a=e.v).status?si.success(a.msg):si.error(a.msg),n.refreshFilesList();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),su=function(){de($u()).copyFilesData.value={files:[],type:""}},fu=function(e,t){var n=Rr();de(n).compData.value={fileData:e,type:t},m({title:"重复文件提示",area:40,btn:["确认","取消"],component:function(){return h(function(){return r.import("./index-legacy257.js?v=1765440387")},void 0,r.meta.url)}})},pu=t("h",function(e){var t=de(Kr()),n=t.activeName,a=t.compData;return n.value="database"===e?"db":"all",a.value={type:e},m({title:"回收站",area:110,component:function(){return h(function(){return r.import("./index-legacy258.js?v=1765440387")},void 0,r.meta.url)}})}),vu=function(e,t){if("dir"===t)return"folder";for(var n=e.split("."),a=n[n.length-1],r=0;r<hi.length;r++)if(hi[r]==a)return hi[r];return"file"},hu=t("u",function(t){var n="text";return t&&(t=t.toLowerCase()),Object.entries(mi).forEach(function(a){var r=e(a,2),i=r[0];r[1].forEach(function(e){e==t&&(n=i)})}),n}),du=t("f",c(u().m(function e(){var t,n,a,r,i,o,l,c,s,f,p,v,h,d,m;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=$u(),n=de(t),a=n.fileTabActiveData,r=n.copyFilesData,i=null,o=r.value.files[0],l=Yi(o.fileName),!("dir"===o.type&&a.value.param.path.indexOf(l+"/")>-1)){e.n=1;break}return si.error("错误的复制逻辑,从".concat(l,"粘贴到").concat(a.value.param.path,"有包含关系,存在无限循环复制风险!")),e.a(2,!1);case 1:return c={path:a.value.param.path},1===r.value.files.length&&(c.name=o.fileName),e.n=2,ct(c);case 2:if(s=e.v,!((f=s.data).length>0)){e.n=3;break}return fu(f,r.value.files.length>1?"batch":"single"),e.a(2,!1);case 3:if(gu(),e.p=4,i=si.load("正在粘贴,请稍候..."),!(r.value.files.length>1)){e.n=6;break}return e.n=5,pt({type:"copy"===r.value.type?1:2,path:a.value.param.path});case 5:p=e.v,si.request(p),r.value.files=[],su(),e.n=11;break;case 6:if(v=o.path,h={sfile:v,dfile:l},"copy"!==r.value.type){e.n=8;break}return e.n=7,st(h);case 7:m=e.v,e.n=10;break;case 8:return e.n=9,ft(h);case 9:m=e.v;case 10:(d=m).status?("copy"===r.value.type?si.success(d.msg):si.success("剪切成功"),r.value.files=[],su()):si.error(d.msg);case 11:return e.p=11,i&&i.close(),clearTimeout(mu),t.refreshFilesList(),e.f(11);case 12:return e.a(2)}},e,null,[[4,,11,12]])}))),mu=null,gu=function(){var e=$u().getRealTask;mu=setTimeout(function(){e()},1500)},bu=t("aT",function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ra();case 1:return e.n=2,wu(t);case 2:return e.n=3,Be({name:t.fileName,path:t.path});case 3:return e.n=4,Oa();case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),yu=t("D",function(e,t){var n=de($u()).copyFilesData;e.path=Yi(e.fileName),n.value.files=[e],n.value.type=t,si.success("".concat("copy"===t?"复制":"剪切","成功,请在目标目录点击右上角【粘贴】按钮!"))}),wu=t("Y",function(){var e=c(u().m(function e(t,n){var a,r,i,o,l,c;return u().w(function(e){for(;;)switch(e.n){case 0:if(o=$u(),(0,o.unbindKeydown)(),l={path:t.path,title:t.path.split("/").pop(),size:t.size,type:"editor"},null==t||null===(a=t.path)||void 0===a||!a.includes("/dev/pts")){e.n=1;break}return si.error("系统目录文件不支持编辑"),e.a(2);case 1:if("text"===hu(null===(r=l.fileName)||void 0===r?void 0:r.split(".").pop())){e.n=2;break}return si.error("暂不支持该类型文件编辑"),e.a(2);case 2:if("minimize"!==(null==(c=document.querySelector(".bt-dialog-header .svgtofont-icon-minmax-black"))||null===(i=c.closest(".icon"))||void 0===i?void 0:i.dataset.state)){e.n=3;break}return Ia(l),e.a(2);case 3:if(!wa.value){e.n=4;break}return ir(l),e.a(2);case 4:return e.n=5,Ra();case 5:Ai(l,n);case 6:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),ku=t("r",function(e){var t=de($u()).createItem,n=Yr().findCurrentImgIndex;if(t.value=[],e.isNew||e.isReName)return!1;if("dir"===e.type)Qi(e.path);else switch(hu(e.ext)){case"images":n(window.location.protocol+"//"+window.location.host+"/download?filename="+e.path);break;case"video":Bi(e);break;case"compress":Du(e);break;default:wu(e)}}),Su=t("x",function(e,t){window.open("/download?filename="+encodeURIComponent(e.path),"_self","noopener,noreferrer"),t&&t()}),_u=t("y",function(e){Di(e)}),Cu=t("z",function(e){Ni(e)}),Lu=t("s",function(e){Si(e)}),xu=t("m",function(e){_i(e)}),Eu=t("A",function(){var e=c(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.n){case 0:n=de($u()),"ltd"!==n.authType.value?un({disablePro:!0,sourceId:70,plugin:!1}):Ci(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),Tu=t("G",function(e){Ei(e)}),Du=t("I",function(e){Ti(e)}),Nu=t("H",function(e){var t=Ir();de(t).fileItem.value=e,Ii()}),Fu=t("K",function(e){Fi(e)}),Iu=t("B",function(e,t){t||(t="routine"),xi(e,t)}),Ru=t("P",function(){uu()}),Ou=t("L",function(){var e=c(u().m(function e(t,n){var a,r,i,o,l,c;return u().w(function(e){for(;;)switch(e.n){case 0:a=de($u()),r=a.fileTabActiveData,i=a.copyFilesData,o={data:JSON.stringify(t.map(function(e){return e.fileName})),type:0,path:r.value.param.path},c=n,e.n="copy"===c?1:"cut"===c?2:3;break;case 1:return o.type=1,e.a(3,3);case 2:return o.type=2,e.a(3,3);case 3:return e.n=4,Ge(o);case 4:(l=e.v).status?(si.success("".concat("copy"===n?"复制":"剪切","成功,请在目标目录点击右上角【粘贴】按钮!")),i.value.files=t,i.value.type=n):si.error(l.msg);case 5:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()),Au=t("O",function(){var e=c(u().m(function e(t){var n,a,r,i,o;return u().w(function(e){for(;;)switch(e.n){case 0:return n=$u(),a=de($u()),r=a.fileTabActiveData,i=a.recyclingBinStatus,o=i.value?"删除后,文件将迁移至文件回收站,如需彻底删除请前往文件回收站,是否继续操作?":"风险操作,当前未开启文件回收站,删除后将彻底删除,无法恢复,是否继续操作?",e.n=1,b({title:"批量删除文件",type:i.value?"default":"calc",content:o});case 1:return e.n=2,l({loading:"正在删除,请稍后...",request:Ge({data:JSON.stringify(t.map(function(e){return e.fileName})),type:4,path:r.value.param.path}),message:!0,success:function(e){e.status&&n.refreshFilesList()}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),ju=function(e,t){var n=e.path,a=e.name,r=$u(),i=de(r),u=i.fileTabList,o=i.disabledCutTab,l=i.fileTabActive;if(n&&!o.value){var c=n,s=n;"/"===c?c="根目录":("/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),c=n.split("/").pop()),a&&(c=a);var f={id:N(),label:c,type:"list",loading:!1,total:0,list:[],param:{p:1,showRow:500,path:s}};o.value=!0,u.value.push(f),l.value=u.value.length-1,K(function(){r.updateTabActiveData(),r.refreshFilesList(),t&&t(f)})}},Pu=t("$",c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.n){case 0:return t=de($u()),n=t.favoriteList,e.n=1,l({request:Vt(),data:[Array,n]});case 1:return e.a(2)}},e)}))),Mu=t("g",c(u().m(function e(){var t,n,a,r;return u().w(function(e){for(;;)switch(e.n){case 0:return t=de($u()),n=t.diskList,e.n=1,Gt();case 1:a=e.v,r=a.data,n.value=r;case 2:return e.a(2)}},e)}))),zu=t("U",function(e){var t=$u(),n=de(t),a=n.fileTabList,r=n.fileTabActive,i=e;"/"===i[i.length-1]&&"/"!==i&&(i=i.slice(0,i.length-1));var u=a.value.findIndex(function(e){return e.param.path===i});-1!==u?(r.value=u,t.updateTabActiveData(),t.refreshFilesList()):ju({path:e})}),qu=function(e){return{icon:"icon-".concat(e),ext:"dir"==e?" folder":"",fileName:"新建".concat("dir"==e?"文件夹":"文本"),time:"",ps:"",size:0,type:e,user:"root",rootLevel:"0",isLink:"",isShare:!1,isTop:!1,isFav:!1,isOsPs:!1,isPsEdit:!1,isSearch:!1,isReName:!0,isNew:!0,isSync:"",isLock:!1,path:"",tamperProofId:0,isFile:"dir"!==e}},Bu=t("V",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0;0",a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=function(e,t){var n="",a=fi.get("".concat("/"===t?"/":"".concat(t,"/")).concat(e));switch(e){case".htaccess":n="PS: Apache用户配置文件(伪静态)";break;case"swap":n="PS: 宝塔默认设置的SWAP交换分区文件"}return e.includes(".upload.tmp")&&(n="PS: 宝塔文件上传临时文件,重新上传从断点续传,可删除"),e.includes(".user.ini")&&(n="PS: PHP用户配置文件(防跨站)!"),a&&(n=a),a||n}(t.nm,a),u="1"===n.split(";")[0],o=n.split(";")[1],l=vu(t.nm,e),c=function(e,t){return"".concat(e,"/").concat(t).replace("//","/")}(a,t.nm);return{icon:hu(l),ext:l,fileName:t.nm,time:y(t.mt),ps:i||t.rmk||"",size:t.sz,type:e,user:t.user,rootLevel:t.acc,isLink:t.lnk,isShare:0!=Number(t.durl)?t.durl:0,isTop:!!t.top,isFav:!!Number(t.fav),isOsPs:!I(i)&&""!==i,isPsEdit:!1,isSearch:!0,isReName:!1,isNew:!1,isSync:Hu(r,c),isLock:u,path:c,tamperProofId:Number(o),isFile:"dir"!==e}}),Hu=function(e,t){if(I(e)||0==e.length)return"";var n=e.find(function(e){return e.path===t});return n?n.type:""},Vu=function(e){return e.map(function(e){return{val:e.val,label:e.val}})},Gu=function(e,t){m({title:(null==e?void 0:e.title)||"批量操作结果",area:t||42,component:function(){return h(function(){return r.import("./index-legacy108.js?v=1765440387")},void 0,r.meta.url)},compData:e})},Wu=t("c",function(e,t){var n=window.innerWidth,a=window.innerHeight,r=t.offsetWidth,i=t.offsetHeight,u=e.clientX,o=e.clientY,l=u;u+r>n&&(l=u-r);var c=o-(a-o<i?i:0);c<0&&(c=(a-i)/2),t.style.top=c+"px",t.style.left=l+"px"}),Uu=Object.freeze(Object.defineProperty({__proto__:null,BatchSetAuth:Wi,CreateTerminalDialog:Hi,FileCompressPreview:Ri,FileCompressView:Ei,FileDecompressionView:Ti,FileFormatConversionView:Ii,FileImageView:Mi,FileInputDatabaseView:Pi,FileMergeView:Ni,FileOperationRecordView:Li,FileRecyclingBinView:pu,FileSearchView:bi,FileSetShareView:Si,FileSplitView:Di,FileStatusDetailView:xi,FilesAceEditor:Ai,FilesCompressCoverView:Vi,FilesHistoryRecordView:ji,ManageFavoritesView:wi,SendEmailView:Fi,ShareDetailView:_i,ShareListView:ki,addFavorites:ru,addTab:ju,addTabEvent:$i,batchDelFile:Au,calculateContextMenuPosition:Wu,calculatePopoverPosition:function(e,t){var n=window.innerWidth,a=window.innerHeight,r=t.offsetWidth,i=t.offsetHeight,u=e.clientX,o=e.clientY,l=u;u+r>n&&(l=u-r);var c=o;return o+i>a&&(c=o-i),c<0&&(c=0),{top:c,left:l,el:t}},cloudStorageDialog:Gi,copyFiles:yu,createCompress:Tu,createCopy:cu,createFile:qu,deCompressFile:Du,defaultPS:fi,delFavorites:ou,delFileEvent:au,determineFileType:hu,downFile:Su,editFilesDialog:zi,editorCloseDialog:Ji,editorLeaveDialog:Ui,exts:hi,fileBatchSet:Ou,fileMainType:mi,fileReName:tu,fileRsyncView:Ci,fileTaskDialog:gi,fileType:di,fileUploadDialog:iu,formatFile:Nu,getDataType:eu,getDiskList:Mu,getExtIcon:vu,getFavoriteList:Pu,getViewportWidth:Oi,getWholePath:Yi,isSyncType:Hu,matchUnqualifiedString:Ki,openAceEditor:wu,openDetail:Iu,openEditorView:bu,openFile:ku,openFileAsync:Eu,openFileMerge:Cu,openFileShare:xu,openFileSplit:_u,openFilesUpload:uu,openResultDialog:Gu,pasteFiles:du,pathJumpEvent:Qi,path_check:Zi,recomList:pi,reconstructionFile:Bu,removeCopyOrCutData:su,renderHistoryList:Vu,repetFileView:fu,sendEmail:Fu,setColumn:function(e,t){},setFileListActive:zu,setFileShare:Lu,setToping:lu,symbolicLinkView:yi,temperDialog:qi,toRepeatPath:Xi,uploadFiles:Ru,videoPlayDialog:Bi},Symbol.toStringTag,{value:"Module"}));t("aV",Uu);var Ju=t("W",le("FILES-URL-DOWN-LOAD-STORE",function(){var e=$u(),t=de(e).fileTabActiveData,a=e.getRealTask,r=fe({url:"",path:t.value.param.path,filename:""}),i=$(!1),o=$(),s=fe({url:[{validator:function(e,t,n){""===t?n(new Error("请输入正确的URL地址!")):H(t)?n():n(new Error("请输入正确的URL地址!"))},trigger:["blur"]}],filename:[{validator:function(e,t,n){""===t?n(new Error("请输入新文件名!")):Ki(t)?n(new Error('文件名不能包含 /\\:*?"<>|符号!')):n()},trigger:["blur","change"]}]});return{quickForm:r,formDisabled:i,quickFormRef:o,quickRules:s,onConfirm:function(){var e=n({},r);o.value.validate(function(){var t=c(u().m(function t(n){return u().w(function(t){for(;;)switch(t.n){case 0:if(!n){t.n=1;break}return t.n=1,l({loading:i,request:Kt(e),message:!0,success:function(e){e.status&&a()}});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())},onPathChange:function(){nn({type:"dir",path:r.path,change:function(e){r.path=e}})},setName:function(e){var t=e.split("/");r.filename=t[t.length-1]},init:function(){i.value=!1,Object.assign(r,{url:"",path:t.value.param.path,filename:""})}}})),$u=t("F",le("FILES-STORE",function(){var e=v(),t=e.mainHeight,o=e.mainWidth,s=e.payment,f=se(s.value).authType,p={id:"label-1",label:"wwwroot",type:"list",loading:!1,total:0,param:{p:1,showRow:500,path:"/www/wwwroot",sort:"",reverse:"True"}},g=$(0),y=$(0),w=$(n({},p)),k=$([n({},p)]),_=$(0),L=$(!0),x=$(),E=fe({index:0,id:""}),T=$(0),D=$(0),N=$(!1),R=$(!1),O=$([]),A=$(0),j=$(w.value.param.path),P=$(),M=$(!0),z=$([]),q=$(0),H=fe({showMore:!1,showUl:!1,list:[]}),Y=$(""),X=$(),Q=$(!1),Z=$([]),ee=$([]),te=$({reqEnd:!1,isSetup:!1,isBuy:!1}),ne=$(!1),ae=$(!1),re=$({isLock:!0,rootLevel:!0,size:!0,time:!0,ps:!0}),ie=$(""),ue=$([]),oe=$(!1),le=$([]),ce=ke(function(){return le.value.length||0}),pe=$([]),ve=ke(function(){return pe.value.length||0}),he=$([]),me=$([]),ge=$([]),be=$({status:!1,tip:""}),ye=$({}),we=$({files:[],type:""}),Se=$({}),_e=$(""),Ce=$(!1),Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=k.value[y.value];e.param&&(e.param=n(n({},t.param),e.param));var a=n(n({},t),e);k.value.splice(y.value,1,a),Object.assign(w.value,a),Y.value=w.value.param.search||"",Q.value="True"===w.value.param.all,Ye.value=!1,j.value!==a.param.path&&(j.value=w.value.param.path,Re(j.value))},xe=function(){var e=o.value-36;O.value=[],A.value=0,K(function(){document.querySelectorAll(".tab-item").forEach(function(e){var t=e.getBoundingClientRect();O.value.push(t.width),A.value+=t.width});var t=A.value-e;D.value=t>0?t:0,Ee(e)})},Ee=function(e){var t=O.value.reduce(function(e,t,n){return n<=y.value?e+t:e},0);if(t<=e)T.value=-1;else{if(y.value===k.value.length-1)return void(T.value=D.value);var n=t-e+20;R.value=!0,T.value=n}},Te=function(){var e=c(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:return Y.value=t,Le({param:{search:Y.value,all:Q.value?"True":"False"}}),e.n=1,ft();case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ne=function(){var e=c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,C({status:-3});case 1:t=e.v,n=document.querySelector(".realTaskDialog"),t.data.length>0&&!n&&gi();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Fe=Pe(function(){d.error("不能直接上传文件到系统根目录!")},2e3),Ie=function(){var e=c(u().m(function e(t){var n,a;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(M.value=t,!t){e.n=13;break}if(w.value.param.path!==j.value){e.n=1;break}return e.a(2);case 1:if(!((n=j.value).length>0)||n.includes("/")){e.n=2;break}return d.error("路径输入不符合规则"),j.value=w.value.param.path,e.a(2);case 2:if(0!==n.length){e.n=3;break}return j.value=w.value.param.path,e.a(2);case 3:return e.n=4,Yt({path:j.value});case 4:if(e.v.data.exists){e.n=10;break}return e.p=5,e.n=6,b({width:50,title:"路径不存在",content:"【".concat(n,"】路径不存在,是否创建并跳转?")});case 6:e.n=8;break;case 7:if(e.p=7,"cancel"!==e.v){e.n=8;break}return j.value=w.value.param.path,e.a(2);case 8:return e.n=9,l({loading:"正在新建文件,请稍后...",request:ze({path:n,type:"dir"}),message:!0,success:function(e){e.status&&Qi(n)}});case 9:e.n=12;break;case 10:return e.n=11,Qi(n);case 11:a=e.v,j.value=a||n;case 12:e.n=14;break;case 13:V(P.value);case 14:return e.a(2)}},e,null,[[5,7]])}));return function(t){return e.apply(this,arguments)}}(),Re=function(e){if(e){var t=e.split("/");if("/"===e)return z.value=[{name:"根目录",path:"/",show:!0,list:[]}];z.value=t.map(function(e,n){return{name:""===e?"根目录":e,path:""===e?"/":t.slice(0,n+1).join("/"),show:!0,showFold:!1,loading:!1,list:[]}}),Ae(),K(function(){H.list=[],H.showMore=!1;var e=document.querySelectorAll(".path-group-item"),t=document.querySelector(".path-list-group"),n=Array.from(e).reduce(function(e,t){return e+t.clientWidth+4},0);setTimeout(function(){if(n>((null==t?void 0:t.clientWidth)||400)){for(var a=20,r=e.length-1;r>=0;r--)(a+=e[r].clientWidth)>((null==t?void 0:t.clientWidth)||0)&&(z.value[r].show=!1,H.showMore=!0,H.list=z.value.slice(r+1));H.showMore&&(z.value[0].show=!1,H.list=z.value.slice(1))}},100)})}},Oe=function(){var e=c(u().m(function e(t,n){var a,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,Ae(),z.value[n].showFold=!0,z.value[n].loading=!0,e.n=1,Xt({path:t,p:1,showRow:2e3});case 1:a=e.v,r=a.data.dir,z.value[n].loading=!1,z.value[n].list=r.map(function(e){return{name:e.nm,path:"".concat(t,"/").concat(e.nm).replace(/\/+/g,"/")}}),q.value=n,window.addEventListener("click",Ae),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),Ae=function(){H.showUl=!1,z.value[q.value]&&(z.value=z.value.map(function(e){return n(n({},e),{},{showFold:!1})})),window.removeEventListener("click",Ae)},je=$([{name:"文件名",key:"name",show:!0,disable:!0},{name:"防篡改",key:"isLock",show:!0,disable:!1,icon:!0},{name:"权限",key:"rootLevel",show:!0,disable:!1},{name:"大小",key:"size",show:!0,disable:!1},{name:"修改时间",key:"time",show:!0,disable:!1},{name:"备注",key:"ps",show:!0,disable:!1},{name:"操作",key:"action",show:!0,disable:!0}]),Me=[{type:"copy",icon:"copy-file-icon",label:"复制",handler:function(){return Ou(Z.value,"copy")}},{type:"cut",icon:"cut-file-icon",label:"剪切",hide:1370,handler:function(){return Ou(Z.value,"cut")}},{type:"compress",icon:"compress-file-icon",label:"压缩",hide:1446,handler:function(){return Tu(Z.value)}},{type:"auth",icon:"authority-file-icon",label:"权限",hide:1610,handler:function(){return Wi(Z.value)}},{type:"delete",icon:"delete-file-icon",label:"删除",hide:1620,handler:function(){return Au(Z.value)}}],qe=function(){var e=c(u().m(function e(t){var n,a,r,i,o;return u().w(function(e){for(;;)switch(e.n){case 0:o=t,e.n="upload"===o?1:"openUrlLinkDown"===o?2:"bos"===o||"alioss"===o||"txcos"===o||"obs"===o?3:5;break;case 1:return uu(),e.a(3,5);case 2:return Be(),e.a(3,5);case 3:return e.n=4,Qt();case 4:return a=e.v,r=a.data,(i=null==r||null===(n=r.down)||void 0===n?void 0:n.find(function(e){return e.name===t}))&&null!=i&&i.is_conf?Gi({type:"down",zName:i.title,pname:t}):He(t,73),e.a(3,5);case 5:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Be=function(){var e=Ju().onConfirm;m({title:"URL链接下载",area:50,btn:!0,component:function(){return h(function(){return r.import("./index-legacy259.js?v=1765440387")},void 0,r.meta.url)},onConfirm:e})},He=function(){var e=c(u().m(function e(t,n){var a,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if("ltd"===f.value){e.n=1;break}return un({sourceId:n}),e.a(2);case 1:return e.p=1,e.n=2,F({sName:t});case 2:if(a=e.v,(r=a.data).setup){e.n=3;break}return rn({name:r.name,type:"i",pluginInfo:r}),e.a(2);case 3:tn({name:t}),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[1,4]])}));return function(t,n){return e.apply(this,arguments)}}(),Ve=function(){K(function(){at(),ut()})},Ge=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return"true"===localStorage.getItem("MYSQL-RECYCLE")&&(pu("database"),localStorage.removeItem("MYSQL-RECYCLE")),je.value.forEach(function(e){e.show=re.value[e.key]}),e.n=1,Mu();case 1:Pu();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),We=$(null),Ue=$(null),Je=$(null),$e=$(!1),Ke=$(""),Ye=$(!1),Xe=$(!1),Qe=function(){var e=c(u().m(function e(){var t,n,a;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(Yr(),"/"!==(t=w.value.param.path)){e.n=1;break}return e.a(2);case 1:if(e.p=1,Xe.value=!0,!te.value.reqEnd||!te.value.isSetup||"ltd"!==f.value){e.n=2;break}le.value=le.value.map(function(e){return e.isDirComputed=!0,e}),it(),ot(),e.n=4;break;case 2:return e.n=3,It({path:t});case 3:n=e.v,a=n.data,Ke.value=a,Ye.value=!0,Xe.value=!1;case 4:return e.p=4,0===Ke.value.length&&Ye.value&&(Xe.value=!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,,4,5]])}));return function(){return e.apply(this,arguments)}}(),Ze=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:"/"===w.value.param.path?$e.value=!0:$e.value=!1;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),et=$([]),tt=function(e){if("el-input__inner"!==e.target.className&&"TEXTAREA"!==e.target.tagName){var t="list"===w.value.type,n=document.querySelector(".el-dialog__body")||document.querySelector(".el-dialog__container");if(!n||"none"===n.style.display){var a=[],r=de(Yr()).selectList;if(et.value.forEach(function(e){r.value.includes(e.path)&&a.push(e)}),e.ctrlKey&&65===e.keyCode&&(e.preventDefault(),Je.value.handleCheckAll(!0)),e.ctrlKey&&88===e.keyCode)switch(a.length){case 0:return;case 1:yu(a[0],"cut");break;default:Ou(a,"cut")}if(e.ctrlKey&&67===e.keyCode)switch(a.length){case 0:return;case 1:yu(a[0],"copy");break;default:Ou(a,"copy")}if(e.ctrlKey&&86===e.keyCode){if(0===we.value.files.length)return;du()}if(113===e.keyCode)switch(a.length){case 0:return;case 1:tu(a[0],t?We.value.editRow:Ue.value.editFile)}if(13===e.keyCode)switch(a.length){case 0:return;case 1:if(a[0].isNew||a[0].isReName||a[0].isPs)return;ku(a[0])}if(46===e.keyCode){if(0===a.length)return;if(a[0].isNew||a[0].isReName)return;Au(a)}}}},nt=function(){document.addEventListener("keydown",tt)},at=function(){document.removeEventListener("keydown",tt)},rt=function(e){""!==e&&1!=oe.value&&(ue.value=[qu(e)],it())},it=function(){et.value=[].concat(a(ue.value),a(le.value),a(pe.value)).map(function(e,t){return e.vid=t,e}),Yr().watchDataList(et.value)},ut=function(){Xe.value=!1,Le({param:{search:""}}),nt();var e=localStorage.getItem("copyOrCutData");e&&(we.value=JSON.parse(e))},ot=function(){var e=c(u().m(function e(){var t,n,a,r,i;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,t=w.value.param.path,e.n=1,Zt(t);case 1:for(i in n=e.v,a=n.data,I(a.msg)||-1!=a.msg.indexOf("企业版")||d.error(a.msg),r=a.list)r["".concat(t,"/").concat(i)]=r[i];Ke.value=S(a.total_asize),setTimeout(function(){le.value=le.value.map(function(e){return e.diskInfo=r[e.path],e.isDirComputed=!1,e}),it()},300);case 2:return e.p=2,Xe.value=!1,Ye.value=!0,e.f(2);case 3:return e.a(2)}},e,null,[[0,,2,3]])}));return function(){return e.apply(this,arguments)}}(),lt=function(){var e=c(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:if(!ne.value){e.n=1;break}return e.a(2);case 1:return ne.value=!0,e.n=2,ft();case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ct=function(){ft(),G("Path",w.value.param.path)},st=function(){var e=JSON.parse(JSON.stringify(w.value.param));return"time"==e.sort&&(e.sort="mtime"),"fileName"==e.sort&&(e.sort="name"),void 0!==e.search&&""===e.search&&delete e.search,void 0!==e.all&&"True"!==e.all&&delete e.all,e},ft=function(){var e=c(u().m(function e(){var t,n,a,r,o,l,c,s,f,p,v,h,m,g,b,y,k,S,_,C,L,x,E,T,D,N;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return le.value=[],pe.value=[],et.value=[],e.p=1,w.value.loading=!0,t=st(),e.n=2,Xt(t);case 2:if(n=e.v,a=n.status,r=n.msg,o=n.data,"True"==t.all&&o.is_max&&d.error("当前搜索结果已超出最大值3000条!"),a||void 0===r){e.n=4;break}if(d.error(r),(l=w.value.param.path.split("/")).pop(),"/"!==(c=l.join("/").replace(/\/+$/,"")||"/")){e.n=3;break}return e.a(2);case 3:return Le({param:{path:c}}),ft(),e.a(2);case 4:if(s=o.path,f=o.dir,p=o.files,v=o.store,h=o.bt_sync,o.page,m=o.tamper_data,g=o.search_history,b=o.file_recycle,y=m.dirs,k=m.files,S=m.msg,_=m.tip,C=m.rules,L=[],x="ok"===_,be.value.status=x,be.value.tip=x?"":_,ge.value=Vu(g),le.value=[],f.forEach(function(e,t){le.value.push(Bu("dir",e,S?"":y[t],s,h))}),pe.value=[],p.forEach(function(e,t){var n=Bu("file",e,S?"":k[t],s);0===t&&x&&(ye.value=C.length>0?C.find(function(e){return e.pid===n.tamperProofId}):void 0),"images"===n.icon&&L.push(n.fileName),pe.value.push(n)}),!(L.length>0)){e.n=6;break}return e.n=5,en({return_type:"base64",height:45,width:45,files:L,path:s});case 5:E=e.v,T=E.data,he.value=T?Object.entries(T.data):[],Yr().setSmallImage(),e.n=7;break;case 6:he.value=[];case 7:return me.value=v,ae.value=b,D="/"===(D=s)?"根目录":s.split("/").pop(),Le({label:D,total:W(o.page),type:w.value.type||"list",param:{path:o.path}}),ne.value=!1,e.n=8,it();case 8:pt(),e.n=10;break;case 9:e.p=9,N=e.v,i(N);case 10:return e.p=10,w.value.loading=!1,e.f(10);case 11:return e.a(2)}},e,null,[[1,9,10,11]])}));return function(){return e.apply(this,arguments)}}(),pt=function(){K(function(){var e=document.querySelector(".custom-tbody");e&&(Ce.value=36*et.value.length>e.clientHeight)})};return{isHaveScoller:Ce,authType:f,mainHeight:t,mainWidth:o,fileTabActive:y,fileTabActiveData:w,fileTabList:k,isAddTabs:L,closeTabs:E,favoriteList:me,diskList:ee,dataList:et,deleteFileData:Se,imgPathItem:_e,recyclingBinStatus:ae,copyFilesData:we,navBtnHeight:g,imageList:he,disabledCutTab:ne,dirPath:j,pathInputRef:P,pathInputMode:M,pathListGroup:z,more:H,searchVal:Y,searchRef:X,isChildren:Q,contextRef:x,scrollWidth:T,showLeftArrow:N,showRightArrow:R,searchHistory:ge,updateTabActiveData:Le,getFilesList:ft,triggerEvent:function(e){e?De(X).showPopover():De(X).hidePopover()},searchEvent:Te,getRealTask:Ne,handleDragOff:function(e){var t,n;(e.preventDefault(),"/"!==w.value.param.path)?null!=e&&null!==(t=e.dataTransfer)&&void 0!==t&&t.items&&Array.from(null==e||null===(n=e.dataTransfer)||void 0===n?void 0:n.items).some(function(e){return"file"===e.kind})&&(iu.value||uu()):Fe()},cutPathInputMode:Ie,cutDirPath:function(e,t){""===e&&(j.value="/"),P.value.blur(),ue.value=[],it(),Le({param:{search:"",p:1,all:"False"}}),t||Qi(e)},getPathListGroup:Re,getCurrentFoldDirList:Oe,goBack:function(){if(!ne.value){if(ne.value=!0,"/"==w.value.param.path){if(""===w.value.param.search)return ne.value=!1,d.error("当前目录为根目录");Le({param:{search:"",all:"False"}}),Qi("/")}var e=w.value.param.path.split("/");e.pop(),Le({param:{search:"",all:"False"}});var t=e.join("/");Qi(t)}},closeOther:function(){k.value=k.value.filter(function(e,t){return t===E.index}),E.index!==y.value&&ct(),y.value=0,Le(),xe()},closeRight:function(){k.value.splice(E.index+1);var e=k.value[E.index].param.path;y.value=E.index,w.value.param.path!==e&&(Le(),ct()),Le(),xe()},watchTabsWidth:function(){K(function(){var e;_.value=(e=document.querySelector(".tabs"))?e.getBoundingClientRect().width:0;var t=document.querySelectorAll(".tab-item"),n=0;t.forEach(function(e){var t=e.getBoundingClientRect();n+=t.width}),L.value=_.value-n>160})},handleRightClick:function(e,t,n){Object.assign(E,{id:t.id,index:n}),x.value.show(e)},watchWindowResize:xe,watchScrollWidth:function(e){var t=e;N.value=0!=t&&-1!=t,-1===t&&(T.value=0,t=0),R.value=D.value>0&&t!=D.value;var n=document.querySelector(".tabs");n&&n.scrollTo({top:0,left:T.value,behavior:"smooth"})},cutTab:function(e){ne.value&&y.value!==e||(y.value=e,ne.value=!0,ue.value=[],Le(),ct(),xe())},scrollLeft:function(){var e=o.value-36;T.value<=e/2?T.value=0:T.value-=e/2},scrollRight:function(){var e=o.value-36;if(D.value<=e/2)T.value=D.value;else{var t=T.value+=e/2;t>D.value&&(t=D.value),T.value=t}},closeTab:function(e,t){var n=k.value.length;if(1===n)return d.error("至少保留一个标签页");var a=k.value.findIndex(function(e){return e.id===t});k.value.splice(a,1),y.value>a?(y.value=y.value-1,Le()):y.value===a&&(ne.value=!0,y.value=n-a===1?a-1:a,Le(),ct()),xe()},fileBatchNum:Z,createListType:ie,columnShow:re,cloudList:[{name:"百度云存储",icon:"baidu-cloud",command:"bos"},{name:"阿里云存储",icon:"alioss-cloud",command:"alioss"},{name:"腾讯云存储",icon:"tencent-cloud",command:"txcos"},{name:"华为云存储",icon:"huawei-cloud",command:"obs"}],actionsBtn:Me,fileBatchEvent:function(e){switch(e){case"copy":Ou(Z.value,"copy");break;case"cut":Ou(Z.value,"cut");break;case"compress":Tu(Z.value);break;case"auth":Wi(Z.value);break;case"del":Au(Z.value)}},handleChangeMenu:function(e){w.value.type!==e&&(Le({type:e}),w.value.type=e,Ve()),Z.value=[],de(Yr()).selectList.value=[],Je.value&&(Je.value.selectList=[])},handleCommand:qe,openPlugin:He,collectCommand:function(e){if("manger"!==e)if(w.value.label=e.name,"dir"===e.type)Qi(e.path);else{var t=n(n({},e),{},{fileName:e.name,ext:e.ext||e.name.split(".").pop()});ku(t)}else wi()},createCommand:function(e){var t;switch(null===(t=document.querySelector(".vue-recycle-scroller"))||void 0===t||t.scroll({top:0}),e){case"file":case"dir":ie.value=e,rt(e);break;case"link":yi()}},globalTamperStatus:be,createItem:ue,fileList:pe,fileLength:ve,dirList:le,dirLength:ce,size:Ke,sizeShow:Ye,sizeLoad:Xe,table:We,isNoCreteItem:oe,iconView:Ue,listView:Je,btnPopover:$e,diskAnalysis:te,watchDeleteFileData:function(e){if(0!==Object.keys(e).length){var t=e.type,n=e.path;e.isNew&&(ue.value=[]),"dir"===t?le.value=le.value.filter(function(e){return e.path!==n}):pe.value=pe.value.filter(function(e){return e.path!==n}),Se.value={},w.value.total=et.value.length,it()}},watchCreateListType:rt,sizeComputed:Qe,checkRoot:Ze,initMain:ut,bindKeydown:nt,unbindKeydown:at,initNavBtn:Ge,refreshList:lt,refreshFilesList:ct,init:function(){e.getGlobalInfo(),Ne(),function(){try{K(c(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,F({sName:"disk_analysis"});case 1:t=e.v,n=t.data,Object.assign(te.value,{reqEnd:!0,isSetup:n.status&&n.setup&&n.endtime>-1,isBuy:n.endtime>-1});case 2:return e.a(2)}},e)})))}catch(e){}}(),B("searchFile")&&(bi(),U("searchFile")),Re(j.value)},$reset:function(){le.value=[],pe.value=[],he.value=[],me.value=[],ge.value=[],N.value=!1,R.value=!1,w.value.param.search="",J(["/files?action=GetDirNew","/system?action=GetDiskInfo","/task?action=get_task_lists","/plugin?action=get_soft_find","/files?action=get_files_store"])},keydown:tt}},{persist:[{storage:localStorage,paths:["fileTabList"]}]})),Ku=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));t("aW",Ku)}}})}();
Save File
Cancel