filecat 5.18.6 → 5.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +5 -5
  2. package/build/dist/129.8205cc2ebe117960bc3a.js +1 -0
  3. package/build/dist/330.9c13b12d9a61020e10e4.js +2 -0
  4. package/build/dist/{402.b269a6a99df5cd6841a9.js → 402.ea60dc89724903328186.js} +2 -2
  5. package/build/dist/{441.a4bd64fd660e2c30ae9d.js → 441.6b3f5167753ee20cfa70.js} +2 -2
  6. package/build/dist/{502.279a81f2b27aa7f9edab.js → 502.8f3b944d6989910055f7.js} +2 -2
  7. package/build/dist/{523.21bc6d99d36cfe551b5c.js → 523.43f77ee6967d01ae5aff.js} +2 -2
  8. package/build/dist/{636.fc1648927c1e40ec1fed.js → 636.13a30148cf6cc61c5de7.js} +2 -2
  9. package/build/dist/{659.cf0d0b96f9833d9c316c.js → 659.1cfc2a2d6030dc20a896.js} +2 -2
  10. package/build/dist/{696.afd023e9ac903362ff82.js → 696.a056a3e48b96ef454eaa.js} +2 -2
  11. package/build/dist/{759.544afa93ae804a04ab2b.js → 759.91dbd0e6cab45b87d2af.js} +2 -2
  12. package/build/dist/{827.f42f9f7f3dd3610da269.js → 827.c8279965745ae3aad44b.js} +2 -2
  13. package/build/dist/{943.57fa1270faa031569bf4.js → 943.6541bcc0446ea4f807c0.js} +2 -2
  14. package/build/dist/index.html +1 -1
  15. package/build/dist/main.206281516b486b2e2d09.js +2 -0
  16. package/build/dist/{main.748a4b4342c9a90fd3b7.js.LICENSE.txt → main.206281516b486b2e2d09.js.LICENSE.txt} +3 -3
  17. package/build/main.js +1 -1
  18. package/package.json +1 -4
  19. package/shell/net-agent/git-clone.bat +23 -0
  20. package/shell/net-agent/git-pull.bat +17 -0
  21. package/shell/net-agent/git-push.bat +17 -0
  22. package/build/dist/330.e5dc8b916f416f6a83be.js +0 -2
  23. package/build/dist/main.748a4b4342c9a90fd3b7.js +0 -2
  24. /package/build/dist/{330.e5dc8b916f416f6a83be.js.LICENSE.txt → 330.9c13b12d9a61020e10e4.js.LICENSE.txt} +0 -0
  25. /package/build/dist/{402.b269a6a99df5cd6841a9.js.LICENSE.txt → 402.ea60dc89724903328186.js.LICENSE.txt} +0 -0
  26. /package/build/dist/{441.a4bd64fd660e2c30ae9d.js.LICENSE.txt → 441.6b3f5167753ee20cfa70.js.LICENSE.txt} +0 -0
  27. /package/build/dist/{502.279a81f2b27aa7f9edab.js.LICENSE.txt → 502.8f3b944d6989910055f7.js.LICENSE.txt} +0 -0
  28. /package/build/dist/{523.21bc6d99d36cfe551b5c.js.LICENSE.txt → 523.43f77ee6967d01ae5aff.js.LICENSE.txt} +0 -0
  29. /package/build/dist/{636.fc1648927c1e40ec1fed.js.LICENSE.txt → 636.13a30148cf6cc61c5de7.js.LICENSE.txt} +0 -0
  30. /package/build/dist/{659.cf0d0b96f9833d9c316c.js.LICENSE.txt → 659.1cfc2a2d6030dc20a896.js.LICENSE.txt} +0 -0
  31. /package/build/dist/{696.afd023e9ac903362ff82.js.LICENSE.txt → 696.a056a3e48b96ef454eaa.js.LICENSE.txt} +0 -0
  32. /package/build/dist/{759.544afa93ae804a04ab2b.js.LICENSE.txt → 759.91dbd0e6cab45b87d2af.js.LICENSE.txt} +0 -0
  33. /package/build/dist/{827.f42f9f7f3dd3610da269.js.LICENSE.txt → 827.c8279965745ae3aad44b.js.LICENSE.txt} +0 -0
  34. /package/build/dist/{943.57fa1270faa031569bf4.js.LICENSE.txt → 943.6541bcc0446ea4f807c0.js.LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
 
2
2
  # ![](./src/web/meta/resources/img/logo-70.png) FileCat
3
3
 
4
- FileCat 是一个基于 Web 的文件服务器、服务器管理工具。集成了文件管理、超大日志查看、远程终端访问、系统进程监控,以及包括 VPN、SSH、RDP、HTTP、TCP 等多种网络代理功能。支持windows、linux、mac。
4
+ FileCat 是一个基于 Web 的文件服务器、服务器管理工具。集成了文件管理、超大日志查看、远程终端访问、系统进程监控,以及包括 TUN、SSH、RDP、HTTP、TCP 等多种网络代理功能。支持windows、linux、mac。
5
5
 
6
6
  本项目是对[filebrowser](https://github.com/filebrowser/filebrowser)的功能增强,使用和filebrowser一样的ui,以服务器文件管理为基础添加一些服务器控制功能。
7
7
 
8
- FileCat is a web-based server management platform that provides file management, large-scale log viewing, remote terminal access, process monitoring, and various network proxies including VPN, SSH, RDP, HTTP, and TCP.
8
+ FileCat is a web-based server management platform that provides file management, large-scale log viewing, remote terminal access, process monitoring, and various network proxies including TUN, SSH, RDP, HTTP, and TCP.
9
9
 
10
10
  ## 安装方式 / Installation
11
11
  小的bug修复与功能更新,只会在npm上实时发布同步
@@ -13,7 +13,7 @@ FileCat is a web-based server management platform that provides file management,
13
13
  Minor bug fixes and feature updates will only be released and synchronized in real time on npm.
14
14
  ### 1. Npm
15
15
  `npm install -g filecat --registry https://registry.npmmirror.com `
16
- windows下如果安装报错,是需要本地编译一些c++依赖,需要先安装python3和[vs_BuildTools](https://aka.ms/vs/17/release/vs_BuildTools.exe)再执行安装.
16
+ windows下如果安装报错,是需要本地编译一些c++依赖,需要先安装python3和[vs_BuildTools](https://aka.ms/vs/17/release/vs_BuildTools.exe)(选择c++桌面,和Spectre 单独的包,安装这两个库)再执行安装.
17
17
  ### 2. Docker
18
18
  `docker run -d \
19
19
  --name filecat \
@@ -45,8 +45,8 @@ account/password: admin/admin
45
45
  | ![](https://github.com/user-attachments/assets/46b67603-db28-4751-b0c1-4e1ae9cef0d2) | ![](https://github.com/user-attachments/assets/aa6cf4d9-1a0f-4d47-b48d-21c509ec1554) | ![](https://github.com/user-attachments/assets/09d968e5-cd72-4aa3-8351-12ea3c0d7031) |
46
46
 
47
47
 
48
- | 10G 日志查看 | 系统信息 | vpn |
49
- |:------------------------:|:------------------------:|:------------------------:|
48
+ | 10G 日志查看 | 系统信息 | TUN客户端/服务器 |
49
+ |:------------------------:|:------------------------:|:------------------------------------------------------------------------------------:|
50
50
  | ![](https://github.com/user-attachments/assets/20702c83-4f68-47cf-ae12-7694f19dea2a) | ![image](https://github.com/user-attachments/assets/9845638c-8298-4957-86cb-201b3ca2a7d9) | ![](https://github.com/user-attachments/assets/f7a746af-5645-4241-9e2e-69eace3b4ba1) |
51
51
 
52
52
  - **文件管理**: 支持断点分块上传、多个根目录、代码\图片编辑、编辑器模式、白板绘图...
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[129],{5129(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(6540);function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(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 o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||i(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 i(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(){var e=o((0,n.useState)([{id:1,sender:"bot",text:"hello filecat"}]),2),t=e[0],r=e[1],i=o((0,n.useState)(""),2),l=i[0],c=i[1],u=(0,n.useRef)(null);(0,n.useEffect)(function(){var e;null===(e=u.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},[]);var f=function(){var e=l.trim();if(e){var t={id:Date.now(),sender:"user",text:e};r(function(e){return[].concat(a(e),[t])}),c(""),setTimeout(function(){var t={id:Date.now()+1,sender:"bot",text:'你说的是: "'.concat(e,'"')};r(function(e){return[].concat(a(e),[t])})},600)}};return n.createElement("div",{className:"chat-page"},n.createElement("div",{className:"chat-messages"},t.map(function(e){return n.createElement("div",{key:e.id,className:"chat-message ".concat(e.sender)},e.text)}),n.createElement("div",{ref:u})),n.createElement("div",{className:"chat-input-area"},n.createElement("textarea",{value:l,onChange:function(e){var t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,200)+"px",c(t.value)},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),f())},placeholder:"输入消息,Shift+Enter换行",className:"chat-input"}),n.createElement("button",{onClick:f},"发送")))}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 330.9c13b12d9a61020e10e4.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[330],{7374(e,t,n){n.d(t,{e:()=>m});var r=n(6540),o=n(4976),i=n(7767),a=n(4694),l=n(4289),c=n(1443),u=n(5725);function f(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t=(0,i.zy)(),n=f((0,r.useState)([]),2),s=n[0],m=n[1],p=f((0,r.useState)("/"),2),d=p[0],y=p[1],v=f((0,r.useState)(void 0),2),h=v[0],_=v[1];r.useEffect(function(){var t="",n=(0,l.vX)().split("/");n=n.filter(function(e){return e});var r=n.indexOf(e.baseRoute),o=[];if(-1!=r){t=(0,a.IO)(n.slice(0,r),e.baseRoute);for(var i=n.slice(r+1),c=0;c<i.length;c++){var u=i[c];o.push({value:u,href:0===c?"".concat(t).concat(u,"/"):(0,a.IO)(o[c-1].href,u)})}y(t),m(o)}},[t]);var b=function(t){t.stopPropagation(),e.clickFun(t)};return r.createElement("div",{className:"breadcrumbs",onClick:function(e){_(void 0!==h?void 0:"")}},r.createElement(r.Fragment,null,void 0===h?r.createElement(r.Fragment,null,r.createElement("span",{className:"chevron"},r.createElement(o.N_,{to:d,onClick:b},r.createElement("i",{className:"material-icons"},"home"))),s.map(function(e,t){return r.createElement("span",{className:"chevron",key:t},r.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),r.createElement(o.N_,{to:e.href,onClick:b},decodeURIComponent(e.value)))})):r.createElement(u.QM,{click:function(){_(void 0)},children:r.createElement(c.Sm,{width:"100%",placeholder:"输入跳转的目录",handlerEnter:function(t){e.input_path_enter&&e.input_path_enter(t),_(void 0)}})})))}},8844(e,t,n){n.d(t,{B:()=>b});var r=n(6540),o=n(7022),i=n(7444),a=n(4694),l=n(6417),c=n(6007),u=n(3430);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}function s(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(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 m(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return p(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function p(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],p=m.p,d=i[2];n>3?(o=d===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(l=0,m.v=r,m.n=i[1]):p<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,m.n=d,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,d){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&p(f,d),l=f,c=d;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),p(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(p(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,p(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,p(s,"constructor",u),p(u,"constructor",c),c.displayName="GeneratorFunction",p(u,o,"GeneratorFunction"),p(s),p(s,o,"Generator"),p(s,r,function(){return this}),p(s,"toString",function(){return"[object Generator]"}),(m=function(){return{w:i,m:d}})()}function p(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}p=function(e,t,n,r){function i(t,n){p(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},p(e,t,n,r)}function d(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)})}}function v(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||h(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 h(e,t){if(e){if("string"==typeof e)return _(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)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e){var t,n,p=v((0,i.L4)(l.A.selectedFileList),2),d=p[0],h=p[1],_=v((0,i.L4)(l.A.nowFileList),2),b=_[0],w=(_[1],v((0,i.L4)(l.A.confirm),2)),g=(w[0],w[1]),E=v((0,i.L4)(l.A.user_base_info),2),k=E[0];E[1];function A(){return(A=y(m().m(function t(n){return m().w(function(t){for(;;)switch(t.n){case 0:e.click&&e.click(n,e.name);case 1:return t.a(2)}},t)}))).apply(this,arguments)}return r.createElement("div",f({},e.extraAttr,{onClick:function(){!function(e){A.apply(this,arguments)}(e.index)},className:"item",role:"button","data-type":e.isLink?"invalid_link":e.type,"data-dir":!e.type||e.type===o.Iw.folder,"aria-selected":null!==(0,a.kW)(d,e.index),"aria-label":e.name,style:{"--filewidth":null!==(t=e.itemWidth)&&void 0!==t?t:"33%"},onDragStart:function(t){return n=e.index,void(d.find(function(e){return e===n})||h([].concat(s(d),[n])));var n},onDrop:function(t){return function(t,n){for(var r,i,a=t.dataTransfer,l=!1,c=0;c<a.items.length;c++)if("file"===a.items[c].kind){l=!0;break}if(!l){var f,s,p;if((null==k||null===(r=k.user_data)||void 0===r?void 0:r.file_list_pagination_mode)===u.yM.pagination){if(f=b.files[n],(null===(s=b.files[n])||void 0===s?void 0:s.type)!==o.Iw.folder)return}else if(f=b.folders[n],b.folders.length<=n)return;g({open:!0,title:"确定将文件移动并覆盖到".concat(null===(i=f)||void 0===i?void 0:i.name,"吗?"),handle:(p=y(m().m(function t(){var n;return m().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.draggable_handle(null===(n=f)||void 0===n?void 0:n.name);case 1:return t.a(2)}},t)})),function(){return p.apply(this,arguments)})})}}(t,e.index)},draggable:void 0!==e.draggable_handle}),void 0===e.icon&&r.createElement("div",null,e.type!==o.Iw.image||null==e.path||null!=k&&null!==(n=k.user_data)&&void 0!==n&&n.not_pre_show_image?r.createElement("i",{className:"material-icons"}):r.createElement("img",{loading:"lazy",src:c.$M.getDownloadUrl(e.path,{mtime:e.mtime,cache:1}),alt:e.name})),void 0!==e.icon&&r.createElement("div",{className:"rotating-div"},r.createElement("span",{className:"material-icons"},e.icon)),r.createElement("div",null,r.createElement("p",{className:"name"},e.name),e.size?r.createElement("p",null,e.size):r.createElement("p",null,"—"),r.createElement("p",null,e.show_mtime)),e.children)}},9330(e,t,n){n.r(t),n.d(t,{default:()=>je});var r=n(6540),o=n(7374),i=n(7444),a=n(6417),l=n(6007),c=n(7767),u=n(7952),f=n(6325),s=n(4289),m=n(3459),p=n(9214),d=n(1443),y=n(7022),v=n(2389),h=n(7523),_=n(8247),b=n(8815),w=n(6960),g=n(7071),E=n(4944),k=n(4188),A=n(3430),O=n(2458),S=n(4251),j=n(3496),P=n(4694),x=n(8844);function L(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return C(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function p(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],p=m.p,d=i[2];n>3?(o=d===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(l=0,m.v=r,m.n=i[1]):p<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,m.n=d,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,d){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&p(f,d),l=f,c=d;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),p(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(C(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,C(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,C(s,"constructor",u),C(u,"constructor",c),c.displayName="GeneratorFunction",C(u,o,"GeneratorFunction"),C(s),C(s,o,"Generator"),C(s,r,function(){return this}),C(s,"toString",function(){return"[object Generator]"}),(L=function(){return{w:i,m}})()}function C(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}C=function(e,t,n,r){function i(t,n){C(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},C(e,t,n,r)}function F(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(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 I(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function G(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){I(i,r,o,a,l,"next",e)}function l(e){I(i,r,o,a,l,"throw",e)}a(void 0)})}}function M(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||T(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){if(e){if("string"==typeof e)return z(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)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e){var t=M((0,i.L4)(a.A.selectedFileList),2),n=t[0],o=t[1],u=M((0,i.L4)(a.A.clickFileList),2),m=u[0],d=u[1],h=M((0,i.L4)(a.A.nowFileList),2),b=h[0],w=h[1],g=M((0,i.L4)(a.A.confirm),2),E=(g[0],g[1]),k=M((0,i.L4)(a.A.enterKey),2),A=k[0],O=(k[1],(0,_.kZ)().click_file),j=((0,v.Bd)().t,(0,c.Zp)()),C=((0,c.zy)(),function(){var t=G(L().m(function t(r,i){var a,l,c,u,f,p;return L().w(function(t){for(;;)switch(t.n){case 0:if(null!==(0,P.kW)(n,r))o((0,P.P1)(n,r));else if("ctrl"===A)o([].concat(F(n),[r]));else if("shift"===A){if(a=(0,P.a7)(n),l=a.max,c=a.min,u=[],r>=l)for(f=l;f<=r;f++)u.push(f);else for(p=c;p>=r;p--)u.push(p);o(u)}else o([r]);if(d([].concat(F(m),[r])),setTimeout(function(){d((0,P.P1)(m,r))},300),e.type!==y.Iw.folder){t.n=2;break}if(void 0===m.find(function(e){return e===r})){t.n=1;break}return j((0,P.IO)((0,s.vX)(),i)),o([]),d([]),w({files:[],folders:[]}),t.a(2);case 1:t.n=3;break;case 2:void 0!==m.find(function(e){return e===r})&&O({name:i,size:e.origin_size,opt_shell:!0,mtime:e.mtime});case 3:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}()),I=M((0,i.L4)(a.A.showPrompt),2),T=(I[0],I[1]),z=function(){var e=G(L().m(function e(t){var r,i;return L().w(function(e){for(;;)switch(e.n){case 0:return r=(0,p.ib)(b,n),i=r.map(function(e){return(0,p.Ok)(e.name)}),e.n=1,l.$M.post("cut",{files:i,to:"".concat((0,s.GG)("file",(0,s.vX)()),"/").concat(t)});case 1:e.v,o([]),E({open:!1,handle:null}),j((0,s.vX)());case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement(x.B,{extraAttr:{onContextMenu:function(t){!function(e,t,n,r){e.preventDefault(),e.stopPropagation();var o=new S.ik;o.path=(0,P.IO)((0,s.vX)(),t),o.filename=t,o.x=e.clientX,o.y=e.clientY,o.type=n?y.Iw.folder:(0,S.uL)(t),o.size=r,T({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:o})}(t,e.name,e.type===y.Iw.folder,e.origin_size)}},draggable_handle:z,name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,isLink:e.isLink,path:e.path,icon:e.icon,show_mtime:e.show_mtime,click:C,itemWidth:e.itemWidth})}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}function X(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(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)?U(e,t):void 0}}(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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(e){var t,n,o=e.handleContextMenu,l=e.file_list,c=e.folder_list,u=e.clickBlank,f=X((0,i.L4)(a.A.user_base_info),2),s=f[0],m=(f[1],(0,r.useRef)(null)),d=(0,v.Bd)().t,y=(0,p.OJ)(),h=(0,_.hg)().file_is_running,b=X((0,i.L4)(a.A.fileShellShow),2),w=b[0],g=b[1],E=X((0,i.L4)(a.A.enterKey),2),k=(E[0],E[1],X((0,i.L4)(a.A.selectedFileList),2)),A=(k[0],k[1],(0,r.useMemo)(function(){var e;return null!==(e=null==c?void 0:c.length)&&void 0!==e?e:0},[c]));return(0,p.ei)(m),(0,p.UK)(l,c,m),(0,r.useEffect)(function(){return function(){w.show&&g({show:!1,path:""})}},[]),r.createElement("div",{onContextMenu:o,id:"listing",style:{paddingBottom:"10rem"},className:"mosaic file-icons ".concat(null!==(t=null==s||null===(n=s.user_data)||void 0===n?void 0:n.file_list_show_type)&&void 0!==t?t:""),ref:m},c&&c.length>0&&r.createElement("h2",null,d("文件夹")),c&&r.createElement("div",{onClick:u},c.map(function(e,t){return r.createElement(r.Fragment,{key:t},r.createElement(N,D({itemWidth:y,index:t},e)))})),l&&l.length>0&&r.createElement("h2",{onClick:u},d("文件")),l&&r.createElement("div",{onClick:u},l.map(function(e,t){return r.createElement(r.Fragment,{key:t+A},r.createElement(N,D({icon:h(e.name)?"refresh":void 0,itemWidth:y,index:t+A},e)))})))}function B(e){var t,n,o=e.handleContextMenu,l=e.list,c=e.clickBlank,u=X((0,i.L4)(a.A.user_base_info),2),f=u[0],s=(u[1],(0,r.useRef)(null)),m=((0,v.Bd)().t,(0,p.OJ)()),d=(0,_.hg)().file_is_running,y=X((0,i.L4)(a.A.fileShellShow),2),h=y[0],b=y[1],w=X((0,i.L4)(a.A.enterKey),2),g=(w[0],w[1],X((0,i.L4)(a.A.selectedFileList),2)),E=(g[0],g[1],X((0,i.L4)(a.A.file_page),2)),k=(E[0],E[1]);return(0,p.UK)(l,[],s),(0,p.ei)(s),(0,p.SQ)(s,function(){k(function(e){return e.page_num<0?e:{page_size:e.page_size,page_num:e.page_num+1}})},function(){}),(0,r.useEffect)(function(){return function(){h.show&&b({show:!1,path:""})}},[]),r.createElement("div",{onContextMenu:o,id:"listing",style:{paddingBottom:"10rem"},className:"mosaic file-icons ".concat(null!==(t=null==f||null===(n=f.user_data)||void 0===n?void 0:n.file_list_show_type)&&void 0!==t?t:""),ref:s},l&&r.createElement("div",{onClick:c},l.map(function(e,t){return r.createElement(r.Fragment,{key:t},r.createElement(N,D({icon:d(e.name)?"refresh":void 0,itemWidth:m,index:t},e)))})))}var K=n(5997),W=n(2042),H=n(2730),R=n(5725),Y=n(447);function Z(e){return Z="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},Z(e)}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Z(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return ee(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function p(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],p=m.p,d=i[2];n>3?(o=d===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(l=0,m.v=r,m.n=i[1]):p<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,m.n=d,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,d){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&p(f,d),l=f,c=d;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),p(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ee(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ee(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,ee(s,"constructor",u),ee(u,"constructor",c),c.displayName="GeneratorFunction",ee(u,o,"GeneratorFunction"),ee(s),ee(s,o,"Generator"),ee(s,r,function(){return this}),ee(s,"toString",function(){return"[object Generator]"}),(Q=function(){return{w:i,m}})()}function ee(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ee=function(e,t,n,r){function i(t,n){ee(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ee(e,t,n,r)}function te(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function ne(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){te(i,r,o,a,l,"next",e)}function l(e){te(i,r,o,a,l,"throw",e)}a(void 0)})}}function re(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||oe(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 oe(e,t){if(e){if("string"==typeof e)return ie(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)?ie(e,t):void 0}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ae={},le=Object.values(A.UG);function ce(){var e=(0,v.Bd)().t,t=(0,c.zy)(),n=(0,c.Zp)(),o=((0,_.MH)().check_user_auth,re((0,i.L4)(a.A.nowFileList),2)),u=o[0],m=(o[1],re((0,i.L4)(a.A.uploadFiles),2)),d=(m[0],m[1]),b=re((0,i.L4)(a.A.showPrompt),2),w=(b[0],b[1]),g=re((0,i.L4)(a.A.selectedFileList),2),A=g[0],O=(g[1],re((0,i.L4)(a.A.copyedFileList),2)),x=O[0],L=O[1],C=re((0,i.L4)(a.A.cutedFileList),2),F=C[0],I=C[1],G=re((0,i.L4)(a.A.selectedFileList),2),M=(G[0],G[1]),T=re((0,i.L4)(a.A.clickFileList),2),z=(T[0],T[1]),N=re((0,i.L4)(a.A.fileShellShow),2),D=N[0],X=N[1],U=re((0,i.L4)(a.A.file_root_list),2),$=U[0],B=(U[1],re((0,i.L4)(a.A.file_root_index),2)),Z=B[0],q=B[1],V=re((0,r.useState)(void 0),2),ee=(V[0],V[1],re((0,r.useState)(""),2)),te=(ee[0],ee[1],re((0,i.L4)(a.A.workflow_show),2)),ie=te[0],ce=te[1],ue=re((0,i.L4)(a.A.workflow_realtime_show),2),fe=(ue[0],ue[1],re((0,i.L4)(a.A.work_flow_show),2)),se=fe[0],me=(fe[1],(0,r.useContext)(h.F).initUserInfo),pe=re((0,i.L4)(a.A.user_base_info),2),de=pe[0],ye=(pe[1],(0,_.kZ)().click_file,re((0,i.L4)(a.A.prompt_card),2)),ve=(ye[0],ye[1]),he=(0,r.useMemo)(function(){return u.files.reduce(function(e,t){return e+(t.type!==y.Iw.folder?1:0)},0)},[u]),_e=(0,r.useMemo)(function(){var e,t;return u.files.reduce(function(e,t){return e+(t.type===y.Iw.folder?1:0)},0)+(null!==(e=null===(t=u.folders)||void 0===t?void 0:t.length)&&void 0!==e?e:0)},[u]);function be(e){(0,W.LW)(e)}(0,r.useEffect)(function(){ae={}},[t]);var we=function(){var e=ne(Q().m(function e(t){return Q().w(function(e){for(;;)switch(e.n){case 0:return q(t),e.n=1,l.$M.post("base_switch",{root_index:t});case 1:return e.n=2,me();case 2:n("/file/"),M([]),z([]);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();function ge(){return(ge=ne(Q().m(function e(){var t,n,r;return Q().w(function(e){for(;;)switch(e.n){case 0:return r=(0,P.jH)(le,null!==(t=null==de||null===(n=de.user_data)||void 0===n?void 0:n.file_list_show_type)&&void 0!==t?t:""),e.n=1,l.wm.post(j.s.user_save_user_file_list_show_type,{type:r});case 1:me();case 2:return e.a(2)}},e)}))).apply(this,arguments)}var Ee=function(t){ve({open:!0,title:e("信息"),context_div:r.createElement("div",{style:{maxWidth:"25rem"}},r.createElement(R.Yh,{left:e("挂载位置磁盘"),right:null==t?void 0:t.total_size}),r.createElement(R.Yh,{left:"".concat(e("磁盘剩余")),right:null==t?void 0:t.left_size}),r.createElement(R.Yh,{left:"".concat(e("文件系统")),right:null==t?void 0:t.fs_type}),r.createElement(R.Yh,{left:"".concat(e("文件夹数")),right:_e}),r.createElement(R.Yh,{left:"".concat(e("文件数")),right:he}),r.createElement(R.Yh,{left:"".concat(e("当前位置")),right:r.createElement(Y.xP,{context:null==t?void 0:t.now_absolute_path})})),cancel:function(){E.ws.removeMsg(k.HK.file_info)}})},ke=function(){var e=ne(Q().m(function e(){var t,n;return Q().w(function(e){for(;;)switch(e.n){case 0:if(ae.now_absolute_path){e.n=2;break}return E.ws.addMsg(k.HK.file_info,function(e){var n=e.context;t&&(ae=J(J({},ae),n),E.ws.removeMsg(k.HK.file_info),Ee(ae))}),e.n=1,E.ws.sendData(k.HK.file_info,{type:y.Iw.folder,path:(0,s.GG)("file",(0,s.vX)())});case 1:n=e.v,t=n.context,Ee(ae=t);case 2:Ee(ae);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,A.length>0&&r.createElement(K.rA,{icon:"delete",title:e("删除"),onClick:function(){w({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),A.length>0&&r.createElement(K.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var e=(0,p.ib)(u,A);L(e.map(function(e){return(0,p.Ok)(e.name)})),I([]),be("已复制")}}),A.length>0&&r.createElement(K.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var e=(0,p.ib)(u,A);I(e.map(function(e){return(0,p.Ok)(e.name)})),L([]),be("已剪切")}}),(x.length>0||F.length>0)&&r.createElement(K.rA,{onClick:function(){w({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:x.length+F.length}),A.length>0&&r.createElement(K.rA,{icon:"download",title:e("下载"),onClick:function(){for(var e=(0,p.ib)(u,A),t=0;t<e.length;t++){var n=e[t];e[t]=encodeURIComponent((0,p.Ok)(n.name))}var r=l.$M.getDownloadUrl(e);window.open(r)}}),A.length>0&&r.createElement(K.rA,{icon:"compress",title:e("压缩"),onClick:function(){for(var e=(0,p.ib)(u,A),t=0;t<e.length;t++){var n=e[t];e[t]=(0,p.Ok)(n.name)}e&&0!==e.length?w({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,W.zN)("没有选中")}}),1===A.length&&r.createElement(K.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){w({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),se&&r.createElement(K.rA,{icon:"api",title:"workflow",onClick:function(){ce(!ie)}}),r.createElement(K.rA,{icon:"terminal",title:"shell",onClick:function(){D.show?X({show:!1,path:""}):X({show:!0,path:(0,s.GG)("file",(0,s.vX)())})}}),r.createElement(K.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){return ge.apply(this,arguments)}}),r.createElement(K.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){w({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(K.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){w({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(K.rA,{icon:"upload_file",title:e("上传"),onClick:function(){w({show:!0,type:f.PromptEnum.UploadFile,overlay:!0,data:{call:function(e){var t,n=null===(t=e.currentTarget)||void 0===t?void 0:t.files;if(n){for(var r=!!n[0].webkitRelativePath,o=[],i=new Set,a=0;a<n.length;a++){var l=n[a],c=r?l.webkitRelativePath:"".concat(l.webkitRelativePath).concat(l.name);l.fullPath=c,r&&i.add((0,H.S)(c)),o.push(l)}var u=[];if(r){var s,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=oe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(i);try{for(m.s();!(s=m.n()).done;){var p=s.value;u.push({isDir:!0,fullPath:p,name:p})}}catch(e){m.e(e)}finally{m.f()}}u.push.apply(u,o),d(u),w({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),r.createElement(K.rA,{icon:"info",title:e("信息"),onClick:ke}),r.createElement(K.rA,{icon:"more_vert",title:e("切换目录"),onClick:function(e){var t=new S.ik;t.x=e.clientX,t.y=e.clientY,t.type=y.Iw.directory,t.items=$,t.item_pre_value=Z,t.textClick=function(){var e=ne(Q().m(function e(t){return Q().w(function(e){for(;;)switch(e.n){case 0:we(t),w({data:void 0,overlay:!1,type:"",show:!1});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),w({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:t})}}))}var ue=n(2543);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach(function(t){me(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function me(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){return pe="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},pe(e)}function de(e){return function(e){if(Array.isArray(e))return Ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ge(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 ye(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return ve(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function p(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],p=m.p,d=i[2];n>3?(o=d===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(l=0,m.v=r,m.n=i[1]):p<d&&(o=n<3||i[0]>r||r>d)&&(i[4]=n,i[5]=r,m.n=d,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,d){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&p(f,d),l=f,c=d;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),p(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ve(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ve(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,ve(s,"constructor",u),ve(u,"constructor",c),c.displayName="GeneratorFunction",ve(u,o,"GeneratorFunction"),ve(s),ve(s,o,"Generator"),ve(s,r,function(){return this}),ve(s,"toString",function(){return"[object Generator]"}),(ye=function(){return{w:i,m}})()}function ve(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ve=function(e,t,n,r){function i(t,n){ve(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ve(e,t,n,r)}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ge(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function _e(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function be(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){_e(i,r,o,a,l,"next",e)}function l(e){_e(i,r,o,a,l,"throw",e)}a(void 0)})}}function we(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 r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||ge(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 ge(e,t){if(e){if("string"==typeof e)return Ee(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)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ke,Ae=r.lazy(function(){return Promise.all([n.e(856),n.e(659)]).then(n.bind(n,3659))}),Oe=r.lazy(function(){return Promise.all([n.e(856),n.e(636)]).then(n.bind(n,1636))}),Se=r.lazy(function(){return Promise.all([n.e(856),n.e(402)]).then(n.bind(n,3402))});function je(){var e=we((0,i.L4)(a.A.editorSetting),2),t=(e[0],e[1]),n=we((0,i.L4)(a.A.file_preview),2),P=(n[0],n[1]),x=(0,v.Bd)().t,L=(0,c.zy)(),C=(0,c.Zp)(),F=(0,_.MH)().check_user_auth,I=we((0,i.L4)(a.A.nowFileList),2),G=I[0],M=I[1],T=we((0,i.L4)(a.A.showPrompt),2),z=(T[0],T[1]),N=we((0,i.L4)(a.A.selectedFileList),2),D=(N[0],N[1]),X=we((0,i.L4)(a.A.clickFileList),2),U=(X[0],X[1]),K=we((0,i.L4)(a.A.fileShellShow),2),W=(K[0],K[1]),H=we((0,r.useState)(""),2),R=H[0],Y=H[1],Z=we((0,i.L4)(a.A.workflow_show),2),q=Z[0],J=(Z[1],we((0,i.L4)(a.A.workflow_realtime_show),2)),V=J[0],Q=(J[1],we((0,i.L4)(a.A.work_flow_show),2)),ee=(Q[0],Q[1]),te=(0,r.useContext)(h.F).initUserInfo,ne=we((0,i.L4)(a.A.user_base_info),2),re=ne[0],oe=(ne[1],(0,_.kZ)().click_file,we((0,i.L4)(a.A.to_running_files),2)),ie=(oe[0],oe[1]),ae=we((0,i.L4)(a.A.router_jump),2),le=(ae[0],ae[1]),fe=we((0,i.L4)(a.A.file_page),2),me=fe[0],ve=fe[1],_e=function(){var e=be(ye().m(function e(){var t;return ye().w(function(e){for(;;)switch(e.n){case 0:return(t=new g.Nd).dir_path="".concat((0,s.GG)("file",(0,s.vX)())),E.ws.addMsg(k.HK.workflow_realtime,function(e){var t=e.context;if(e.context){var n,r=he(t.sucess_file_list);try{for(r.s();!(n=r.n()).done;){var o=n.value;(0,p.Ys)(o)}}catch(e){r.e(e)}finally{r.f()}var i,a=he(t.failed_file_list);try{for(a.s();!(i=a.n()).done;){var l=i.value;(0,p.V$)(l)}}catch(e){a.e(e)}finally{a.f()}ie(new Set(t.running_file_list))}}),e.n=1,E.ws.sendData(k.HK.workflow_realtime,t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=be(ye().m(function e(t){var n,r,o,i,a,l,c,u,f;return ye().w(function(e){for(;;)switch(e.n){case 0:o=!1,i=he(null!==(n=t.files)&&void 0!==n?n:[]);try{for(i.s();!(a=i.n()).done;)(l=a.value).show_mtime=l.mtime?(0,w.$)(l.mtime):"",l.origin_size=l.size,l.size=(0,b.v7)(l.size),o||!l.name.endsWith(".workflow.yml")&&!l.name.endsWith(".act")||(o=!0,Promise.resolve().then(function(){_e()})),l.name===g.SB&&(o=!0)}catch(e){i.e(e)}finally{i.f()}c=he(null!==(r=t.folders)&&void 0!==r?r:[]);try{for(c.s();!(u=c.n()).done;)(f=u.value).show_mtime=f.mtime?(0,w.$)(f.mtime):"",f.name===g.SB&&(o=!0)}catch(e){c.e(e)}finally{c.f()}ee(o);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ee=function(){var e=be(ye().m(function e(){var t,n,r,o,i;return ye().w(function(e){for(;;)switch(e.n){case 0:if(t=(0,s.GG)("file",(0,s.vX)()),re.user_data.file_list_pagination_mode!==A.yM.pagination){e.n=3;break}if(!(me.page_num<0)){e.n=1;break}return e.a(2);case 1:return e.n=2,l.$M.post("file_get_page",{param_path:t,page_num:me.page_num,page_size:me.page_size});case 2:n=e.v,o=n.data,null!==(r=o.files)&&void 0!==r&&r.length||ve({page_size:me.page_size,page_num:-1}),o.files=(0,ue.cloneDeep)([].concat(de(G.files),de(o.files))),e.n=5;break;case 3:return e.n=4,l.$M.get(t);case 4:n=e.v;case 5:if(n.code===m.m.Sucess){e.n=6;break}return e.a(2);case 6:i=n.data,(0,p.yC)(i,re.user_data.dir_show_type),ge(n.data),M(n.data),ke=n.data;case 7:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),je=function(){ve({page_num:1,page_size:200})};(0,r.useEffect)(function(){return je(),be(ye().m(function e(){return ye().w(function(e){for(;;)switch(e.n){case 0:ie(new Set);case 1:return e.a(2)}},e)}))},[]);var Pe=function(){Ee(),t({open:!1}),P({open:!1}),ee(!1)};(0,r.useEffect)(function(){M({files:[],folders:[]}),je(),Pe()},[L]),(0,r.useEffect)(function(){Pe()},[me]);var xe=function(e){e.target===e.currentTarget&&D([])},Le=function(e){var t;e.preventDefault(),e.stopPropagation();var n=new S.ik;n.x=e.clientX,n.y=e.clientY,n.type=y.Iw.directory;var o=[{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.time_minx_max?"green":void 0}},x("时间逆序")),v:A.t8.time_minx_max},{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},x("时间顺序")),v:A.t8.time_max_min}],i=[{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.size_min_max?"green":void 0}},x("大小逆序")),v:A.t8.size_min_max},{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},x("大小顺序")),v:A.t8.size_max_min}],a=[{r:r.createElement("span",{style:{color:re.user_data.file_list_pagination_mode&&re.user_data.file_list_pagination_mode!==A.yM.all?void 0:"green"}},x("全部加载文件")),v:A.yM.all},{r:r.createElement("span",{style:{color:re.user_data.file_list_pagination_mode===A.yM.pagination?"green":void 0}},x("分页滚动加载文件")),v:A.yM.pagination}],c=[{r:x("文件排序"),v:"",items:[{r:r.createElement("span",{style:{color:re.user_data.dir_show_type?void 0:"green"}},x("系统默认")),v:A.t8.defualt},{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.name?"green":void 0}},x("名字")),v:A.t8.name},{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.time_minx_max||re.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},x("修改时间")),v:!1,items:o},{r:r.createElement("span",{style:{color:re.user_data.dir_show_type===A.t8.size_min_max||re.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},x("文件大小")),v:!1,items:i}]},{r:x("文件加载方式"),v:"",items:a}];F(A.oV.code_resource)&&c.push({r:x("添加http资源根目录"),v:"code_resource"}),F(A.oV.http_proxy)&&c.push({r:x("在此目录下载http资源"),v:"http_resource"}),null!=re&&null!==(t=re.user_data)&&void 0!==t&&t.quick_cmd&&(0,p.LL)(de(re.user_data.quick_cmd),c),n.items=c,n.textClick=function(){var e=be(ye().m(function e(t){var n,r,o,i;return ye().w(function(e){for(;;)switch(e.n){case 0:if(!1!==t){e.n=1;break}return e.a(2);case 1:if(n={},"code_resource"!==t){e.n=3;break}return e.n=2,E.ws.sendData(k.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 2:return r=e.v,le({page_self_router_api_data:["",r.context.now_absolute_path]}),z({data:void 0,overlay:!1,type:"",show:!1}),C("/setting/customer_router/"),e.a(2);case 3:if("http_resource"!==t){e.n=5;break}return e.n=4,E.ws.sendData(k.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 4:return o=e.v,le({http_download_map_path:o.context.now_absolute_path}),z({data:void 0,overlay:!1,type:"",show:!1}),C("/proxy/http/"),e.a(2);case 5:"object"===pe(t)&&"quick_cmd"===t.tag?(i=t.cmd)&&(i.endsWith("\r")||(i+="\r",W({show:!0,path:(0,s.GG)("file",(0,s.vX)()),cmd:i}))):t===A.yM.all||t===A.yM.pagination?n.is_pagination_mode=!0:n.is_dir_list_type=!0;case 6:return e.n=7,l.wm.post(j.s.user_save_user_file_list_show_type,se({type:t},n));case 7:return e.n=8,te();case 8:z({data:void 0,overlay:!1,type:"",show:!1}),C((0,s.vX)());case 9:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),z({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:n})};return r.createElement(r.Fragment,null,r.createElement(u.A,{left_children:r.createElement(d.$Z,{handleEnterPress:function(){var e,t;if(ke){D([]),U([]);var n,r=[],o=[],i=he(null!==(e=ke.files)&&void 0!==e?e:[]);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.name.includes(R)&&r.push(a)}}catch(e){i.e(e)}finally{i.f()}var l,c=he(null!==(t=ke.folders)&&void 0!==t?t:[]);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.name.includes(R)&&o.push(u)}}catch(e){c.e(e)}finally{c.f()}M({files:r,folders:o})}},placeholder:x("搜索当前目录"),icon:"search",value:"",handleInputChange:function(e){Y(e)},max_width:"25em"})},r.createElement(ce,null)),r.createElement(o.e,{baseRoute:"file",clickFun:function(){D([]),U([])},input_path_enter:function(e){var t;(0,O.Z1)(e)?(e=e.replace(0===(t=re.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),C(e)):C((0,O.Jn)((0,s.vX)(),e)),D([]),U([]),M({files:[],folders:[]})}}),re.user_data.file_list_pagination_mode===A.yM.pagination?r.createElement(B,{handleContextMenu:Le,clickBlank:xe,list:G.files}):r.createElement($,{handleContextMenu:Le,file_list:G.files,folder_list:G.folders,clickBlank:xe}),r.createElement(Se,null),q&&r.createElement(Ae,null),V.open&&r.createElement(Oe,null))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 402.b269a6a99df5cd6841a9.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[402],{3402(t,n,e){e.r(n),e.d(n,{default:()=>m});var r=e(6540),o=e(7856),i=e(4238),u=e(4944),c=e(7444),a=e(6417),f=e(4405),l=e(505);function s(){var t,n,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,r,o,i){var a=r&&r.prototype instanceof c?r:c,f=Object.create(a.prototype);return h(f,"_invoke",function(e,r,o){var i,c,a,f=0,l=o||[],s=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(n,e){return i=n,c=0,a=t,h.n=e,u}};function d(e,r){for(c=e,a=r,n=0;!s&&f&&!o&&n<l.length;n++){var o,i=l[n],d=h.p,p=i[2];e>3?(o=p===r)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=e<2&&d<i[1])?(c=0,h.v=r,h.n=i[1]):d<p&&(o=e<3||i[0]>r||r>p)&&(i[4]=e,i[5]=r,h.n=p,c=0))}if(o||e>1)return u;throw s=!0,r}return function(o,l,p){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&d(l,p),c=l,a=p;(n=c<2?t:a)||!s;){i||(c?c<3?(c>1&&(h.n=-1),d(c,a)):h.n=a:h.v=a);try{if(f=2,i){if(c||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,c<2&&(c=0)}else 1===c&&(n=i.return)&&n.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((n=(s=h.n<0)?a:e.call(r,h))!==u)break}catch(n){i=t,c=1,a=n}finally{f=1}}return{value:n,done:s}}}(e,o,i),!0),f}var u={};function c(){}function a(){}function f(){}n=Object.getPrototypeOf;var l=[][r]?n(n([][r]())):(h(n={},r,function(){return this}),n),d=f.prototype=c.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,h(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return a.prototype=f,h(d,"constructor",f),h(f,"constructor",a),a.displayName="GeneratorFunction",h(f,o,"GeneratorFunction"),h(d),h(d,o,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(s=function(){return{w:i,m:p}})()}function h(t,n,e,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}h=function(t,n,e,r){function i(n,e){h(t,n,function(t){return this._invoke(n,e,t)})}n?o?o(t,n,{value:e,enumerable:!r,configurable:!r,writable:!r}):t[n]=e:(i("next",0),i("throw",1),i("return",2))},h(t,n,e,r)}function d(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}function p(t){return function(){var n=this,e=arguments;return new Promise(function(r,o){var i=t.apply(n,e);function u(t){d(i,r,o,u,c,"next",t)}function c(t){d(i,r,o,u,c,"throw",t)}u(void 0)})}}function y(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,u,c=[],a=!0,f=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=i.call(e)).done)&&(c.push(r.value),c.length!==n);a=!0);}catch(t){f=!0,o=t}finally{try{if(!a&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return c}}(t,n)||function(t,n){if(t){if("string"==typeof t)return w(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?w(t,n):void 0}}(t,n)||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 w(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var v=r.lazy(function(){return e.e(614).then(e.bind(e,5614))});function m(t){var n=y((0,r.useState)(null),2),e=n[0],h=n[1],d=y((0,c.L4)(a.A.fileShellShow),2),w=d[0],m=(d[1],y((0,c.L4)(a.A.file_shell_hidden),2)),b=m[0],g=(m[1],y((0,r.useState)(!1),2)),_=(g[0],g[1]),S=y((0,c.L4)(a.A.user_base_info),2),F=S[0],k=(S[1],"dark"===F.user_data.theme?"#FFFFFF":"#000000"),j=function(){var t=p(s().m(function t(){var n,e,r;return s().w(function(t){for(;;)switch(t.n){case 0:n=new o.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:k,cursor:k,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),r=function(t){n.write(t)},e=function(t){n.clear(),n.write(t),e=r},u.ws.addMsg(i.HK.shell_getting,function(t){e(t.context)}),u.ws.addMsg(i.HK.shell_copy,function(t){t.context&&(0,l.l)(t.context),n.focus()}),n.onData(function(){var t=p(s().m(function t(n){var e;return s().w(function(t){for(;;)switch(t.n){case 0:return(e=new i.hf(i.HK.shell_send)).context=n,t.n=1,u.ws.send(e);case 1:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}()),h(n);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),O=function(){p(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:e&&(e.dispose(),h(null)),u.ws.isAilive()&&u.ws.setPromise(function(){var t=p(s().m(function t(n){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,u.ws.unConnect();case 1:n();case 2:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}());case 1:return t.a(2)}},t)}))()};(0,r.useEffect)(function(){return function(){O()}},[]),(0,r.useEffect)(function(){w.show?e?w.cmd&&u.ws.sendData(i.HK.shell_send,w.cmd):(j(),_(!0)):O()},[w]);return r.createElement(v,{show:w.show,file_shell_hidden:b,terminal:e,init:function(t,n){e.writeln("open shell... ");var r=new i.hf(i.HK.shell_open),o=new f.n;o.init_path=w.path,o.rows=t,o.cols=n,o.http_token=localStorage.getItem("token"),r.context=o,u.ws.send(r),w.cmd&&u.ws.sendData(i.HK.shell_send,w.cmd)}})}}}]);
1
+ /*! For license information please see 402.ea60dc89724903328186.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[402],{3402(t,n,e){e.r(n),e.d(n,{default:()=>m});var r=e(6540),o=e(7856),i=e(4188),u=e(4944),c=e(7444),a=e(6417),f=e(4405),l=e(505);function s(){var t,n,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,r,o,i){var a=r&&r.prototype instanceof c?r:c,f=Object.create(a.prototype);return h(f,"_invoke",function(e,r,o){var i,c,a,f=0,l=o||[],s=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(n,e){return i=n,c=0,a=t,h.n=e,u}};function d(e,r){for(c=e,a=r,n=0;!s&&f&&!o&&n<l.length;n++){var o,i=l[n],d=h.p,p=i[2];e>3?(o=p===r)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=e<2&&d<i[1])?(c=0,h.v=r,h.n=i[1]):d<p&&(o=e<3||i[0]>r||r>p)&&(i[4]=e,i[5]=r,h.n=p,c=0))}if(o||e>1)return u;throw s=!0,r}return function(o,l,p){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&d(l,p),c=l,a=p;(n=c<2?t:a)||!s;){i||(c?c<3?(c>1&&(h.n=-1),d(c,a)):h.n=a:h.v=a);try{if(f=2,i){if(c||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,c<2&&(c=0)}else 1===c&&(n=i.return)&&n.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((n=(s=h.n<0)?a:e.call(r,h))!==u)break}catch(n){i=t,c=1,a=n}finally{f=1}}return{value:n,done:s}}}(e,o,i),!0),f}var u={};function c(){}function a(){}function f(){}n=Object.getPrototypeOf;var l=[][r]?n(n([][r]())):(h(n={},r,function(){return this}),n),d=f.prototype=c.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,h(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return a.prototype=f,h(d,"constructor",f),h(f,"constructor",a),a.displayName="GeneratorFunction",h(f,o,"GeneratorFunction"),h(d),h(d,o,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(s=function(){return{w:i,m:p}})()}function h(t,n,e,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}h=function(t,n,e,r){function i(n,e){h(t,n,function(t){return this._invoke(n,e,t)})}n?o?o(t,n,{value:e,enumerable:!r,configurable:!r,writable:!r}):t[n]=e:(i("next",0),i("throw",1),i("return",2))},h(t,n,e,r)}function d(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}function p(t){return function(){var n=this,e=arguments;return new Promise(function(r,o){var i=t.apply(n,e);function u(t){d(i,r,o,u,c,"next",t)}function c(t){d(i,r,o,u,c,"throw",t)}u(void 0)})}}function y(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,u,c=[],a=!0,f=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=i.call(e)).done)&&(c.push(r.value),c.length!==n);a=!0);}catch(t){f=!0,o=t}finally{try{if(!a&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return c}}(t,n)||function(t,n){if(t){if("string"==typeof t)return w(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?w(t,n):void 0}}(t,n)||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 w(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var v=r.lazy(function(){return e.e(614).then(e.bind(e,5614))});function m(t){var n=y((0,r.useState)(null),2),e=n[0],h=n[1],d=y((0,c.L4)(a.A.fileShellShow),2),w=d[0],m=(d[1],y((0,c.L4)(a.A.file_shell_hidden),2)),b=m[0],g=(m[1],y((0,r.useState)(!1),2)),_=(g[0],g[1]),S=y((0,c.L4)(a.A.user_base_info),2),F=S[0],k=(S[1],"dark"===F.user_data.theme?"#FFFFFF":"#000000"),j=function(){var t=p(s().m(function t(){var n,e,r;return s().w(function(t){for(;;)switch(t.n){case 0:n=new o.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:k,cursor:k,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),r=function(t){n.write(t)},e=function(t){n.clear(),n.write(t),e=r},u.ws.addMsg(i.HK.shell_getting,function(t){e(t.context)}),u.ws.addMsg(i.HK.shell_copy,function(t){t.context&&(0,l.l)(t.context),n.focus()}),n.onData(function(){var t=p(s().m(function t(n){var e;return s().w(function(t){for(;;)switch(t.n){case 0:return(e=new i.hf(i.HK.shell_send)).context=n,t.n=1,u.ws.send(e);case 1:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}()),h(n);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),O=function(){p(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:e&&(e.dispose(),h(null)),u.ws.isAilive()&&u.ws.setPromise(function(){var t=p(s().m(function t(n){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,u.ws.unConnect();case 1:n();case 2:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}());case 1:return t.a(2)}},t)}))()};(0,r.useEffect)(function(){return function(){O()}},[]),(0,r.useEffect)(function(){w.show?e?w.cmd&&u.ws.sendData(i.HK.shell_send,w.cmd):(j(),_(!0)):O()},[w]);return r.createElement(v,{show:w.show,file_shell_hidden:b,terminal:e,init:function(t,n){e.writeln("open shell... ");var r=new i.hf(i.HK.shell_open),o=new f.n;o.init_path=w.path,o.rows=t,o.cols=n,o.http_token=localStorage.getItem("token"),r.context=o,u.ws.send(r),w.cmd&&u.ws.sendData(i.HK.shell_send,w.cmd)}})}}}]);