@whyour/qinglong 2.21.0-12 → 2.21.0-14

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.
package/docker/Dockerfile CHANGED
@@ -1,11 +1,26 @@
1
- FROM python:3.11-alpine3.18 AS builder
1
+ # Run Node package installation natively on the builder. Node/npm can spin at
2
+ # 100% CPU when Alpine s390x is emulated through QEMU.
3
+ FROM --platform=$BUILDPLATFORM node:18-alpine3.18 AS builder
4
+
5
+ ARG TARGETARCH
6
+ ENV NPM_CONFIG_PREFIX=/opt/node-global
7
+ ENV PATH=/opt/node-global/bin:${PATH}
8
+
2
9
  COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
3
10
  RUN set -x \
4
- && apk update \
5
- && apk add nodejs npm git \
6
- && npm i -g pnpm@8.3.1 pm2 ts-node \
11
+ && apk add --no-cache git \
12
+ && npm i -g pnpm@8.3.1 pm2 ts-node typescript@5 \
7
13
  && cd /tmp/build \
8
- && pnpm install --prod
14
+ && case "${TARGETARCH}" in \
15
+ amd64) NODE_ARCH=x64 ;; \
16
+ 386) NODE_ARCH=ia32 ;; \
17
+ ppc64le) NODE_ARCH=ppc64 ;; \
18
+ *) NODE_ARCH="${TARGETARCH}" ;; \
19
+ esac \
20
+ && npm_config_target_platform=linux \
21
+ npm_config_target_arch="${NODE_ARCH}" \
22
+ npm_config_target_libc=musl \
23
+ pnpm install --prod
9
24
 
10
25
  FROM python:3.11-alpine
11
26
 
@@ -26,8 +41,8 @@ VOLUME /ql/data
26
41
 
27
42
  EXPOSE 5700
28
43
 
29
- COPY --from=builder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
30
- COPY --from=builder /usr/local/bin/. /usr/local/bin/
44
+ COPY --from=builder /opt/node-global/lib/node_modules/. /usr/local/lib/node_modules/
45
+ COPY --from=builder /opt/node-global/bin/. /usr/local/bin/
31
46
 
32
47
  RUN set -x \
33
48
  && apk update -f \
@@ -1,11 +1,26 @@
1
- FROM python:3.10-alpine3.18 AS builder
1
+ # Run Node package installation natively on the builder. Node/npm can spin at
2
+ # 100% CPU when Alpine s390x is emulated through QEMU.
3
+ FROM --platform=$BUILDPLATFORM node:18-alpine3.18 AS builder
4
+
5
+ ARG TARGETARCH
6
+ ENV NPM_CONFIG_PREFIX=/opt/node-global
7
+ ENV PATH=/opt/node-global/bin:${PATH}
8
+
2
9
  COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
3
10
  RUN set -x \
4
- && apk update \
5
- && apk add nodejs npm git \
6
- && npm i -g pnpm@8.3.1 pm2 ts-node \
11
+ && apk add --no-cache git \
12
+ && npm i -g pnpm@8.3.1 pm2 ts-node typescript@5 \
7
13
  && cd /tmp/build \
8
- && pnpm install --prod
14
+ && case "${TARGETARCH}" in \
15
+ amd64) NODE_ARCH=x64 ;; \
16
+ 386) NODE_ARCH=ia32 ;; \
17
+ ppc64le) NODE_ARCH=ppc64 ;; \
18
+ *) NODE_ARCH="${TARGETARCH}" ;; \
19
+ esac \
20
+ && npm_config_target_platform=linux \
21
+ npm_config_target_arch="${NODE_ARCH}" \
22
+ npm_config_target_libc=musl \
23
+ pnpm install --prod
9
24
 
10
25
  FROM python:3.10-alpine
11
26
 
@@ -26,8 +41,8 @@ VOLUME /ql/data
26
41
 
27
42
  EXPOSE 5700
28
43
 
29
- COPY --from=builder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
30
- COPY --from=builder /usr/local/bin/. /usr/local/bin/
44
+ COPY --from=builder /opt/node-global/lib/node_modules/. /usr/local/lib/node_modules/
45
+ COPY --from=builder /opt/node-global/bin/. /usr/local/bin/
31
46
 
32
47
  RUN set -x \
33
48
  && apk update -f \
@@ -1,4 +1,6 @@
1
- FROM node:22-slim AS nodebuilder
1
+ # Node 20 Bookworm is the latest official Node image variant that covers the
2
+ # full Debian build matrix, including arm/v7, ppc64le, and s390x.
3
+ FROM node:20-bookworm-slim AS nodebuilder
2
4
 
3
5
  FROM python:3.11-slim-bookworm AS builder
4
6
  COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
@@ -67,7 +69,7 @@ RUN set -x && \
67
69
  git config --global user.email "qinglong@users.noreply.github.com" && \
68
70
  git config --global user.name "qinglong" && \
69
71
  git config --global http.postBuffer 524288000 && \
70
- npm install -g pnpm@8.3.1 pm2 ts-node && \
72
+ npm install -g pnpm@8.3.1 pm2 ts-node typescript@5 && \
71
73
  rm -rf /root/.cache && \
72
74
  rm -rf /root/.npm && \
73
75
  rm -rf /etc/apt/apt.conf.d/docker-clean && \
@@ -1,4 +1,6 @@
1
- FROM node:22-slim AS nodebuilder
1
+ # Node 20 Bookworm is the latest official Node image variant that covers the
2
+ # full Debian build matrix, including arm/v7, ppc64le, and s390x.
3
+ FROM node:20-bookworm-slim AS nodebuilder
2
4
 
3
5
  FROM python:3.10-slim-bookworm AS builder
4
6
  COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
@@ -66,7 +68,7 @@ RUN set -x && \
66
68
  git config --global user.email "qinglong@users.noreply.github.com" && \
67
69
  git config --global user.name "qinglong" && \
68
70
  git config --global http.postBuffer 524288000 && \
69
- npm install -g pnpm@8.3.1 pm2 ts-node && \
71
+ npm install -g pnpm@8.3.1 pm2 ts-node typescript@5 && \
70
72
  rm -rf /root/.cache && \
71
73
  rm -rf /root/.npm && \
72
74
  rm -rf /etc/apt/apt.conf.d/docker-clean && \
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whyour/qinglong",
3
3
  "packageManager": "pnpm@8.3.1",
4
- "version": "2.21.0-12",
4
+ "version": "2.21.0-14",
5
5
  "description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
