filecat 6.7.3 → 6.7.5

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 (36) hide show
  1. package/README.md +148 -88
  2. package/build/dist/{1501.25f31920ea48439a5dfe.js → 1501.30512e814de66dc6d353.js} +1 -1
  3. package/build/dist/{2502.11767be679fbd6ea43ec.js → 2502.c7ff4efe287affeaebf2.js} +2 -2
  4. package/build/dist/{2542.0bb1b9d7512a8d6dbafc.js → 2542.7c6602fb9248bbea6b3a.js} +2 -2
  5. package/build/dist/27.2b59200aa78f261574a7.js +2 -0
  6. package/build/dist/3402.7ce43d6229d0d1619983.js +2 -0
  7. package/build/dist/4273.bdeeb513174c433c27c6.js +2 -0
  8. package/build/dist/4377.49c55e0115507313e69f.js +2 -0
  9. package/build/dist/{4943.e232440198d7b7222ca6.js → 4943.cfacb31920dc581eb288.js} +2 -2
  10. package/build/dist/6247.8381e099693850a703a3.js +2 -0
  11. package/build/dist/{9213.bd1caff2b1a815eb1038.js → 9213.b5a57e055b13867f7890.js} +2 -2
  12. package/build/dist/9591.244877af4d162c74cf82.js +2 -0
  13. package/build/dist/9704.690a6bd511a3b5af6735.js +2 -0
  14. package/build/dist/index.html +1 -1
  15. package/build/dist/{main.dc5144b153a171cb95e4.js → main.5b7a7a215aa3f9a7ade3.js} +2 -2
  16. package/build/main.js +1 -1
  17. package/package.json +1 -1
  18. package/build/dist/27.9e60a657618569eddc88.js +0 -2
  19. package/build/dist/3402.09670dff158f73c74e1f.js +0 -2
  20. package/build/dist/4273.1b1f2c82ce8bdac85b36.js +0 -2
  21. package/build/dist/4377.91c93e23695c70e884ec.js +0 -2
  22. package/build/dist/6247.10552fe1e4a60a12cd8a.js +0 -2
  23. package/build/dist/9591.407a2b9c30537745ea2f.js +0 -2
  24. package/build/dist/9704.199cc8c1553096c054a4.js +0 -2
  25. /package/build/dist/{2502.11767be679fbd6ea43ec.js.LICENSE.txt → 2502.c7ff4efe287affeaebf2.js.LICENSE.txt} +0 -0
  26. /package/build/dist/{2542.0bb1b9d7512a8d6dbafc.js.LICENSE.txt → 2542.7c6602fb9248bbea6b3a.js.LICENSE.txt} +0 -0
  27. /package/build/dist/{27.9e60a657618569eddc88.js.LICENSE.txt → 27.2b59200aa78f261574a7.js.LICENSE.txt} +0 -0
  28. /package/build/dist/{3402.09670dff158f73c74e1f.js.LICENSE.txt → 3402.7ce43d6229d0d1619983.js.LICENSE.txt} +0 -0
  29. /package/build/dist/{4273.1b1f2c82ce8bdac85b36.js.LICENSE.txt → 4273.bdeeb513174c433c27c6.js.LICENSE.txt} +0 -0
  30. /package/build/dist/{4377.91c93e23695c70e884ec.js.LICENSE.txt → 4377.49c55e0115507313e69f.js.LICENSE.txt} +0 -0
  31. /package/build/dist/{4943.e232440198d7b7222ca6.js.LICENSE.txt → 4943.cfacb31920dc581eb288.js.LICENSE.txt} +0 -0
  32. /package/build/dist/{6247.10552fe1e4a60a12cd8a.js.LICENSE.txt → 6247.8381e099693850a703a3.js.LICENSE.txt} +0 -0
  33. /package/build/dist/{9213.bd1caff2b1a815eb1038.js.LICENSE.txt → 9213.b5a57e055b13867f7890.js.LICENSE.txt} +0 -0
  34. /package/build/dist/{9591.407a2b9c30537745ea2f.js.LICENSE.txt → 9591.244877af4d162c74cf82.js.LICENSE.txt} +0 -0
  35. /package/build/dist/{9704.199cc8c1553096c054a4.js.LICENSE.txt → 9704.690a6bd511a3b5af6735.js.LICENSE.txt} +0 -0
  36. /package/build/dist/{main.dc5144b153a171cb95e4.js.LICENSE.txt → main.5b7a7a215aa3f9a7ade3.js.LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -1,144 +1,204 @@
1
+ <p align="center">
2
+ <img src="./src/web/meta/resources/img/logo-70.png" alt="FileCat Logo" width="70" height="70">
3
+ </p>
4
+
5
+ <h1 align="center">FileCat</h1>
1
6
 
2
- # ![](./src/web/meta/resources/img/logo-70.png) FileCat
7
+ <p align="center">
8
+ <i>一款自部署的 Web 文件服务器与轻量级服务器管理工具</i>
9
+ </p>
3
10
 
4
- <p align="left">
5
- <!-- npm 下载量 -->
11
+ <p align="center">
6
12
  <a href="https://www.npmjs.com/package/filecat">
7
13
  <img src="https://img.shields.io/npm/dm/filecat.svg" alt="npm downloads">
8
14
  </a>
9
-
10
- <!-- npm 版本 -->
11
15
  <a href="https://www.npmjs.com/package/filecat">
12
16
  <img src="https://img.shields.io/npm/v/filecat.svg" alt="npm version">
13
17
  </a>
14
-
15
- <!-- GitHub stars -->
16
18
  <a href="https://github.com/xiaobaidadada/filecat">
17
19
  <img src="https://img.shields.io/github/stars/xiaobaidadada/filecat.svg" alt="stars">
18
20
  </a>
19
-
20
-
21
- <!-- Docker pulls -->
22
21
  <a href="https://ghcr.io/xiaobaidadada/filecat">
23
22
  <img src="https://img.shields.io/badge/docker-ghcr.io-blue.svg" alt="docker">
24
23
  </a>
25
-
26
- <!-- license -->
27
24
  <a href="https://github.com/xiaobaidadada/filecat/blob/main/LICENSE">
28
25
  <img src="https://img.shields.io/github/license/xiaobaidadada/filecat.svg" alt="license">
29
26
  </a>
30
27
  </p>
31
28
 
32
- [English Doc](./doc/EN_README.md)
29
+ <p align="center">
30
+ <a href="#功能特性">功能特性</a> •
31
+ <a href="#功能截图">功能截图</a> •
32
+ <a href="#安装方式">安装方式</a> •
33
+ <a href="#快速运行">快速运行</a>
34
+ </p>
35
+
36
+ <p align="center">
37
+ <a href="./doc/EN_README.md">English</a>
38
+ </p>
33
39
 
34
- FileCat 是一个web文件服务器、也是一个轻量级的服务器管理工具。部署在服务器上后,即可浏览服务器上的文件,支持多种文件格式在线浏览(图片、视频、绘图、Markdown等)
40
+ ---
41
+
42
+ FileCat 是一个需要自己部署的 Web 文件服务器,同时也是一款**轻量级服务器管理工具**。部署后,你可以随时随地通过浏览器管理服务器上的文件,并享受丰富的运维功能。
43
+
44
+ > **核心理念**:以文件管理为核心,融合 AI Agent、远程桌面、内网穿透、系统监控等能力,让服务器管理变得更简单。
45
+
46
+ ---
47
+
48
+ ## 功能特性
49
+
50
+ | 类别 | 功能 |
51
+ |------|-----------------------------------|
52
+ | 文件管理 | 浏览、上传、下载、编辑、在线预览(图片、视频、Markdown、绘图等) |
53
+ | AI Agent | 集成大语言模型,智能辅助运维和文件处理(需自行配置 API) |
54
+ | 内网穿透 | 将内网暴露到公网,或者多个内网之间互相通信 |
55
+ | SSH 终端 | 浏览器内置 Web 终端,随时连接服务器 |
56
+ | Windows 远程桌面 | 浏览器中直接操作远程 Windows 桌面(RDP) |
57
+ | 系统信息看板 | 实时 CPU、内存、磁盘、网络等系统监控 |
58
+ | CI/CD 工作流 | 支持自定义命令流水线,实现持续集成与部署 |
59
+ | 超大日志查看 | 任意大小的文本日志文件秒开,高效定位问题 |
60
+ | Excalidraw 绘图 | 内置白板绘图工具 |
61
+ | 多用户管理 | 完善的权限体系 |
62
+ | 可分享链接 | 生成文件分享链接,方便他人下载 |
63
+ | 多路径挂载 | 支持挂载多个文件系统路径 |
64
+
65
+ ---
66
+
67
+ ## 功能截图
68
+
69
+ <table>
70
+ <tr>
71
+ <td align="center"><b>文件列表</b></td>
72
+ <td align="center"><b>AI Agent</b></td>
73
+ </tr>
74
+ <tr>
75
+ <td><img src="./doc/文件列表.png" alt="文件列表"/></td>
76
+ <td><img src="./doc/AI能力.png" alt="AI Agent"/></td>
77
+ </tr>
78
+ <tr>
79
+ <td align="center"><b>内网穿透</b></td>
80
+ <td align="center"><b>系统信息看板</b></td>
81
+ </tr>
82
+ <tr>
83
+ <td><img src="./doc/内网穿透.png" alt="内网穿透"/></td>
84
+ <td><img src="./doc/系统信息看板.png" alt="系统信息看板"/></td>
85
+ </tr>
86
+ </table>
87
+
88
+ ---
35
89
 
36
- 在文件管理的基础上,filecat集成了很多服务器运维与管理的功能,让你同时拥有一个轻量级的服务器管理工具,这些功能能够帮助用户更方便的访问和操作服务器上的文件
90
+ ## Demo
37
91
 
92
+ 在线体验地址:**[http://demo.filecat.xiaobaidadada.fun/](http://demo.filecat.xiaobaidadada.fun/)**
38
93
 
39
- ## 部分功能截图
40
- ### 文件列表
41
- ![](./doc/文件列表.png)
42
- ### 内网穿透
43
- ![](./doc/内网穿透.png)
44
- ### 系统信息看板
45
- ![](./doc/系统信息看板.png)
46
- ### AI能力
47
- ![](./doc/AI能力.png)
94
+ 账号密码: `demo`/`demo`或者 `test`/`test`
48
95
 
49
- 除了以上功能之外,还支持一些可能会对你有帮助的功能,任意大小的文本日志文件秒开,windows远程桌面,图片简单编辑,CI/CD工作流,excalidraw绘图 ...
96
+ > Demo 服务器由 [野草云](https://my.yecaoyun.com/aff.php?aff=7185) 赞助提供
50
97
 
51
- ## Demo
52
- http://demo.filecat.xiaobaidadada.fun/
98
+ ---
53
99
 
54
- username/password: demo/demo
55
- 中文账号 demo-zh/demo
100
+ ## 安装方式
56
101
 
57
- demo服务器由[ 野草云 ](https://my.yecaoyun.com/aff.php?aff=7185)赞助提供
58
- ## 安装方式
59
- 小的bug修复与功能更新,只会在npm上实时发布同步
102
+ > 小版本 bug 修复与功能更新仅在 npm 上实时发布同步。
60
103
 
61
- ### 1. Npm
104
+ ### 1. NPM 安装(推荐)
62
105
 
106
+ ```bash
107
+ npm install -g filecat
108
+ ```
63
109
 
64
- `npm install -g filecat `
110
+ 对于 Linux 系统,安装后可以选择使用 `pm2` 保活,或执行 `filecat --install` 注册到 systemd。
65
111
 
66
- 对于Linux系统,安装完以后,你可选择使用pm2来保活,或者使用 `filecat --install`来注册到systemd
112
+ ### 2. Linux 一键脚本
67
113
 
68
- ### 2. Linux curl
114
+ ```bash
115
+ curl -o install.sh https://filecat.xiaobaidadada.fun/files/linux-install.sh && bash install.sh
116
+ ```
69
117
 
70
- `curl -o install.sh https://filecat.xiaobaidadada.fun/files/linux-install.sh && bash install.sh`
118
+ 自动下载二进制包并执行安装,按提示输入参数即可。
71
119
 
72
- 在linux系统下可以执行该命令,将自动下载二进制包并执行安装程序,按照提示输入参数即可。
120
+ ### 3. 二进制包
73
121
 
74
- ### 3. 二进制
75
- 下载最新 [Releases](https://github.com/xiaobaidadada/filecat/releases)
122
+ [Releases](https://github.com/xiaobaidadada/filecat/releases) 下载对应系统的最新版本。
76
123
 
77
124
  ### 4. Docker
78
- `docker run -d --name filecat --restart=always --net=host -v /home:/home ghcr.io/xiaobaidadada/filecat:latest --port 5567 --base_folder /home`
79
125
 
80
- ### 5. Git Clone
81
- `git clone https://github.com/xiaobaidadada/filecat.git`
126
+ ```bash
127
+ docker run -d --name filecat --restart=always --net=host \
128
+ -v /home:/home \
129
+ ghcr.io/xiaobaidadada/filecat:latest \
130
+ --port 5567 --base_folder /home
131
+ ```
82
132
 
83
- `npm install`
133
+ ### 5. 源码编译
84
134
 
85
- `npm run dev` or `npm run build && node dist/main.js`
135
+ ```bash
136
+ git clone https://github.com/xiaobaidadada/filecat.git
137
+ cd filecat
138
+ npm install
139
+ npm run dev # 开发模式
140
+ # 或
141
+ npm run build && node build/main.js # 生产模式
142
+ ```
86
143
 
87
- ## 运行
88
- 安装完以后运行命令 `filecat --port 5567`
144
+ ---
89
145
 
90
- 默认账号/密码: admin/admin
146
+ ## 快速运行
91
147
 
92
- 更多参数可以使用 `filecat --help` 查看
148
+ **方式一**:NPM 安装后执行:
149
+ ```bash
150
+ filecat --port 5567
151
+ ```
93
152
 
94
- 使用提示:权限功能是必须要注意的,安装以后,默认能够访问的服务器文件目录就是安装目录,你需要在设置中设置每个用户能够访问的目录,以及能够执行的权限。
153
+ **方式二**:二进制包解压后,目录内有 `filecat-run.sh`(Linux/Mac)或 `filecat-run.cmd`(Windows)运行脚本。
95
154
 
96
- ## 升级
97
- 1. 使用自定义的安装方式进行升级,比如npm 安装的就使用 npm -g i filecat,docker 可以重新pull镜像,二进制安装的可以重新下载替换。
98
- 2. 从5.33.0 版本以后,可以使用 `filecat-upgrade` 命令来进行升级,会自动根据安装环境进行升级。对于docker和二进制安装的方式,filecat-upgrade 命令还支持一个自定义下载url路径参数(默认是从github下载最新包)。
155
+ **默认账号/密码**:`admin` / `admin`
99
156
 
157
+ > 更多参数请使用 `filecat --help` 查看。
100
158
 
101
- ## qq群
102
- 824838674
159
+ > **权限提示**:安装后默认能访问的文件目录是安装目录,请在设置中为每个用户配置可访问目录及执行权限。
103
160
 
161
+ ---
104
162
 
163
+ ## 升级指南
105
164
 
106
- ## 软件对比
165
+ 1. **常规升级**:根据你的安装方式升级
166
+ - NPM:`npm -g i filecat`
167
+ - Docker:重新 pull 最新镜像
168
+ - 二进制:下载最新包替换
169
+ 2. **自动升级**(v5.33.0+):执行 `filecat-upgrade` 命令,自动根据安装环境升级。Docker 和二进制安装还支持自定义下载 URL 参数。
107
170
 
108
- | 软件名称 | ![](./src/web/meta/resources/img/logo-70.png) [FileCat](https://github.com/xiaobaidadada/filecat) | <img width="48" src="https://github.com/user-attachments/assets/c40b22c9-33da-47b7-bc4c-ce69bb5cc174" > [Quantum](https://github.com/gtsteffaniak/filebrowser) | <img width="48" src="https://raw.githubusercontent.com/filebrowser/filebrowser/master/branding/banner.png" > [Filebrowser](https://github.com/filebrowser/filebrowser) |
109
- |--------------|---------|--|-------------------------------------------------------------------------------------------------------------------------|
110
- | 文件系统支持 | ✅ | ✅ | ✅ |
111
- | Linux | ✅ | ✅ | ✅ |
112
- | Windows | ✅ | | ✅ |
113
- | Mac | ✅ | ✅| ✅ |
114
- | 自己部署 | ✅|✅|✅|
115
- | webdav 支持 | ❌|✅|❌|
116
- | 多用户登陆管理支持 | ✅|✅|✅|
117
- | 终端shell |✅|❌|❌|
118
- | 开源 |✅|✅|✅|
119
- | 单点登录支持 |✅|✅|❌|
120
- | 可分享的网页链接 |✅|✅|✅|
121
- | 基于文本的文件编辑器 |✅|✅|✅|
122
- | 详细使用手册 | ❌|✅|✅|
123
- | Office 文件预览 |❌|✅|❌|
124
- | 索引搜索 |❌|✅|❌|
125
- | 多文件系统路径挂载 |✅|✅|❌|
126
- | 内网穿透 |✅|❌|❌|
127
- | ssh终端 |✅|❌|❌|
128
- | 实时系统信息 |✅|❌|❌|
129
- | windows 远程桌面 |✅|❌|❌|
130
- | 命令CI/CD工作流支持 |✅|❌|❌|
131
- | 超大日志文件查看 |✅|❌|❌|
132
- | ai agent |✅|❌|❌|
171
+ ---
172
+
173
+ ## 社区交流
174
+
175
+ 加入 QQ **824838674** 进行交流反馈
176
+
177
+ ---
133
178
 
134
179
  ## 参与开发
135
180
 
136
- 1. 请将PR先提交到dev分支
137
- 2. 功能性提交请在qq群先沟通一下
181
+ 1. PR 请先提交到 `dev` 分支
182
+ 2. 功能性提交请在 QQ 群中提前沟通
183
+
184
+ ---
185
+
186
+ ## 感谢
187
+
188
+ 以下项目为 FileCat 提供了灵感或基础:
138
189
 
139
- ## Thanks
140
- 以下项目为 FileCat 提供了灵感或基础
190
+ - [filebrowser](https://github.com/filebrowser/filebrowser)
191
+ - [MeshCentral](https://github.com/Ylianst/MeshCentral)
192
+ - [mstsc](https://github.com/citronneur/mstsc.js)
141
193
 
142
- - [filebrowser](https://github.com/filebrowser/filebrowser)
143
- - [MeshCentral](https://github.com/Ylianst/MeshCentral)
144
- - [mstsc](https://github.com/citronneur/mstsc.js)
194
+ ---
195
+
196
+ <p align="center">
197
+ <a href="https://github.com/xiaobaidadada/filecat">
198
+ <img src="https://img.shields.io/github/stars/xiaobaidadada/filecat?style=social" alt="Star on GitHub">
199
+ </a>
200
+ </p>
201
+
202
+ <p align="center">
203
+ Made with love by <a href="https://github.com/xiaobaidadada">xiaobaidadada</a>
204
+ </p>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1501,6010],{3277(t,e,n){function r(t){return r="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},r(t)}function o(t,e,n){return e=l(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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,l=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){i=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(i)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function s(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e,n){return(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}n.d(e,{$j:()=>_,CP:()=>m,Lv:()=>v,cL:()=>g,qq:()=>b});var h=s(function t(){p(this,t)}),v=function(){return s(function t(){p(this,t),y(this,"open",!1),y(this,"dotenv",""),y(this,"tool_mode",!1)},null,[{key:"get_label_by_v",value:function(t,e){if(!t||null==e||!e.length)return t;var n,r=u(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.value===t)return o.label}}catch(t){r.e(t)}finally{r.f()}}}])}(),b=function(t){function e(){var t;p(this,e);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return y(t=o(this,e,[].concat(r)),"tool_error_max",50),y(t,"tool_call_max",300),y(t,"allow_exec_cmd_directly",!1),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(e,t),s(e)}(h),m='\n\n# 工具报错最大尝试次数\ntool_error_max=50\n# 聊天循环最大次数\ntool_call_max=300\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n\n# 可选的多个url 以数组分割\n# options_agent_url_list=[{"value":"http://..",label:"openai"}]\n\n# 可选的多个 token\n# options_agent_token_list=[{"value":"sh-aaa",label:"option1"}]\n\n# 可选的多个 model\n# options_agent_model_list=[{"value":"gpt-5.5",label:"gpt"}]\n\n',g=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function _(t){return"string"==typeof t?t:Array.isArray(t)?t.map(function(t){return"text"===t.type?t.text:"[图片]"}).join("\n"):""}},6494(t,e,n){n.d(e,{r:()=>o});var r=n(2389);function o(){var t=(0,r.Bd)().t;return[{value:"completions",label:t("文本对话")},{value:"images",label:t("图片生成")},{value:"embeddings",label:t("向量嵌入")}]}},4299(t,e,n){n.r(e),n.d(e,{default:()=>h});var r=n(6540),o=n(3557),a=n(3995),l=n(950),i=n(7979),u=n(8263),c=n(9428),f=n.n(c),s=(n(3775),n(1499)),p=n(9214),y=n(9878),d=(n(2411),new o.A({html:!0,highlight:function(t,e){if(e&&y.A.getLanguage(e))try{var n=y.A.highlight(t,{language:e}).value;return'<pre class="hljs code-block-with-copy"><code class="hljs language-'.concat(e,'">').concat(n,"</code></pre>")}catch(t){}try{var r=y.A.highlightAuto(t).value;return'<pre class="hljs code-block-with-copy"><code class="hljs">'.concat(r,"</code></pre>")}catch(t){}return'<pre class="hljs code-block-with-copy"><code>'.concat(d.utils.escapeHtml(t),"</code></pre>")}}));function h(t){return(0,p.VD)(),r.createElement("div",{dangerouslySetInnerHTML:{__html:d.render(t.context)}})}d.use(a.A).use(l.A).use(i.A).use(u.A).use(f()).use(function(t){t.renderer.rules.fence;t.renderer.rules.fence=function(e,n,r,o,a){var l=e[n],i=l.content.trim(),u=l.info.trim(),c="";if(u&&y.A.getLanguage(u))try{c=y.A.highlight(i,{language:u}).value}catch(e){c=t.utils.escapeHtml(i)}else try{c=y.A.highlightAuto(i).value}catch(e){c=t.utils.escapeHtml(i)}return'\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">'.concat(u||"code",'</span>\n <button class="copy-btn" data-code="').concat(t.utils.escapeHtml(i),'">复制</button>\n </div>\n <pre><code class="hljs ').concat(u?"language-".concat(u):"",'">').concat(c,"</code></pre>\n </div>")}}).use(function(t){var e=t.renderer.rules.link_open||function(t,e,n,r,o){return o.renderToken(t,e,n)};t.renderer.rules.link_open=function(t,n,r,o,a){var l=t[n],i=l.attrIndex("href");if(i>=0){var u=l.attrs[i][1];l.attrs[i][1]=(0,s.bi)(window.location.href,u)}return e(t,n,r,o,a)}})},5907(t,e,n){n.d(e,{y:()=>i});var r=n(7444),o=n(6417);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,l,i=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(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 l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(){var t=a((0,r.L4)(o.AG.confirm),2),e=(t[0],t[1]);return function(t){var n=t.sub_title,r=t.confirm_fun,o=t.title,a=t.context_div;e({open:!0,sub_title:n,handle:function(){r(),e({open:!1,handle:null})},title:o,context_div:a})}}},840(t){t.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1501,6010],{3277(t,e,n){function r(t){return r="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},r(t)}function o(t,e,n){return e=l(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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,l=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){i=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(i)throw a}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function s(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e,n){return(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}n.d(e,{$j:()=>_,CP:()=>m,Lv:()=>v,cL:()=>g,qq:()=>b});var h=s(function t(){p(this,t)}),v=function(){return s(function t(){p(this,t),y(this,"open",!1),y(this,"dotenv",""),y(this,"tool_mode",!1)},null,[{key:"get_label_by_v",value:function(t,e){if(!t||null==e||!e.length)return t;var n,r=u(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.value===t)return o.label}}catch(t){r.e(t)}finally{r.f()}}}])}(),b=function(t){function e(){var t;p(this,e);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return y(t=o(this,e,[].concat(r)),"tool_error_max",50),y(t,"tool_call_max",300),y(t,"allow_exec_cmd_directly",!1),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(e,t),s(e)}(h),m='\n\n# 工具报错最大尝试次数\ntool_error_max=50\n# 聊天循环最大次数\ntool_call_max=300\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n\n# 可选的多个url 以数组分割\n# options_agent_url_list=[{"value":"http://..",label:"openai"}]\n\n# 可选的多个 token\n# options_agent_token_list=[{"value":"sh-aaa",label:"option1"}]\n\n# 可选的多个 model\n# options_agent_model_list=[{"value":"gpt-5.5",label:"gpt"}]\n\n',g=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function _(t){return"string"==typeof t?t:Array.isArray(t)?t.map(function(t){return"text"===t.type?t.text:"[图片]"}).join("\n"):""}},6494(t,e,n){n.d(e,{r:()=>o});var r=n(2389);function o(){var t=(0,r.Bd)().t;return[{value:"completions",label:t("文本对话")},{value:"images",label:t("图片生成")}]}},4299(t,e,n){n.r(e),n.d(e,{default:()=>h});var r=n(6540),o=n(3557),a=n(3995),l=n(950),i=n(7979),u=n(8263),c=n(9428),f=n.n(c),s=(n(3775),n(1499)),p=n(9214),y=n(9878),d=(n(2411),new o.A({html:!0,highlight:function(t,e){if(e&&y.A.getLanguage(e))try{var n=y.A.highlight(t,{language:e}).value;return'<pre class="hljs code-block-with-copy"><code class="hljs language-'.concat(e,'">').concat(n,"</code></pre>")}catch(t){}try{var r=y.A.highlightAuto(t).value;return'<pre class="hljs code-block-with-copy"><code class="hljs">'.concat(r,"</code></pre>")}catch(t){}return'<pre class="hljs code-block-with-copy"><code>'.concat(d.utils.escapeHtml(t),"</code></pre>")}}));function h(t){return(0,p.VD)(),r.createElement("div",{dangerouslySetInnerHTML:{__html:d.render(t.context)}})}d.use(a.A).use(l.A).use(i.A).use(u.A).use(f()).use(function(t){t.renderer.rules.fence;t.renderer.rules.fence=function(e,n,r,o,a){var l=e[n],i=l.content.trim(),u=l.info.trim(),c="";if(u&&y.A.getLanguage(u))try{c=y.A.highlight(i,{language:u}).value}catch(e){c=t.utils.escapeHtml(i)}else try{c=y.A.highlightAuto(i).value}catch(e){c=t.utils.escapeHtml(i)}return'\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">'.concat(u||"code",'</span>\n <button class="copy-btn" data-code="').concat(t.utils.escapeHtml(i),'">复制</button>\n </div>\n <pre><code class="hljs ').concat(u?"language-".concat(u):"",'">').concat(c,"</code></pre>\n </div>")}}).use(function(t){var e=t.renderer.rules.link_open||function(t,e,n,r,o){return o.renderToken(t,e,n)};t.renderer.rules.link_open=function(t,n,r,o,a){var l=t[n],i=l.attrIndex("href");if(i>=0){var u=l.attrs[i][1];l.attrs[i][1]=(0,s.bi)(window.location.href,u)}return e(t,n,r,o,a)}})},5907(t,e,n){n.d(e,{y:()=>i});var r=n(7444),o=n(6417);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,l,i=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(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 l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(){var t=a((0,r.L4)(o.AG.confirm),2),e=(t[0],t[1]);return function(t){var n=t.sub_title,r=t.confirm_fun,o=t.title,a=t.context_div;e({open:!0,sub_title:n,handle:function(){r(),e({open:!1,handle:null})},title:o,context_div:a})}}},840(t){t.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 2502.11767be679fbd6ea43ec.js.LICENSE.txt */
2
- (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2502,4627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function d(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function h(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function g(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>h,I:()=>g,IO:()=>d,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>g,gz:()=>v,uF:()=>d,xP:()=>h});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(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 s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function d(t){return u(t,c.full)}function h(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var g=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>y,Sm:()=>m,U6:()=>b,cA:()=>v,l6:()=>g});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return u="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},u(t)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(l.In,{icon:t.icon}),r.createElement("input",{type:t.type,ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],a=n[1],l=f(r.useState("input input--block awesomplete"),2),s=l[0],c=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&c("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var d=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){d.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current&&Array.isArray(t.options)){var n=t.options.map(function(t){return"object"===u(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),d.current&&d.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:s,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function m(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function g(t){var e,n,i=f((0,r.useState)(!1),2),o=i[0],l=i[1],s=f((0,r.useState)({}),2),c=s[0],u=s[1],d=(0,r.useRef)(null),h=(0,r.useRef)(null),p=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){d.current&&!d.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&d.current&&h.current){var t,e=d.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,u({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:d,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==p?void 0:p.color)||"inherit"}},null!==(e=null!==(n=null==p?void 0:p.title)&&void 0!==n?n:null==p?void 0:p.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:c},t.options.map(function(e,n){var i,o,a;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=null!==(a=e.title)&&void 0!==a?a:e.label)&&void 0!==o?o:e.value)})),document.body)))}function b(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function y(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),d=n(2042),h=n(3033),p=n(2389),m=n(4694),v=n(447);function g(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return k(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 y(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return _(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,d.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],h=d.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,s)):d.n=s:d.v=s);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?s:n.call(r,d))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(_(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,_(f,"constructor",c),_(c,"constructor",s),s.displayName="GeneratorFunction",_(c,i,"GeneratorFunction"),_(f),_(f,i,"Generator"),_(f,r,function(){return this}),_(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:d}})()}function _(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}_=function(t,e,n,r){function o(e,n){_(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},_(t,e,n,r)}function x(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){x(o,r,i,a,l,"next",t)}function l(t){x(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(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 k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var C,S=300,N=!1,I=0,O=!0,T=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.AG.log_viewer),2),n=e[0],_=e[1],x=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),G=$[0],W=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(x.current.insertBefore(o,i),T.unshift(o)):(x.current.appendChild(o),T.push(o)),o},tt=function(t){var e=(0,m.I)(T,function(e){return e===t});e&&x.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?x.current.firstChild:o);if(T.length>S)for(var l=T.length-1;l>=S;)tt(T[T.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(T.length>S)for(var c=T.length-S;c>0;)tt(T[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return C.encoding=n.encoding,C.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,C);case 1:if(e=t.v){if(r=e.context,C=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));C.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,C.back),C.context_list.length>0&&(C.back&&T.length>0?(C.context_list.length>T.length?P(Math.floor(100*parseInt(T[C.context_list.length-T.length].getAttribute("position"))/C.max_size)):P(Math.floor(100*parseInt(T[T.length-C.context_list.length].getAttribute("position"))/C.max_size)),O=!1):P(Math.floor(100*(null!==(s=C.context_position_list[C.context_position_list.length-1])&&void 0!==s?s:0)/C.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){N||(N=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(C=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),x.current.scrollTop=x.current.scrollHeight)}),C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.position=t,o.ws.sendData(i.HK.log_viewer_watch,C),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=x.current)){t.n=7;break}if(!N){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&T.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(T[T.length-1].getAttribute("position")))>=C.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return C.line=20,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!1,C.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&T.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(T[0].getAttribute("start_position")))<=0)){t.n=5;break}return O||(O=!0,(0,d.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return C.line=10,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!0,C.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),x.current.addEventListener("scroll",e),r=function(t){var e=x.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},x.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),W(""),N=!1,V(0),I=0,L=[],j=-1,T=[],(C=new u.d2).line=S,C.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),C.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,d.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,b(t.context)),V(t.context.length)}catch(t){(0,d.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:x.current&&x.current.remove(),T=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,d.zN)("范围在0-100"),"超过最大范围";case 2:n=g(T);try{for(n.s();!(r=n.n()).done;)i=r.value,x.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}T=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,d.N9)(o),t.a(2);case 4:return C.back=e>=100,C.position=Math.floor(C.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!N){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],C.back=!0,C.position=C.max_size,t.n=2,nt();case 2:x.current.scrollTop=x.current.scrollHeight,rt(C.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(G){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],C.query_text=G,C.encoding=n.encoding,o.ws.sendData(i.HK.search_file,C);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,C.find_back_enter_index=!0,C.back=!1,C.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,C.back=!1,C.find_back_enter_index=!0,C.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){_({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(h.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:G,handleInputChange:function(t){W(t)},max_width:"25em"})),G&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),G&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),G&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),G&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),W(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){N&&(N=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,C))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(h.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:x,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),d=n.n(f),h=n(1113),p=n.n(h),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
1
+ /*! For license information please see 2502.c7ff4efe287affeaebf2.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2502,4627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function d(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function h(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function g(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>h,I:()=>g,IO:()=>d,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>g,gz:()=>v,uF:()=>d,xP:()=>h});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(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 s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function d(t){return u(t,c.full)}function h(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var g=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>y,Sm:()=>m,U6:()=>b,cA:()=>v,l6:()=>g});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return u="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},u(t)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(l.In,{icon:t.icon}),r.createElement("input",{type:t.type,ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],a=n[1],l=f(r.useState("input input--block awesomplete"),2),s=l[0],c=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&c("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var d=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){d.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current&&Array.isArray(t.options)){var n=t.options.map(function(t){return"object"===u(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),d.current&&d.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:s,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function m(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function g(t){var e,n,i,o=f((0,r.useState)(!1),2),l=o[0],s=o[1],c=f((0,r.useState)({}),2),u=c[0],d=c[1],h=(0,r.useRef)(null),p=(0,r.useRef)(null),m=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){h.current&&!h.current.contains(t.target)&&p.current&&!p.current.contains(t.target)&&s(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(l&&h.current&&p.current){var t,e=h.current.getBoundingClientRect(),n=p.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,d({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[l]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:h,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||s(!l)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==m?void 0:m.color)||"inherit"}},null!==(e=null!==(n=null!==(i=null==m?void 0:m.title)&&void 0!==i?i:null==m?void 0:m.label)&&void 0!==n?n:null==m?void 0:m.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",l?"select_trigger__icon--open":""].join(" ")},"expand_more")),l&&(0,a.createPortal)(r.createElement("div",{ref:p,className:"select_dropdown",style:u},t.options.map(function(e,n){var i,o,a;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),s(!1)}},null!==(o=null!==(a=e.title)&&void 0!==a?a:e.label)&&void 0!==o?o:e.value)})),document.body)))}function b(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function y(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),d=n(2042),h=n(3033),p=n(2389),m=n(4694),v=n(447);function g(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return k(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 y(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return _(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,d.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],h=d.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,s)):d.n=s:d.v=s);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?s:n.call(r,d))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(_(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,_(f,"constructor",c),_(c,"constructor",s),s.displayName="GeneratorFunction",_(c,i,"GeneratorFunction"),_(f),_(f,i,"Generator"),_(f,r,function(){return this}),_(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:d}})()}function _(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}_=function(t,e,n,r){function o(e,n){_(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},_(t,e,n,r)}function x(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){x(o,r,i,a,l,"next",t)}function l(t){x(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(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 k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var C,S=300,N=!1,I=0,O=!0,T=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.AG.log_viewer),2),n=e[0],_=e[1],x=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),G=$[0],W=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(x.current.insertBefore(o,i),T.unshift(o)):(x.current.appendChild(o),T.push(o)),o},tt=function(t){var e=(0,m.I)(T,function(e){return e===t});e&&x.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?x.current.firstChild:o);if(T.length>S)for(var l=T.length-1;l>=S;)tt(T[T.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(T.length>S)for(var c=T.length-S;c>0;)tt(T[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return C.encoding=n.encoding,C.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,C);case 1:if(e=t.v){if(r=e.context,C=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));C.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,C.back),C.context_list.length>0&&(C.back&&T.length>0?(C.context_list.length>T.length?P(Math.floor(100*parseInt(T[C.context_list.length-T.length].getAttribute("position"))/C.max_size)):P(Math.floor(100*parseInt(T[T.length-C.context_list.length].getAttribute("position"))/C.max_size)),O=!1):P(Math.floor(100*(null!==(s=C.context_position_list[C.context_position_list.length-1])&&void 0!==s?s:0)/C.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){N||(N=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(C=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),x.current.scrollTop=x.current.scrollHeight)}),C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.position=t,o.ws.sendData(i.HK.log_viewer_watch,C),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=x.current)){t.n=7;break}if(!N){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&T.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(T[T.length-1].getAttribute("position")))>=C.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return C.line=20,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!1,C.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&T.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(T[0].getAttribute("start_position")))<=0)){t.n=5;break}return O||(O=!0,(0,d.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return C.line=10,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!0,C.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),x.current.addEventListener("scroll",e),r=function(t){var e=x.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},x.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),W(""),N=!1,V(0),I=0,L=[],j=-1,T=[],(C=new u.d2).line=S,C.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),C.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,d.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,b(t.context)),V(t.context.length)}catch(t){(0,d.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:x.current&&x.current.remove(),T=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,d.zN)("范围在0-100"),"超过最大范围";case 2:n=g(T);try{for(n.s();!(r=n.n()).done;)i=r.value,x.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}T=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,d.N9)(o),t.a(2);case 4:return C.back=e>=100,C.position=Math.floor(C.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!N){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],C.back=!0,C.position=C.max_size,t.n=2,nt();case 2:x.current.scrollTop=x.current.scrollHeight,rt(C.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(G){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],C.query_text=G,C.encoding=n.encoding,o.ws.sendData(i.HK.search_file,C);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,C.find_back_enter_index=!0,C.back=!1,C.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,C.back=!1,C.find_back_enter_index=!0,C.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){_({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(h.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:G,handleInputChange:function(t){W(t)},max_width:"25em"})),G&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),G&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),G&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),G&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),W(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){N&&(N=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,C))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(h.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:x,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),d=n.n(f),h=n(1113),p=n.n(h),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);