filecat 4.6.0 → 4.7.1

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 (29) hide show
  1. package/README.md +38 -67
  2. package/build/dist/467.3781a513321c2c8d059d.js +2 -0
  3. package/build/dist/523.d50711dd73ff748dbd8d.js +2 -0
  4. package/build/dist/859.f38e42e308fe8117d239.js +2 -0
  5. package/build/dist/{859.b7ddfa663ba2c84040a7.js.LICENSE.txt → 859.f38e42e308fe8117d239.js.LICENSE.txt} +1 -1
  6. package/build/dist/874.65c53193302161627183.js +2 -0
  7. package/build/dist/{943.fcf3e63c5ef9c7f96697.js → 943.e0ce78fe8027d57e8bdb.js} +2 -2
  8. package/build/dist/998.35918cc184b275053643.js +2 -0
  9. package/build/dist/index.html +1 -1
  10. package/build/dist/main.87f0ba91a22cb6dfb881.js +2 -0
  11. package/build/dist/{main.763916ee4cdaa02d4e4f.js.LICENSE.txt → main.87f0ba91a22cb6dfb881.js.LICENSE.txt} +3 -3
  12. package/build/main.js +227 -1
  13. package/build/main.js.LICENSE.txt +7 -8
  14. package/package.json +3 -3
  15. package/shell/config/prebuild-file-path.js +17 -17
  16. package/shell/docker-build.sh +2 -2
  17. package/shell/filecat +1 -1
  18. package/shell/start/run.sh +2 -2
  19. package/build/dist/467.025a59630c115bb81741.js +0 -2
  20. package/build/dist/523.6fa212d8146a849f1192.js +0 -2
  21. package/build/dist/859.b7ddfa663ba2c84040a7.js +0 -2
  22. package/build/dist/874.bfbe455bc52590b560ff.js +0 -2
  23. package/build/dist/998.a3638ab1209721c9b6ea.js +0 -2
  24. package/build/dist/main.763916ee4cdaa02d4e4f.js +0 -2
  25. /package/build/dist/{467.025a59630c115bb81741.js.LICENSE.txt → 467.3781a513321c2c8d059d.js.LICENSE.txt} +0 -0
  26. /package/build/dist/{523.6fa212d8146a849f1192.js.LICENSE.txt → 523.d50711dd73ff748dbd8d.js.LICENSE.txt} +0 -0
  27. /package/build/dist/{874.bfbe455bc52590b560ff.js.LICENSE.txt → 874.65c53193302161627183.js.LICENSE.txt} +0 -0
  28. /package/build/dist/{943.fcf3e63c5ef9c7f96697.js.LICENSE.txt → 943.e0ce78fe8027d57e8bdb.js.LICENSE.txt} +0 -0
  29. /package/build/dist/{998.a3638ab1209721c9b6ea.js.LICENSE.txt → 998.35918cc184b275053643.js.LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -1,72 +1,43 @@
1
1
 
2
- # ![](./src/web/meta/resources/img/logo-70.png) filecat
3
-
4
- - 中文 | [English ](./doc/EN_README.md)
5
- - FileCat 用于帮助开发者搭建一个文件服务器,并提供众多与程序开发人员相关的必备功能。包括带有权限的远程终端(支持rdp桌面、终端命令拦截)、SSH代理、文件在线浏览\编辑\解压缩、白板绘图、自动化构建、系统监控、docker管理、超大日志实时读取等功能(目前可以运行在linux与windows系统下,不支持mac os系统)。
6
- - 它是一个服务程序,使用web访问。可以使用npm执行`npm install filecat -g`全局安装命令,然后执行 `filecat`命令运行,使用参数`filecat --help`可以获取更多参数说明。也支持**二进制**方式直接运行,更多使用方式与参数请参考下文。
7
- ## 一. 截图
8
- ![展示](https://github.com/user-attachments/assets/c763018e-c420-491f-92b4-e8b12149b7cd)
9
-
10
- ## 二. 使用
11
- ### 1. 体验
12
- url: http://filecat.xiaobaidadada.fun:5569/
13
- - 账号密码: `admin`/`admin`
14
- ### 2. npm 方式运行
15
- - 如果你的服务器上已经安装了node和npm,使用 `npm install filecat -g`全局安装,后然后使用`filecat`命令即可运行,或者`npm install filecat`安装到本项目下,使用`npx filecat `运行;
16
- - 如果网络比较差,可以使用淘宝镜像源`npm config set registry https://registry.npmmirror.com`。或者,安装的时候临时使用淘宝镜像源`npm install -g filecat --registry https://registry.npmmirror.com`。
17
- - 许多依赖是预构建放在github上的(支持node 16、18、20、22),如果主机环境访问github很慢(多尝试几下也许就好了),需要编译,查看报错后安装诸如`npm -g install node-addon-api`的依赖。实在访问不了github导致安装不了也可以使用下面的二进制或者docker运行。在windwos上编译可能遇到的问题可以查看这个链接 https://blog.csdn.net/jjocwc/article/details/134152602
18
- ### 3. 二进制文件方式运行
19
- 下载[最新release](https://github.com/xiaobaidadada/filecat/releases)
20
- 然后使用各个平台的解压缩包,里面包含了所有资源以及一个node.exe,然后使用里面使用的run脚本执行;目前只有x64架构的,arm需要自己构建;
21
- 1. 执行命令`run.cmd --port 5567 --base_folder /home ` 在linux下是`run.sh`; 不设置username的话,账号密码默认是admin
22
- 2. 使用例子中的配置文件,执行命令`run.sh --env ./env`;linux下也许需要执行`sudo chmod +x ./run.sh`获得执行权限
23
- ### 4. linux下安装到systemd后台运行
24
- 这里的安装是安装到systemd作为后台进程,默认需要使用root权限,对于Linux系统现在提供自动安装功能,推荐使用这种systemd方式运行;只需要下载最新版本的`filecat-linux`可执行程序后,给与它chod可执行权限,然后运行 `./filecat-linux --install linux`;如果你使用npm安装了filecat,可以直接使用`filecat --install linux`来安装到systemd。
25
- ### 5. docker 方式运行
26
- 使用`docker run -d --name filecat --restart=always --net=host -v /home:/home ghcr.io/xiaobaidadada/filecat:latest --port 5567 --base_folder /home`命令直接运行。
27
-
28
- 说明:
29
- 1. 所有的用于可执行的参数在这里都可用,也可以省略参数,那么参数会使用项目下的env文件。
30
- 2. 可以使用`-v`参数映射一个env配置文件给程序, `-v /home:/home`是管理文件的必要参数(使用`base_folder`参数设置),否则能够看到的只是容器内的临时文件。
31
- 3. `--net=host`参数可以使用项目的所有关于网络的功能(虚拟网络,ddns等),由于在容器内运行,系统基本信息有些获取不到,但是内存和cpu使用率还是可以获取到物理机的。
32
- 4. 如果只是想用文件管理功能,使用docker是可以的,否则还是建议在物理机上安装此程序。
33
- ## 三. 主要特性
34
- - 文件管理
35
- 1. 图片,视频,markdown 等文件格式在线预览。
36
- 2. 代码编辑器,可选择文件打开方式。
37
- 3. 图片编辑器,对图片右键可以进入[图片编辑器](https://github.com/scaleflex/filerobot-image-editor)模式。
38
- 4. studio 编辑器,右键文件夹可以打开一个类似vscode的编辑器页面,可用于linux程序临时开发环境。
39
- 5. [excalidraw](https://github.com/excalidraw/excalidraw)绘图编辑器,这是一个很好用白板工具。
40
- 5. 切换根目录,在设置中添加多个文件夹路径后,可以在右上角选择切换根目录,只对一个session生效。
41
- 6. 终端,内嵌了一个自定义终端,可以实现任意命令的过滤,防止用户执行恶意的类似rm -rf / 命令,因为不是实际的pty环境,所以像node这样的软件想要交互式执行需要添加-i或者自定义处理函数,对于pty执行的程序虽然可以不用输出绝对路径,但是要输入文件的后缀,比如 cmd不能执行但是cmd.exe可以执行。
42
- 7. 超大文本日志查看器,对任意大小的文本右键使用作为日志类型查看,点击窗口后可以使用上下键来快速滚动翻页,还可以实时输出内容。
43
- 8. workflow 这是一个类似github workflow、jenkins 功能的本地自动化构建工具,创建文件的时候选择workflow模式,右键文件运行,也可以自己输入.workflow.yml后缀,不过这样没有文件预处理提示内容(这需要一定的权限才能进行)。
44
- 9. 支持文件的断点上传,分块并发上传。
45
- - ssh代理,ftp代理: 可以管理多个linux服务器,作用和winscp类似,让终端和文件管理更方便。
46
- - http代理,类似postman 的发送http请求功能,还可以作为服务器文件下载工具。
47
- - 网站,是网址收藏夹,可用于保存服务器上其它的网站
48
- - ddns
49
- - http网页代理、rdp代理(windwos远程控制)、rtsp代理播放器,输入直播源,比如监控的url可以实时网页观看
50
- - docker容器,镜像管理,查看日志等功能
51
- - 系统内存cpu信息,进程cpu信息(利用c插件、使用极低的资源,实时查看系统全部进程信息,类似windows的任务管理器),systemd管理(linux下才有)
52
- - wol网络唤醒
53
- - 虚拟网络实现一个轻量的vpn (p2p功能由于国内25以后各地运营商对打洞封锁的更严格,通过ipv4的方式已经不可行了,这个功能现在删除不做维护了);
54
- - 权限,支持各种系统权限,文件操作权限,命令权限.
55
- ## 四. 其它说明
56
- 1. 由于一些库目前不支持mac(比如虚拟网络) **mac下无法使用**上面的安装方式直接安装成功,在windows需要管理员模式下运行,linux需要root权限才可以使用该功能。此外还很多功能没有在macos下测试过,只支持windows和Linux;
57
- 2. 部分功能目前处于demo阶段,未来会持续优化;
58
- 3. 对于想要参与开发的朋友,只需要了解 ts语言,react框架,webpack打包,以及基本的node相关api即可。本项目的所有非dev依赖都是为了本项目而创建或者fork的,感兴趣的朋友也可以参与维护,都采用c++实现,本项目在install的时候会到github下载提前编译好的二进制文件,如果访问github网很差,会退化成本地编译,本地编译在不同的系统的需要安装不同的编译环境,至少目前所有的Ubuntu环境都自带编译c++的环境,只需要安装python就行,对于windows需要安装vs和python。
59
- ## 五. 路线
60
- 1. 优化更多操作细节
61
- 2. 支持更多的文件格式浏览
62
- 3. 支持更多的流媒体功能
63
- 4. 支持更多的ddns平台
64
- 5. 自动化爬虫
65
- 6. 优化虚拟网络,分布式文件同步
66
- ## 六. qq群
2
+ # ![](./src/web/meta/resources/img/logo-70.png) FileCat
3
+
4
+ FileCat is a **web-based server management** tool. It offers features like file management, large-scale log viewing, remote terminal access, system process monitoring, and various network proxies including SSH, RDP, HTTP, and TCP.
5
+
6
+ FileCat 是一个基于web的**服务器管理**工具。提供文件管理、超大日志查看、远程终端、系统进程监控,vpn、ssh\rdp\http\tcp各种网络代理等功能。
7
+
8
+
9
+ ## Install
10
+ 不同的安装方式请参考: https://filecat.xiaobaidadada.fun/#/zh-CN/install.md
11
+
12
+ English: https://filecat.xiaobaidadada.fun/#/en/install.md
13
+
14
+
15
+ ## Detailed Features
16
+ 详细的功能特性请参考文档: https://filecat.xiaobaidadada.fun/
17
+
18
+ 备用地址:https://docs.filecat.xiaobaidadada.fun/
19
+
20
+ ## Demo Experience
21
+ url: http://demo.filecat.xiaobaidadada.fun:5569/
22
+
23
+ 账号密码: `admin`/`admin`
24
+
25
+ english account: `en_admin`/`en_admin`
26
+
27
+ ## English Doc
28
+ [English Readme](./doc/EN_README.md)
29
+
30
+ [English Docs](https://filecat.xiaobaidadada.fun/#/en/)
31
+
32
+ ## Screenshot
33
+ ![filecat](https://github.com/user-attachments/assets/e1cd2e78-7ff3-4c91-abb5-10f1ee68811a)
34
+
35
+ ## qq群
67
36
  824838674
68
- ## 七. 致谢
69
- 本项目部分功能还基于或者借鉴于以下项目
37
+ ## Thanks
38
+ Some features of this project are based on or inspired by the following projects.
39
+
40
+
70
41
  - [filebrowser](https://github.com/filebrowser/filebrowser)
71
42
  - [MeshCentral](https://github.com/Ylianst/MeshCentral)
72
43
  - [mstsc](https://github.com/citronneur/mstsc.js)
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 467.3781a513321c2c8d059d.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[467],{7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,a.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8467:(t,e,r)=>{r.r(e),r.d(e,{default:()=>N});var n=r(6540),o=r(5725),a=r(6007),i=r(2042),c=r(3459),u=r(447),l=r(3033),f=r(5997),s=r(7481),h=r(8694),p=r(4944),y=r(4238),v=r(2389);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function d(){d=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:I(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",g={};function b(){}function w(){}function E(){}var x={};l(x,i,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(N([])));_&&_!==r&&n.call(_,i)&&(x=_);var L=E.prototype=b.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==m(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function I(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(m(e)+" is not iterable")}return w.prototype=E,o(L,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(j.prototype),l(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function g(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){g(a,n,o,i,c,"next",t)}function c(t){g(a,n,o,i,c,"throw",t)}i(void 0)}))}}function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}(t,e)||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 E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function x(t){var e=(0,v.Bd)().t,r=w((0,n.useState)(void 0),2),m=r[0],g=r[1],E=w((0,n.useState)(!1),2),x=E[0],S=E[1],_=w((0,n.useState)(""),2),L=_[0],k=_[1],j=w((0,n.useState)([e("".concat(e("名称"))),e("".concat(e("虚拟"),"ip")),"".concat(e("物理"),"信息"),e("在线状态")]),2),I=j[0],O=(j[1],w((0,n.useState)([]),2)),A=O[0],C=O[1];(0,n.useEffect)((function(){var t=function(){var t=b(d().mark((function t(){var e,r;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new y.hf(y.HK.vir_net_serverIno_get),t.next=3,p.ws.send(e);case 3:(r=t.sent)&&(C(r.context),p.ws.addMsg(y.HK.vir_net_serverIno_get,(function(t){C(t.context)})));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t();var e=function(){var e=b(d().mark((function e(){var r,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._U.get("vir/server/get");case 2:if((r=e.sent).code===c.m.Sucess){e.next=5;break}return e.abrupt("return");case 5:n=r.data,g(n.port),k(n.key),S(n.open),setInterval(t,3e4);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return e(),function(){p.ws.unConnect()}}),[]);var P=function(){var t=b(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new h.$K).open=x,e.key=L,m&&(e.port=parseInt(m)),t.next=6,a._U.post("vir/server/save",e);case 6:if(t.sent.code===c.m.Sucess){t.next=10;break}return(0,i.zN)("网络错误"),t.abrupt("return");case 10:(0,i.LW)("保存成功");case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(u.Zp,{title:"",rightBottomCom:n.createElement(f.C3,{text:e("保存"),clickFun:P})},n.createElement(l.Sm,{placeholder:"port",value:m,handleInputChange:function(t){g(t)}}),n.createElement(l.Sm,{placeholder:"key ",value:L,handleInputChange:function(t){k(t)}}),n.createElement("form",null,e("状态"),":",n.createElement(s.S,{isFlex:!0,columns:[n.createElement(l.U6,{value:1,context:e("开启"),selected:x,onchange:function(){S(!x)}}),n.createElement(l.U6,{value:1,context:e("关闭"),selected:!x,onchange:function(){S(!x)}})]}))),n.createElement(u.Zp,{title:""},n.createElement(s.X,{headers:I,rows:A,width:"10rem"})))))}function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function _(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||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 L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:I(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",m={};function d(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,i)&&(w=x);var _=b.prototype=d.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==S(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function I(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(S(e)+" is not iterable")}return g.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(j.prototype),l(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=A(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function j(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function I(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){j(a,n,o,i,c,"next",t)}function c(t){j(a,n,o,i,c,"throw",t)}i(void 0)}))}}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||A(t,e)||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 A(t,e){if(t){if("string"==typeof t)return C(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,e):void 0}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function P(t){var e=(0,v.Bd)().t,r=O((0,n.useState)(""),2),m=r[0],d=r[1],g=O((0,n.useState)(void 0),2),b=g[0],w=g[1],E=O((0,n.useState)(""),2),x=E[0],S=E[1],j=O((0,n.useState)(""),2),A=j[0],C=j[1],P=O((0,n.useState)(void 0),2),N=P[0],T=P[1],F=O((0,n.useState)(!1),2),G=F[0],U=F[1],B=O((0,n.useState)(""),2),K=B[0],M=B[1],$=O((0,n.useState)(!1),2),H=$[0],W=$[1],Y=[e("端口"),e("目标地址"),e("目标端口"),e("开启"),e("备注"),e("状态"),e("删除")],Z=O((0,n.useState)([]),2),q=Z[0],V=Z[1],X=O((0,n.useState)({}),2),z=X[0],R=X[1];(0,n.useEffect)((function(){var t=function(){var t=I(L().mark((function t(){var e,r,n,o,i,u,l,f,s,h,v;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a._U.get("vir/client/get");case 2:if((e=t.sent).code===c.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:if(r=e.data,T(r.serverPort),S(r.serverIp),d(r.ip),w(r.mask),M(r.key),U(r.open),C(r.client_name),!r.open){t.next=25;break}return o=new y.hf(y.HK.vir_net_client_get),t.next=17,p.ws.send(o);case 17:i=t.sent,u=i.context.state,W(u),l={},f=k(null!==(n=i.context.tcp_proxy_list_status)&&void 0!==n?n:[]);try{for(f.s();!(s=f.n()).done;)h=s.value,l[h.param]=h.status}catch(t){f.e(t)}finally{f.f()}R(l),p.ws.addMsg(y.HK.vir_net_client_get,(function(t){var e;W(t.context.state),l={};var r,n=k(null!==(e=t.context.tcp_proxy_list_status)&&void 0!==e?e:[]);try{for(n.s();!(r=n.n()).done;){var o=r.value;l[o.param]=o.status}}catch(t){n.e(t)}finally{n.f()}R(l)}));case 25:return t.next=27,a._U.post("vir/client/tcp_proxy/get");case 27:(v=t.sent).code===c.m.Sucess&&V(v.data);case 29:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]);var D=function(){var t=I(L().mark((function t(){var e;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new h.vo).ip=m,e.mask=parseInt(b),e.key=K,e.serverIp=x,e.serverPort=parseInt(N),e.open=G,e.client_name=A,t.next=10,a._U.post("vir/client/save",e);case 10:if(t.sent.code===c.m.Sucess){t.next=14;break}return(0,i.zN)("网络错误"),t.abrupt("return");case 14:(0,i.LW)("保存成功");case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=function(){var t=I(L().mark((function t(){var e,r;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=[],r=0;r<q.length;r++)q[r].index=r,e.push(q[r]);return t.next=4,a._U.post("vir/client/tcp_proxy/save",e);case 4:t.sent.code===c.m.Sucess&&(0,i.LW)("保存成功");case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(u.Zp,{title:"",rightBottomCom:n.createElement(f.C3,{text:e("保存"),clickFun:D}),titleCom:n.createElement("div",null,e("连接状态"),n.createElement(u.fq,{ok:H}))},n.createElement(l.Sm,{placeholder:"ip ",value:m,handleInputChange:function(t){d(t)}}),n.createElement(l.Sm,{placeholder:"mask",value:b,handleInputChange:function(t){w(t)}}),n.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"ip"),value:x,handleInputChange:function(t){S(t)}}),n.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"part"),value:N,handleInputChange:function(t){T(t)}}),n.createElement(l.Sm,{placeholder:"名称 ",value:A,handleInputChange:function(t){C(t)}}),n.createElement(l.Sm,{placeholder:"key ",value:K,handleInputChange:function(t){M(t)}}),n.createElement("form",null,e("状态"),n.createElement(s.S,{isFlex:!0,columns:[n.createElement(l.U6,{value:1,context:e("开启"),selected:G,onchange:function(){U(!G)}}),n.createElement(l.U6,{value:1,context:e("关闭"),selected:!G,onchange:function(){U(!G)}})]}))),n.createElement(u.Zp,{title:""},n.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),n.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),n.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样"))),n.createElement(o.VP,null,n.createElement(u.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("Tcp Proxy"))," "),titleCom:n.createElement("div",null,n.createElement(f.rA,{icon:"add",title:e("添加"),onClick:function(){V([].concat(_(q),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),n.createElement(f.rA,{icon:"save",title:e("保存"),onClick:J}))},n.createElement(s.X,{headers:Y,rows:q.map((function(t,r){var o=[n.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),n.createElement(l.Sm,{value:t.target_ip,handleInputChange:function(e){t.target_ip=e},no_border:!0}),n.createElement(l.Sm,{value:t.target_port,handleInputChange:function(e){t.target_port=parseInt(e)},no_border:!0}),n.createElement(l.l6,{value:t.open,onChange:function(t){!function(t,e,r){for(var n=[],o=0;o<q.length;o++)q[o].open=o===r&&"true"===e,n.push(q[o]);V(n)}(0,t,r)},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),n.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),n.createElement(u.fq,{ok:z[t.index]}),n.createElement("div",null,n.createElement(f.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){q.splice(t,1),V(_(q))}(r)}}))];return o})),width:"10rem"})))))}function N(){var t=(0,v.Bd)().t,e=[{index:2,name:t("服务端"),rto:"server/"},{index:1,name:t("客户端"),rto:"client/"}];return n.createElement(o.W1,{optionList:e},n.createElement(P,null),n.createElement(x,null))}},8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>s,RB:()=>p,qB:()=>l,vo:()=>h,vr:()=>y});var l=i((function t(){u(this,t)})),f=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),s=i((function t(){u(this,t),o(this,"open",!1),o(this,"key","")})),h=i((function t(){u(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",f.udp)})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=i((function t(){u(this,t)}))}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 523.d50711dd73ff748dbd8d.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[523],{447:(e,t,n)=>{n.d(t,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>y,gz:()=>v,uF:()=>d,xP:()=>h});var r=n(6540),o=n(3413),a=n.n(o),i=n(505);function c(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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 l(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 u=function(e){return e[e.common=0]="common",e[e.full=1]="full",e}(u||{});function s(e,t){var n=t===u.common?"card-content":t===u.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},e.self_title?e.self_title:r.createElement("h2",null,e.title),r.createElement("div",{className:"not-select-div"},e.titleCom&&e.titleCom)),r.createElement("div",{className:n},e.children),r.createElement("div",{className:"card-action card-action-bottom-right"},e.rightBottomCom))}function f(e){return s(e,u.common)}function d(e){return s(e,u.full)}function h(e){var t,n,o,c=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip",ref:c,onClick:function(){var t,n;(0,i.l)(null!==(t=null!==(n=e.tip_context)&&void 0!==n?n:e.context)&&void 0!==t?t:e.children),new(a())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(o=e.tip_context)&&void 0!==o?o:e.context)&&void 0!==n?n:e.children))}function p(e){var t,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip"},null!==(n=e.context)&&void 0!==n?n:e.children))}function m(e){var t,n;return r.createElement("div",{className:"card floating",onKeyPress:function(t){"Enter"===t.key&&e.confirm_enter&&e.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,e.title)),r.createElement("div",{className:"card-content"},e.context&&e.context.map((function(e,t){return r.createElement("div",{key:t},e)}))),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:e.cancel},null!==(t=e.cancel_t)&&void 0!==t?t:"cancel"),r.createElement("button",{className:"button button--flat",onClick:e.confirm},null!==(n=e.confirm_t)&&void 0!==n?n:"confirm")))}function v(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var y=function(e){var t=c((0,r.useState)("var(--iconTertiary)"),2),n=t[0],o=t[1];(0,r.useEffect)((function(){void 0===e.ok?void 0===e.success?void 0!==e.running&&o("var(--icon-yellow)"):!0===e.success?o("var(--icon-green)"):!1===e.success&&o("var(--icon-red)"):o(e.ok?"var(--icon-green)":"var(--iconTertiary)")}),[e]);var a={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:a})}},505:(e,t,n)=>{function r(e){var t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}n.d(t,{l:()=>r})},3033:(e,t,n)=>{n.d(t,{$Z:()=>u,GL:()=>m,Sm:()=>f,U6:()=>p,cA:()=>d,l6:()=>h});var r=n(6540);function o(e){return o="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},o(e)}function a(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 i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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 l(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 u(e){var t=(0,r.useRef)(null),n=c(r.useState(""),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){var n=e.value;null==n&&(n=""),t.current.value=n,a(e.value||"")}),[e.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:e.max_width,display:e.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},e.icon),r.createElement("input",{type:"text",ref:t,placeholder:o||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),a(t.target.value)},onKeyPress:function(t){"Enter"===t.key&&e.handleEnterPress&&e.handleEnterPress()}})))}function s(e){var t=(0,r.useRef)(null),n=c(r.useState(""),2),o=n[0],a=n[1],i=c(r.useState("input input--block"),2),l=i[0],u=i[1];return(0,r.useEffect)((function(){a(void 0===e.value||null===e.value?"":e.value),e.focus&&t.current.focus(),e.no_border&&u("".concat(l," input--no_border"))}),[e.value]),r.createElement(r.Fragment,null,e.placeholderOut&&r.createElement("p",null,e.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:e.width,maxWidth:e.maxWidth}},e.left_placeholder&&r.createElement("div",{style:{paddingRight:".3rem",width:"auto",whiteSpace:"nowrap"}},e.left_placeholder),r.createElement("input",{onClick:function(e){e.stopPropagation()},disabled:!!e.disabled,className:l,type:e.type,placeholder:o||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),a(t.target.value)},onKeyPress:function(t){"Enter"===t.key&&e.handlerEnter&&e.handlerEnter(t.target.value)},value:o,ref:t}),e.right_placeholder&&r.createElement("div",{style:{paddingLeft:".3rem",width:"auto",whiteSpace:"nowrap"}},e.right_placeholder)))}function f(e){return s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))}function d(e){return s({placeholder:e.placeholder,type:"password",handleInputChange:e.handleInputChange,handlerEnter:e.handleEnterPress,maxWidth:e.maxWidth,width:e.width})}function h(e){return r.createElement("div",{style:{display:"flex"}},e.tip&&r.createElement("p",{className:"input input_left "},e.tip),r.createElement("select",{defaultValue:e.defaultValue,value:e.value,style:{width:e.width},disabled:!!e.disabled,className:"input input--block ".concat(e.no_border?"input--no_border":""),onChange:function(t){return e.onChange(t.target.value)}},e.options.map((function(e,t){return r.createElement("option",{key:t,value:e.value},e.title)}))))}function p(e){var t;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:e.selected,name:null!==(t=e.name)&&void 0!==t?t:"common_name",value:e.value,className:"input_radio",onChange:function(){e.onchange&&e.onchange(e.value)}}),e.context)}function m(e){var t,n=c((0,r.useState)(!1),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){a(!!e.selected)}),[e.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(t=e.is_disable)&&void 0!==t&&t,checked:o,onChange:function(){e.onchange&&e.onchange()}}),e.context)}},3496:(e,t,n)=>{n.d(t,{s:()=>r});var r=function(e){return e.setting_sys_option_status_save="sys_option/status/save",e.setting_customer_router="customer_router",e.setting_customer_router_save="customer_router/save",e.setting_customer_workflow_router="customer_router/workflow",e.setting_customer_workflow_router_save="customer_router/workflow/save",e.user_save_user_file_list_show_type="save_user_file_list_show_type",e}({})},4777:(e,t,n)=>{function r(e){return r="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},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Gd:()=>u,U$:()=>f,aM:()=>l,jk:()=>s});var l=function(e){return e[e.close=0]="close",e[e.length=1]="length",e[e.forver=2]="forver",e}({}),u=a((function e(){c(this,e)})),s=function(e){return e.ffmpeg="ffmpeg",e.smartmontools="smartmontools",e.ntfs_3g="ntfs_3g",e}({}),f=function(e){return e[e.auth=0]="auth",e[e.cmd=1]="cmd",e[e.cyc=2]="cyc",e}({})},7481:(e,t,n)=>{n.d(t,{S:()=>c,X:()=>i});var r=n(6540);function o(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(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 a(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 i(e){var t,n=o(r.useState([]),2),a=n[0],i=n[1];return(0,r.useEffect)((function(){e.children?i(Array.isArray(e.children)?e.children:[e.children]):i(e.rows)}),[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map((function(e,t){return r.createElement("th",{key:t},e)})))),r.createElement("tbody",null,a.map((function(t,n){return r.createElement("tr",{key:n},t.map((function(t,n){var o;return r.createElement("td",{style:{width:null!==(o=e.width)&&void 0!==o?o:"auto"},key:n,className:n===a.length-1?"small":""},t)})))}))))}function c(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map((function(e,t){return r.createElement("div",{key:t},e)})))}},8523:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var r=n(6540),o=n(5725),a=n(3430),i=n(3413),c=n.n(i),l=n(6007),u=n(3459),s=n(447),f=n(5997),d=n(3033),h=n(7481),p=n(2389);function m(e){return m="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},m(e)}function v(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(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 y(){y=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:O(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",_={};function g(){}function b(){}function w(){}var E={};u(E,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==n&&r.call(k,i)&&(E=k);var S=w.prototype=g.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==m(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=A(c,r);if(l){if(l===_)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?v:h,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function A(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,A(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,_;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,_):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(m(t)+" is not iterable")}return b.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=u(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},L(C.prototype),u(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new C(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(S),u(S,l,"Generator"),u(S,i,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),_}},t}function _(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){_(a,r,o,i,c,"next",e)}function c(e){_(a,r,o,i,c,"throw",e)}i(void 0)}))}}function b(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||w(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 w(e,t){if(e){if("string"==typeof e)return E(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(e,t):void 0}}function E(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 x(e){var t=(0,p.Bd)().t,n=b((0,r.useState)([]),2),a=n[0],i=n[1],c=function(){var t=g(y().mark((function t(){var n;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.getItems){t.next=5;break}return t.next=3,e.getItems();case 3:n=t.sent,i(n);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)((function(){c()}),[]);var l=function(){var t=g(y().mark((function t(){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save){t.next=3;break}return t.next=3,e.save(a);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e.title),e.info_click&&r.createElement(f.rA,{icon:"info",onClick:function(){e.info_click()},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){for(var t=[],n=0;n<e.headers.length-1;n++)t.push("");i([t].concat(v(a)))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:l}))},r.createElement(h.X,{headers:e.headers,rows:a.map((function(n,o){for(var c=[],l=function(e){c.push(r.createElement(d.Sm,{value:n[e],handleInputChange:function(t){n[e]=t,i(v(a))},no_border:!0}))},u=0;u<e.headers.length;u++)l(u);return c.push(r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){a.splice(e,1),i(v(a))}(o)}})),c})),width:"10rem"})))}var k=n(7444),S=n(6417),L=n(8247),C=n(2042);function O(e){return O="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},O(e)}function A(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(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 j(){j=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(N([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==O(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(O(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function I(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){I(a,r,o,i,c,"next",e)}function c(e){I(a,r,o,i,c,"throw",e)}i(void 0)}))}}function N(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||P(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 P(e,t){if(e){if("string"==typeof e)return T(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)?T(e,t):void 0}}function T(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 F(){var e=(0,p.Bd)().t,t=N((0,k.L4)(S.A.prompt_card),2),n=(t[0],t[1]),a=[e("路由"),e("auth"),e("备注")],i=N((0,k.L4)(S.A.editorSetting),2),m=(i[0],i[1]),v=N((0,r.useState)([]),2),y=v[0],_=v[1],g=function(){var e=V(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("api/customer_router");case 2:(t=e.sent).code===u.m.Sucess&&_(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){g()}),[]);var b=function(){var e=V(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("api/customer_router/save",y);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=V(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.router){e.next=3;break}return(0,C.zN)("路由不能为空"),e.abrupt("return");case 3:return e.next=5,l.XO.get("jscode/".concat(encodeURIComponent(t.router)));case 5:n=e.sent,m({model:"ace/mode/javascript",open:!0,fileName:t.router,save:function(){var e=V(j().mark((function e(n){var r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={context:n,router:t.router},e.next=3,l.XO.post("jscode/save",r);case 3:0===e.sent.code&&(L.xK.set_value_temp(""),m({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),L.xK.set_value_temp(n.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("自定义api路由"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){var e;e=r.createElement("div",null,'默认需要以 "/api" 开头的路由。'),n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:e("添加"),onClick:function(){_([{note:"",needAuth:!1,router:""}].concat(A(y)))}}),r.createElement(f.rA,{icon:"save",title:e("保存"),onClick:b}))},r.createElement(h.X,{headers:a,rows:y.map((function(t,n){var o=[r.createElement(d.Sm,{value:t.router,handleInputChange:function(e){t.router=e,_(A(y))},no_border:!0}),r.createElement(d.l6,{defaultValue:t.needAuth,onChange:function(e){t.needAuth="true"===e,_(A(y))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:t.note,handleInputChange:function(e){t.note=e,_(A(y))},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){y.splice(e,1),_(A(y))}(n)}}),r.createElement(f.rA,{icon:"edit",title:e("编辑"),onClick:function(){return w(t)}}))];return o})),width:"10rem"})))}var G=n(3496),X=n(7952);function M(e){return M="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},M(e)}function z(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(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 W(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Z(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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function B(){B=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==M(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(M(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function U(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){U(a,r,o,i,c,"next",e)}function c(e){U(a,r,o,i,c,"throw",e)}i(void 0)}))}}function $(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Z(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 Z(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function K(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 H(){var e=(0,p.Bd)().t,t=$((0,k.L4)(S.A.prompt_card),2),n=(t[0],t[1]),a=$((0,k.L4)(S.A.router_jump),2),i=a[0],s=a[1],f=[e("路由"),e("路径"),e("过期时间(s)"),e("备注")],d=[e("路由"),e("文件路径"),"token","user id",e("备注")],h=function(){var e=Y(B().mark((function e(t){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(G.s.setting_customer_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Y(B().mark((function e(){var t,n,r,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(G.s.setting_customer_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=6;break}if(null!=i&&i.page_self_router_api_data){n=W(t.data);try{for(n.s();!(r=n.n()).done;)r.value[1]===(null==i?void 0:i.page_self_router_api_data[1])&&(0,C.N9)("已经存在的页面资源路由配置目录设置")}catch(e){n.e(e)}finally{n.f()}o={},Object.assign(o,null==i?void 0:i.page_self_router_api_data),t.data=[o].concat(z(t.data)),s({})}return e.abrupt("return",t.data);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(X.A,null),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(x,{title:e("页面资源路由"),headers:f,getItems:m,save:h,info_click:function(){var e=r.createElement("div",null,'默认需要以 "/api" 开头的路由,会自动识别地址,将页面转到对应结果。路径支持文件路径(如果是文件夹路径的最后最后一个名字将会成为资源实际地址,整个目录将会变成一个http目录),http地址。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}}),r.createElement(x,{title:e("workflow触发路由"),headers:d,getItems:Y(B().mark((function e(){var t;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(G.s.setting_customer_workflow_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=5;break}return e.abrupt("return",t.data);case 5:return e.abrupt("return",[]);case 6:case"end":return e.stop()}}),e)}))),save:function(){var e=Y(B().mark((function e(t){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(G.s.setting_customer_workflow_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),info_click:function(){var e=r.createElement("div",null,'默认需要以 "/api" 开头的路由,文件路径是有效的workflow路径。token也可以是文件绝对路径,请求的时候请设置同样的authorization请求头字段。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}})),r.createElement(o.VP,null,r.createElement(F,null))))}var R=function(e){return e.username="username",e.password="password",e.password_hash="password_hash",e.navindex_remote_ssh_key="navindex_remote_ssh_key",e.user_id_name_mapping="user_id_name_mapping",e.user_id_info_data_mapping="user_id_info_data_mapping",e.user_unique_id_num="user_unique_id_num",e.role_unique_id_num="role_unique_id_num",e.sys_all_roles="sys_all_roles",e.ddns_http_url_key="ddns_http_url_key",e.ddns_tx_key="tengxun_ddns_key",e.ddns_dnspod_key="ddns_dnspod",e.ddns_ali_key="ali_ddns_key",e.navindex_net_key_list="navindex_net_key_list",e.navindex_wol_key="navindex_wol_key",e.customer_router_key="customer_router_key",e.customer_workflow_router_key="customer_workflow_router_key",e.customer_api_router_key="customer_api_router_key",e.token_setting="token_setting",e.sys_software="sys_software",e.protection_directory="sys_protection_directory",e.dir_upload_max_num="dir_upload_max_num",e.self_auth_jscode="self_auth_jscode",e.navindex_video_key="navindex_video_tag_key",e.systemd_key="systemd_key",e.vir_server_data_key="vir_server_net_data_key",e.vir_client_data_key="vir_client_net_data_key",e.vir_data_client_hash_key="vir_data_client_hash_key",e.vir_data_server_hash_key="vir_data_server_hash_key",e.language="user_language",e.navindex_rdp_key="navindex_rdp_tag_key",e.navindex_key="navindex_key_list",e.http_tag_key="http_tag_key",e.self_shell_cmd_check_open_status="self_shell_cmd_check_open_status",e.self_shell_cmd_jscode="self_shell_cmd_jscode",e.extra_env_path_list_key="extra_env_path_list_key",e.cmd_use_pty_key="cmd_use_pty_key",e.recycle_bin_key="recycle_bin_key",e.recycle_bin_status="recycle_bin_status",e.guid_key="guid_key",e.tcp_proxy_key="tcp_proxy_key",e}({});var q=R.self_auth_jscode,D=n(4777);function J(e){return J="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},J(e)}function Q(){Q=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==J(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(J(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function ee(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function te(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ee(a,r,o,i,c,"next",e)}function c(e){ee(a,r,o,i,c,"throw",e)}i(void 0)}))}}function ne(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return re(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)?re(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 re(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 oe(){var e=ne((0,r.useState)(""),2),t=e[0],n=e[1],i=ne((0,r.useState)(""),2),c=i[0],m=i[1],v=ne((0,r.useState)(!1),2),y=v[0],_=v[1],g=ne((0,r.useState)(!1),2),b=g[0],w=g[1],E=ne((0,r.useState)(!1),2),x=E[0],O=E[1],A=ne((0,r.useState)(""),2),j=A[0],I=A[1],V=ne((0,k.L4)(S.A.prompt_card),2),N=(V[0],V[1]),P=ne((0,k.L4)(S.A.editorSetting),2),T=(P[0],P[1]),F=ne((0,r.useState)(D.aM.close),2),M=F[0],z=F[1],W=ne((0,r.useState)(void 0),2),B=W[0],U=W[1],Y=(0,p.Bd)(),$=Y.t,Z=Y.i18n,K=ne((0,k.L4)(S.A.user_base_info),2),H=K[0],R=(K[1],(0,L.MH)().check_user_auth,ne((0,r.useState)(""),2)),J=R[0],ee=R[1],re=function(){var e=te(Q().mark((function e(){var n;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&c){e.next=3;break}return(0,C.zN)("账号密码不能为空"),e.abrupt("return");case 3:return(n=new a.tl).username=t,n.password=c,n.user_id=H.user_data.id,e.next=9,l.wm.post("updatePassword",n);case 9:e.sent.code===u.m.Sucess&&(0,C.LW)("修改成功");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=te(Q().mark((function e(){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!x){e.next=4;break}if(j){e.next=4;break}return(0,C.zN)("目录不能为空"),e.abrupt("return");case 4:return e.next=6,l.XO.post(G.s.setting_sys_option_status_save,{type:D.U$.cyc,value:j,open:x});case 6:e.sent.code===u.m.Sucess&&(0,C.LW)("修改成功");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){var e,t=function(){var e=te(Q().mark((function e(){var t,n,r;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("sys_option/status");case 2:return(t=e.sent).code===u.m.Sucess&&(_(t.data.self_auth_open),w(t.data.shell_cmd_check_open),O(t.data.recycle_open),I(t.data.recycle_dir)),e.next=6,l.XO.get("token");case 6:if((n=e.sent).code!==u.m.Sucess){e.next=13;break}if(r=n.data){e.next=11;break}return e.abrupt("return");case 11:r.length&&U(r.length),r.mode&&z(r.mode);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t(),ee(null==H||null===(e=H.user_data)||void 0===e?void 0:e.language)}),[]);var ae=function(){var e=te(Q().mark((function e(){var t;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("self_auth_open/jscode");case 2:t=e.sent,T({model:"ace/mode/javascript",open:!0,fileName:"",save:function(){var e=te(Q().mark((function e(t){var n;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={context:t,router:q},e.next=3,l.XO.post("jscode/save",n);case 3:0===e.sent.code&&(L.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),L.xK.set_value_temp(t.data);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=te(Q().mark((function e(){var t;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("shell_cmd_check_open/jscode");case 2:t=e.sent,T({model:"ace/mode/javascript",open:!0,fileName:"",save:function(){var e=te(Q().mark((function e(t){var n;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={context:t},e.next=3,l.XO.post("shell_cmd_check_open/jscode/save",n);case 3:0===e.sent.code&&(L.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),L.xK.set_value_temp(t.data);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=te(Q().mark((function e(){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("self_auth_open/save",{open:y});case 2:e.sent.code===u.m.Sucess&&(0,C.LW)("修改成功");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=te(Q().mark((function e(){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("shell_cmd_check_open/save",{open:b});case 2:e.sent.code===u.m.Sucess&&(0,C.LW)("修改成功");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=te(Q().mark((function e(){var t;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new D.Gd).mode=M,D.aM.length!==t.mode||B||(0,C.zN)("秒数不能为空"),t.length=parseInt(B),e.next=6,l.XO.post("token/save",t);case 6:e.sent.code===u.m.Sucess&&(0,C.LW)("保存成功");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),se=function(){var e=te(Q().mark((function e(){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z.changeLanguage(J),e.next=3,l.wm.post("language/save",{language:J});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=te(Q().mark((function e(){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("token/clear");case 2:e.sent.code===u.m.Sucess&&(0,C.LW)("清理完成,重新登录");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(s.Zp,{title:$("修改密码"),rightBottomCom:r.createElement(f.C3,{text:$("确定修改"),clickFun:re})},r.createElement(d.Sm,{placeholder:$("新账号"),value:t,handleInputChange:function(e){n(e)}}),r.createElement(d.Sm,{placeholder:$("新密码"),value:c,handleInputChange:function(e){m(e)}})),r.createElement(s.Zp,{title:$("自定义登录auth"),rightBottomCom:r.createElement(f.C3,{text:$("保存"),clickFun:ce}),titleCom:r.createElement(f.rA,{icon:"edit",title:$("代码修改"),onClick:ae})},r.createElement(d.l6,{value:y,onChange:function(e){_("true"===e)},options:[{title:$("开启"),value:!0},{title:$("关闭"),value:!1}]})),r.createElement(s.Zp,{title:$("自定义shell命令校验"),rightBottomCom:r.createElement(f.C3,{text:$("保存"),clickFun:le}),titleCom:r.createElement(f.rA,{icon:"edit",title:$("代码修改"),onClick:ie})},r.createElement(d.l6,{value:b,onChange:function(e){w("true"===e)},options:[{title:$("开启"),value:!0},{title:$("关闭"),value:!1}]})))),r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,$("文件回收站"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){N({open:!0,title:"信息",context_div:r.createElement("div",null,$("格式:[被删除的文件所在父目录] 回收站目录 [; ...]"))})},title:"信息"})),rightBottomCom:r.createElement(f.C3,{text:$("确定修改"),clickFun:oe})},r.createElement(d.Sm,{placeholder:$("目录"),value:j,handleInputChange:function(e){I(e)}}),r.createElement(d.l6,{value:x,onChange:function(e){O("true"===e)},options:[{title:$("开启"),value:!0},{title:$("关闭"),value:!1}]})),r.createElement(s.Zp,{title:$("语言"),rightBottomCom:r.createElement(f.C3,{text:$("保存"),clickFun:se})},r.createElement(d.l6,{value:J,onChange:function(e){ee(e)},options:[{title:"English",value:"en"},{title:"中文",value:"zh"}]})),r.createElement(s.Zp,{title:$("token过期时间"),rightBottomCom:r.createElement(h.S,{isFlex:!0,columns:[r.createElement(f.C3,{text:$("清空token"),clickFun:fe}),r.createElement(f.C3,{text:$("保存"),clickFun:ue})]})},r.createElement(h.S,{isFlex:!0,columns:[r.createElement(d.U6,{value:1,context:$("关闭"),selected:M===D.aM.close,onchange:function(){z(D.aM.close)}}),r.createElement(d.U6,{value:1,context:$("指定时间"),selected:M===D.aM.length,onchange:function(){z(D.aM.length)}}),r.createElement(d.U6,{value:1,context:$("永不过期"),selected:M===D.aM.forver,onchange:function(){z(D.aM.forver)}})]}),M===D.aM.length&&r.createElement(d.Sm,{placeholder:$("秒"),value:B,handleInputChange:function(e){U(e)}})))),r.createElement(X.A,{left_children:r.createElement("span",null," ",r.createElement("span",{className:"credits"},"version:".concat("4.7.1")),r.createElement("span",{className:"credits"},"系统运行于:",H.runing_time_length))}))}var ae=n(7523),ie=n(4694);function ce(e){return ce="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},ce(e)}function le(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pe(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 ue(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pe(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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function se(){se=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ce(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(ce(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function fe(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){fe(a,r,o,i,c,"next",e)}function c(e){fe(a,r,o,i,c,"throw",e)}i(void 0)}))}}function he(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||pe(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 pe(e,t){if(e){if("string"==typeof e)return me(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)?me(e,t):void 0}}function me(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 ve(){var e=(0,p.Bd)(),t=e.t,n=(e.i18n,(0,r.useContext)(ae.F)),a=n.initUserInfo,i=n.reloadUserInfo,c=he((0,r.useState)([]),2),m=c[0],v=c[1],y=he((0,r.useState)([]),2),_=y[0],g=y[1],b=he((0,k.L4)(S.A.prompt_card),2),w=(b[0],b[1]),E=he((0,r.useState)([]),2),x=E[0],O=E[1],A=he((0,r.useState)([]),2),j=A[0],I=A[1],V=he((0,r.useState)([]),2),N=V[0],P=V[1],T=he((0,r.useState)([]),2),F=T[0],G=T[1],X=he((0,r.useState)(""),2),M=X[0],z=X[1],W=[t("编号"),t("路径"),t("是否默认"),t("备注")],B=[t("软件"),t("是否安装"),t("路径")],U=[t("编号"),t("路径"),t("备注")],Y=[t("编号"),t("路径"),t("备注")],$=[t("编号"),t("路径"),t("单用户并发数量"),t("系统并发数量"),t("是否开启大文件断点"),t("大文件判断大小MB"),t("大文件并发数量"),t("大文件分块大小MB"),t("备注")],Z=((0,L.MH)().check_user_auth,function(){var e=de(se().mark((function e(){var t,n,r,o,a,i,c,s,f,d;return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("filesSetting");case 2:return(t=e.sent).code===u.m.Sucess&&v(t.data),e.next=6,l.XO.get("outside/software/get");case 6:return(n=e.sent).code===u.m.Sucess&&g(n.data),e.next=10,l.XO.get("env/path/get");case 10:return(r=e.sent).code===u.m.Sucess&&G(r.data),e.next=14,l.XO.get("protection_dir");case 14:return(o=e.sent).code===u.m.Sucess&&O(null!==(a=o.data)&&void 0!==a?a:[]),e.next=18,l.XO.get("pty_cmd");case 18:return(i=e.sent).code===u.m.Sucess&&z(i.data),e.next=22,l.XO.get("protection_dir/sys");case 22:return(c=e.sent).code===u.m.Sucess&&I(null!==(s=c.data)&&void 0!==s?s:[]),e.next=26,l.XO.get("dir_upload_max_num");case 26:(f=e.sent).code===u.m.Sucess&&P(null!==(d=f.data)&&void 0!==d?d:[]);case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());(0,r.useEffect)((function(){Z()}),[]);var K=function(){var e=de(se().mark((function e(){return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("pty_cmd/save",{str:M});case 2:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=de(se().mark((function e(){var t;return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0;t<m.length;t++)m[t].index=t;return e.next=3,l.XO.post("filesSetting/save",m);case 3:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),i());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=de(se().mark((function e(){return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("protection_dir/save",x);case 2:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=de(se().mark((function e(){return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("protection_dir/sys/save",j);case 2:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=de(se().mark((function e(){var t,n,r,o,a,c;return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=ue(N),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=17;break}if(!(r=n.value).open_ws_file){e.next=15;break}if("number"==typeof r.ws_file_block_mb_size){e.next=9;break}return(0,C.zN)("编号:".concat(null!==(o=r.index)&&void 0!==o?o:""," 文件块的大小设置有问题")),e.abrupt("return");case 9:if("number"==typeof r.ws_file_parallel_num){e.next=12;break}return(0,C.zN)("编号:".concat(null!==(a=r.index)&&void 0!==a?a:""," 并发数量设置有问题")),e.abrupt("return");case 12:if("number"==typeof r.ws_file_standard_size){e.next=15;break}return(0,C.zN)("编号:".concat(null!==(c=r.index)&&void 0!==c?c:""," 大文件size设置有问题")),e.abrupt("return");case 15:e.next=3;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.e(e.t0);case 22:return e.prev=22,t.f(),e.finish(22);case 25:return(0,ie.di)(N,(function(e){return e.index})),e.next=28,l.XO.post("dir_upload_max_num/save",N);case 28:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),i());case 30:case"end":return e.stop()}}),e,null,[[1,19,22,25]])})));return function(){return e.apply(this,arguments)}}(),Q=function(){var e=de(se().mark((function e(){return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("outside/software/save",_);case 2:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),a());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(e){var t;e===D.jk.ffmpeg?t=r.createElement("div",null,"视频转换,rtsp播放器等媒体功能都需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置"):e===D.jk.smartmontools?t=r.createElement("div",null,"磁盘检查需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置。"):e===D.jk.ntfs_3g?t=r.createElement("div",null,"如果在linux需要挂载ntfs的硬盘,需要这个软件支持。"):"保护目录"===e?t=r.createElement("div",null,"在删除的时候保护目录会拒绝删除。",r.createElement("ul",null,r.createElement("li",null,"可以使用 /* 来表达该目录下所有文件都禁止删除"),r.createElement("li",null,"可以使用 /** 来表达该目录下所有子目录文件都禁止删除"))):"文件夹路径"===e?t=r.createElement("div",null,"用于在文件夹下切换根目录"):"环境路径"===e?t=r.createElement("div",null,"当在不同用户环境下运行的时候由于没有执行终端去加载PATH,这里可以添加额外的PATH路径,点击这里的保存还会更新系统上的path路径"):"pty"===e?t=r.createElement("div",null,"一些需要Pty环境的命令"):"文件上传"===e&&(t=r.createElement("div",null,r.createElement("li",null,"对于不同的目录(包括所有子目录),可能是机械或者固态硬盘,机械硬盘在处理多个小文件的时候会做随机i/o,由于一般只有一个盘头所以会影响整体效率,特别是写操作,这里提供了上传时候的最大数量限制,对于下载数量目前不做限制."),r.createElement("li",null,"大文件支持断点和分块并发传输,建议并发数量设置为2,分块大小设置为10MB,大文件判断为500MB,设置过大的话会上传的时候会占据较大内存"))),w({open:!0,title:"信息",context_div:r.createElement("div",null,t)})},te=function(){var e=de(se().mark((function e(){return se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("env/path/save",{paths:F});case 2:e.sent.code===u.m.Sucess&&((0,C.LW)("保存成功"),a());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(o.J,{widthPer:100},r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("文件上传最大并发限制"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("文件上传")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){P([].concat(le(N),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:J}))},r.createElement(h.X,{headers:$,rows:N.map((function(e,n){var o=[r.createElement(d.Sm,{value:e.index,placeholder:n,handleInputChange:function(t){e.index=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.user_upload_num,handleInputChange:function(t){e.user_upload_num=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:e.sys_upload_num,handleInputChange:function(t){e.sys_upload_num=parseInt(t)},no_border:!0}),r.createElement(d.l6,{value:!0===e.open_ws_file,onChange:function(t){e.open_ws_file="true"===t,P(le(N))},options:[{title:t("是"),value:!0},{title:t("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:"number"==typeof e.ws_file_standard_size?e.ws_file_standard_size/1024/1024:void 0,handleInputChange:function(t){e.ws_file_standard_size=1024*parseInt(t)*1024},no_border:!0}),r.createElement(d.Sm,{value:e.ws_file_parallel_num,handleInputChange:function(t){e.ws_file_parallel_num=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:"number"==typeof e.ws_file_block_mb_size?e.ws_file_block_mb_size/1024/1024:void 0,handleInputChange:function(t){e.ws_file_block_mb_size=1024*parseInt(t)*1024},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){N.splice(e,1),P(le(N))}(n)}})];return o})),width:"10rem"}))),r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{title:t("外部软件"),titleCom:r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:Q})},r.createElement(h.X,{headers:B,rows:_.map((function(e,n){return[r.createElement("div",null,e.id),r.createElement(s.fq,{ok:e.installed}),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0,placeholder:t("默认使用环境变量")}),r.createElement(f.rA,{icon:"info",onClick:function(){ee(e.id)},title:"信息"})]})),width:"10rem"}))),r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("文件夹路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("文件夹路径")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){v([].concat(le(m),[{note:"",default:!1,path:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:H}))},r.createElement(h.X,{headers:W,rows:m.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.l6,{value:e.default,onChange:function(e){!function(e,t,n){for(var r=[],o=0;o<m.length;o++)m[o].default=o===n&&"true"===t,r.push(m[o]);v(r)}(0,e,n)},options:[{title:t("是"),value:!0},{title:t("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,0!==n&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){m.splice(e,1),v(le(m))}(n)}}))];return o})),width:"10rem"})),r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("个人保护路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("保护目录")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){O([].concat(le(x),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:R}))},r.createElement(h.X,{headers:U,rows:x.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){x.splice(e,1),O(le(x))}(n)}})];return o})),width:"10rem"})),r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("系统保护路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("保护目录")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){I([].concat(le(j),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:q}))},r.createElement(h.X,{headers:U,rows:j.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){j.splice(e,1),I(le(j))}(n)}})];return o})),width:"10rem"})))),r.createElement(o.VP,null,r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("PATH")),r.createElement(f.rA,{icon:"info",onClick:function(){ee("环境路径")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){G([].concat(le(F),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:te}))},r.createElement(h.X,{headers:Y,rows:F.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){F.splice(e,1),G(le(F))}(n)}})];return o})),width:"10rem"})),r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("PTY CMD")),r.createElement(f.rA,{icon:"info",onClick:function(){ee("pty")},title:"信息"})),rightBottomCom:r.createElement(f.C3,{text:t("更新"),clickFun:K})},r.createElement(d.Sm,{placeholder:t("cmd need pty env"),value:M,handleInputChange:function(e){z(e)}}))))))}var ye=n(1499);function _e(e){var t=(0,p.Bd)(),n=t.t;t.i18n;return r.createElement(r.Fragment,null,r.createElement("h3",null,n("功能权限")),r.createElement("div",{className:"checkbox_container"},r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.user_manage),checked:e.is_selected(a.oV.user_manage),onChange:function(){e.select_auth(a.oV.user_manage)}}),n("用户管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.role_manage),checked:e.is_selected(a.oV.role_manage),onChange:function(){e.select_auth(a.oV.role_manage)}}),n("角色管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_process_close),checked:e.is_selected(a.oV.sys_process_close),onChange:function(){e.select_auth(a.oV.sys_process_close)}}),n("系统进程关闭")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.docker_container_update),checked:e.is_selected(a.oV.docker_container_update),onChange:function(){e.select_auth(a.oV.docker_container_update)}}),n("docker容器停止、删除")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.docker_images_delete),checked:e.is_selected(a.oV.docker_images_delete),onChange:function(){e.select_auth(a.oV.docker_images_delete)}}),n("docker镜像删除")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.systemd_update),checked:e.is_selected(a.oV.systemd_update),onChange:function(){e.select_auth(a.oV.systemd_update)}}),n("systemd删除、添加管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.vir_net),checked:e.is_selected(a.oV.vir_net),onChange:function(){e.select_auth(a.oV.vir_net)}}),n("虚拟网络")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.token_update),checked:e.is_selected(a.oV.token_update),onChange:function(){e.select_auth(a.oV.token_update)}}),n("token时间修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_auth),checked:e.is_selected(a.oV.code_auth),onChange:function(){e.select_auth(a.oV.code_auth)}}),n("自定义auth")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_resource),checked:e.is_selected(a.oV.code_resource),onChange:function(){e.select_auth(a.oV.code_resource)}}),n("自定义资源路由")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_api),checked:e.is_selected(a.oV.code_api),onChange:function(){e.select_auth(a.oV.code_api)}}),n("自定义api路由")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.update_password),checked:e.is_selected(a.oV.update_password),onChange:function(){e.select_auth(a.oV.update_password)}}),n("修改密码")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_disk_mount),checked:e.is_selected(a.oV.sys_disk_mount),onChange:function(){e.select_auth(a.oV.sys_disk_mount)}}),n("磁盘挂载")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ddns),checked:e.is_selected(a.oV.ddns),onChange:function(){e.select_auth(a.oV.ddns)}}),"ddns"),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.outside_software_path),checked:e.is_selected(a.oV.outside_software_path),onChange:function(){e.select_auth(a.oV.outside_software_path)}}),n("外部软件路径")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_context_update),checked:e.is_selected(a.oV.filecat_file_context_update),onChange:function(){e.select_auth(a.oV.filecat_file_context_update)}}),n("内容更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.shell_cmd_check),checked:e.is_selected(a.oV.shell_cmd_check),onChange:function(){e.select_auth(a.oV.shell_cmd_check)}}),n("shell命令检测")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.env_path_update),checked:e.is_selected(a.oV.env_path_update),onChange:function(){e.select_auth(a.oV.env_path_update)}}),n("PATH路径修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.pty_cmd_update),checked:e.is_selected(a.oV.pty_cmd_update),onChange:function(){e.select_auth(a.oV.pty_cmd_update)}}),n("pty cmd 更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_protection_dir),checked:e.is_selected(a.oV.sys_protection_dir),onChange:function(){e.select_auth(a.oV.sys_protection_dir)}}),n("系统保护路径更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.workflow_exe),checked:e.is_selected(a.oV.workflow_exe),onChange:function(){e.select_auth(a.oV.workflow_exe)}}),n("workflow 执行")),r.createElement("div",null,r.createElement("input",{type:"checkbox",checked:e.is_selected(a.oV.workflow_exe_user,!0),onChange:function(){e.select_auth(a.oV.workflow_exe_user)}}),n("workflow 执行用户")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.workflow_api),checked:e.is_selected(a.oV.workflow_api),onChange:function(){e.select_auth(a.oV.workflow_api)}}),n("workflow触发api 修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.dir_upload_max_num),checked:e.is_selected(a.oV.dir_upload_max_num),onChange:function(){e.select_auth(a.oV.dir_upload_max_num)}}),n("目录文件上传数量限制修改"))),r.createElement("h3",null,n("文件权限")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_delete_cut_rename),checked:e.is_selected(a.oV.filecat_file_delete_cut_rename),onChange:function(){e.select_auth(a.oV.filecat_file_delete_cut_rename)}}),n("文件删除、剪切、重命名")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_context_update_upload_created_copy_decompression),checked:e.is_selected(a.oV.filecat_file_context_update_upload_created_copy_decompression),onChange:function(){e.select_auth(a.oV.filecat_file_context_update_upload_created_copy_decompression)}}),n("文件创建、上传、内容更新、解压缩")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.recycle_file_save),checked:e.is_selected(a.oV.recycle_file_save),onChange:function(){e.select_auth(a.oV.recycle_file_save)}}),n("文件回收站修改")),r.createElement("h3",null,n("标签编辑权限")),r.createElement("div",{className:"checkbox_container"},r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.net_site_tag_update),checked:e.is_selected(a.oV.net_site_tag_update),onChange:function(){e.select_auth(a.oV.net_site_tag_update)}}),n("网址")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ssh_proxy_tag_update),checked:e.is_selected(a.oV.ssh_proxy_tag_update),onChange:function(){e.select_auth(a.oV.ssh_proxy_tag_update)}}),n("ssh代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.http_proxy_tag_update),checked:e.is_selected(a.oV.http_proxy_tag_update),onChange:function(){e.select_auth(a.oV.http_proxy_tag_update)}}),n("http代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.browser_proxy_tag_update),checked:e.is_selected(a.oV.browser_proxy_tag_update),onChange:function(){e.select_auth(a.oV.browser_proxy_tag_update)}}),n("浏览器代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rdp_proxy_tag_update),checked:e.is_selected(a.oV.rdp_proxy_tag_update),onChange:function(){e.select_auth(a.oV.rdp_proxy_tag_update)}}),n("rdp代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.wol_proxy_tag_update),checked:e.is_selected(a.oV.wol_proxy_tag_update),onChange:function(){e.select_auth(a.oV.wol_proxy_tag_update)}}),n("网络唤醒")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rtsp_proxy_tag_update),checked:e.is_selected(a.oV.rtsp_proxy_tag_update),onChange:function(){e.select_auth(a.oV.rtsp_proxy_tag_update)}}),n("rtsp播放器")),r.createElement("h3",null,n("工具功能")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ssh_proxy),checked:e.is_selected(a.oV.ssh_proxy),onChange:function(){e.select_auth(a.oV.ssh_proxy)}}),n("ssh代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.http_proxy),checked:e.is_selected(a.oV.http_proxy),onChange:function(){e.select_auth(a.oV.http_proxy)}}),n("http代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.http_proxy_download_cancel),checked:e.is_selected(a.oV.http_proxy_download_cancel),onChange:function(){e.select_auth(a.oV.http_proxy_download_cancel)}}),n("http代理下载关闭")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.browser_proxy),checked:e.is_selected(a.oV.browser_proxy),onChange:function(){e.select_auth(a.oV.browser_proxy)}}),n("浏览器代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rdp_proxy),checked:e.is_selected(a.oV.rdp_proxy),onChange:function(){e.select_auth(a.oV.rdp_proxy)}}),n("rdp代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.wol_proxy),checked:e.is_selected(a.oV.wol_proxy),onChange:function(){e.select_auth(a.oV.wol_proxy)}}),n("网络唤醒")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rtsp_proxy),checked:e.is_selected(a.oV.rtsp_proxy),onChange:function(){e.select_auth(a.oV.rtsp_proxy)}}),n("rtsp播放器")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.crypto_ssh_file),checked:e.is_selected(a.oV.crypto_ssh_file),onChange:function(){e.select_auth(a.oV.crypto_ssh_file)}}),n("ssh密钥保存到磁盘"))))}function ge(e){return ge="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},ge(e)}function be(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Le(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 we(){we=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ge(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(ge(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ee(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Le(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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function xe(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function ke(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){xe(a,r,o,i,c,"next",e)}function c(e){xe(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Se(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Le(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 Le(e,t){if(e){if("string"==typeof e)return Ce(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)?Ce(e,t):void 0}}function Ce(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 Oe=new Map;function Ae(){var e,t,n,i=(0,p.Bd)(),c=i.t,m=(i.i18n,(0,r.useContext)(ae.F)),v=(m.initUserInfo,m.reloadUserInfo,Se((0,k.L4)(S.A.user_base_info),2)),y=(v[0],v[1],Se((0,r.useState)([]),2)),_=y[0],g=y[1],b=Se((0,k.L4)(S.A.prompt_card),2),w=(b[0],b[1],Se((0,r.useState)(!1),2)),E=w[0],x=w[1],L=Se((0,r.useState)(!1),2),O=L[0],A=L[1],j=Se((0,k.L4)(S.A.confirm),2),I=(j[0],j[1]),V=Se((0,r.useState)(""),2),N=V[0],P=V[1],T=Se((0,r.useState)(""),2),F=T[0],G=T[1],X=Se((0,r.useState)(""),2),M=X[0],z=X[1],W=Se((0,r.useState)([]),2),B=W[0],U=W[1],Y=Se((0,r.useState)([]),2),$=Y[0],Z=Y[1],K=Se((0,r.useState)([]),2),H=K[0],R=K[1],q=Se((0,r.useState)(""),2),D=q[0],J=q[1],Q=Se((0,r.useState)("en"),2),ee=Q[0],te=Q[1],ne=Se((0,r.useState)([]),2),re=ne[0],oe=ne[1],ce=Se((0,r.useState)(""),2),le=ce[0],ue=ce[1],se=Se((0,r.useState)(!1),2),fe=se[0],de=se[1],he=Se((0,r.useState)(""),2),pe=he[0],me=he[1],ve=Se((0,r.useState)(""),2),ge=ve[0],xe=ve[1],Le=Se((0,r.useState)({}),2),Ce=Le[0],Ae=Le[1],je=Se((0,r.useState)([]),2),Ie=je[0],Ve=je[1],Ne=[c("用户id"),c("用户名"),c("目录范围"),c("备注")],Pe=function(){var e=ke(we().mark((function e(){var t,n,r,o,a;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.wm.get("all_users");case 2:return(t=e.sent).code===u.m.Sucess&&g(t.data),e.next=6,l.wm.get("all_roles");case 6:if((n=e.sent).code===u.m.Sucess){Ve(n.data),Oe.clear(),r=Ee(n.data);try{for(r.s();!(o=r.n()).done;)a=o.value,Oe.set(a.role_id,a)}catch(e){r.e(e)}finally{r.f()}}case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(e){var t,n,r,o,a,i,c,l,u,s,f,d,h;(P(null!==(t=null==e?void 0:e.username)&&void 0!==t?t:""),G(null!==(n=null==e?void 0:e.password)&&void 0!==n?n:""),z(null!==(r=null==e?void 0:e.cwd)&&void 0!==r?r:""),U(null!==(o=null==e?void 0:e.access_dirs)&&void 0!==o?o:[]),Z(null!==(a=null==e?void 0:e.not_access_dirs)&&void 0!==a?a:[]),R(null!==(i=null==e?void 0:e.only_read_dirs)&&void 0!==i?i:[]),J(null!==(c=null==e?void 0:e.access_cmd)&&void 0!==c?c:""),te(null!==(l=null==e?void 0:e.language)&&void 0!==l?l:""),oe(null!==(u=null==e?void 0:e.auth_list)&&void 0!==u?u:[]),ue(null!==(s=null==e?void 0:e.note)&&void 0!==s?s:""),de(null!==(f=null==e?void 0:e.is_root)&&void 0!==f&&f),me(null!==(d=null==e?void 0:e.id)&&void 0!==d?d:""),null!=e&&e.bind_role_id)?Fe(e.bind_role_id,null!==(h=e.auth_list)&&void 0!==h?h:[]):(xe(""),Ae({}))};(0,r.useEffect)((function(){Pe()}),[]);var Fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return xe(""),void Ae({});var n=Oe.get(e);if(n){if(n.cwd&&z(n.cwd),n.access_dirs&&n.access_dirs.length>0&&U(n.access_dirs),n.not_access_dirs&&n.not_access_dirs.length>0&&Z(n.not_access_dirs),n.only_read_dirs&&n.only_read_dirs.length>0&&R(n.only_read_dirs),n.access_cmd&&J(n.access_cmd),n.language&&te(n.language),n.auth_list&&n.auth_list.length>0){var r,o=new Set(n.auth_list),a=Ee(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;o.add(i)}}catch(e){a.e(e)}finally{a.f()}oe(Array.from(o))}xe(e),Ae(n)}},Ge=function(){if(N)if((0,ye.CB)(N))(0,C.zN)("username not empty char");else{if(M){var e=new a.E0;return e.language=ee,e.access_dirs=B,e.username=N,e.password=F,e.not_access_dirs=$,e.only_read_dirs=H,e.cwd=M,e.note=le,e.access_cmd=D,e.auth_list=re,e.bind_role_id=ge,e}(0,C.zN)("cwd not empty")}else(0,C.zN)("username not empty")},Xe=function(){var e=ke(we().mark((function e(){var t,n;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(F){e.next=3;break}return(0,C.zN)("password not empty"),e.abrupt("return");case 3:if(!(0,ye.CB)(F)){e.next=6;break}return(0,C.zN)("username not empty char"),e.abrupt("return");case 6:return t=Ge(),e.next=9,l.wm.post("create_user",t);case 9:n=e.sent,Pe(),n.code===u.m.Sucess&&((0,C.LW)("创建完成"),Pe(),x(!1),A(!1),Te(void 0));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=ke(we().mark((function e(){var t;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ge()){e.next=3;break}return e.abrupt("return");case 3:return t.id=pe,e.next=6,l.wm.post("save_user",t);case 6:e.sent.code===u.m.Sucess&&((0,C.LW)("保存完成"),Pe());case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ze=function(){var e=ke(we().mark((function e(t){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:I({open:!0,title:"确定删除吗",handle:function(){var e=ke(we().mark((function e(){var n;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new a.E0).username=t,e.next=4,l.wm.post("delete_user",n);case 4:e.sent.code===u.m.Sucess&&((0,C.LW)("删除完成"),Pe(),I({open:!1,handle:null}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,c("用户"))),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:c("添加"),onClick:function(){x(!0),A(!1),Te(void 0)}}))},r.createElement(h.X,{headers:Ne,rows:_.map((function(e,t){return[r.createElement("p",null,e.id),r.createElement(s.xP,null,e.username),r.createElement(s.xP,null,e.cwd),r.createElement(s.xP,null,e.note),r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:c("编辑"),onClick:function(){return function(e){x(!1),A(!0),Te(e)}(e)}}),!e.is_root&&r.createElement(f.rA,{icon:"delete",title:c("删除"),onClick:function(){return ze(e.username)}}))]})),width:"10rem"})))),r.createElement(o.VP,{widthPer:50},(E||O)&&r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,c("".concat(E?"添加":"编辑")))," "),rightBottomCom:r.createElement("div",null,r.createElement(f.rA,{icon:"cancel",title:c("取消"),onClick:function(){x(!1),A(!1),Te(void 0)}}),E&&r.createElement(f.rA,{icon:"add_circle",title:c("添加"),onClick:Xe}),O&&r.createElement(f.rA,{icon:"save",title:c("保存"),onClick:Me}))},r.createElement("label",null,c("用户名")),r.createElement(d.Sm,{value:N,handleInputChange:function(e){return P(e)}}),r.createElement("label",null,c("密码")),r.createElement(d.Sm,{value:F,handleInputChange:function(e){return G(e)}}),r.createElement("label",null,!(null!=Ce&&null!==(e=Ce.access_dirs)&&void 0!==e&&e.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){U([].concat(be(B),[""]))},title:"添加"}),c("目录范围")),r.createElement(d.Sm,{disabled:""!==Ce.cwd&&void 0!==Ce.cwd,value:M,handleInputChange:function(e){return z(e)}}),(null!=B?B:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ce||null===(n=Ce.access_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ce||null===(o=Ce.access_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){B[t]=e,U(be(B))}})),0===(null==Ce||null===(a=Ce.access_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ce||null===(i=Ce.access_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){B.splice(t,1),U(be(B))},title:c("删除")}))})),r.createElement("label",null,!(null!=Ce&&null!==(t=Ce.not_access_dirs)&&void 0!==t&&t.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){Z([].concat(be($),[""]))},title:c("添加")}),c("禁止目录范围")),(null!=$?$:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ce||null===(n=Ce.not_access_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ce||null===(o=Ce.not_access_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){$[t]=e,Z(be($))}})),0===(null==Ce||null===(a=Ce.not_access_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ce||null===(i=Ce.not_access_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){$.splice(t,1),Z(be($))},title:c("删除")}))})),r.createElement("label",null,!(null!=Ce&&null!==(n=Ce.only_read_dirs)&&void 0!==n&&n.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){R([].concat(be(H),[""]))},title:c("添加")}),c("只读目录范围")),(null!=H?H:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ce||null===(n=Ce.only_read_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ce||null===(o=Ce.only_read_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){H[t]=e,R(be(H))}})),0===(null==Ce||null===(a=Ce.only_read_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ce||null===(i=Ce.only_read_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){H.splice(t,1),R(be(H))},title:c("删除")}))})),r.createElement("label",null,c("可执行的命令")),r.createElement(d.Sm,{disabled:""!==Ce.access_cmd&&void 0!==Ce.access_cmd,value:D,placeholder:"use blank split",handleInputChange:function(e){return J(e)}}),!fe&&r.createElement(r.Fragment,null,r.createElement("label",null,c("角色")),r.createElement(d.l6,{value:ge,onChange:function(e){Fe(e)},options:function(){var e=[];e.push({title:"NOT",value:""});var t,n=Ee(Ie);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push({title:r.role_name,value:r.role_id})}}catch(e){n.e(e)}finally{n.f()}return e}()})),r.createElement("label",null,c("语言")),r.createElement(d.l6,{disabled:""!==Ce.language&&void 0!==Ce.language,value:ee,onChange:function(e){te(e)},options:[{title:"English",value:"en"},{title:"中文",value:"zh"}]}),r.createElement("p",{className:"small"},c("标签编辑是所有人都可见的的数据")),r.createElement(_e,{is_disable:function(e){if(!0===fe)return!0;if(ge){var t,n=Oe.get(ge);if(n)return(null!==(t=n.auth_list)&&void 0!==t?t:[]).includes(e)}return!1},is_selected:function(e,t){return!t&&!0===fe||void 0!==(null==re?void 0:re.find((function(t){return t===e})))},select_auth:function(e){re?re.includes(e)?((0,ie.I)(re,(function(t){return t===e})),oe(be(re))):oe([].concat(be(re),[e])):oe([e])}}),r.createElement("label",null,c("备注")),r.createElement(d.Sm,{value:le,handleInputChange:function(e){return ue(e)}})))))}function je(e){return je="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},je(e)}function Ie(e){return function(e){if(Array.isArray(e))return Ge(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fe(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 Ve(){Ve=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==je(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(je(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ne(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Pe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ne(a,r,o,i,c,"next",e)}function c(e){Ne(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Te(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Fe(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 Fe(e,t){if(e){if("string"==typeof e)return Ge(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)?Ge(e,t):void 0}}function Ge(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 Xe(){var e=(0,p.Bd)(),t=e.t,n=(e.i18n,(0,r.useContext)(ae.F)),i=(n.initUserInfo,n.reloadUserInfo,Te((0,r.useState)([]),2)),c=i[0],m=i[1],v=Te((0,k.L4)(S.A.prompt_card),2),y=(v[0],v[1],Te((0,r.useState)(!1),2)),_=y[0],g=y[1],b=Te((0,r.useState)(!1),2),w=b[0],E=b[1],x=Te((0,k.L4)(S.A.confirm),2),L=(x[0],x[1]),O=Te((0,r.useState)(""),2),A=O[0],j=O[1],I=Te((0,r.useState)(""),2),V=I[0],N=I[1],P=Te((0,r.useState)([]),2),T=P[0],F=P[1],G=Te((0,r.useState)([]),2),X=G[0],M=G[1],z=Te((0,r.useState)([]),2),W=z[0],B=z[1],U=Te((0,r.useState)(""),2),Y=U[0],$=U[1],Z=Te((0,r.useState)(""),2),K=Z[0],H=Z[1],R=Te((0,r.useState)([]),2),q=R[0],D=R[1],J=Te((0,r.useState)(""),2),Q=J[0],ee=J[1],te=Te((0,r.useState)(""),2),ne=te[0],re=te[1],oe=[t("角色id"),t("角色名"),t("备注")],ce=function(){var e=Pe(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.wm.get("all_roles");case 2:(t=e.sent).code===u.m.Sucess&&m(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(e){var t,n,r,o,a,i,c,l,u,s;j(null!==(t=null==e?void 0:e.role_name)&&void 0!==t?t:""),N(null!==(n=null==e?void 0:e.cwd)&&void 0!==n?n:""),F(null!==(r=null==e?void 0:e.access_dirs)&&void 0!==r?r:[]),M(null!==(o=null==e?void 0:e.not_access_dirs)&&void 0!==o?o:[]),B(null!==(a=null==e?void 0:e.only_read_dirs)&&void 0!==a?a:[]),$(null!==(i=null==e?void 0:e.access_cmd)&&void 0!==i?i:""),H(null!==(c=null==e?void 0:e.language)&&void 0!==c?c:""),D(null!==(l=null==e?void 0:e.auth_list)&&void 0!==l?l:[]),ee(null!==(u=null==e?void 0:e.role_id)&&void 0!==u?u:""),re(null!==(s=null==e?void 0:e.role_note)&&void 0!==s?s:"")};(0,r.useEffect)((function(){ce()}),[]);var ue=function(){if(A){var e=new a.E0;return e.language=K,e.access_dirs=T,e.role_name=A,e.not_access_dirs=X,e.only_read_dirs=W,e.cwd=V,e.access_cmd=Y,e.auth_list=q,e.role_note=ne,e}(0,C.zN)("role_name not empty")},se=function(){var e=Pe(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ue()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,l.wm.post("create_role",t);case 5:n=e.sent,ce(),n.code===u.m.Sucess&&((0,C.LW)("创建完成"),ce(),g(!1),E(!1),le(void 0));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=Pe(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ue()){e.next=3;break}return e.abrupt("return");case 3:return t.role_id=Q,e.next=6,l.wm.post("save_role",t);case 6:e.sent.code===u.m.Sucess&&((0,C.LW)("保存完成"),ce());case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),de=function(){var e=Pe(Ve().mark((function e(t){return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L({open:!0,title:"确定删除吗",handle:function(){var e=Pe(Ve().mark((function e(){var n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new a.E0).role_id=t,e.next=4,l.wm.post("delete_role",n);case 4:e.sent.code===u.m.Sucess&&((0,C.LW)("删除完成"),ce(),L({open:!1,handle:null}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("角色"))),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){g(!0),E(!1),le(void 0)}}))},r.createElement(h.X,{headers:oe,rows:c.map((function(e,n){return[r.createElement("p",null,e.role_id),r.createElement(s.xP,null,e.role_name),r.createElement(s.xP,null,e.role_note),r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:t("编辑"),onClick:function(){return function(e){g(!1),E(!0),le(e)}(e)}}),!e.is_root&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return de(e.role_id)}}))]})),width:"10rem"})))),r.createElement(o.VP,{widthPer:50},(_||w)&&r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("".concat(_?"添加":"编辑")))," "),rightBottomCom:r.createElement("div",null,r.createElement(f.rA,{icon:"cancel",title:t("取消"),onClick:function(){g(!1),E(!1),le(void 0)}}),_&&r.createElement(f.rA,{icon:"add_circle",title:t("添加"),onClick:se}),w&&r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:fe}))},r.createElement("label",null,"角色名"),r.createElement(d.Sm,{value:A,handleInputChange:function(e){return j(e)}}),r.createElement("label",null,"角色备注"),r.createElement(d.Sm,{value:ne,handleInputChange:function(e){return re(e)}}),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){F([].concat(Ie(T),[""]))},title:"添加"}),"目录范围"),r.createElement(d.Sm,{value:V,handleInputChange:function(e){return N(e)}}),(null!=T?T:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){T[t]=e,F(Ie(T))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){T.splice(t,1),F(Ie(T))},title:"删除"}))})),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){M([].concat(Ie(X),[""]))},title:"添加"}),"禁止目录范围"),(null!=X?X:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){X[t]=e,M(Ie(X))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){X.splice(t,1),M(Ie(X))},title:"删除"}))})),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){B([].concat(Ie(W),[""]))},title:"添加"}),"只读目录范围"),(null!=W?W:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){W[t]=e,B(Ie(W))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){W.splice(t,1),B(Ie(W))},title:"删除"}))})),r.createElement("label",null,"可执行的命令"),r.createElement(d.Sm,{value:Y,placeholder:"use blank split",handleInputChange:function(e){return $(e)}}),r.createElement("label",null,"语言"),r.createElement(d.l6,{value:K,onChange:function(e){H(e)},options:[{title:"NOT",value:""},{title:"English",value:"en"},{title:"中文",value:"zh"}]}),r.createElement("p",{className:"small"},"标签编辑是所有人都可见的的数据"),r.createElement(_e,{is_disable:function(){return!1},is_selected:function(e,t){return void 0!==(null==q?void 0:q.find((function(t){return t===e})))},select_auth:function(e){q?(q.find((function(t){return t==e}))?(0,ie.I)(q,(function(t){return t===e})):q.push(e),D(Ie(q))):D([e])}})))))}function Me(){var e=(0,p.Bd)().t,t=(0,L.MH)().check_user_auth,n=[{index:1,name:e("系统"),rto:"password/"},{index:1,name:e("环境"),rto:"env_setting/"},{index:1,name:e("自定义路由"),rto:"customer_router/"}];return t(a.oV.user_manage)&&n.push({index:1,name:e("用户管理"),rto:"user_manager/"}),t(a.oV.role_manage)&&n.push({index:1,name:e("角色管理"),rto:"role_manager/"}),r.createElement(o.W1,{optionList:n},r.createElement(oe,null),r.createElement(ve,null),r.createElement(H,null),t(a.oV.user_manage)&&r.createElement(Ae,null),t(a.oV.role_manage)&&r.createElement(Xe,null))}}}]);