6
6
  "repository": {
7
7
  "type": "git",
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "overrides": {
68
- "sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.0.3",
68
+ "sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.1.0",
69
69
  "@codemirror/state": "6.5.4",
70
70
  "@codemirror/view": "6.39.16"
71
71
  }
@@ -109,7 +109,7 @@
109
109
  "request-ip": "3.3.0",
110
110
  "sequelize": "^6.37.5",
111
111
  "sockjs": "^0.3.24",
112
- "sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.0.3",
112
+ "sqlite3": "git+https://github.com/whyour/node-sqlite3.git#v1.1.0",
113
113
  "toad-scheduler": "^3.0.1",
114
114
  "typedi": "^0.10.0",
115
115
  "undici": "^7.9.0",
package/shell/check.sh CHANGED
@@ -59,7 +59,7 @@ check_pm2() {
59
59
 
60
60
  main() {
61
61
  t '=====> 开始检测'
62
- npm i -g pnpm@8.3.1 pm2 ts-node
62
+ npm i -g pnpm@8.3.1 pm2 ts-node typescript@5
63
63
 
64
64
  reset_env
65
65
  copy_dep
package/shell/start.sh CHANGED
@@ -74,7 +74,7 @@ if [[ $command != "reload" ]]; then
74
74
  ;;
75
75
  esac
76
76
 
77
- npm install -g pnpm@8.3.1 pm2 ts-node
77
+ npm install -g pnpm@8.3.1 pm2 ts-node typescript@5
78
78
  fi
79
79
 
80
80
  export PYTHON_SHORT_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
@@ -350,6 +350,20 @@ exports.default = (app) => {
350
350
  return next(e);
351
351
  }
352
352
  });
353
+ route.put('/config/panel-title', (0, celebrate_1.celebrate)({
354
+ body: celebrate_1.Joi.object({
355
+ panelTitle: celebrate_1.Joi.string().max(100).allow('').allow(null),
356
+ }),
357
+ }), async (req, res, next) => {
358
+ try {
359
+ const systemService = typedi_1.Container.get(system_1.default);
360
+ const result = await systemService.updatePanelTitle(req.body);
361
+ res.send(result);
362
+ }
363
+ catch (e) {
364
+ return next(e);
365
+ }
366
+ });
353
367
  route.put('/config/global-ssh-key', (0, celebrate_1.celebrate)({
354
368
  body: celebrate_1.Joi.object({
355
369
  globalSshKey: celebrate_1.Joi.string().allow('').allow(null),
@@ -439,6 +439,13 @@ let SystemService = class SystemService {
439
439
  (0, i18n_1.setLang)(lang);
440
440
  return { code: 200, data: { lang } };
441
441
  }
442
+ async updatePanelTitle(info) {
443
+ var _a;
444
+ const oDoc = await this.getSystemConfig();
445
+ const panelTitle = ((_a = info.panelTitle) === null || _a === void 0 ? void 0 : _a.trim()) || '';
446
+ await this.updateAuthDb(Object.assign(Object.assign({}, oDoc), { info: Object.assign(Object.assign({}, oDoc.info), { panelTitle }) }));
447
+ return { code: 200, data: { panelTitle } };
448
+ }
442
449
  async updateGlobalSshKey(info) {
443
450
  const oDoc = await this.getSystemConfig();
444
451
  const result = await this.updateAuthDb(Object.assign(Object.assign({}, oDoc), { info: Object.assign(Object.assign({}, oDoc.info), info) }));
@@ -7,10 +7,10 @@
7
7
  <link rel="shortcut icon" href="https://qn.whyour.cn/favicon.svg">
8
8
  <link rel="stylesheet" href="./umi.a4d14b92.css">
9
9
  <script src="./api/env.js"></script>
10
- <script src="./preload_helper.5fb41cf7.js"></script>
10
+ <script src="./preload_helper.a2e35565.js"></script>
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
14
- <script src="./umi.1e3916ff.js"></script>
14
+ <script src="./umi.73f4b916.js"></script>
15
15
  </body>
16
16
  </html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[1717],{44224:function(e,t,n){var i=(0,n(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=i},84903:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var i=n(26068),a=n.n(i),o=n(48305),s=n.n(o),r=n(3475),c=n(9364),l=n(16314),u=n(81379),d=n(1371),h=n(5323),p=n(41206),f=n(34014),m=n(99192),g=n(98783),v=n(71571),x=n(65823),k=n(59816),b=n(87893),y=n(85950),Z=n(70892),S=n(75271),w=n(72317),P=n(86563),j=n.n(P),I=n(63883),E=n(76991),q=n(44224),_=n(52676),C={route:{routes:[{name:w.ZP.get("登录"),path:"/login",hideInMenu:!0,component:"@/pages/login/index"},{name:w.ZP.get("初始化"),path:"/initialization",hideInMenu:!0,component:"@/pages/initialization/index"},{name:w.ZP.get("错误"),path:"/error",hideInMenu:!0,component:"@/pages/error/index"},{path:"/dashboard",name:w.ZP.get("仪表盘"),icon:(0,_.jsx)(I.Z,{}),component:"@/pages/dashboard/index"},{path:"/crontab",name:w.ZP.get("定时任务"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-crontab"}),component:"@/pages/crontab/index"},{path:"/subscription",name:w.ZP.get("订阅管理"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-subs"}),component:"@/pages/subscription/index"},{path:"/env",name:w.ZP.get("环境变量"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-env"}),component:"@/pages/env/index"},{path:"/config",name:w.ZP.get("配置文件"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-config"}),component:"@/pages/config/index"},{path:"/script",name:w.ZP.get("脚本管理"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-script"}),component:"@/pages/script/index"},{path:"/dependence",name:w.ZP.get("依赖管理"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-dependence"}),component:"@/pages/dependence/index"},{path:"/log",name:w.ZP.get("日志管理"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-log"}),component:"@/pages/log/index"},{path:"/diff",name:w.ZP.get("对比工具"),icon:(0,_.jsx)(q.Z,{type:"ql-icon-diff"}),component:"@/pages/diff/index"},{path:"/setting",name:w.ZP.get("系统设置"),icon:(0,_.jsx)(E.Z,{}),component:"@/pages/password/index"}]},navTheme:"light",fixSiderbar:!0,contentWidth:"Fixed",splitMenus:!1,siderWidth:180},T=n(83383);var z=n(65814);function L(){var e=(0,g.useLocation)(),t=(0,c.e)(),n=(0,c.F)(),i=n.theme,o=n.reloadTheme,P=(0,S.useState)({}),I=s()(P,2),E=I[0],q=I[1],L=(0,S.useState)(!0),M=s()(L,2),A=M[0],N=M[1],W=(0,S.useState)(),O=s()(W,2),F=O[0],R=O[1],H=(0,S.useState)((function(){var e;return(null===(e=localStorage.getItem("qinglong_panel_title"))||void 0===e?void 0:e.trim())||w.ZP.get("青龙")})),U=s()(H,2),D=U[0],J=U[1],K=(0,S.useState)(!1),B=s()(K,2),Q=B[0],G=B[1],V=(0,S.useState)(!0),X=s()(V,2),Y=X[0],$=X[1],ee=v||{},te=ee.enable,ne=ee.disable,ie=(ee.exportGeneratedCSS,ee.setFetchMethod),ae=ee.auto,oe=function(){l.W.get("".concat(r.Z.apiPrefix,"system")).then((function(e){var t=e.code,n=e.data;200===t&&(R(n),n.isInitialized?(n.version,T._m.config({paths:{vs:"".concat(r.Z.baseUrl,"monaco-editor/min/vs")},"vs/nls":{availableLanguages:{"*":"zh-cn"}}}),se()):g.history.push("/initialization"))})).catch((function(e){console.log(e)}))},se=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&N(!0),l.W.get("".concat(r.Z.apiPrefix,"user")).then((function(n){var i=n.code,a=n.data;200===i&&a.username&&(q(a),"/"===e.pathname&&g.history.push("/dashboard")),t&&N(!1)})).catch((function(e){console.log(e)}))},re=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];se(e)},ce=function(){l.W.get("".concat(r.Z.apiPrefix,"system/config")).then((function(e){var t,n,i=e.data,a=null==i||null===(t=i.info)||void 0===t||null===(t=t.panelTitle)||void 0===t?void 0:t.trim();if(a?(J(a),localStorage.setItem("qinglong_panel_title",a)):(J(w.ZP.get("青龙")),localStorage.removeItem("qinglong_panel_title")),null==i||null===(n=i.info)||void 0===n||!n.lang){var o,s=localStorage.getItem("lang")||(null===(o=navigator.language)||void 0===o?void 0:o.slice(0,2))||"zh";l.W.put("".concat(r.Z.apiPrefix,"system/config/lang"),{lang:s}).catch((function(){}))}})).catch((function(){}))};if((0,S.useEffect)((function(){F&&F.isInitialized&&!E&&se()}),[e.pathname]),(0,S.useEffect)((function(){l.W.get("".concat(r.Z.apiPrefix,"health")).then((function(e){var t;"ok"===(null==e||null===(t=e.data)||void 0===t?void 0:t.status)?oe():g.history.push("/error")})).catch((function(e){401!==e.response.status?g.history.push("/error"):window.location.reload()})).finally((function(){return $(!1)}))}),[]),(0,S.useEffect)((function(){ce()}),[]),(0,S.useEffect)((function(){if(["/login","/initialization","/error"].includes(e.pathname)){var t=r.Z.documentTitleMap[e.pathname]||w.ZP.get("未找到");document.title="".concat(t," - ").concat(D)}}),[e.pathname,D]),(0,S.useEffect)((function(){"vs-dark"===i?document.body.setAttribute("data-dark","true"):document.body.setAttribute("data-dark","false")}),[i]),(0,S.useEffect)((function(){j()();var e=localStorage.getItem("qinglong_dark_theme")||"auto";if("undefined"!=typeof window&&void 0!==window.matchMedia)return v?(ie(fetch),"dark"===e?te({}):"light"===e?ne():ae({}),function(){ne()}):function(){return null}}),[]),(0,S.useEffect)((function(){if(E&&E.username){var e=z.Z.getInstance("".concat(window.location.origin).concat(r.Z.apiPrefix,"ws?token=").concat(localStorage.getItem(r.Z.authKey)));return function(){e.close()}}}),[E]),(0,S.useEffect)((function(){window.onload=function(){var e=performance.timing;console.log("白屏时间: ".concat(e.responseStart-e.navigationStart)),console.log("请求完毕至DOM加载: ".concat(e.domInteractive-e.responseEnd)),console.log("解释dom树耗时: ".concat(e.domComplete-e.domInteractive)),console.log("从开始至load总耗时: ".concat(e.loadEventEnd-e.navigationStart))}}),[]),Y)return(0,_.jsx)(f.Z,{});if(["/login","/initialization","/error"].includes(e.pathname)&&(null!=F&&F.isInitialized&&"/initialization"===e.pathname&&g.history.push("/dashboard"),F||"/error"===e.pathname))return(0,_.jsx)(g.Outlet,{context:a()(a()({},t),{},{theme:i,user:E,reloadUser:re,reloadSystemConfig:ce,reloadTheme:o,siteTitle:D,systemInfo:F})});var le=navigator.userAgent.includes("Firefox"),ue=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),de=navigator.userAgent.includes("QQBrowser"),he={items:[{label:w.ZP.get("退出登录"),className:"side-menu-user-drop-menu",onClick:function(){l.W.post("".concat(r.Z.apiPrefix,"user/logout")).then((function(){localStorage.removeItem(r.Z.authKey),g.history.push("/login")}))},key:"logout",icon:(0,_.jsx)(u.Z,{})}]};return A?(0,_.jsx)(f.Z,{}):(0,_.jsx)(m.ZP,a()(a()({selectedKeys:[e.pathname],loading:A,logo:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(x.Z,{preview:!1,src:"https://qn.whyour.cn/logo.png"}),(0,_.jsxs)("div",{className:"title",children:[(0,_.jsx)("span",{className:"title",children:w.ZP.get("青龙")}),(0,_.jsx)("span",{onClick:function(e){e.stopPropagation(),window.open(null==F?void 0:F.changeLogLink,"_blank")},children:(0,_.jsx)(k.Z,{title:"develop"===(null==F?void 0:F.branch)?w.ZP.get("开发版"):w.ZP.get("正式版"),children:(0,_.jsx)(b.Z,{size:"small",dot:"develop"===(null==F?void 0:F.branch),children:(0,_.jsxs)("span",{style:{fontSize:le?9:12,color:"#666",marginLeft:2,zoom:ue?.66:.8,letterSpacing:de?-2:0},children:["v",null==F?void 0:F.version]})})})})]})]}),title:!1,menuItemRender:function(t,n){return t.isUrl||!t.path||e.pathname===t.path?n:(0,_.jsx)(g.Link,{to:t.path,children:n})},pageTitleRender:function(t,n,i){var a=r.Z.documentTitleMap[e.pathname]||w.ZP.get("未找到");return"".concat(a," - ").concat(D)},onCollapse:G,collapsed:Q,rightContentRender:function(){return t.isPhone&&(0,_.jsx)(y.Z,{menu:he,placement:"bottomRight",trigger:["click"],children:(0,_.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,_.jsx)(Z.C,{shape:"square",size:"small",icon:(0,_.jsx)(d.Z,{}),src:E.avatar?"".concat(r.Z.apiPrefix,"static/").concat(E.avatar):""}),(0,_.jsx)("span",{style:{marginLeft:5},children:E.username})]})})},collapsedButtonRender:function(e){return(0,_.jsxs)("span",{className:"side-menu-container",onClick:function(e){e.preventDefault(),e.stopPropagation()},children:[!e&&!t.isPhone&&(0,_.jsx)(y.Z,{menu:he,placement:"topLeft",trigger:["hover"],children:(0,_.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,_.jsx)(Z.C,{shape:"square",size:"small",icon:(0,_.jsx)(d.Z,{}),src:E.avatar?"".concat(r.Z.apiPrefix,"static/").concat(E.avatar):""}),(0,_.jsx)("span",{style:{marginLeft:5},children:E.username})]})}),(0,_.jsx)("span",{className:"side-menu-collapse-button",onClick:function(){return G(!e)},children:e?(0,_.jsx)(h.Z,{}):(0,_.jsx)(p.Z,{})})]})}},C),{},{children:(0,_.jsx)(g.Outlet,{context:a()(a()({},t),{},{theme:i,user:E,reloadUser:re,reloadSystemConfig:ce,reloadTheme:o,siteTitle:D,systemInfo:F})})}))}},9364:function(e,t,n){n.d(t,{F:function(){return c},e:function(){return r}});var i=n(48305),a=n.n(i),o=n(75271),s=n(48916),r=function(){var e=(0,o.useState)("100%"),t=a()(e,2),n=t[0],i=t[1],r=(0,o.useState)(0),c=a()(r,2),l=c[0],u=c[1],d=(0,o.useState)(-48),h=a()(d,2),p=h[0],f=h[1],m=(0,o.useState)(!1),g=a()(m,2),v=g[0],x=g[1],k=(0,o.useMemo)((function(){return(0,s.ZP)()}),[]).platform;return(0,o.useEffect)((function(){"mobile"===k&&document.body.offsetWidth<768?(i("auto"),u(0),f(0),x(!0),document.body.setAttribute("data-mode","phone")):(i("100%"),u(0),f(-48),x(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:p,width:n,marginLeft:l},isPhone:v}},c=function(){var e=(0,o.useState)(),t=a()(e,2),n=t[0],i=t[1];return(0,o.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;i(n?"vs-dark":"vs");var a=function(e){"auto"!==t&&t||(e.matches?i("vs-dark"):i("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",a):"function"==typeof e.addListener&&e.addListener(a)}),[]),{theme:n,reloadTheme:function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;i(n?"vs-dark":"vs")}}}},65814:function(e,t,n){var i=n(15558),a=n.n(i),o=n(67825),s=n.n(o),r=n(90228),c=n.n(r),l=n(87999),u=n.n(l),d=n(25298),h=n.n(d),p=n(17069),f=n.n(p),m=n(82092),g=n.n(m),v=n(78078),x=n.n(v),k=["type"],b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(this,e),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return f()(e,[{key:"init",value:(n=u()(c()().mark((function e(){var t=this;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var i={action:"subscribe",topic:e};this.send(i)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var i={action:"unsubscribe",topic:e};this.send(i)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=s()(e,k),i=this.subscriptions.get(t)||new Set;a()(i).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();g()(b,"instance",null),t.Z=b}}]);
@@ -1 +1 @@
1
- !function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"@whyour/qinglong","b":"webpack","f":[["src__pages__subscription__modal.562448e2.async.js",73],["119.89e2d610.async.js",119],["134.54df9e38.async.js",134],["src__pages__setting__about.e6db5090.chunk.css",154],["src__pages__setting__about.3d3c019f.async.js",154],["src__pages__env__modal.e1234834.async.js",222],["255.8a80b983.async.js",255],["src__pages__crontab__viewManageModal.0e317746.async.js",349],["src__pages__script__setting.1a82c6d7.async.js",440],["540.19ddf020.async.js",540],["src__pages__subscription__logModal.3864b37f.async.js",578],["src__pages__dashboard__index.52ea0532.async.js",635],["691.187a388c.async.js",691],["src__pages__dependence__modal.f7bb47ba.async.js",803],["1147.62793604.async.js",1147],["1352.96a77e1d.async.js",1352],["1379.f91563a1.async.js",1379],["src__pages__dependence__logModal.0681830b.async.js",1406],["src__pages__initialization__index.66819338.chunk.css",1554],["src__pages__initialization__index.22620a77.async.js",1554],["1571.94ddca13.async.js",1571],["layouts__index.adf0692f.chunk.css",1717],["layouts__index.a7a2bfe0.async.js",1717],["1765.5ac01a93.async.js",1765],["1836.f0b74cf1.async.js",1836],["1883.675b6a18.chunk.css",1883],["1885.e1ea09f6.async.js",1885],["1967.3f3945d0.async.js",1967],["2096.6d98fd12.async.js",2096],["2208.85285476.async.js",2208],["2286.f371c743.async.js",2286],["src__pages__setting__appModal.43b7758a.async.js",2313],["2325.dfa32834.async.js",2325],["2338.d678967d.async.js",2338],["src__pages__setting__index.7cf46d4a.chunk.css",2340],["src__pages__setting__index.7e070838.async.js",2340],["2808.cdc0995c.async.js",2808],["2821.651f31e5.async.js",2821],["2890.9e373f5b.async.js",2890],["src__pages__script__components__UnsupportedFilePreview__index.d50aeff1.chunk.css",2892],["src__pages__script__components__UnsupportedFilePreview__index.c347a13a.async.js",2892],["3191.545ab873.async.js",3191],["src__pages__error__index.b047bb77.chunk.css",3217],["src__pages__error__index.dedb2b90.async.js",3217],["src__pages__crontab__logModal.831d5e4b.async.js",3249],["src__pages__setting__progress.8823ac90.async.js",3308],["3382.a584a111.async.js",3382],["3383.041eee73.async.js",3383],["3390.fb4b6851.async.js",3390],["3481.333c2962.async.js",3481],["3600.7637c822.async.js",3600],["src__pages__setting__checkUpdate.34d773f2.async.js",3830],["src__pages__env__editNameModal.48715576.async.js",4216],["src__pages__crontab__viewCreateModal.4d589f66.async.js",4453],["src__pages__crontab__index.5bbea517.chunk.css",4473],["src__pages__crontab__index.68e78a33.async.js",4473],["src__pages__crontab__const.aba07deb.async.js",4555],["src__pages__404.771168fc.async.js",4650],["4859.1b962b29.chunk.css",4859],["4859.6592cebb.async.js",4859],["4902.555f92ab.async.js",4902],["4934.f3539d08.async.js",4934],["5077.cbd111cd.async.js",5077],["5481.624d0e07.async.js",5481],["5520.ff2cfd6b.async.js",5520],["src__pages__setting__security.7c80dd0f.chunk.css",5530],["src__pages__setting__security.b7235753.async.js",5530],["src__pages__script__editModal.cbf4ec0e.async.js",5586],["src__pages__setting__loginLog.cea6056c.async.js",5722],["src__pages__crontab__type.d7af36e5.async.js",5812],["src__pages__config__index.a22ff7dc.async.js",5825],["5970.d3a6e7bd.async.js",5970],["6013.4e38de36.async.js",6013],["6016.1e6574b6.async.js",6016],["6035.32ebfad9.async.js",6035],["6339.ab305e96.async.js",6339],["6341.673fb65c.async.js",6341],["src__pages__diff__index.16e53710.chunk.css",6401],["src__pages__diff__index.013b7c75.async.js",6401],["src__pages__setting__other.28ecea01.chunk.css",6465],["src__pages__setting__other.707cfafe.async.js",6465],["src__pages__script__index.60b6f827.chunk.css",6534],["src__pages__script__index.1fc20f22.async.js",6534],["6569.55177f6a.async.js",6569],["6646.95e92533.async.js",6646],["6707.801b886b.async.js",6707],["6872.42f939f1.async.js",6872],["src__pages__setting__dependence.28ecea01.chunk.css",6877],["src__pages__setting__dependence.9c04c79a.async.js",6877],["src__pages__script__editNameModal.532a3044.async.js",7158],["src__pages__setting__notification.bac481c2.async.js",7213],["src__pages__dependence__type.e48c5c88.async.js",7243],["7253.4b9bf133.async.js",7253],["7285.d561cf26.async.js",7285],["7355.f9f263d8.async.js",7355],["7384.1bb449d5.async.js",7384],["7508.3fffed15.chunk.css",7508],["7508.7dcee91c.async.js",7508],["7802.34255805.async.js",7802],["src__pages__subscription__index.4b5150de.chunk.css",7953],["src__pages__subscription__index.d0ab2abc.async.js",7953],["7984.594296a5.async.js",7984],["8060.8b699029.async.js",8060],["8078.8586c875.async.js",8078],["src__pages__env__index.77923857.chunk.css",8247],["src__pages__env__index.452cdc47.async.js",8247],["src__pages__crontab__modal.f7041c7c.async.js",8393],["src__pages__setting__systemLog.b81a8c1d.async.js",8490],["8495.d53e15ca.async.js",8495],["src__pages__script__saveModal.5ffed35f.async.js",8673],["8826.db34ad8d.async.js",8826],["src__pages__script__renameModal.5cdde919.async.js",9064],["9066.605168f8.async.js",9066],["9313.37acaf13.async.js",9313],["9323.a33f47da.async.js",9323],["src__pages__crontab__detail.b98f0084.async.js",9558],["9730.801665a3.async.js",9730],["9761.360a19d8.async.js",9761],["src__pages__log__index.9f2eae80.chunk.css",9818],["src__pages__log__index.9c66639f.async.js",9818],["src__pages__dependence__index.ef46db37.chunk.css",9914],["src__pages__dependence__index.b7bbc795.async.js",9914],["src__pages__login__index.d00b91e8.chunk.css",9939],["src__pages__login__index.8c813eb1.async.js",9939]],"r":{"/*":[6,12,23,37,49,50,57,71,1,14,16,20,21,22,25,47,48,75,95,103,112,113],"/":[1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/initialization":[6,12,18,19,23,33,37,49,71,72,73,93,113,1,14,16,20,21,22,25,47,48,50,75,95,103,112],"/subscription":[1,6,9,12,14,16,23,25,26,32,33,37,41,49,64,71,72,74,76,84,93,94,95,96,97,99,100,102,103,112,113,116,20,21,22,47,48,50,75],"/dependence":[1,6,9,12,23,25,26,32,33,37,49,64,71,72,74,76,92,93,94,95,96,97,98,102,103,110,112,113,116,120,121,14,16,20,21,22,47,48,50,75],"/dashboard":[1,2,6,9,11,12,14,16,23,25,26,32,37,38,49,64,71,72,74,76,93,94,95,96,97,102,108,112,113,20,21,22,47,48,50,75,103],"/crontab":[1,6,9,12,15,16,23,24,25,26,32,33,37,38,47,49,54,55,62,64,71,72,74,76,92,93,94,95,96,97,102,108,112,113,114,116,14,20,21,22,48,50,75,103],"/setting":[1,6,9,12,15,16,20,23,25,26,32,33,34,35,36,37,38,49,60,63,64,71,72,73,74,76,86,93,94,95,96,97,101,102,103,112,113,116,117,14,21,22,47,48,50,75],"/config":[1,6,14,16,23,25,26,27,36,37,47,49,61,70,72,74,95,96,97,113,20,21,22,48,50,75,103,112],"/script":[1,6,12,16,23,25,26,27,33,36,37,46,47,49,58,59,61,64,71,72,73,74,76,81,82,93,95,96,97,102,103,112,113,116,117,14,20,21,22,48,50,75],"/error":[6,12,23,37,42,43,71,113,1,14,16,20,21,22,25,47,48,49,50,75,95,103,112],"/login":[6,14,16,23,33,37,38,49,71,93,113,122,123,1,20,21,22,25,47,48,50,75,95,103,112],"/diff":[1,6,14,16,23,25,33,37,47,49,72,74,77,78,85,95,96,97,113,20,21,22,48,50,75,103,112],"/env":[1,6,9,12,16,23,25,26,32,33,37,49,62,64,71,72,73,74,76,92,93,94,95,96,97,104,105,112,113,114,116,117,14,20,21,22,47,48,50,75,103],"/log":[1,6,12,14,16,23,25,26,36,37,46,47,49,61,64,71,72,74,76,93,95,96,97,112,113,116,118,119,20,21,22,48,50,75,103],"/crontab/viewCreateModal":[6,15,23,29,33,37,49,53,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/crontab/viewManageModal":[1,6,7,9,12,15,23,26,29,32,33,37,49,64,71,72,76,92,93,94,95,112,113,116,14,16,20,21,22,25,47,48,50,75,103],"/subscription/logModal":[10,14,16,37,49,64,102,112,113,1,6,20,21,22,23,25,47,48,50,75,95,103],"/script/editNameModal":[6,23,26,28,33,37,49,61,64,71,72,73,89,93,112,113,116,117,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/notification":[6,23,33,37,49,71,72,90,93,113,1,14,16,20,21,22,25,47,48,50,75,95,103,112],"/dependence/logModal":[17,37,49,64,102,103,110,112,113,1,6,14,16,20,21,22,23,25,47,48,50,75,95],"/setting/checkUpdate":[14,16,37,38,49,51,64,102,103,112,113,1,6,20,21,22,23,25,47,48,50,75,95],"/script/renameModal":[6,23,33,37,49,64,71,93,111,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/dependence":[6,23,33,37,49,71,72,87,88,93,102,103,113,1,14,16,20,21,22,25,47,48,50,75,95,112],"/subscription/modal":[0,6,16,23,33,37,41,49,64,71,72,84,93,112,113,1,14,20,21,22,25,47,48,50,75,95,103],"/env/editNameModal":[6,23,33,37,49,52,64,71,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/systemLog":[6,15,36,37,49,63,107,113,1,14,16,20,21,22,23,25,47,48,50,75,95,103,112],"/crontab/logModal":[6,12,14,16,23,37,38,44,49,64,71,102,112,113,1,20,21,22,25,47,48,50,75,95,103],"/dependence/modal":[6,13,23,33,37,49,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/script/editModal":[6,14,16,23,26,33,37,46,47,48,49,61,64,67,71,72,93,102,103,112,113,1,20,21,22,25,50,75,95],"/script/saveModal":[6,23,33,37,49,64,71,93,109,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/appModal":[6,23,31,33,37,49,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/loginLog":[1,6,9,12,23,26,32,37,49,68,71,72,76,93,94,95,14,16,20,21,22,25,47,48,50,75,103,112,113],"/setting/progress":[37,45,49,64,73,112,1,6,14,16,20,21,22,23,25,47,48,50,75,95,103,113],"/setting/security":[6,12,23,33,37,49,64,65,66,71,73,93,101,112,113,116,117,1,14,16,20,21,22,25,47,48,50,75,95,103],"/dependence/type":[91,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/crontab/detail":[6,12,14,16,23,32,37,38,47,49,64,71,72,74,83,95,102,112,113,115,1,20,21,22,25,48,50,75,103],"/script/setting":[6,8,23,33,37,49,64,71,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/crontab/const":[56,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/crontab/modal":[6,16,23,30,33,37,49,64,71,72,93,106,112,113,114,1,14,20,21,22,25,47,48,50,75,95,103],"/setting/about":[3,4,6,12,23,37,71,1,14,16,20,21,22,25,47,48,49,50,75,95,103,112,113],"/setting/other":[6,9,14,16,20,23,33,37,38,49,64,71,72,73,79,80,84,86,93,102,103,112,113,116,117,1,21,22,25,47,48,50,75,95],"/crontab/type":[69,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/env/modal":[5,6,23,30,33,37,49,64,71,93,112,113,114,1,14,16,20,21,22,25,47,48,50,75,95,103],"/script/components/UnsupportedFilePreview":[39,40,49,1,6,14,16,20,21,22,23,25,37,47,48,50,75,95,103,112,113]}},{publicPath:"./"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();
1
+ !function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"@whyour/qinglong","b":"webpack","f":[["src__pages__subscription__modal.562448e2.async.js",73],["119.89e2d610.async.js",119],["134.54df9e38.async.js",134],["src__pages__setting__about.e6db5090.chunk.css",154],["src__pages__setting__about.3d3c019f.async.js",154],["src__pages__env__modal.e1234834.async.js",222],["255.8a80b983.async.js",255],["src__pages__crontab__viewManageModal.0e317746.async.js",349],["src__pages__script__setting.1a82c6d7.async.js",440],["540.19ddf020.async.js",540],["src__pages__subscription__logModal.3864b37f.async.js",578],["src__pages__dashboard__index.52ea0532.async.js",635],["691.187a388c.async.js",691],["src__pages__dependence__modal.f7bb47ba.async.js",803],["1147.62793604.async.js",1147],["1352.96a77e1d.async.js",1352],["1379.f91563a1.async.js",1379],["src__pages__dependence__logModal.0681830b.async.js",1406],["src__pages__initialization__index.66819338.chunk.css",1554],["src__pages__initialization__index.22620a77.async.js",1554],["1571.94ddca13.async.js",1571],["layouts__index.adf0692f.chunk.css",1717],["layouts__index.e1963075.async.js",1717],["1765.5ac01a93.async.js",1765],["1836.f0b74cf1.async.js",1836],["1883.675b6a18.chunk.css",1883],["1885.e1ea09f6.async.js",1885],["1967.3f3945d0.async.js",1967],["2096.6d98fd12.async.js",2096],["2208.85285476.async.js",2208],["2286.f371c743.async.js",2286],["src__pages__setting__appModal.43b7758a.async.js",2313],["2325.dfa32834.async.js",2325],["2338.d678967d.async.js",2338],["src__pages__setting__index.7cf46d4a.chunk.css",2340],["src__pages__setting__index.18fe4e7d.async.js",2340],["2808.cdc0995c.async.js",2808],["2821.651f31e5.async.js",2821],["2890.9e373f5b.async.js",2890],["src__pages__script__components__UnsupportedFilePreview__index.d50aeff1.chunk.css",2892],["src__pages__script__components__UnsupportedFilePreview__index.c347a13a.async.js",2892],["3191.545ab873.async.js",3191],["src__pages__error__index.b047bb77.chunk.css",3217],["src__pages__error__index.dedb2b90.async.js",3217],["src__pages__crontab__logModal.831d5e4b.async.js",3249],["src__pages__setting__progress.8823ac90.async.js",3308],["3382.a584a111.async.js",3382],["3383.041eee73.async.js",3383],["3390.fb4b6851.async.js",3390],["3481.333c2962.async.js",3481],["3600.7637c822.async.js",3600],["src__pages__setting__checkUpdate.34d773f2.async.js",3830],["src__pages__env__editNameModal.48715576.async.js",4216],["src__pages__crontab__viewCreateModal.4d589f66.async.js",4453],["src__pages__crontab__index.5bbea517.chunk.css",4473],["src__pages__crontab__index.68e78a33.async.js",4473],["src__pages__crontab__const.aba07deb.async.js",4555],["src__pages__404.771168fc.async.js",4650],["4859.1b962b29.chunk.css",4859],["4859.6592cebb.async.js",4859],["4902.555f92ab.async.js",4902],["4934.f3539d08.async.js",4934],["5077.cbd111cd.async.js",5077],["5481.624d0e07.async.js",5481],["5520.ff2cfd6b.async.js",5520],["src__pages__setting__security.7c80dd0f.chunk.css",5530],["src__pages__setting__security.b7235753.async.js",5530],["src__pages__script__editModal.cbf4ec0e.async.js",5586],["src__pages__setting__loginLog.cea6056c.async.js",5722],["src__pages__crontab__type.d7af36e5.async.js",5812],["src__pages__config__index.a22ff7dc.async.js",5825],["5970.d3a6e7bd.async.js",5970],["6013.4e38de36.async.js",6013],["6016.1e6574b6.async.js",6016],["6035.32ebfad9.async.js",6035],["6339.ab305e96.async.js",6339],["6341.673fb65c.async.js",6341],["src__pages__diff__index.16e53710.chunk.css",6401],["src__pages__diff__index.013b7c75.async.js",6401],["src__pages__setting__other.28ecea01.chunk.css",6465],["src__pages__setting__other.a680cd5c.async.js",6465],["src__pages__script__index.60b6f827.chunk.css",6534],["src__pages__script__index.1fc20f22.async.js",6534],["6569.55177f6a.async.js",6569],["6646.95e92533.async.js",6646],["6707.801b886b.async.js",6707],["6872.42f939f1.async.js",6872],["src__pages__setting__dependence.28ecea01.chunk.css",6877],["src__pages__setting__dependence.9c04c79a.async.js",6877],["src__pages__script__editNameModal.532a3044.async.js",7158],["src__pages__setting__notification.bac481c2.async.js",7213],["src__pages__dependence__type.e48c5c88.async.js",7243],["7253.4b9bf133.async.js",7253],["7285.d561cf26.async.js",7285],["7355.f9f263d8.async.js",7355],["7384.1bb449d5.async.js",7384],["7508.3fffed15.chunk.css",7508],["7508.7dcee91c.async.js",7508],["7802.34255805.async.js",7802],["src__pages__subscription__index.4b5150de.chunk.css",7953],["src__pages__subscription__index.d0ab2abc.async.js",7953],["7984.594296a5.async.js",7984],["8060.8b699029.async.js",8060],["8078.8586c875.async.js",8078],["src__pages__env__index.77923857.chunk.css",8247],["src__pages__env__index.452cdc47.async.js",8247],["src__pages__crontab__modal.f7041c7c.async.js",8393],["src__pages__setting__systemLog.b81a8c1d.async.js",8490],["8495.d53e15ca.async.js",8495],["src__pages__script__saveModal.5ffed35f.async.js",8673],["8826.db34ad8d.async.js",8826],["src__pages__script__renameModal.5cdde919.async.js",9064],["9066.605168f8.async.js",9066],["9313.37acaf13.async.js",9313],["9323.a33f47da.async.js",9323],["src__pages__crontab__detail.b98f0084.async.js",9558],["9730.801665a3.async.js",9730],["9761.360a19d8.async.js",9761],["src__pages__log__index.9f2eae80.chunk.css",9818],["src__pages__log__index.9c66639f.async.js",9818],["src__pages__dependence__index.ef46db37.chunk.css",9914],["src__pages__dependence__index.b7bbc795.async.js",9914],["src__pages__login__index.d00b91e8.chunk.css",9939],["src__pages__login__index.8c813eb1.async.js",9939]],"r":{"/*":[6,12,23,37,49,50,57,71,1,14,16,20,21,22,25,47,48,75,95,103,112,113],"/":[1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/initialization":[6,12,18,19,23,33,37,49,71,72,73,93,113,1,14,16,20,21,22,25,47,48,50,75,95,103,112],"/subscription":[1,6,9,12,14,16,23,25,26,32,33,37,41,49,64,71,72,74,76,84,93,94,95,96,97,99,100,102,103,112,113,116,20,21,22,47,48,50,75],"/dependence":[1,6,9,12,23,25,26,32,33,37,49,64,71,72,74,76,92,93,94,95,96,97,98,102,103,110,112,113,116,120,121,14,16,20,21,22,47,48,50,75],"/dashboard":[1,2,6,9,11,12,14,16,23,25,26,32,37,38,49,64,71,72,74,76,93,94,95,96,97,102,108,112,113,20,21,22,47,48,50,75,103],"/crontab":[1,6,9,12,15,16,23,24,25,26,32,33,37,38,47,49,54,55,62,64,71,72,74,76,92,93,94,95,96,97,102,108,112,113,114,116,14,20,21,22,48,50,75,103],"/setting":[1,6,9,12,15,16,20,23,25,26,32,33,34,35,36,37,38,49,60,63,64,71,72,73,74,76,86,93,94,95,96,97,101,102,103,112,113,116,117,14,21,22,47,48,50,75],"/config":[1,6,14,16,23,25,26,27,36,37,47,49,61,70,72,74,95,96,97,113,20,21,22,48,50,75,103,112],"/script":[1,6,12,16,23,25,26,27,33,36,37,46,47,49,58,59,61,64,71,72,73,74,76,81,82,93,95,96,97,102,103,112,113,116,117,14,20,21,22,48,50,75],"/error":[6,12,23,37,42,43,71,113,1,14,16,20,21,22,25,47,48,49,50,75,95,103,112],"/login":[6,14,16,23,33,37,38,49,71,93,113,122,123,1,20,21,22,25,47,48,50,75,95,103,112],"/diff":[1,6,14,16,23,25,33,37,47,49,72,74,77,78,85,95,96,97,113,20,21,22,48,50,75,103,112],"/env":[1,6,9,12,16,23,25,26,32,33,37,49,62,64,71,72,73,74,76,92,93,94,95,96,97,104,105,112,113,114,116,117,14,20,21,22,47,48,50,75,103],"/log":[1,6,12,14,16,23,25,26,36,37,46,47,49,61,64,71,72,74,76,93,95,96,97,112,113,116,118,119,20,21,22,48,50,75,103],"/crontab/viewCreateModal":[6,15,23,29,33,37,49,53,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/crontab/viewManageModal":[1,6,7,9,12,15,23,26,29,32,33,37,49,64,71,72,76,92,93,94,95,112,113,116,14,16,20,21,22,25,47,48,50,75,103],"/subscription/logModal":[10,14,16,37,49,64,102,112,113,1,6,20,21,22,23,25,47,48,50,75,95,103],"/script/editNameModal":[6,23,26,28,33,37,49,61,64,71,72,73,89,93,112,113,116,117,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/notification":[6,23,33,37,49,71,72,90,93,113,1,14,16,20,21,22,25,47,48,50,75,95,103,112],"/dependence/logModal":[17,37,49,64,102,103,110,112,113,1,6,14,16,20,21,22,23,25,47,48,50,75,95],"/setting/checkUpdate":[14,16,37,38,49,51,64,102,103,112,113,1,6,20,21,22,23,25,47,48,50,75,95],"/script/renameModal":[6,23,33,37,49,64,71,93,111,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/dependence":[6,23,33,37,49,71,72,87,88,93,102,103,113,1,14,16,20,21,22,25,47,48,50,75,95,112],"/subscription/modal":[0,6,16,23,33,37,41,49,64,71,72,84,93,112,113,1,14,20,21,22,25,47,48,50,75,95,103],"/env/editNameModal":[6,23,33,37,49,52,64,71,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/systemLog":[6,15,36,37,49,63,107,113,1,14,16,20,21,22,23,25,47,48,50,75,95,103,112],"/crontab/logModal":[6,12,14,16,23,37,38,44,49,64,71,102,112,113,1,20,21,22,25,47,48,50,75,95,103],"/dependence/modal":[6,13,23,33,37,49,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/script/editModal":[6,14,16,23,26,33,37,46,47,48,49,61,64,67,71,72,93,102,103,112,113,1,20,21,22,25,50,75,95],"/script/saveModal":[6,23,33,37,49,64,71,93,109,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/appModal":[6,23,31,33,37,49,64,71,72,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/setting/loginLog":[1,6,9,12,23,26,32,37,49,68,71,72,76,93,94,95,14,16,20,21,22,25,47,48,50,75,103,112,113],"/setting/progress":[37,45,49,64,73,112,1,6,14,16,20,21,22,23,25,47,48,50,75,95,103,113],"/setting/security":[6,12,23,33,37,49,64,65,66,71,73,93,101,112,113,116,117,1,14,16,20,21,22,25,47,48,50,75,95,103],"/dependence/type":[91,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/crontab/detail":[6,12,14,16,23,32,37,38,47,49,64,71,72,74,83,95,102,112,113,115,1,20,21,22,25,48,50,75,103],"/script/setting":[6,8,23,33,37,49,64,71,93,112,113,1,14,16,20,21,22,25,47,48,50,75,95,103],"/crontab/const":[56,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/crontab/modal":[6,16,23,30,33,37,49,64,71,72,93,106,112,113,114,1,14,20,21,22,25,47,48,50,75,95,103],"/setting/about":[3,4,6,12,23,37,71,1,14,16,20,21,22,25,47,48,49,50,75,95,103,112,113],"/setting/other":[6,9,14,16,20,23,33,37,38,49,64,71,72,73,79,80,84,86,93,102,103,112,113,116,117,1,21,22,25,47,48,50,75,95],"/crontab/type":[69,1,6,14,16,20,21,22,23,25,37,47,48,49,50,75,95,103,112,113],"/env/modal":[5,6,23,30,33,37,49,64,71,93,112,113,114,1,14,16,20,21,22,25,47,48,50,75,95,103],"/script/components/UnsupportedFilePreview":[39,40,49,1,6,14,16,20,21,22,23,25,37,47,48,50,75,95,103,112,113]}},{publicPath:"./"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,1147],{29774:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return h}});var n=a(72317),i=(a(75271),a(50691)),r=a(18015),o="container___nww32",s="right___o0xXT",c="title___DHxWh",l="desc___frhI6",u=a(16483),d=a.n(u),p=a(52676),g=i.Z.Link,h=function(e){var t=e.systemInfo;return(0,p.jsxs)("div",{className:o,children:[(0,p.jsx)("img",{alt:"logo",style:{width:140,marginRight:20},src:"https://qn.whyour.cn/logo.png"}),(0,p.jsxs)("div",{className:s,children:[(0,p.jsx)("span",{className:c,children:n.ZP.get("青龙")}),(0,p.jsx)("span",{className:l,children:n.ZP.get("支持python3、javascript、shell、typescript 的定时任务管理面板")}),(0,p.jsxs)(r.Z,{children:[(0,p.jsxs)(r.Z.Item,{label:n.ZP.get("版本"),span:3,children:["develop"===(null==t?void 0:t.branch)?n.ZP.get("开发版"):n.ZP.get("正式版")," ","v",t.version]}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新时间"),span:3,children:d()(1e3*t.publishTime).format("YYYY-MM-DD HH:mm")}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新日志"),span:3,children:(0,p.jsx)(g,{href:"https://qn.whyour.cn/version.yaml?t=".concat(Date.now()),target:"_blank",children:n.ZP.get("查看")})})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong",target:"_blank",style:{marginRight:15},children:"Github"}),(0,p.jsx)(g,{href:"https://t.me/jiao_long",target:"_blank",style:{marginRight:15},children:n.ZP.get("Telegram频道")}),(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong/issues",target:"_blank",children:n.ZP.get("提交BUG")})]})]})]})}},92294:function(e,t,a){"use strict";a.r(t);var n=a(90228),i=a.n(n),r=a(26068),o=a.n(r),s=a(87999),c=a.n(s),l=a(48305),u=a.n(l),d=a(72317),p=a(75271),g=a(72338),h=a(61508),f=a(45520),m=a(17082),P=a(35181),Z=a(16314),v=a(3475),y=a(52676);t.default=function(e){var t=e.app,a=e.handleCancel,n=g.Z.useForm(),r=u()(n,1)[0],s=(0,p.useState)(!1),l=u()(s,2),x=l[0],b=l[1],A=function(){var e=c()(i()().mark((function e(n){var r,s,c,l,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),r=t?"put":"post",s=o()({},n),t&&(s.id=t.id),e.prev=4,e.next=7,Z.W[r]("".concat(v.Z.apiPrefix,"apps"),s);case 7:c=e.sent,l=c.code,u=c.data,200===l&&(h.ZP.success(t?d.ZP.get("更新应用成功"):d.ZP.get("创建应用成功")),a(u)),b(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),b(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,y.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:!0,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){r.validateFields().then((function(e){A(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:x,children:(0,y.jsxs)(g.Z,{form:r,layout:"vertical",name:"form_app_modal",initialValues:t,children:[(0,y.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{validator:function(e,t){return["system"].includes(t)?Promise.reject(new Error(d.ZP.get("名称不能为保留关键字"))):Promise.resolve()}}],children:(0,y.jsx)(m.Z,{placeholder:d.ZP.get("请输入应用名称")})}),(0,y.jsx)(g.Z.Item,{name:"scopes",label:d.ZP.get("权限"),rules:[{required:!0}],children:(0,y.jsx)(P.Z,{mode:"multiple",placeholder:d.ZP.get("请选择模块权限"),allowClear:!0,style:{width:"100%"},children:v.Z.scopes.map((function(e){return(0,y.jsx)(P.Z.Option,{value:e.value,children:e.name},e.value)}))})})]})})}},73236:function(e,t,a){"use strict";a.r(t);var n=a(48305),i=a.n(n),r=a(48916),o=a(3475),s=a(16314),c=a(65814),l=a(78060),u=a.n(l),d=a(32890),p=a(61508),g=a(45520),h=a(93481),f=a(75271),m=a(72317),P=a(52676),Z=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,a=(0,f.useState)(!1),n=i()(a,2),l=n[0],d=n[1],v=(0,f.useState)(""),y=i()(v,2),x=y[0],b=y[1],A=(0,f.useRef)(),k=(0,f.useRef)(),w=function(e){g.Z.confirm({width:500,title:m.ZP.get("更新"),content:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{children:m.ZP.get("已经是最新版了!")}),(0,P.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("青龙")," ",e.lastVersion," ",m.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:m.ZP.get("重新下载"),onOk:function(){S(),s.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},j=function(e){var a=e.lastVersion,n=e.lastLog;g.Z.confirm({width:500,title:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{children:m.ZP.get("更新可用")}),(0,P.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("新版本")," ",a," ",m.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:n})}),okText:m.ZP.get("下载更新"),cancelText:m.ZP.get("以后再说"),onOk:function(){S(),s.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},S=function(){b(""),A.current=g.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})})})},C=function(e){s.W.put("".concat(o.Z.apiPrefix,"update/").concat(e)).then((function(e){p.ZP.success({content:(0,P.jsxs)("span",{children:[m.ZP.get("系统将在"),(0,P.jsx)(Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),m.ZP.get("秒后自动刷新")]}),duration:30}),(0,r.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,f.useEffect)((function(){if(x){var e="failed"===k.current;A.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})}),(0,P.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[x]);var T=(0,f.useCallback)((function(e){var t=e.message,a=e.status;"failed"===a&&(k.current="failed",p.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试"))),"success"===a&&(k.current="success",setTimeout((function(){g.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){C("system")},onCancel:function(){A.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3)),setTimeout((function(){var e;null===(e=document.querySelector("#log-identifier"))||void 0===e||e.scrollIntoView({behavior:"smooth"})}),600),t&&b((function(e){return"".concat(e).concat(t)}))}),[]);return(0,f.useEffect)((function(){var e=c.Z.getInstance();return e.subscribe("updateSystemVersion",T),function(){e.unsubscribe("updateSystemVersion",T)}}),[]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{type:"primary",onClick:function(){l||(d(!0),p.ZP.loading(m.ZP.get("检查更新中..."),0),s.W.put("".concat(o.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,a=e.data;p.ZP.destroy(),200===t&&(a.hasNewVersion?j(a):w(a))})).catch((function(e){p.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:m.ZP.get("检查更新")}),(0,P.jsx)(h.Z,{type:"primary",onClick:function(){return C("reload")},style:{marginLeft:8},children:m.ZP.get("重新启动")})]})}},53626:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),s=a(72317),c=a(75271),l=a(72338),u=a(61508),d=a(17082),p=a(93481),g=a(35181),h=a(3475),f=a(16314),m=(a(68251),a(78060)),P=a.n(m),Z=a(19334),v=a.n(Z),y=a(65814),x=a(52676),b={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,c.useState)(),t=o()(e,2),a=t[0],n=t[1],r=l.Z.useForm(),m=o()(r,1)[0],Z=(0,c.useState)(""),A=o()(Z,2),k=A[0],w=A[1],j=(0,c.useState)(!1),S=o()(j,2),C=S[0],T=S[1],E=(0,c.useState)("node"),M=o()(E,2),B=M[0],I=M[1],_=function(e){T(!0),w("in progress...\n"),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){})).catch((function(){T(!1),w((function(e){return"".concat(e,"update mirror error")}))}))},q=function(e){T(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(s.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return T(!1)}))},G=function(e){var t=e.message,a=e.status;t&&w((function(e){return"".concat(e).concat(t)})),"completed"===a&&T(!1)};return(0,c.useEffect)((function(){var e=y.Z.getInstance();return e.subscribe("updateNodeMirror",G),e.subscribe("updateLinuxMirror",G),function(){e.unsubscribe("updateNodeMirror",G),e.unsubscribe("updateLinuxMirror",G)}}),[]),(0,c.useEffect)((function(){f.W.get("".concat(h.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&n(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,x.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,x.jsxs)(l.Z,{layout:"vertical",form:m,style:{flexShrink:0},children:[(0,x.jsx)(l.Z.Item,{label:s.ZP.get("代理"),name:"proxy",extra:s.ZP.get("代理与镜像源二选一即可"),tooltip:{title:s.ZP.get("代理地址, 支持HTTP(S)/SOCK5"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{placeholder:"http://1.1.1.1:8080",style:{width:250},value:null==a?void 0:a.dependenceProxy,onChange:function(e){n(i()(i()({},a),{},{dependenceProxy:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){q("dependence-proxy")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:s.ZP.get("Node 软件包镜像源"),name:"node",tooltip:s.ZP.get("NPM 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://registry.npmmirror.com",value:null==a?void 0:a.nodeMirror,onChange:function(e){n(i()(i()({},a),{},{nodeMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){_("node-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:s.ZP.get("Python 软件包镜像源"),name:"python",tooltip:s.ZP.get("PyPI 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://pypi.doubanio.com/simple/",value:null==a?void 0:a.pythonMirror,onChange:function(e){n(i()(i()({},a),{},{pythonMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){q("python-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:s.ZP.get("Linux 软件包镜像源"),name:"linux",tooltip:s.ZP.get("debian linux 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"http://mirrors.aliyun.com",value:null==a?void 0:a.linuxMirror,onChange:function(e){n(i()(i()({},a),{},{linuxMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){_("linux-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:s.ZP.get("清除依赖缓存"),name:"clean",tooltip:{title:s.ZP.get("清除依赖缓存"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(g.Z,{defaultValue:"node",style:{width:100},onChange:function(e){I(e)},options:[{label:"node",value:"node"},{label:"python3",value:"python3"}]}),(0,x.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){var e;e=B,T(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/dependence-clean"),{type:e}).then((function(e){var t=e.code;e.data,200===t&&u.ZP.success(s.ZP.get("清除成功"))})).catch((function(e){console.log(e)})).finally((function(){return T(!1)}))},style:{width:100},children:s.ZP.get("确认")})]})})]}),(0,x.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,x.jsx)(P(),{children:k})})]})}},42716:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(15558),o=a.n(r),s=a(48305),c=a.n(s),l=a(72317),u=a(75271),d=a(50691),p=a(47667),g=a(63505),h=a(59816),f=a(45520),m=a(61508),P=a(93481),Z=a(46035),v=a(10948),y=a(3475),x=a(47508),b=a(16314),A=a(92294),k=a(28423),w=a(28068),j=a(88939),S=a(67303),C=a(59362),T=a(61160),E=a(85657),M=a(29774),B=a(98783),I=(a(68251),a(30502)),_=a(76433),q=a(53626),G=a(52676),L=d.Z.Text,D="demo"===window.__ENV__DeployEnv;t.default=function(){var e=(0,B.useOutletContext)(),t=e.headerStyle,a=e.isPhone,n=e.user,r=e.theme,s=e.reloadUser,d=e.reloadSystemConfig,R=e.reloadTheme,K=e.systemInfo;console.log("user",n);var W=[{title:l.ZP.get("名称"),dataIndex:"name",key:"name"},{title:"Client ID",dataIndex:"client_id",key:"client_id",render:function(e,t){return(0,G.jsx)(L,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,G.jsx)(L,{copyable:{text:t.client_secret},children:"*******"})}},{title:l.ZP.get("权限"),dataIndex:"scopes",key:"scopes",width:500,render:function(e,t){return(0,G.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.scopes.map((function(e){return(0,G.jsx)(p.Z,{style:{marginRight:0},children:y.Z.scopesMap[e]},e)}))})}},{title:l.ZP.get("操作"),key:"action",render:function(e,t,n){var i=!a;return(0,G.jsxs)(g.Z,{size:"middle",style:{paddingLeft:8},children:[(0,G.jsx)(h.Z,{title:i?l.ZP.get("编辑"):"",children:(0,G.jsx)("a",{onClick:function(){return be(t,n)},children:(0,G.jsx)(k.Z,{})})}),(0,G.jsx)(h.Z,{title:i?l.ZP.get("重置secret"):"",children:(0,G.jsx)("a",{onClick:function(){return ke(t,n)},children:(0,G.jsx)(w.Z,{})})}),(0,G.jsx)(h.Z,{title:i?l.ZP.get("删除"):"",children:(0,G.jsx)("a",{onClick:function(){return Ae(t,n)},children:(0,G.jsx)(j.Z,{})})})]})}}],H=(0,u.useState)(!0),F=c()(H,2),N=F[0],z=F[1],V=(0,u.useState)([]),U=c()(V,2),O=U[0],Y=U[1],Q=(0,u.useState)(!1),X=c()(Q,2),J=X[0],$=X[1],ee=(0,u.useState)(),te=c()(ee,2),ae=te[0],ne=te[1],ie=(0,u.useState)("security"),re=c()(ie,2),oe=re[0],se=re[1],ce=(0,u.useState)([]),le=c()(ce,2),ue=le[0],de=le[1],pe=(0,u.useState)(),ge=c()(pe,2),he=ge[0],fe=ge[1],me=(0,u.useRef)(null),Pe=(0,u.useState)(0),Ze=c()(Pe,2),ve=Ze[0],ye=Ze[1];(0,I.Z)(me,(function(e){var t,a=null===(t=e.target)||void 0===t?void 0:t.offsetHeight;a&&ve!==a-101&&ye(a-101)}));var xe=function(){z(!0),b.W.get("".concat(y.Z.apiPrefix,"apps")).then((function(e){var t=e.code,a=e.data;200===t&&Y(a)})).finally((function(){return z(!1)}))},be=function(e,t){ne(e),$(!0)},Ae=function(e,t){f.Z.confirm({title:l.ZP.get("确认删除"),content:(0,G.jsxs)(G.Fragment,{children:[l.ZP.get("确认删除应用")," ",(0,G.jsx)(L,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){b.W.delete("".concat(y.Z.apiPrefix,"apps"),{data:[e.id]}).then((function(e){var a=e.code;e.data;if(200===a){m.ZP.success(l.ZP.get("删除成功"));var n=o()(O);n.splice(t,1),Y(n)}}))}})},ke=function(e,t){f.Z.confirm({title:l.ZP.get("确认重置"),content:(0,G.jsxs)(G.Fragment,{children:[l.ZP.get("确认重置应用")," ",(0,G.jsx)(L,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("的Secret吗"),(0,G.jsx)("br",{}),(0,G.jsx)(L,{type:"secondary",children:l.ZP.get("重置Secret会让当前应用所有token失效")})]}),onOk:function(){b.W.put("".concat(y.Z.apiPrefix,"apps/").concat(e.id,"/reset-secret")).then((function(e){var t=e.code,a=e.data;200===t&&(m.ZP.success(l.ZP.get("重置成功")),we(a))}))}})},we=function(e){var t=O.findIndex((function(t){return t.id===e.id})),a=o()(O);-1===t?a.push(e):a.splice(t,1,i()({},e)),Y(a)},je=function(){b.W.get("".concat(y.Z.apiPrefix,"user/notification")).then((function(e){var t=e.code,a=e.data;200===t&&fe(a)})).catch((function(e){console.log(e)}))};return(0,u.useEffect)((function(){D&&xe()}),[]),(0,G.jsxs)(x.ZP,{className:"ql-container-wrapper ql-container-wrapper-has-tab ql-setting-container",title:l.ZP.get("系统设置"),header:{style:t},extra:"app"===oe?[(0,G.jsx)(P.Z,{type:"primary",onClick:function(){return ne(null),void $(!0)},children:l.ZP.get("创建应用")},"2")]:[],children:[(0,G.jsx)("div",{ref:me,style:{height:"100%"},children:(0,G.jsx)(Z.Z,{style:{height:"100%"},defaultActiveKey:"security",size:"small",tabPosition:"top",onChange:function(e){se(e),"app"===e?xe():"login"===e?b.W.get("".concat(y.Z.apiPrefix,"user/login-log")).then((function(e){var t=e.code,a=e.data;200===t&&de(a)})).catch((function(e){console.log(e)})):"notification"===e&&je()},destroyInactiveTabPane:!0,items:[].concat(o()(D?[]:[{key:"security",label:l.ZP.get("安全设置"),children:(0,G.jsx)(S.default,{user:n,userChange:s})}]),[{key:"app",label:l.ZP.get("应用设置"),children:(0,G.jsx)(v.Z,{columns:W,pagination:!1,dataSource:O,rowKey:"id",size:"middle",scroll:{x:1e3,y:ve},loading:N})},{key:"notification",label:l.ZP.get("通知设置"),children:(0,G.jsx)(T.default,{data:he})},{key:"syslog",label:l.ZP.get("系统日志"),children:(0,G.jsx)(_.default,{height:ve,theme:r})},{key:"login",label:l.ZP.get("登录日志"),children:(0,G.jsx)(C.default,{height:ve,data:ue})},{key:"dependence",label:l.ZP.get("依赖设置"),children:(0,G.jsx)(q.default,{})},{key:"other",label:l.ZP.get("其他设置"),children:(0,G.jsx)(E.default,{reloadSystemConfig:d,reloadTheme:R,systemInfo:K})},{key:"about",label:l.ZP.get("关于"),children:(0,G.jsx)(M.default,{systemInfo:K})}])})}),J&&(0,G.jsx)(A.default,{handleCancel:function(e){$(!1),e&&we(e)},app:ae})]})}},59362:function(e,t,a){"use strict";a.r(t);var n=a(72317),i=(a(75271),a(50691)),r=a(47667),o=a(10948),s=a(16483),c=a.n(s),l=a(52676),u=(i.Z.Text,i.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(u||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),p=[{title:n.ZP.get("序号"),width:50,render:function(e,t,a){return a+1}},{title:n.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return c()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:n.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:n.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:n.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:n.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,l.jsx)(r.Z,{color:d[t.status],style:{marginRight:0},children:n.ZP.get(u[t.status])})}}];t.default=function(e){var t=e.data,a=e.height;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(o.Z,{columns:p,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:a}})})}},61160:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),s=a(72317),c=a(75271),l=a(35181),u=a(72338),d=a(61508),p=a(17082),g=a(93481),h=a(16314),f=a(3475),m=a(52676),P=l.Z.Option;t.default=function(e){var t=e.data,a=(0,c.useState)(!1),n=o()(a,2),r=n[0],Z=n[1],v=(0,c.useState)("closed"),y=o()(v,2),x=y[0],b=y[1],A=(0,c.useState)([]),k=o()(A,2),w=k[0],j=k[1],S=u.Z.useForm(),C=o()(S,1)[0],T=function(e){b(e);var t=f.Z.notificationModeMap[e];j(t||[])};return(0,c.useEffect)((function(){t&&t.type&&(T(t.type),C.setFieldsValue(i()({},t)))}),[t]),(0,m.jsx)("div",{children:(0,m.jsxs)(u.Z,{onFinish:function(e){Z(!0),"closed"==e.type&&(e.type=""),h.W.put("".concat(f.Z.apiPrefix,"user/notification"),e).then((function(t){var a=t.code;t.data;200===a&&d.ZP.success(e.type?s.ZP.get("通知发送成功"):s.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return Z(!1)}))},form:C,layout:"vertical",children:[(0,m.jsx)(u.Z.Item,{label:s.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:x,children:(0,m.jsx)(l.Z,{onChange:T,disabled:r,children:f.Z.notificationModes.map((function(e){return(0,m.jsx)(P,{value:e.value,children:e.label},e.value)}))})}),w.map((function(e){return(0,m.jsx)(u.Z.Item,{label:e.label,name:e.label,extra:(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:e.tip}}),rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(l.Z,{placeholder:e.placeholder||"".concat(s.ZP.get("请选择")," ").concat(e.label),disabled:r,children:e.items.map((function(e){return(0,m.jsx)(P,{value:e.value,children:e.label||e.value},e.value)}))}):(0,m.jsx)(p.Z.TextArea,{disabled:r,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(s.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:r,children:r?s.ZP.get("测试中..."):s.ZP.get("保存")})]})})}},85657:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),s=a(72317),c=a(75271),l=a(72338),u=a(61508),d=a(45520),p=a(94747),g=a(17082),h=a(93481),f=a(56646),m=a(35181),P=a(6367),Z=a(32253),v=a(71571),y=a(3475),x=a(16314),b=a(73236),A=a(87105),k=(a(68251),a(79231)),w=a(84522),j=a(32916),S=a(19334),C=a.n(S),T=a(48916),E=a(97302),M=a(52676),B={"panel-title":"panelTitle","log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone","global-ssh-key":"globalSshKey"},I=[{value:"base",label:s.ZP.get("基础数据"),disabled:!0},{value:"config",label:s.ZP.get("配置文件")},{value:"scripts",label:s.ZP.get("脚本文件")},{value:"log",label:s.ZP.get("日志文件")},{value:"deps",label:s.ZP.get("依赖文件")},{value:"syslog",label:s.ZP.get("系统日志")},{value:"dep_cache",label:s.ZP.get("依赖缓存")},{value:"raw",label:s.ZP.get("远程脚本缓存")},{value:"repo",label:s.ZP.get("远程仓库缓存")},{value:"ssh.d",label:s.ZP.get("SSH 文件缓存")}];t.default=function(e){var t=e.systemInfo,a=e.reloadSystemConfig,n=e.reloadTheme,r=localStorage.getItem("qinglong_dark_theme")||"auto",S=(0,c.useState)(),_=o()(S,2),q=_[0],G=_[1],L=l.Z.useForm(),D=o()(L,1)[0],R=(0,c.useState)(!1),K=o()(R,2),W=K[0],H=K[1],F=(0,j.default)(s.ZP.get("上传")),N=(0,j.default)(s.ZP.get("下载")),z=(0,c.useState)(!1),V=o()(z,2),U=V[0],O=V[1],Y=(0,c.useState)(["base"]),Q=o()(Y,2),X=Q[0],J=Q[1],$=v||{},ee=$.enable,te=$.disable,ae=($.exportGeneratedCSS,$.setFetchMethod),ne=$.auto,ie=function(e){x.W.put("".concat(y.Z.apiPrefix,"system/config/").concat(e),C()(q,B[e])).then((function(t){var n=t.code;t.data;200===n&&(u.ZP.success(s.ZP.get("更新成功")),"panel-title"===e&&a())})).catch((function(e){console.log(e)}))};return(0,c.useEffect)((function(){x.W.get("".concat(y.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&G(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(l.Z,{layout:"vertical",form:D,children:[(0,M.jsx)(l.Z.Item,{label:s.ZP.get("主题"),name:"theme",initialValue:r,children:(0,M.jsxs)(p.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),ae(fetch),"dark"===t?ee({}):"light"===t?te():ne({}),n()},value:r,optionType:"button",buttonStyle:"solid",children:[(0,M.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:s.ZP.get("亮色")}),(0,M.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:s.ZP.get("暗色")}),(0,M.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:s.ZP.get("跟随系统")})]})}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("面板标题"),name:"panelTitle",tooltip:s.ZP.get("自定义面板的站点标题,留空使用默认值“青龙”"),children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(g.Z,{style:{width:180},maxLength:100,value:(null==q?void 0:q.panelTitle)||"",placeholder:s.ZP.get("留空使用默认值“青龙”"),onChange:function(e){G(i()(i()({},q),{},{panelTitle:e.target.value}))}}),(0,M.jsx)(h.Z,{type:"primary",onClick:function(){ie("panel-title")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("日志删除频率"),name:"frequency",tooltip:s.ZP.get("每x天自动删除x天以前的日志"),children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(f.Z,{addonBefore:s.ZP.get("每"),addonAfter:s.ZP.get("天"),style:{width:180},placeholder:s.ZP.get("未启用"),min:0,value:null==q?void 0:q.logRemoveFrequency,onChange:function(e){G(i()(i()({},q),{},{logRemoveFrequency:e}))}}),(0,M.jsx)(h.Z,{type:"primary",onClick:function(){ie("log-remove-frequency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("定时任务并发数"),name:"frequency",children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(f.Z,{style:{width:180},min:4,value:null==q?void 0:q.cronConcurrency,placeholder:s.ZP.get("默认为 CPU 个数"),onChange:function(e){G(i()(i()({},q),{},{cronConcurrency:e}))}}),(0,M.jsx)(h.Z,{type:"primary",onClick:function(){ie("cron-concurrency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("时区"),name:"timezone",children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(m.Z,{value:null==q?void 0:q.timezone,style:{width:180},onChange:function(e){G(i()(i()({},q),{},{timezone:e}))},options:E.z.map((function(e){return{value:e,label:e}})),showSearch:!0,filterOption:function(e,t){var a;return(null==t||null===(a=t.value)||void 0===a?void 0:a.toLowerCase().indexOf(e.toLowerCase()))>=0}}),(0,M.jsx)(h.Z,{type:"primary",onClick:function(){ie("timezone")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,M.jsxs)(l.Z.Item,{label:s.ZP.get("全局SSH私钥"),name:"globalSshKey",tooltip:s.ZP.get("用于访问所有私有仓库的全局SSH私钥"),children:[(0,M.jsx)(g.Z.Group,{compact:!0,children:(0,M.jsx)(g.Z.TextArea,{value:(null==q?void 0:q.globalSshKey)||"",style:{width:264},autoSize:{minRows:3,maxRows:8},placeholder:s.ZP.get("请输入完整的SSH私钥内容"),onChange:function(e){G(i()(i()({},q),{},{globalSshKey:e.target.value}))}})}),(0,M.jsx)(h.Z,{type:"primary",onClick:function(){ie("global-ssh-key")},style:{width:264,marginTop:8},children:s.ZP.get("确认")})]}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("语言"),name:"lang",children:(0,M.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){var t;localStorage.setItem("lang",e);var a=e||(null===(t=navigator.language)||void 0===t?void 0:t.slice(0,2))||"zh";x.W.put("".concat(y.Z.apiPrefix,"system/config/lang"),{lang:a}).catch((function(){})),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:s.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,M.jsxs)(l.Z.Item,{label:s.ZP.get("数据备份还原"),name:"frequency",children:[(0,M.jsx)(h.Z,{type:"primary",onClick:function(){J(["base"]),O(!0)},loading:W,children:W?s.ZP.get("生成数据中..."):s.ZP.get("备份")}),(0,M.jsx)(P.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(y.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,a=e.event;null!=a&&a.percent&&F(Math.min(parseFloat(null==a?void 0:a.percent.toFixed(1)),99)),"done"===t.status&&(F(100),d.Z.confirm({width:600,maskClosable:!1,title:s.ZP.get("确认重启"),centered:!0,content:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{children:s.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,M.jsxs)("div",{children:[s.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:s.ZP.get("重启"),onOk:function(){x.W.put("".concat(y.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,M.jsxs)("span",{children:[s.ZP.get("系统将在"),(0,M.jsx)(w.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),s.ZP.get("秒后自动刷新")]}),duration:30}),(0,T.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&u.ZP.error(s.ZP.get("上传失败"))},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(y.Z.authKey))},children:(0,M.jsx)(h.Z,{icon:(0,M.jsx)(k.Z,{}),style:{marginLeft:8},children:s.ZP.get("还原数据")})})]}),(0,M.jsx)(l.Z.Item,{label:s.ZP.get("检查更新"),name:"update",children:(0,M.jsx)(b.default,{systemInfo:t})})]}),(0,M.jsx)(d.Z,{title:s.ZP.get("选择备份模块"),open:U,onOk:function(){H(!0),x.W.put("".concat(y.Z.apiPrefix,"system/data/export"),{type:X},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&N(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,A.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){H(!1),O(!1)}))},onCancel:function(){return O(!1)},okText:s.ZP.get("开始备份"),cancelText:s.ZP.get("取消"),okButtonProps:{loading:W},children:(0,M.jsx)(Z.Z.Group,{value:X,onChange:function(e){J(e)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:I.map((function(e){return(0,M.jsx)(Z.Z,{value:e.value,disabled:e.disabled,style:{marginLeft:0},children:e.label},e.value)}))})})]})}},32916:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l}});var n=a(72317),i=a(46016),r=a(45520),o=a(75271),s=a(52676),c=function(e){var t=e.percent;return(0,s.jsx)(i.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function l(e){var t=(0,o.useRef)();return function(a){t.current?(t.current.update({title:"".concat(e).concat(a>=100?n.ZP.get("成功"):n.ZP.get("中...")),content:(0,s.jsx)(c,{percent:a}),okButtonProps:{disabled:100!==a}}),100===a&&setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}))):t.current=r.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(a>=100?n.ZP.get("成功"):n.ZP.get("中...")),centered:!0,content:(0,s.jsx)(c,{percent:a}),okButtonProps:{disabled:!0}})}}},67303:function(e,t,a){"use strict";a.r(t);var n=a(48305),i=a.n(n),r=a(72317),o=a(75271),s=a(50691),c=a(61508),l=a(17082),u=a(93481),d=a(72338),p=a(70892),g=a(6367),h=a(16314),f=a(3475),m=a(98783),P=a(63392),Z=a.n(P),v=a(34014),y=a(1371),x=a(79231),b=a(69822),A=(a(94095),a(52676)),k=s.Z.Title,w=s.Z.Link;t.default=function(e){var t=e.user,a=e.userChange,n=(0,o.useState)(!1),s=i()(n,2),P=s[0],j=s[1],S=(0,o.useState)(),C=i()(S,2),T=C[0],E=C[1],M=(0,o.useState)(!1),B=i()(M,2),I=B[0],_=B[1],q=(0,o.useState)(),G=i()(q,2),L=G[0],D=G[1],R=(0,o.useState)(),K=i()(R,2),W=K[0],H=K[1],F=(0,o.useState)(),N=i()(F,2),z=N[0],V=N[1],U=function(){h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/deactivate")).then((function(e){var t=e.code,n=e.data;200===t&&n&&(E(!1),a())})).catch((function(e){console.log(e)}))},O=function(){h.W.get("".concat(f.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,a=e.data;200===t&&D(a)})).catch((function(e){console.log(e)}))};return(0,o.useEffect)((function(){E(t&&t.twoFactorActivated),V(t.avatar&&"".concat(f.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),I?(0,A.jsx)(A.Fragment,{children:L?(0,A.jsxs)("div",{children:[(0,A.jsx)(k,{level:5,children:r.ZP.get("第一步")}),r.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,A.jsx)(w,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,A.jsx)(w,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,A.jsx)(w,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,A.jsx)(w,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第二步")}),r.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==L?void 0:L.secret,(0,A.jsx)("div",{style:{marginTop:10},children:(0,A.jsx)(Z(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==L?void 0:L.url})}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第三步")}),r.ZP.get("输入手机应用上的6位数字"),(0,A.jsx)(l.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:W,onChange:function(e){return H(e.target.value)},placeholder:"123456"}),(0,A.jsx)(u.Z,{type:"primary",loading:P,onClick:function(){j(!0),h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/active"),{code:W}).then((function(e){var t=e.code,n=e.data;200===t&&(n?(c.ZP.success(r.ZP.get("激活成功")),_(!1),E(!0),a()):c.ZP.success(r.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return j(!1)}))},children:r.ZP.get("完成设置")})]}):(0,A.jsx)(v.Z,{})}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:r.ZP.get("修改用户名密码")}),(0,A.jsxs)(d.Z,{onFinish:function(e){h.W.put("".concat(f.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(f.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,A.jsx)(d.Z.Item,{label:r.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{autoComplete:"username",placeholder:r.ZP.get("用户名")})}),(0,A.jsx)(d.Z.Item,{label:r.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:r.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{type:"password",autoComplete:"current-password",placeholder:r.ZP.get("密码")})}),(0,A.jsx)(u.Z,{type:"primary",htmlType:"submit",children:r.ZP.get("保存")})]}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("两步验证")}),(0,A.jsx)(u.Z,{type:"primary",danger:T,onClick:function(){T?U():(O(),_(!0))},children:T?r.ZP.get("禁用"):r.ZP.get("启用")}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("头像")}),(0,A.jsx)(p.C,{size:128,shape:"square",icon:(0,A.jsx)(y.Z,{}),src:z}),(0,A.jsx)(b.Z,{rotationSlider:!0,children:(0,A.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(V("".concat(f.Z.apiPrefix,"static/").concat(e.file.response.data)),a())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(f.Z.authKey))},children:(0,A.jsx)(u.Z,{icon:(0,A.jsx)(x.Z,{}),style:{marginLeft:8},children:r.ZP.get("更换头像")})})})]})}},76433:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return U}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),s=a(48305),c=a.n(s),l=a(72317),u=a(75271),d=a(62808),p=a(19116),g=a(61508),h=a(93481),f=a(20553),m=a(98705),P=a(54075),Z=a(2727),v=a(16314),y=a(3475),x=a(31352),b=a(11333),A=a.n(b),k=a(25298),w=a.n(k),j=a(17069),S=a.n(j),C=a(82092),T=a.n(C),E=a(18446),M=a(71529),B=/\[ℹ️info/g,I=/\[⚠️debug/g,_=/\[❌warn/g,q=/\[🐛error/g,G="system-log-info",L="system-warn-info",D="system-error-info",R="system-debug-info",K=E.lg.fromClass(function(){function e(t){w()(this,e),T()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new M.f_,n=e.state.doc.toString();null!==(t=B.exec(n));){var i=E.p.mark({class:G});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),W=E.lg.fromClass(function(){function e(t){w()(this,e),T()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new M.f_,n=e.state.doc.toString();null!==(t=_.exec(n));){var i=E.p.mark({class:L});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),H=E.lg.fromClass(function(){function e(t){w()(this,e),T()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new M.f_,n=e.state.doc.toString();null!==(t=I.exec(n));){var i=E.p.mark({class:R});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),F=E.lg.fromClass(function(){function e(t){w()(this,e),T()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new M.f_,n=e.state.doc.toString();null!==(t=q.exec(n));){var i=E.p.mark({class:D});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),N=E.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),z=a(52676),V=p.Z.RangePicker,U=function(e){var t=e.height,a=e.theme,n=(0,u.useRef)(null),r=(0,u.useRef)(),s=(0,u.useState)(["",""]),p=c()(s,2),b=p[0],k=p[1],w=(0,u.useState)(""),j=c()(w,2),S=j[0],C=j[1],T=(0,x.Z)((function(){return v.W.get("".concat(y.Z.apiPrefix,"system/log?startTime=").concat(b[0],"&endTime=").concat(b[1]),{responseType:"blob"})}),{refreshDeps:[b],onSuccess:function(e){return o()(i()().mark((function t(){return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=C,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),E=T.loading,M=T.refresh,B=function(e){n.current.scrollDOM.scrollTo({top:"start"===e?0:n.current.scrollDOM.scrollHeight})};return(0,z.jsxs)("div",{style:{position:"relative"},children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(V,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>A()()||e<A()().subtract(7,"days")},defaultValue:[A()(),A()()],onOpenChange:function(e){r.current=!!e&&["",""]},onCalendarChange:function(e,t,a){var n=a.range;r.current&&"boolean"!=typeof r.current&&("start"===n&&(r.current[0]=t[0]),"end"===n&&(r.current[1]=t[1]),r.current[0]&&r.current[1]&&k(t))}}),(0,z.jsx)(h.Z,{onClick:function(){v.W.delete("".concat(y.Z.apiPrefix,"system/log")).then((function(e){g.ZP.success(l.ZP.get("删除成功")),M()}))},children:l.ZP.get("清空日志")})]}),S?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(d.ZP,{maxHeight:"".concat(t,"px"),value:S,onCreateEditor:function(e){n.current=e},extensions:[H,F,K,W,N],readOnly:!0,theme:a.includes("dark")?"dark":"light"}),(0,z.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(P.Z,{}),onClick:function(){B("start")}}),(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(Z.Z,{}),onClick:function(){B("end")}})]})]}):E?(0,z.jsx)(f.Z,{}):(0,z.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_SIMPLE})]})}},3475:function(e,t,a){"use strict";var n=a(72317),i=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:i,apiPrefix:"".concat(i,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],scopes:[{name:n.ZP.get("定时任务"),value:"crons"},{name:n.ZP.get("环境变量"),value:"envs"},{name:n.ZP.get("订阅管理"),value:"subscriptions"},{name:n.ZP.get("配置文件"),value:"configs"},{name:n.ZP.get("脚本管理"),value:"scripts"},{name:n.ZP.get("日志管理"),value:"logs"},{name:n.ZP.get("依赖管理"),value:"dependencies"},{name:n.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:n.ZP.get("定时任务"),envs:n.ZP.get("环境变量"),subscriptions:n.ZP.get("订阅管理"),configs:n.ZP.get("配置文件"),scripts:n.ZP.get("脚本管理"),logs:n.ZP.get("日志管理"),dependencies:n.ZP.get("依赖管理"),system:n.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:n.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:n.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:n.ZP.get("钉钉机器人")},{value:"weWorkBot",label:n.ZP.get("企业微信机器人")},{value:"weWorkApp",label:n.ZP.get("企业微信应用")},{value:"aibotk",label:n.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:n.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"wxPusherSpt",label:"WxPusher(极简推送SPT-推荐)"},{value:"openiLink",label:"OpeniLink"},{value:"chat",label:n.ZP.get("群晖chat")},{value:"email",label:n.ZP.get("邮箱")},{value:"lark",label:n.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:n.ZP.get("自定义通知")},{value:"closed",label:n.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:n.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:n.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:n.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:n.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:n.ZP.get("ntfy应用topic"),required:!0},{label:"ntfyPriority",tip:n.ZP.get("推送消息的优先级")},{label:"ntfyToken",tip:n.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:n.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:n.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:n.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:n.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:n.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:n.ZP.get("发送模板")},{label:"pushplusChannel",tip:n.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:n.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:n.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:n.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:n.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:n.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:n.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:n.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:n.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:n.ZP.get("wxPusherBot的uids"),required:!1}],wxPusherSpt:[{label:"wxPusherSptList",tip:n.ZP.get("wxPusherSpt的SPT"),required:!0}],openiLink:[{label:"openiLinkAppToken",tip:n.ZP.get("OpeniLink的app_token,在OpeniLink Hub后台安装App后获取,参考 https://openilink.com/docs/hub/apps"),required:!0},{label:"openiLinkHubUrl",tip:n.ZP.get("OpeniLink Hub地址,默认为 https://hub.openilink.com,自建Hub时填写自己的地址")},{label:"openiLinkContextToken",tip:n.ZP.get("OpeniLink的context_token,用于标识消息会话上下文,可从消息事件中获取")}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0},{label:"larkSecret",tip:n.ZP.get("飞书群组机器人加签密钥,安全设置中开启签名校验后获得")}],email:[{label:"emailService",tip:n.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:n.ZP.get("邮箱认证地址"),required:!0},{label:"emailPass",tip:n.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0},{label:"emailTo",tip:n.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:n.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理"),"/dashboard":n.ZP.get("仪表盘")},dependenceTypes:["nodejs","python3","linux"]}},97302:function(e,t,a){"use strict";a.d(t,{eY:function(){return n},um:function(){return i},z:function(){return r}});var n="     ",i={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},r=["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar es Salaam","Africa/Djibouti","Africa/Douala","Africa/El Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La Rioja","America/Argentina/Mendoza","America/Argentina/Rio Gallegos","America/Argentina/Salta","America/Argentina/San Juan","America/Argentina/San Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa Vista","America/Bogota","America/Boise","America/Cambridge Bay","America/Campo Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad Juarez","America/Costa Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El Salvador","America/Fort Nelson","America/Fortaleza","America/Glace Bay","America/Goose Bay","America/Grand Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La Paz","America/Lima","America/Los Angeles","America/Lower Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New York","America/Nome","America/Noronha","America/North Dakota/Beulah","America/North Dakota/Center","America/North Dakota/New Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Paramaribo","America/Phoenix","America/Port of Spain","America/Port-au-Prince","America/Porto Velho","America/Puerto Rico","America/Punta Arenas","America/Rankin Inlet","America/Recife","America/Regina","America/Resolute","America/Rio Branco","America/Santarem","America/Santiago","America/Santo Domingo","America/Sao Paulo","America/Scoresbysund","America/Sitka","America/St Barthelemy","America/St Johns","America/St Kitts","America/St Lucia","America/St Thomas","America/St Vincent","America/Swift Current","America/Tegucigalpa","America/Thule","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho Chi Minh","Asia/Hong Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South Georgia","Atlantic/St Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken Hill","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Etc/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle of Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"]},16314:function(e,t,a){"use strict";a.d(t,{W:function(){return P}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),s=a(72317),c=a(61508),l=a(33839),u=a(3475),d=a(98783),p=a(69313),g=a(52676);c.ZP.config({duration:2});var h=Date.now(),f=p.Z.create({timeout:6e4,params:{t:h}}),m=["".concat(u.Z.baseUrl,"api/user/login"),"".concat(u.Z.baseUrl,"open/auth/token"),"".concat(u.Z.baseUrl,"api/user/two-factor/login"),"".concat(u.Z.baseUrl,"api/system"),"".concat(u.Z.baseUrl,"api/user/init"),"".concat(u.Z.baseUrl,"api/user/notification/init")];f.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.interceptors.response.use(function(){var e=o()(i()().mark((function e(t){var a,n,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}d.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==d.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),d.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(r=n.message||n.data)&&l.Z.error({message:r,description:null!=n&&n.errors?(0,g.jsx)(g.Fragment,{children:null==n?void 0:n.errors.map((function(e){return(0,g.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",n);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,a=e.response.status;if([502,504].includes(a))d.history.push("/error");else if(401===a)"/login"!==d.history.location.pathname&&(c.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var n,i,r,o;if("function"==typeof(null===(n=e.config)||void 0===n?void 0:n.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&l.Z.error({message:t,description:null!==(i=e.response)&&void 0!==i&&null!==(i=i.data)&&void 0!==i&&i.errors?(0,g.jsx)(g.Fragment,{children:null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.errors)||void 0===r?void 0:r.map((function(e){return(0,g.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var P=f},48916:function(e,t,a){"use strict";a.d(t,{DY:function(){return g},FA:function(){return f},H$:function(){return Z},I1:function(){return p},W9:function(){return u},ZP:function(){return l},o4:function(){return v},rS:function(){return P},w7:function(){return d},x$:function(){return h}});var n=a(15558),i=a.n(n),r=a(72317),o=a(97302),s=a(91379),c=a.n(s);function l(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},a=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},n="unknow";t(/windows|win32|win64|wow32|wow64/g)?n="windows":t(/macintosh|macintel/g)?n="macos":t(/x11/g)?n="linux":t(/android|adr/g)?n="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(n="ios");var i="unknow";"windows"===n?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===n?i=a(/os x [\d._]+/g):"android"===n?i=a(/android [\d._]+/g):"ios"===n&&(i=a(/os [\d._]+/g));var r="unknow";"windows"===n||"macos"===n||"linux"===n?r="desktop":("android"===n||"ios"===n||t(/mobile/g))&&(r="mobile");var o="unknow",s="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?s="edge":t(/opr/g)?s="opera":t(/chrome/g)?s="chrome":t(/safari/g)&&(s="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",s="firefox"):t(/presto/g)?(o="presto",s="opera"):t(/trident|compatible|msie/g)&&(o="trident",s="iexplore");var c="unknow";"webkit"===o?c=a(/applewebkit\/[\d._]+/g):"gecko"===o?c=a(/gecko\/[\d._]+/g):"presto"===o?c=a(/presto\/[\d._]+/g):"trident"===o&&(c=a(/trident\/[\d._]+/g));var l="unknow";"chrome"===s?l=a(/chrome\/[\d._]+/g):"safari"===s?l=a(/version\/[\d._]+/g):"firefox"===s?l=a(/firefox\/[\d._]+/g):"opera"===s?l=a(/opr\/[\d._]+/g):"iexplore"===s?l=a(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(l=a(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=a(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=a(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=a(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=a(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=a(/maxthon\/[\d._]+/g));var p=Object.assign({engine:o,engineVs:c,platform:r,supporter:s,supporterVs:l,system:n,systemVs:i},"none"===u?{}:{shell:u,shellVs:d});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(p.system,"/").concat(p.systemVs,"\n浏览器:").concat(p.supporter,"/").concat(p.supporterVs,"\n内核:").concat(p.engine,"/").concat(p.engineVs),"color: green;font-size: 14px;font-weight: bold;"),p}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,a=e.target;void 0===t&&(t=99);var n=null,i=0;(n=a||document.querySelector(".ant-table-wrapper"))&&(i=n.getBoundingClientRect().top);var r=document.body.clientHeight-i-t;return r}function d(e,t){var a,n,i=window.URL||window.webkitURL||window,r=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=i.createObjectURL(r),o.download=e,a=o,(n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(n)}function p(e,t,a){var n=i()(e),r=[];return function e(n){if(n)for(var i=0;i<(null==n?void 0:n.length);i++){if(t(n[i]))return a?void(n[i].children?n[i].children.unshift(a):n[i].children=[a]):void n.splice(i,1);n[i].children&&(r.push(n[i].key),e(n[i].children))}}(n),n}function g(e,t){var a;return function e(n){if(n)for(var i=0;i<(null==n?void 0:n.length);i++)t(n[i])?a=n[i]:n[i].children&&e(n[i].children)}(i()(e)),a}function h(e){return[o.eY,r.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function f(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var a=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(a){var n,i,r="".concat(window.__ENV__QL_DIR,"/data/scripts");a.startsWith(r)&&(a=a.replace(r,""));var o=a.lastIndexOf("/");return o>=0?(i=a.slice(o+1),n=a.slice(0,o)):(i=a,n=""),[i,n]}}function m(e){try{var t=c().parse(e);if(t)return t.next().toDate()}catch(e){}return null}function P(e,t){var a=m(e);return null!=t&&t.length&&t.forEach((function(e){var t=m(e.schedule);t&&(!a||t<a)&&(a=t)})),a}function Z(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o.um[t]}function v(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},65814:function(e,t,a){"use strict";var n=a(15558),i=a.n(n),r=a(67825),o=a.n(r),s=a(90228),c=a.n(s),l=a(87999),u=a.n(l),d=a(25298),p=a.n(d),g=a(17069),h=a.n(g),f=a(82092),m=a.n(f),P=a(78078),Z=a.n(P),v=["type"],y=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:a.maxReconnectAttempts||5,reconnectInterval:a.reconnectInterval||3e3,heartbeatInterval:a.heartbeatInterval||3e4},this.init()}var t,a;return h()(e,[{key:"init",value:(a=u()(c()().mark((function e(){var t=this;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(Z())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return a.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var a=JSON.parse(t.data);e.dispatchMessage(a)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===Z().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(!a.has(t)){a.add(t),this.subscriptions.set(e,a);var n={action:"subscribe",topic:e};this.send(n)}}},{key:"unsubscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(a.has(t)){a.delete(t);var n={action:"unsubscribe",topic:e};this.send(n)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===Z().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,a=o()(e,v),n=this.subscriptions.get(t)||new Set;i()(n).forEach((function(e){return e(a)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===Z().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,a)),e.instance}}]),e}();m()(y,"instance",null),t.Z=y},68251:function(){},16130:function(){},6057:function(){}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465],{73236:function(t,e,n){"use strict";n.r(e);var o=n(48305),r=n.n(o),i=n(48916),a=n(3475),s=n(16314),c=n(65814),l=n(78060),u=n.n(l),d=n(32890),p=n(61508),h=n(45520),f=n(93481),g=n(75271),v=n(72317),m=n(52676),x=d.Z.Countdown;e.default=function(t){var e=t.systemInfo,n=(0,g.useState)(!1),o=r()(n,2),l=o[0],d=o[1],Z=(0,g.useState)(""),y=r()(Z,2),b=y[0],P=y[1],_=(0,g.useRef)(),w=(0,g.useRef)(),k=function(t){h.Z.confirm({width:500,title:v.ZP.get("更新"),content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:v.ZP.get("已经是最新版了!")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[v.ZP.get("青龙")," ",t.lastVersion," ",v.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:v.ZP.get("重新下载"),onOk:function(){C(),s.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},j=function(t){var n=t.lastVersion,o=t.lastLog;h.Z.confirm({width:500,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:v.ZP.get("更新可用")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[v.ZP.get("新版本")," ",n," ",v.ZP.get("可用,你使用的版本为")," ",e.version,"。"]})]}),content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:o})}),okText:v.ZP.get("下载更新"),cancelText:v.ZP.get("以后再说"),onOk:function(){C(),s.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},C=function(){P(""),_.current=h.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:v.ZP.get("下载更新中..."),centered:!0,content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})})})},S=function(t){s.W.put("".concat(a.Z.apiPrefix,"update/").concat(t)).then((function(t){p.ZP.success({content:(0,m.jsxs)("span",{children:[v.ZP.get("系统将在"),(0,m.jsx)(x,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),v.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))};(0,g.useEffect)((function(){if(b){var t="failed"===w.current;_.current.update({maskClosable:t,closable:t,okButtonProps:{disabled:!t},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[b]);var I=(0,g.useCallback)((function(t){var e=t.message,n=t.status;"failed"===n&&(w.current="failed",p.ZP.error(v.ZP.get("更新失败,请检查网络及日志或稍后再试"))),"success"===n&&(w.current="success",setTimeout((function(){h.Z.confirm({width:600,maskClosable:!1,title:v.ZP.get("确认重启"),centered:!0,content:v.ZP.get("系统安装包下载成功,确认重启"),okText:v.ZP.get("重启"),onOk:function(){S("system")},onCancel:function(){_.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3)),setTimeout((function(){var t;null===(t=document.querySelector("#log-identifier"))||void 0===t||t.scrollIntoView({behavior:"smooth"})}),600),e&&P((function(t){return"".concat(t).concat(e)}))}),[]);return(0,g.useEffect)((function(){var t=c.Z.getInstance();return t.subscribe("updateSystemVersion",I),function(){t.unsubscribe("updateSystemVersion",I)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f.Z,{type:"primary",onClick:function(){l||(d(!0),p.ZP.loading(v.ZP.get("检查更新中..."),0),s.W.put("".concat(a.Z.apiPrefix,"system/update-check")).then((function(t){var e=t.code,n=t.data;p.ZP.destroy(),200===e&&(n.hasNewVersion?j(n):k(n))})).catch((function(t){p.ZP.destroy(),console.log(t)})).finally((function(){d(!1)})))},children:v.ZP.get("检查更新")}),(0,m.jsx)(f.Z,{type:"primary",onClick:function(){return S("reload")},style:{marginLeft:8},children:v.ZP.get("重新启动")})]})}},85657:function(t,e,n){"use strict";n.r(e);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),s=n(72317),c=n(75271),l=n(72338),u=n(61508),d=n(45520),p=n(94747),h=n(17082),f=n(93481),g=n(56646),v=n(35181),m=n(6367),x=n(32253),Z=n(71571),y=n(3475),b=n(16314),P=n(73236),_=n(87105),w=(n(68251),n(79231)),k=n(84522),j=n(32916),C=n(19334),S=n.n(C),I=n(48916),O=n(97302),T=n(52676),F={"panel-title":"panelTitle","log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone","global-ssh-key":"globalSshKey"},z=[{value:"base",label:s.ZP.get("基础数据"),disabled:!0},{value:"config",label:s.ZP.get("配置文件")},{value:"scripts",label:s.ZP.get("脚本文件")},{value:"log",label:s.ZP.get("日志文件")},{value:"deps",label:s.ZP.get("依赖文件")},{value:"syslog",label:s.ZP.get("系统日志")},{value:"dep_cache",label:s.ZP.get("依赖缓存")},{value:"raw",label:s.ZP.get("远程脚本缓存")},{value:"repo",label:s.ZP.get("远程仓库缓存")},{value:"ssh.d",label:s.ZP.get("SSH 文件缓存")}];e.default=function(t){var e=t.systemInfo,n=t.reloadSystemConfig,o=t.reloadTheme,i=localStorage.getItem("qinglong_dark_theme")||"auto",C=(0,c.useState)(),E=a()(C,2),N=E[0],A=E[1],R=l.Z.useForm(),B=a()(R,1)[0],W=(0,c.useState)(!1),q=a()(W,2),H=q[0],M=q[1],L=(0,j.default)(s.ZP.get("上传")),G=(0,j.default)(s.ZP.get("下载")),D=(0,c.useState)(!1),V=a()(D,2),$=V[0],K=V[1],U=(0,c.useState)(["base"]),J=a()(U,2),X=J[0],Q=J[1],Y=Z||{},tt=Y.enable,et=Y.disable,nt=(Y.exportGeneratedCSS,Y.setFetchMethod),ot=Y.auto,rt=function(t){b.W.put("".concat(y.Z.apiPrefix,"system/config/").concat(t),S()(N,F[t])).then((function(e){var o=e.code;e.data;200===o&&(u.ZP.success(s.ZP.get("更新成功")),"panel-title"===t&&n())})).catch((function(t){console.log(t)}))};return(0,c.useEffect)((function(){b.W.get("".concat(y.Z.apiPrefix,"system/config")).then((function(t){var e=t.code,n=t.data;200===e&&n.info&&A(n.info)})).catch((function(t){console.log(t)}))}),[]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(l.Z,{layout:"vertical",form:B,children:[(0,T.jsx)(l.Z.Item,{label:s.ZP.get("主题"),name:"theme",initialValue:i,children:(0,T.jsxs)(p.ZP.Group,{onChange:function(t){var e=t.target.value;localStorage.setItem("qinglong_dark_theme",t.target.value),nt(fetch),"dark"===e?tt({}):"light"===e?et():ot({}),o()},value:i,optionType:"button",buttonStyle:"solid",children:[(0,T.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:s.ZP.get("亮色")}),(0,T.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:s.ZP.get("暗色")}),(0,T.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:s.ZP.get("跟随系统")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("面板标题"),name:"panelTitle",tooltip:s.ZP.get("自定义面板的站点标题,留空使用默认值“青龙”"),children:(0,T.jsxs)(h.Z.Group,{compact:!0,children:[(0,T.jsx)(h.Z,{style:{width:180},maxLength:100,value:(null==N?void 0:N.panelTitle)||"",placeholder:s.ZP.get("留空使用默认值“青龙”"),onChange:function(t){A(r()(r()({},N),{},{panelTitle:t.target.value}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){rt("panel-title")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("日志删除频率"),name:"frequency",tooltip:s.ZP.get("每x天自动删除x天以前的日志"),children:(0,T.jsxs)(h.Z.Group,{compact:!0,children:[(0,T.jsx)(g.Z,{addonBefore:s.ZP.get("每"),addonAfter:s.ZP.get("天"),style:{width:180},placeholder:s.ZP.get("未启用"),min:0,value:null==N?void 0:N.logRemoveFrequency,onChange:function(t){A(r()(r()({},N),{},{logRemoveFrequency:t}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){rt("log-remove-frequency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("定时任务并发数"),name:"frequency",children:(0,T.jsxs)(h.Z.Group,{compact:!0,children:[(0,T.jsx)(g.Z,{style:{width:180},min:4,value:null==N?void 0:N.cronConcurrency,placeholder:s.ZP.get("默认为 CPU 个数"),onChange:function(t){A(r()(r()({},N),{},{cronConcurrency:t}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){rt("cron-concurrency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("时区"),name:"timezone",children:(0,T.jsxs)(h.Z.Group,{compact:!0,children:[(0,T.jsx)(v.Z,{value:null==N?void 0:N.timezone,style:{width:180},onChange:function(t){A(r()(r()({},N),{},{timezone:t}))},options:O.z.map((function(t){return{value:t,label:t}})),showSearch:!0,filterOption:function(t,e){var n;return(null==e||null===(n=e.value)||void 0===n?void 0:n.toLowerCase().indexOf(t.toLowerCase()))>=0}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){rt("timezone")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsxs)(l.Z.Item,{label:s.ZP.get("全局SSH私钥"),name:"globalSshKey",tooltip:s.ZP.get("用于访问所有私有仓库的全局SSH私钥"),children:[(0,T.jsx)(h.Z.Group,{compact:!0,children:(0,T.jsx)(h.Z.TextArea,{value:(null==N?void 0:N.globalSshKey)||"",style:{width:264},autoSize:{minRows:3,maxRows:8},placeholder:s.ZP.get("请输入完整的SSH私钥内容"),onChange:function(t){A(r()(r()({},N),{},{globalSshKey:t.target.value}))}})}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){rt("global-ssh-key")},style:{width:264,marginTop:8},children:s.ZP.get("确认")})]}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("语言"),name:"lang",children:(0,T.jsx)(v.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(t){var e;localStorage.setItem("lang",t);var n=t||(null===(e=navigator.language)||void 0===e?void 0:e.slice(0,2))||"zh";b.W.put("".concat(y.Z.apiPrefix,"system/config/lang"),{lang:n}).catch((function(){})),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:s.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,T.jsxs)(l.Z.Item,{label:s.ZP.get("数据备份还原"),name:"frequency",children:[(0,T.jsx)(f.Z,{type:"primary",onClick:function(){Q(["base"]),K(!0)},loading:H,children:H?s.ZP.get("生成数据中..."):s.ZP.get("备份")}),(0,T.jsx)(m.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(y.Z.apiPrefix,"system/data/import"),onChange:function(t){var e=t.file,n=t.event;null!=n&&n.percent&&L(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===e.status&&(L(100),d.Z.confirm({width:600,maskClosable:!1,title:s.ZP.get("确认重启"),centered:!0,content:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{children:s.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,T.jsxs)("div",{children:[s.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:s.ZP.get("重启"),onOk:function(){b.W.put("".concat(y.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,T.jsxs)("span",{children:[s.ZP.get("系统将在"),(0,T.jsx)(k.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),s.ZP.get("秒后自动刷新")]}),duration:30}),(0,I.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))}})),"error"===e.status&&u.ZP.error(s.ZP.get("上传失败"))},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(y.Z.authKey))},children:(0,T.jsx)(f.Z,{icon:(0,T.jsx)(w.Z,{}),style:{marginLeft:8},children:s.ZP.get("还原数据")})})]}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("检查更新"),name:"update",children:(0,T.jsx)(P.default,{systemInfo:e})})]}),(0,T.jsx)(d.Z,{title:s.ZP.get("选择备份模块"),open:$,onOk:function(){M(!0),b.W.put("".concat(y.Z.apiPrefix,"system/data/export"),{type:X},{responseType:"blob",timeout:864e5,onDownloadProgress:function(t){t.progress&&G(parseFloat((100*t.progress).toFixed(1)))}}).then((function(t){(0,_.saveAs)(t,"data.tgz")})).catch((function(t){console.log(t)})).finally((function(){M(!1),K(!1)}))},onCancel:function(){return K(!1)},okText:s.ZP.get("开始备份"),cancelText:s.ZP.get("取消"),okButtonProps:{loading:H},children:(0,T.jsx)(x.Z.Group,{value:X,onChange:function(t){Q(t)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:z.map((function(t){return(0,T.jsx)(x.Z,{value:t.value,disabled:t.disabled,style:{marginLeft:0},children:t.label},t.value)}))})})]})}},32916:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return l}});var o=n(72317),r=n(46016),i=n(45520),a=n(75271),s=n(52676),c=function(t){var e=t.percent;return(0,s.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:e})};function l(t){var e=(0,a.useRef)();return function(n){e.current?(e.current.update({title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,s.jsx)(c,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var t;null===(t=e.current)||void 0===t||t.destroy(),e.current=null}))):e.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,s.jsx)(c,{percent:n}),okButtonProps:{disabled:!0}})}}},65814:function(t,e,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),a=n.n(i),s=n(90228),c=n.n(s),l=n(87999),u=n.n(l),d=n(25298),p=n.n(d),h=n(17069),f=n.n(h),g=n(82092),v=n.n(g),m=n(78078),x=n.n(m),Z=["type"],y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,t),v()(this,"url",void 0),v()(this,"socket",null),v()(this,"subscriptions",new Map),v()(this,"options",void 0),v()(this,"reconnectAttempts",0),v()(this,"heartbeatTimeout",null),v()(this,"state","closed"),this.url=e,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var e,n;return f()(t,[{key:"init",value:(n=u()(c()().mark((function t(){var e=this;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){t.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),t.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,t.next=14,new Promise((function(t){return setTimeout(t,e.options.reconnectInterval)}));case 14:t.next=3;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),this.handleError(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var t=this;this.socket&&(this.socket.onopen=function(){t.state="open",t.emit("open")},this.socket.onmessage=function(e){var n=JSON.parse(e.data);t.dispatchMessage(n)},this.socket.onclose=function(){t.state="closed",t.emit("close")})}},{key:"waitForClose",value:(e=u()(c()().mark((function t(){var e;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().CLOSED){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,100)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"subscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(!n.has(e)){n.add(e),this.subscriptions.set(t,n);var o={action:"subscribe",topic:t};this.send(o)}}},{key:"unsubscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(n.has(e)){n.delete(e);var o={action:"unsubscribe",topic:t};this.send(o)}}},{key:"send",value:function(t){var e;(null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&this.socket.send(JSON.stringify(t))}},{key:"dispatchMessage",value:function(t){var e=t.type,n=a()(t,Z),o=this.subscriptions.get(e)||new Set;r()(o).forEach((function(t){return t(n)}))}},{key:"startHeartbeat",value:function(){var t=this;this.heartbeatTimeout=setInterval((function(){var e;(null===(e=t.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&t.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(t){console.error("WebSocket错误:",t),this.emit("error",t)}},{key:"on",value:function(t,e){}},{key:"emit",value:function(t,e){}}],[{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.instance||(t.instance=new t(e,n)),t.instance}}]),t}();v()(y,"instance",null),e.Z=y},68251:function(){},27916:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var o=n(99459),r=n(75271);function i(){var t=r.useReducer((function(t){return t+1}),0);return(0,o.Z)(t,2)[1]}},35181:function(t,e,n){"use strict";var o=n(57904),r=n(2053),i=n(82187),a=n.n(i),s=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),p=n(30107),h=n(38470),f=n(5663),g=n(21485),v=n(28800),m=n(50528),x=n(81393),Z=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n},y="SECRET_COMBOBOX_MODE_DO_NOT_USE",b=function(t,e){var n,i=t.prefixCls,b=t.bordered,P=void 0===b||b,_=t.className,w=t.getPopupContainer,k=t.dropdownClassName,j=t.popupClassName,C=t.listHeight,S=void 0===C?256:C,I=t.placement,O=t.listItemHeight,T=void 0===O?32:O,F=t.size,z=t.disabled,E=t.notFoundContent,N=t.status,A=t.showArrow,R=Z(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),B=l.useContext(u.E_),W=B.getPopupContainer,q=B.getPrefixCls,H=B.renderEmpty,M=B.direction,L=B.virtual,G=B.dropdownMatchSelectWidth,D=l.useContext(h.Z),V=q("select",i),$=q(),K=(0,x.ri)(V,M),U=K.compactSize,J=K.compactItemClassnames,X=l.useMemo((function(){var t=R.mode;if("combobox"!==t)return t===y?"combobox":t}),[R.mode]),Q="multiple"===X||"tags"===X,Y=void 0!==A?A:R.loading||!(Q||"combobox"===X),tt=(0,l.useContext)(f.aM),et=tt.status,nt=tt.hasFeedback,ot=tt.isFormItemInput,rt=tt.feedbackIcon,it=(0,v.F)(et,N);n=void 0!==E?E:"combobox"===X?null:(H||d.Z)("Select");var at=(0,m.Z)((0,r.Z)((0,r.Z)({},R),{multiple:Q,hasFeedback:nt,feedbackIcon:rt,showArrow:Y,prefixCls:V})),st=at.suffixIcon,ct=at.itemIcon,lt=at.removeIcon,ut=at.clearIcon,dt=(0,c.Z)(R,["suffixIcon","itemIcon"]),pt=a()(j||k,(0,o.Z)({},"".concat(V,"-dropdown-").concat(M),"rtl"===M)),ht=U||F||D,ft=l.useContext(p.Z),gt=null!=z?z:ft,vt=a()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===ht),"".concat(V,"-sm"),"small"===ht),"".concat(V,"-rtl"),"rtl"===M),"".concat(V,"-borderless"),!P),"".concat(V,"-in-form-item"),ot),(0,v.Z)(V,it,nt),J,_);return l.createElement(s.ZP,(0,r.Z)({ref:e,virtual:L,dropdownMatchSelectWidth:G},dt,{transitionName:(0,g.mL)($,(0,g.q0)(I),R.transitionName),listHeight:S,listItemHeight:T,mode:X,prefixCls:V,placement:void 0!==I?I:"rtl"===M?"bottomRight":"bottomLeft",direction:M,inputIcon:st,menuItemSelectedIcon:ct,removeIcon:lt,clearIcon:ut,notFoundContent:n,className:vt,getPopupContainer:w||W,dropdownClassName:pt,showArrow:nt||A,disabled:gt}))},P=l.forwardRef(b);P.SECRET_COMBOBOX_MODE_DO_NOT_USE=y,P.Option=s.Wx,P.OptGroup=s.Xo,e.Z=P},88987:function(t,e,n){var o=n(71519),r=n(82999),i=n(76111),a=n(50506),s=n(80845);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},175:function(t,e,n){var o=n(2173),r=n(33752),i=n(10548),a=n(63410),s=n(3564);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},35922:function(t,e,n){var o=n(47758)(n(29165),"Map");t.exports=o},9440:function(t,e,n){var o=n(7140),r=n(56504),i=n(88833),a=n(80953),s=n(70724);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},62718:function(t,e,n){var o=n(42448);t.exports=function(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}},58939:function(t,e,n){var o=n(92042),r=n(90654),i=n(36838),a=n(51059),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(o(t)?p:s).test(a(t))}},36633:function(t,e,n){var o=n(29165)["__core-js_shared__"];t.exports=o},67707:function(t,e,n){var o=n(3880);t.exports=function(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}},47758:function(t,e,n){var o=n(58939),r=n(9149);t.exports=function(t,e){var n=r(t,e);return o(n)?n:void 0}},9149:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},71519:function(t,e,n){var o=n(37722);t.exports=function(){this.__data__=o?o(null):{},this.size=0}},82999:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},76111:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},50506:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return o?void 0!==e[t]:r.call(e,t)}},80845:function(t,e,n){var o=n(37722);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this}},3880:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},90654:function(t,e,n){var o,r=n(36633),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";t.exports=function(t){return!!i&&i in t}},2173:function(t){t.exports=function(){this.__data__=[],this.size=0}},33752:function(t,e,n){var o=n(62718),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},10548:function(t,e,n){var o=n(62718);t.exports=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}},63410:function(t,e,n){var o=n(62718);t.exports=function(t){return o(this.__data__,t)>-1}},3564:function(t,e,n){var o=n(62718);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},7140:function(t,e,n){var o=n(88987),r=n(175),i=n(35922);t.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},56504:function(t,e,n){var o=n(67707);t.exports=function(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}},88833:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).get(t)}},80953:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).has(t)}},70724:function(t,e,n){var o=n(67707);t.exports=function(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},37722:function(t,e,n){var o=n(47758)(Object,"create");t.exports=o},51059:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},42448:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},92042:function(t,e,n){var o=n(80732),r=n(36838);t.exports=function(t){if(!r(t))return!1;var e=o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}}]);