@whyour/qinglong 2.18.3-3 → 2.19.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.env.example +7 -9
  2. package/docker/310.Dockerfile +18 -9
  3. package/docker/Dockerfile +18 -9
  4. package/docker/docker-entrypoint.sh +14 -15
  5. package/docker/front.conf +0 -32
  6. package/ecosystem.config.js +5 -25
  7. package/package.json +9 -11
  8. package/sample/notify.js +5 -3
  9. package/shell/check.sh +0 -2
  10. package/shell/preload/sitecustomize.js +38 -15
  11. package/shell/preload/sitecustomize.py +42 -18
  12. package/shell/share.sh +23 -75
  13. package/shell/update.sh +21 -20
  14. package/static/build/api/health.js +32 -0
  15. package/static/build/api/index.js +4 -0
  16. package/static/build/api/log.js +1 -1
  17. package/static/build/api/script.js +2 -3
  18. package/static/build/api/system.js +1 -0
  19. package/static/build/api/update.js +47 -0
  20. package/static/build/api/user.js +2 -2
  21. package/static/build/app.js +70 -21
  22. package/static/build/config/const.js +2 -1
  23. package/static/build/config/index.js +32 -25
  24. package/static/build/config/util.js +72 -89
  25. package/static/build/data/dependence.js +1 -13
  26. package/static/build/data/notify.js +1 -0
  27. package/static/build/loaders/app.js +7 -9
  28. package/static/build/loaders/db.js +1 -3
  29. package/static/build/loaders/express.js +1 -9
  30. package/static/build/loaders/initData.js +7 -8
  31. package/static/build/loaders/initFile.js +0 -1
  32. package/static/build/loaders/logger.js +34 -15
  33. package/static/build/middlewares/monitoring.js +56 -0
  34. package/static/build/schedule/api.js +47 -8
  35. package/static/build/schedule/client.js +1 -1
  36. package/static/build/services/cron.js +12 -6
  37. package/static/build/services/dependence.js +10 -9
  38. package/static/build/services/grpc.js +97 -0
  39. package/static/build/services/health.js +74 -0
  40. package/static/build/services/http.js +68 -0
  41. package/static/build/services/metrics.js +82 -0
  42. package/static/build/services/notify.js +3 -3
  43. package/static/build/services/system.js +8 -1
  44. package/static/build/services/user.js +21 -5
  45. package/static/build/shared/pLimit.js +13 -1
  46. package/static/dist/{2208.03c2cf4a.async.js → 2208.98ccac5f.async.js} +1 -1
  47. package/static/dist/8826.faecf076.async.js +1 -0
  48. package/static/dist/8851.cf7e0ebc.async.js +1 -0
  49. package/static/dist/index.html +2 -2
  50. package/static/dist/layouts__index.6e23431c.async.js +1 -0
  51. package/static/dist/{preload_helper.1b1a7a9f.js → preload_helper.67e88ed6.js} +1 -1
  52. package/static/dist/{src__pages__crontab__index.5eb33581.async.js → src__pages__crontab__index.d6d37f6a.async.js} +1 -1
  53. package/static/dist/{src__pages__crontab__modal.b20074c2.async.js → src__pages__crontab__modal.dcd053b5.async.js} +1 -1
  54. package/static/dist/src__pages__dependence__modal.7f588c0b.async.js +1 -0
  55. package/static/dist/src__pages__env__editNameModal.411043e2.async.js +1 -0
  56. package/static/dist/{src__pages__env__modal.d923acdb.async.js → src__pages__env__modal.7d952f26.async.js} +1 -1
  57. package/static/dist/src__pages__error__index.837f4753.async.js +1 -0
  58. package/static/dist/{src__pages__initialization__index.684197ee.async.js → src__pages__initialization__index.5bd471c5.async.js} +1 -1
  59. package/static/dist/src__pages__script__editNameModal.32bb2f80.async.js +1 -0
  60. package/static/dist/src__pages__script__index.53f99bee.async.js +1 -0
  61. package/static/dist/{src__pages__script__renameModal.09dfb133.async.js → src__pages__script__renameModal.8232c924.async.js} +1 -1
  62. package/static/dist/{src__pages__script__saveModal.21b81bcc.async.js → src__pages__script__saveModal.8e358e84.async.js} +1 -1
  63. package/static/dist/{src__pages__script__setting.c6503aaf.async.js → src__pages__script__setting.dcdd7253.async.js} +1 -1
  64. package/static/dist/{src__pages__setting__appModal.b115baf8.async.js → src__pages__setting__appModal.25adf30e.async.js} +1 -1
  65. package/static/dist/src__pages__setting__dependence.95dd01e7.async.js +1 -0
  66. package/static/dist/src__pages__setting__index.3b426f9f.async.js +1 -0
  67. package/static/dist/src__pages__setting__notification.989e57d6.async.js +1 -0
  68. package/static/dist/src__pages__setting__security.7623a492.async.js +1 -0
  69. package/static/dist/src__pages__setting__systemLog.2e8cc7a0.async.js +1 -0
  70. package/static/dist/src__pages__subscription__modal.46a69195.async.js +1 -0
  71. package/static/dist/{umi.32588872.js → umi.b7656bb3.js} +1 -1
  72. package/version.yaml +12 -6
  73. package/back.d.ts +0 -9
  74. package/other.config.js +0 -13
  75. package/static/build/loaders/update.js +0 -79
  76. package/static/build/public.js +0 -34
  77. package/static/build/schedule/index.js +0 -52
  78. package/static/build/update.js +0 -29
  79. package/static/dist/8826.b3f9fa78.async.js +0 -1
  80. package/static/dist/8851.a57942be.async.js +0 -1
  81. package/static/dist/layouts__index.623b87d2.async.js +0 -1
  82. package/static/dist/src__pages__dependence__modal.1bb8572d.async.js +0 -1
  83. package/static/dist/src__pages__env__editNameModal.115bb8ea.async.js +0 -1
  84. package/static/dist/src__pages__error__index.a17578c5.async.js +0 -1
  85. package/static/dist/src__pages__script__editNameModal.7d1cc6b4.async.js +0 -1
  86. package/static/dist/src__pages__script__index.0cd08dcd.async.js +0 -1
  87. package/static/dist/src__pages__setting__dependence.f3afc194.async.js +0 -1
  88. package/static/dist/src__pages__setting__index.34ed674c.async.js +0 -1
  89. package/static/dist/src__pages__setting__notification.b7722a0b.async.js +0 -1
  90. package/static/dist/src__pages__setting__security.534a5e67.async.js +0 -1
  91. package/static/dist/src__pages__setting__systemLog.cb8a2174.async.js +0 -1
  92. package/static/dist/src__pages__subscription__modal.10cd630d.async.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7158],{6334:function(e,t,r){r.r(t);var a=r(26068),l=r.n(a),i=r(335),o=r.n(i),n=r(90228),s=r.n(n),u=r(87999),p=r.n(u),c=r(48305),g=r.n(c),d=r(72317),P=r(75271),h=r(35181),Z=r(72338),b=r(61508),m=r(45520),f=r(94747),v=r(17082),y=r(88142),k=r(6367),x=r(16314),w=r(3475),q=r(79231),B=r(52676);h.Z.Option;t.default=function(e){var t=e.handleCancel,r=e.treeData,a=e.visible,i=Z.Z.useForm(),n=g()(i,1)[0],u=(0,P.useState)(!1),c=g()(u,2),h=c[0],C=c[1],j=(0,P.useState)([]),_=g()(j,2),T=_[0],U=_[1],K=(0,P.useState)(),S=g()(K,2),A=S[0],I=S[1],Q=(0,P.useState)("blank"),H=g()(Q,2),R=H[0],X=H[1],D=function(){var e=p()(s()().mark((function e(r){var a,l,i,o,n,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(!0),a=r.path,l=void 0===a?"":a,i=r.filename,o=r.directory,n=void 0===o?"":o,(u=new FormData).append("file",A||""),u.append("filename",(null==A?void 0:A.name)||i),u.append("path",l),u.append("content",""),u.append("directory",n),x.W.post("".concat(w.Z.apiPrefix,"scripts"),u).then((function(e){var r=e.code;e.data;if(200===r){b.ZP.success(n?d.ZP.get("创建文件夹成功"):d.ZP.get("创建文件成功"));var a=l?"".concat(l,"/"):"",o=A?A.name:i;t({filename:o,path:l,key:"".concat(a).concat(o)})}C(!1)})).finally((function(){return C(!1)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function e(t){var r,a=o()(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.children&&i.children.length>0&&(i.children=i.children.filter((function(e){return"directory"===e.type})).map((function(e){return l()(l()({},e),{},{disabled:!1})})),e(i.children))}}catch(e){a.e(e)}finally{a.f()}return t};return(0,P.useEffect)((function(){var e=r.filter((function(e){return"directory"===e.type})).map((function(e){return l()(l()({},e),{},{disabled:!1})})),t=E(e);U(t)}),[r]),(0,P.useEffect)((function(){n.resetFields()}),[a]),(0,B.jsx)(m.Z,{title:d.ZP.get("创建"),open:a,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){n.validateFields().then((function(e){D(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return t()},confirmLoading:h,children:(0,B.jsxs)(Z.Z,{form:n,layout:"vertical",name:"edit_name_modal",children:[(0,B.jsx)(Z.Z.Item,{name:"type",label:d.ZP.get("类型"),rules:[{required:!0}],initialValue:"blank",children:(0,B.jsxs)(f.ZP.Group,{onChange:function(e){X(e.target.value)},children:[(0,B.jsx)(f.ZP,{value:"blank",children:d.ZP.get("空文件")}),(0,B.jsx)(f.ZP,{value:"upload",children:d.ZP.get("本地文件")}),(0,B.jsx)(f.ZP,{value:"directory",children:d.ZP.get("文件夹")})]})}),"blank"===R&&(0,B.jsx)(Z.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")},{validator:function(e,t){return t.includes("/")?Promise.reject(new Error(d.ZP.get("文件名不能包含斜杠"))):Promise.resolve()}}],children:(0,B.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件名")})}),"directory"===R&&(0,B.jsx)(Z.Z.Item,{name:"directory",label:d.ZP.get("文件夹名"),rules:[{required:!0,message:d.ZP.get("请输入文件夹名")}],children:(0,B.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件夹名")})}),(0,B.jsx)(Z.Z.Item,{label:d.ZP.get("父目录"),name:"path",children:(0,B.jsx)(y.Z,{allowClear:!0,treeData:T,fieldNames:{value:"key",label:"title"},placeholder:d.ZP.get("请选择父目录"),treeDefaultExpandAll:!0})}),"upload"===R&&(0,B.jsx)(Z.Z.Item,{label:d.ZP.get("文件"),name:"file",children:(0,B.jsxs)(k.Z.Dragger,{beforeUpload:function(e){return I(e),!1},maxCount:1,children:[(0,B.jsx)("p",{className:"ant-upload-drag-icon",children:(0,B.jsx)(q.Z,{})}),(0,B.jsx)("p",{className:"ant-upload-text",children:d.ZP.get("点击或者拖拽文件到此区域上传")})]})})]})})}},3475:function(e,t,r){var a=r(72317),l=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),baseUrl:l,apiPrefix:"".concat(l,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:a.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:a.ZP.get("定时任务"),value:"crons"},{name:a.ZP.get("环境变量"),value:"envs"},{name:a.ZP.get("订阅管理"),value:"subscriptions"},{name:a.ZP.get("配置文件"),value:"configs"},{name:a.ZP.get("脚本管理"),value:"scripts"},{name:a.ZP.get("日志管理"),value:"logs"},{name:a.ZP.get("依赖管理"),value:"dependencies"},{name:a.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:a.ZP.get("定时任务"),envs:a.ZP.get("环境变量"),subscriptions:a.ZP.get("订阅管理"),configs:a.ZP.get("配置文件"),scripts:a.ZP.get("脚本管理"),logs:a.ZP.get("日志管理"),dependencies:a.ZP.get("依赖管理"),system:a.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:a.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:a.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:a.ZP.get("钉钉机器人")},{value:"weWorkBot",label:a.ZP.get("企业微信机器人")},{value:"weWorkApp",label:a.ZP.get("企业微信应用")},{value:"aibotk",label:a.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:a.ZP.get("群晖chat")},{value:"email",label:a.ZP.get("邮箱")},{value:"lark",label:a.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:a.ZP.get("自定义通知")},{value:"closed",label:a.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:a.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:a.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:a.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:a.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:a.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:a.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:a.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:a.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:a.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:a.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:a.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:a.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:a.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:a.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:a.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:a.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:a.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:a.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:a.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:a.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:a.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:a.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:a.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:a.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:a.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:a.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:a.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:a.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:a.ZP.get("请输入要发送的目标"),items:[{value:"room",label:a.ZP.get("群聊")},{value:"contact",label:a.ZP.get("好友")}]},{label:"aibotkName",tip:a.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:a.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:a.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:a.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:a.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:a.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:a.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:a.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:a.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:a.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:a.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:a.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:a.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:a.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:a.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:a.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:a.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":a.ZP.get("登录"),"/initialization":a.ZP.get("初始化"),"/crontab":a.ZP.get("定时任务"),"/env":a.ZP.get("环境变量"),"/subscription":a.ZP.get("订阅管理"),"/config":a.ZP.get("配置文件"),"/script":a.ZP.get("脚本管理"),"/diff":a.ZP.get("对比工具"),"/log":a.ZP.get("日志管理"),"/setting":a.ZP.get("系统设置"),"/error":a.ZP.get("错误日志"),"/dependence":a.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,r){r.d(t,{W:function(){return b}});var a=r(90228),l=r.n(a),i=r(87999),o=r.n(i),n=r(72317),s=r(61508),u=r(33839),p=r(3475),c=r(98783),g=r(69313),d=r(52676);s.ZP.config({duration:2});var P=Date.now(),h=g.Z.create({timeout:6e4,params:{t:P}}),Z=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(p.Z.authKey);return t&&!Z.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(l()().mark((function e(t){var r,a,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}c.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(p.Z.authKey),c.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(a=t.data).code&&(i=a.message||a.data)&&u.Z.error({message:i,description:null!=a&&a.errors?(0,d.jsx)(d.Fragment,{children:null==a?void 0:a.errors.map((function(e){return(0,d.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",a);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,r=e.response.status;if([502,504].includes(r))c.history.push("/error");else if(401===r)"/login"!==c.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(p.Z.authKey),c.history.push("/login"));else{var a,l,i,o;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&u.Z.error({message:t,description:null!==(l=e.response)&&void 0!==l&&null!==(l=l.data)&&void 0!==l&&l.errors?(0,d.jsx)(d.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,d.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var b=h},27916:function(e,t,r){r.d(t,{Z:function(){return i}});var a=r(99459),l=r(75271);function i(){var e=l.useReducer((function(e){return e+1}),0);return(0,a.Z)(e,2)[1]}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6534,9064,8673,440,8851],{44224:function(e,t,a){"use strict";var i=(0,a(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=i},82802:function(e,t,a){"use strict";var i=a(26068),n=a.n(i),r=a(75271);t.Z=function(e,t,a){var i=a.treeNodeFilterProp;return(0,r.useMemo)((function(){var a=[];if(!t)return{treeData:e,keys:a};var r=t.toUpperCase();function o(e,t){var a=t[i];return String(a).toUpperCase().includes(r)}return{treeData:function e(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.map((function(t){var r=t.children,c=i||o(0,t),s=e(r||[],c);return c||s.length?(s.length&&a.push(t.key),n()(n()({},t),{},{children:s})):null})).filter((function(e){return e}))}(e),keys:a}}),[e,t,i])}},68537:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return A}});a(75271);var i=a(63505),n=a(93481),r=a(5418),o=a(81469),c=a(72317),s="container___ddbSX",l="content___r4xW8",u="iconWrapper___djOAE",d="icon___K6vsC",p="message___MzLqV",f="actionArea___Dnv9D",g="button___hI60l",m="warning___mePYd",h="warningIcon___eTSpJ",v=a(52676),A=function(e){var t=e.onForceOpen;return(0,v.jsx)("div",{className:s,children:(0,v.jsxs)("div",{className:l,children:[(0,v.jsx)("div",{className:u,children:(0,v.jsx)(r.Z,{className:d})}),(0,v.jsx)("div",{className:p,children:c.ZP.get("当前文件不支持预览")}),(0,v.jsxs)(i.Z,{direction:"vertical",size:8,className:f,children:[(0,v.jsx)(n.Z,{type:"primary",onClick:t,className:g,children:c.ZP.get("强制打开")}),(0,v.jsxs)("div",{className:m,children:[(0,v.jsx)(o.Z,{className:h}),c.ZP.get("强制打开可能会导致编辑器显示异常")]})]})]})})}},79297:function(e,t,a){"use strict";a.r(t);var i=a(26068),n=a.n(i),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(35181),u=a(53390),d=a(88142),p=a(93481),f=a(16314),g=a(3475),m=a(43382),h=a(83383),v=a(90310),A=a(3843),P=a(9364),b=a(48916),y=a(65814),k=a(78060),Z=a.n(k),x=a(52676),w=l.Z.Option;t.default=function(e){var t=e.treeData,a=e.currentNode,i=e.content,r=e.handleCancel,k=e.visible,j=(0,s.useState)(""),E=o()(j,2),S=E[0],C=E[1],M=(0,s.useState)(),_=o()(M,2),B=_[0],T=_[1],q=(0,s.useState)(),I=o()(q,2),N=I[0],D=I[1],G=(0,s.useState)(),R=o()(G,2),L=R[0],K=R[1],V=(0,s.useState)(!1),F=o()(V,2),H=F[0],W=F[1],O=(0,s.useState)(!1),U=o()(O,2),z=U[0],Y=U[1],Q=(0,s.useState)(""),$=o()(Q,2),X=$[0],J=$[1],ee=(0,P.F)().theme,te=(0,s.useRef)(null),ae=(0,s.useState)(!1),ie=o()(ae,2),ne=ie[0],re=ie[1],oe=(0,s.useState)(null),ce=o()(oe,2),se=ce[0],le=ce[1],ue=function(e){f.W.get("".concat(g.Z.apiPrefix,"scripts/detail?file=").concat(e.title,"&path=").concat(e.parent||"")).then((function(e){var t=e.code,a=e.data;200===t&&C(a)}))},de=function(){N&&N.title&&se&&f.W.put("".concat(g.Z.apiPrefix,"scripts/stop"),{filename:N.title,path:N.parent||"",pid:se}).then((function(e){var t=e.code;e.data;200===t&&re(!1)}))},pe=(0,s.useCallback)((function(e){var t=e.message;(0,b.x$)(t)&&setTimeout((function(){re(!1)}),300),J((function(e){return"".concat(e).concat(t)}))}),[]);return(0,s.useEffect)((function(){var e=y.Z.getInstance();return e.subscribe("manuallyRunScript",pe),function(){e.unsubscribe("manuallyRunScript",pe)}}),[]),(0,s.useEffect)((function(){if(J(""),a){D(a),C(i),K(a.key);var e=(0,b.H$)(a.title);T(e)}}),[i,a]),(0,x.jsxs)(u.Z,{className:"edit-modal",closable:!1,title:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(d.Z,{treeExpandAction:"click",style:{marginRight:8,width:300},value:L,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:t,placeholder:c.ZP.get("请选择脚本文件"),fieldNames:{value:"key",label:"title"},showSearch:!0,onSelect:function(e,t){if(t.key!==L&&e&&"directory"!==t.type){var a=(0,b.H$)(e);D(t),T(a),ue(t),K(t.key)}},treeLine:{showLeafIcon:!0}}),(0,x.jsxs)(l.Z,{value:B,style:{width:110,marginRight:8},onChange:function(e){T(e)},children:[(0,x.jsx)(w,{value:"javascript",children:"javascript"}),(0,x.jsx)(w,{value:"typescript",children:"typescript"}),(0,x.jsx)(w,{value:"shell",children:"shell"}),(0,x.jsx)(w,{value:"python",children:"python"})]}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:ne?de:function(){J("");var e=te.current.getValue().replace(/\r\n/g,"\n");f.W.put("".concat(g.Z.apiPrefix,"scripts/run"),{filename:N.title,path:N.parent||"",content:e}).then((function(e){var t=e.code,a=e.data;200===t&&(re(!0),le(a))}))},children:ne?c.ZP.get("停止"):c.ZP.get("运行")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){J("")},children:c.ZP.get("清空日志")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){W(!0)},children:c.ZP.get("保存")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){de(),r()},children:c.ZP.get("退出")})]}),width:"100%",headerStyle:{padding:"11px 24px"},onClose:function(){r()},open:k,children:[(0,x.jsxs)(m.Z,{split:"vertical",minSize:200,defaultSize:"50%",style:{height:"calc(100vh - 55px)"},pane2Style:{overflowY:"auto"},children:[(0,x.jsx)(h.ZP,{language:B,value:S,theme:ee,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){te.current=e}}),(0,x.jsx)("pre",{style:{padding:"0 15px"},children:(0,x.jsx)(Z(),{children:X})})]}),(0,x.jsx)(v.default,{visible:H,handleCancel:function(){W(!1)},file:n()({content:te.current&&te.current.getValue().replace(/\r\n/g,"\n")},N)}),(0,x.jsx)(A.default,{visible:z,handleCancel:function(){Y(!1)}})]})}},6334:function(e,t,a){"use strict";a.r(t);var i=a(26068),n=a.n(i),r=a(335),o=a.n(r),c=a(90228),s=a.n(c),l=a(87999),u=a.n(l),d=a(48305),p=a.n(d),f=a(72317),g=a(75271),m=a(35181),h=a(72338),v=a(61508),A=a(45520),P=a(94747),b=a(17082),y=a(88142),k=a(6367),Z=a(16314),x=a(3475),w=a(79231),j=a(52676);m.Z.Option;t.default=function(e){var t=e.handleCancel,a=e.treeData,i=e.visible,r=h.Z.useForm(),c=p()(r,1)[0],l=(0,g.useState)(!1),d=p()(l,2),m=d[0],E=d[1],S=(0,g.useState)([]),C=p()(S,2),M=C[0],_=C[1],B=(0,g.useState)(),T=p()(B,2),q=T[0],I=T[1],N=(0,g.useState)("blank"),D=p()(N,2),G=D[0],R=D[1],L=function(){var e=u()(s()().mark((function e(a){var i,n,r,o,c,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:E(!0),i=a.path,n=void 0===i?"":i,r=a.filename,o=a.directory,c=void 0===o?"":o,(l=new FormData).append("file",q||""),l.append("filename",(null==q?void 0:q.name)||r),l.append("path",n),l.append("content",""),l.append("directory",c),Z.W.post("".concat(x.Z.apiPrefix,"scripts"),l).then((function(e){var a=e.code;e.data;if(200===a){v.ZP.success(c?f.ZP.get("创建文件夹成功"):f.ZP.get("创建文件成功"));var i=n?"".concat(n,"/"):"",o=q?q.name:r;t({filename:o,path:n,key:"".concat(i).concat(o)})}E(!1)})).finally((function(){return E(!1)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function e(t){var a,i=o()(t);try{for(i.s();!(a=i.n()).done;){var r=a.value;r.children&&r.children.length>0&&(r.children=r.children.filter((function(e){return"directory"===e.type})).map((function(e){return n()(n()({},e),{},{disabled:!1})})),e(r.children))}}catch(e){i.e(e)}finally{i.f()}return t};return(0,g.useEffect)((function(){var e=a.filter((function(e){return"directory"===e.type})).map((function(e){return n()(n()({},e),{},{disabled:!1})})),t=K(e);_(t)}),[a]),(0,g.useEffect)((function(){c.resetFields()}),[i]),(0,j.jsx)(A.Z,{title:f.ZP.get("创建"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){L(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return t()},confirmLoading:m,children:(0,j.jsxs)(h.Z,{form:c,layout:"vertical",name:"edit_name_modal",children:[(0,j.jsx)(h.Z.Item,{name:"type",label:f.ZP.get("类型"),rules:[{required:!0}],initialValue:"blank",children:(0,j.jsxs)(P.ZP.Group,{onChange:function(e){R(e.target.value)},children:[(0,j.jsx)(P.ZP,{value:"blank",children:f.ZP.get("空文件")}),(0,j.jsx)(P.ZP,{value:"upload",children:f.ZP.get("本地文件")}),(0,j.jsx)(P.ZP,{value:"directory",children:f.ZP.get("文件夹")})]})}),"blank"===G&&(0,j.jsx)(h.Z.Item,{name:"filename",label:f.ZP.get("文件名"),rules:[{required:!0,message:f.ZP.get("请输入文件名")},{validator:function(e,t){return t.includes("/")?Promise.reject(new Error(f.ZP.get("文件名不能包含斜杠"))):Promise.resolve()}}],children:(0,j.jsx)(b.Z,{placeholder:f.ZP.get("请输入文件名")})}),"directory"===G&&(0,j.jsx)(h.Z.Item,{name:"directory",label:f.ZP.get("文件夹名"),rules:[{required:!0,message:f.ZP.get("请输入文件夹名")}],children:(0,j.jsx)(b.Z,{placeholder:f.ZP.get("请输入文件夹名")})}),(0,j.jsx)(h.Z.Item,{label:f.ZP.get("父目录"),name:"path",children:(0,j.jsx)(y.Z,{allowClear:!0,treeData:M,fieldNames:{value:"key",label:"title"},placeholder:f.ZP.get("请选择父目录"),treeDefaultExpandAll:!0})}),"upload"===G&&(0,j.jsx)(h.Z.Item,{label:f.ZP.get("文件"),name:"file",children:(0,j.jsxs)(k.Z.Dragger,{beforeUpload:function(e){return I(e),!1},maxCount:1,children:[(0,j.jsx)("p",{className:"ant-upload-drag-icon",children:(0,j.jsx)(w.Z,{})}),(0,j.jsx)("p",{className:"ant-upload-text",children:f.ZP.get("点击或者拖拽文件到此区域上传")})]})})]})})}},53636:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return J}});var i=a(15558),n=a.n(i),r=a(48305),o=a.n(r),c=a(44224),s=a(82802),l=a(48916),u=a(3475),d=a(16314),p=a(62609),f={frontend:{extensions:[".json5",".vue",".svelte",".astro",".wxss",".pcss",".acss"],patterns:[/\.env\.(local|development|production|test)$/,/\.module\.(css|less|scss|sass)$/,/\.d\.ts$/,/\.config\.(js|ts|json)$/]},miniprogram:{extensions:[".wxml",".wxs",".axml",".sjs",".swan",".ttml",".ttss",".wxl",".qml",".qss",".ksml",".kss"]},devtools:{extensions:[".prisma",".mdx",".swagger",".openapi"]},lock:{filenames:["yarn.lock","pnpm-lock.yaml","package-lock.json","composer.lock","Gemfile.lock","poetry.lock","Cargo.lock"]},noExtension:{filenames:[".dockerignore",".gitignore",".npmignore",".browserslistrc",".czrc",".huskyrc",".lintstagedrc",".nvmrc",".gcloudignore",".htaccess"],patterns:[/^\.env\./]},cicd:{patterns:[/^\.github\/workflows\/.*\.yml$/,/^\.gitlab\/.*\.yml$/,/^\.circleci\/.*\.yml$/]}};function g(e){if(!e)return!1;var t=p.Mj.getLanguages(),a=e.slice(e.lastIndexOf(".")).toLowerCase(),i=e.toLowerCase();return!!t.some((function(e){var t,n;return(null===(t=e.extensions)||void 0===t?void 0:t.includes(a))||(null===(n=e.filenames)||void 0===n?void 0:n.includes(i))}))||Object.values(f).some((function(e){var t,n,r,o,c;return(null===(t=e.extensions)||void 0===t?void 0:t.includes(a))||(null===(n=e.filenames)||void 0===n?void 0:n.includes(i))||(null===(r=e.patterns)||void 0===r?void 0:r.some((function(e){return e.test(i)})))||(null===(o=e.startsWith)||void 0===o?void 0:o.some((function(e){return i.startsWith(e)})))||(null===(c=e.endsWith)||void 0===c?void 0:c.some((function(e){return i.endsWith(e)})))}))}var m=a(21288),h=a(28423),v=a(88939),A=a(97953),P=a(30769),b=a(47508),y=a(83383),k=a(82904),Z=a(71742),x=a(98783),w=a(50691),j=a(45520),E=a(61508),S=a(88142),C=a(85950),M=a(93481),_=a(59816),B=a(17082),T=a(13107),q=a(98705),I=a(87105),N=a(66292),D=a.n(N),G=a(4363),R=a.n(G),L=a(79514),K=a(40324),V=a(75271),F=a(28837),H=a(72317),W=a(43382),O=a(79297),U=a(6334),z={"left-tree-container":"left-tree-container___z9VeF","left-tree-scroller":"left-tree-scroller___MRc8C","log-container":"log-container___Iva4k"},Y=a(97428),Q=a(68537),$=a(52676),X=w.Z.Text,J=function(){var e=(0,x.useOutletContext)(),t=e.headerStyle,a=e.isPhone,i=e.theme,r=(0,V.useState)(H.ZP.get("请选择脚本文件")),p=o()(r,2),f=p[0],w=p[1],N=(0,V.useState)(H.ZP.get("请选择脚本文件")),G=o()(N,2),J=G[0],ee=G[1],te=(0,V.useState)([]),ae=o()(te,2),ie=ae[0],ne=ae[1],re=(0,V.useState)(!1),oe=o()(re,2),ce=oe[0],se=oe[1],le=(0,V.useState)(""),ue=o()(le,2),de=ue[0],pe=ue[1],fe=(0,V.useState)(),ge=o()(fe,2),me=ge[0],he=ge[1],ve=(0,V.useRef)(),Ae=(0,V.useState)(!1),Pe=o()(Ae,2),be=Pe[0],ye=Pe[1],ke=(0,V.useState)(""),Ze=o()(ke,2),xe=Ze[0],we=Ze[1],je=(0,V.useState)(!1),Ee=o()(je,2),Se=Ee[0],Ce=Ee[1],Me=(0,V.useRef)(null),_e=(0,V.useState)(!1),Be=o()(_e,2),Te=Be[0],qe=Be[1],Ie=(0,V.useState)(!1),Ne=o()(Ie,2),De=Ne[0],Ge=Ne[1],Re=(0,V.useState)(),Le=o()(Re,2),Ke=Le[0],Ve=Le[1],Fe=(0,V.useState)([]),He=o()(Fe,2),We=He[0],Oe=He[1],Ue=(0,V.useState)(!0),ze=o()(Ue,2),Ye=ze[0],Qe=ze[1],$e=function(e,t){Ce(t&&g(e))},Xe=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&se(!0),d.W.get("".concat(u.Z.apiPrefix,"scripts")).then((function(e){var t=e.code,a=e.data;200===t&&(ne(a),gt(),et(a))})).finally((function(){return e&&se(!1)}))},Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d.W.get("".concat(u.Z.apiPrefix,"scripts/detail?file=").concat(encodeURIComponent(e.title),"&path=").concat(e.parent||"")).then((function(e){var a=e.code,i=e.data;200===a&&(w(i),t.callback&&t.callback())}))},et=function(e){var t=(0,K.parse)(x.history.location.search),a=t.p,i=t.s;if(i){var n="".concat(a,"/").concat(i),r={node:{title:i,key:a?n:i,parent:a}},o=(0,l.DY)(e,(function(e){return e.key===r.node.key}));o&&(r.node=o,Oe([a]),at([n],r))}},tt=function(e,t){if(t.key!==J&&e){if(ee(t.key),Ve(t),"directory"===t.type)return w(H.ZP.get("请选择脚本文件")),void Qe(!0);if(g(t.title)){Qe(!0);var i=(0,l.H$)(e);pe(a&&"typescript"===i?"javascript":i),w(H.ZP.get("加载中...")),Je(t,{callback:function(){Se&&Ce(!0)}})}else Qe(!1)}},at=(0,V.useCallback)((function(e,t){t.node.key===J&&Se||((Me.current?Me.current.getValue().replace(/\r\n/g,"\n"):f)!==f.replace(/\r\n/g,"\n")&&Se?j.Z.confirm({title:H.ZP.get("确认离开"),content:(0,$.jsx)($.Fragment,{children:H.ZP.get("当前文件未保存,确认离开吗")}),onOk:function(){tt(e[0],t.node),$e(t.node.title,!1)}}):($e(t.node.title,!1),tt(e[0],t.node)))}),[f,J,Se]),it=(0,V.useCallback)((function(e){var t=e.target.value;nt(t)}),[ie]),nt=(0,V.useCallback)(D()((function(e){we(e)}),300),[ie]),rt=(0,s.Z)(ie,xe,{treeNodeFilterProp:"title"}),ot=rt.treeData,ct=rt.keys;(0,V.useEffect)((function(){Oe(R()([].concat(n()(We),n()(ct))))}),[ct]);var st=function(){setTimeout((function(){$e(Ke.title,!0)}),300)},lt=function(){$e(Ke.title,!1),w(H.ZP.get("加载中...")),Je(Ke)},ut=function(){j.Z.confirm({title:"确认保存",content:(0,$.jsxs)($.Fragment,{children:[H.ZP.get("确认保存文件"),(0,$.jsxs)(X,{style:{wordBreak:"break-all"},type:"warning",children:[" ",Ke.title]}),H.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=Me.current?Me.current.getValue().replace(/\r\n/g,"\n"):f;return new Promise((function(t,a){d.W.put("".concat(u.Z.apiPrefix,"scripts"),{filename:Ke.title,path:Ke.parent||"",content:e}).then((function(a){var i=a.code;a.data;200===i&&(E.ZP.success("保存成功"),w(e),$e(Ke.title,!1)),t(null)})).catch((function(e){return a(e)}))}))}})},dt=function(){j.Z.confirm({title:"确认删除",content:(0,$.jsxs)($.Fragment,{children:[H.ZP.get("确认删除"),(0,$.jsxs)(X,{style:{wordBreak:"break-all"},type:"warning",children:[" ",J," "]}),H.ZP.get("文件"),"directory"===Ke.type?H.ZP.get("夹及其子文件"):"",H.ZP.get(",删除后不可恢复")]}),onOk:function(){d.W.delete("".concat(u.Z.apiPrefix,"scripts"),{data:{filename:Ke.title,path:Ke.parent||"",type:Ke.type}}).then((function(e){if(200===e.code){E.ZP.success("删除成功");var t=n()(ie);if(Ke.parent)t=(0,l.I1)(t,(function(e){return e.key===Ke.key}));else{var a=t.findIndex((function(e){return e.key===Ke.key}));-1!==a&&t.splice(a,1)}ne(t),gt()}}))}})},pt=function(){Ge(!0)},ft=function(){qe(!0)},gt=function(){ee(H.ZP.get("请选择脚本文件")),Ve(null),w(H.ZP.get("请选择脚本文件"))};(0,V.useEffect)((function(){Xe()}),[]),(0,V.useEffect)((function(){ve.current&&he(ve.current.clientHeight-6)}),[ve.current,ie]),(0,F.y1)("mod+s",(function(e){Se&&ut()}),{enableOnFormTags:["textarea"],preventDefault:!0}),(0,F.y1)("mod+d",(function(e){Ke.title&&dt()}),{preventDefault:!0}),(0,F.y1)("mod+o",(function(e){Se||ft()}),{preventDefault:!0}),(0,F.y1)("mod+e",(function(e){Ke.title&&lt()}),{preventDefault:!0});var mt=Se?{items:[{label:H.ZP.get("保存"),key:"save",icon:(0,$.jsx)(m.Z,{})},{label:H.ZP.get("退出编辑"),key:"exit",icon:(0,$.jsx)(h.Z,{})}],onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"save":ut();break;case"exit":lt()}}(t)}}:{items:[{label:H.ZP.get("创建"),key:"add",icon:(0,$.jsx)(m.Z,{})},{label:H.ZP.get("编辑"),key:"edit",icon:(0,$.jsx)(h.Z,{}),disabled:!Ke},{label:H.ZP.get("重命名"),key:"rename",icon:(0,$.jsx)(c.Z,{type:"ql-icon-rename"}),disabled:!Ke},{label:H.ZP.get("删除"),key:"delete",icon:(0,$.jsx)(v.Z,{}),disabled:!Ke}],onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"add":ft();break;case"edit":st();break;case"delete":dt();break;case"rename":pt()}}(t)}};return(0,$.jsx)(b.ZP,{className:"ql-container-wrapper log-wrapper",title:(0,$.jsxs)($.Fragment,{children:[J,"file"===(null==Ke?void 0:Ke.type)&&(0,$.jsx)("span",{style:{marginLeft:6,fontSize:12,color:"#999",display:"inline-block",height:14},children:(0,L.Z)(Ke.size)})]}),loading:ce,extra:a?[(0,$.jsx)(S.Z,{treeExpandAction:"click",className:"log-select",value:J,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:ie,placeholder:H.ZP.get("请选择脚本"),fieldNames:{value:"key"},treeNodeFilterProp:"title",showSearch:!0,allowClear:!0,onSelect:tt}),(0,$.jsx)(C.Z,{menu:mt,trigger:["click"],children:(0,$.jsx)(M.Z,{type:"primary",icon:(0,$.jsx)(A.Z,{})})})]:Se?[(0,$.jsx)(M.Z,{type:"primary",onClick:ut,children:H.ZP.get("保存")}),(0,$.jsx)(M.Z,{type:"primary",onClick:lt,children:H.ZP.get("退出编辑")})]:[(0,$.jsx)(_.Z,{title:H.ZP.get("创建"),children:(0,$.jsx)(M.Z,{type:"primary",onClick:ft,icon:(0,$.jsx)(m.Z,{})})}),(0,$.jsx)(_.Z,{title:H.ZP.get("编辑"),children:(0,$.jsx)(M.Z,{disabled:!Ke,type:"primary",onClick:st,icon:(0,$.jsx)(h.Z,{})})}),(0,$.jsx)(_.Z,{title:H.ZP.get("重命名"),children:(0,$.jsx)(M.Z,{disabled:!Ke,type:"primary",onClick:pt,icon:(0,$.jsx)(c.Z,{type:"ql-icon-rename"})})}),(0,$.jsx)(_.Z,{title:H.ZP.get("下载"),children:(0,$.jsx)(M.Z,{disabled:!Ke||"directory"===Ke.type,type:"primary",onClick:function(){d.W.post("".concat(u.Z.apiPrefix,"scripts/download"),{filename:Ke.title,path:Ke.parent||""},{responseType:"blob"}).then((function(e){(0,I.saveAs)(e,Ke.title)}))},icon:(0,$.jsx)(P.Z,{})})}),(0,$.jsx)(_.Z,{title:H.ZP.get("删除"),children:(0,$.jsx)(M.Z,{type:"primary",disabled:!Ke,onClick:dt,icon:(0,$.jsx)(v.Z,{})})}),(0,$.jsx)(M.Z,{type:"primary",onClick:function(){ye(!0)},children:H.ZP.get("调试")})],header:{style:t},children:(0,$.jsxs)("div",{className:"".concat(z["log-container"]," log-container"),children:[!a&&(0,$.jsxs)(W.Z,{split:"vertical",size:200,maxSize:-100,children:[(0,$.jsx)("div",{className:z["left-tree-container"],children:ie.length>0?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(B.Z.Search,{className:z["left-tree-search"],onChange:it,placeholder:H.ZP.get("请输入脚本名"),allowClear:!0}),(0,$.jsx)("div",{className:z["left-tree-scroller"],ref:ve,children:(0,$.jsx)(T.Z,{expandAction:"click",className:z["left-tree"],treeData:ot,showIcon:!0,height:me,selectedKeys:[J],expandedKeys:We,onExpand:function(e){Oe(e)},showLine:{showLeafIcon:!0},onSelect:at,onDoubleClick:function(e,t){"file"===t.type&&(ee(t.key),Ve(t),$e(t.title,!0))}})})]}):(0,$.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,$.jsx)(q.Z,{description:H.ZP.get("暂无脚本"),image:q.Z.PRESENTED_IMAGE_SIMPLE})})}),Ye?(0,$.jsx)(y.ZP,{language:de,value:f,theme:i,options:{readOnly:!Se,fontSize:12,lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){Me.current=e}}):(0,$.jsx)(Q.default,{filename:(null==Ke?void 0:Ke.title)||"",onForceOpen:function(){Ke&&(pe("plaintext"),w(H.ZP.get("加载中...")),Qe(!0),Je(Ke,{callback:function(){Ce(!0)}}))}})]}),a&&(0,$.jsx)(Z.ZP,{value:f,extensions:de?[k.RI[de]()]:void 0,theme:i.includes("dark")?"dark":"light",readOnly:!Se,onChange:function(e){w(e)}}),be&&(0,$.jsx)(O.default,{visible:be,treeData:ie,currentNode:Ke,content:f,handleCancel:function(){ye(!1)}}),(0,$.jsx)(U.default,{visible:Te,treeData:ie,handleCancel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{filename:"",path:"",key:""},t=e.filename,a=e.path,i=e.key;if(t){var r=n()(ie),o={title:t,key:i,parent:a};if(a){r=(0,l.I1)(r,(function(e){return e.key===a}),o);var c=a.split("/"),s=[];c.reduce((function(e,t){return s.push(e),"".concat(e,"/").concat(t)})),Oe([].concat(n()(We),s,[a]))}else r.unshift(o);ne(r),tt(o.title,o),$e(o.title,!0)}qe(!1)}}),(0,$.jsx)(Y.default,{visible:De,handleCancel:function(){Ge(!1),Xe(!1)},currentNode:Ke})]})})}},97428:function(e,t,a){"use strict";a.r(t);var i=a(90228),n=a.n(i),r=a(87999),o=a.n(r),c=a(48305),s=a.n(c),l=a(72317),u=a(75271),d=a(72338),p=a(61508),f=a(45520),g=a(17082),m=a(16314),h=a(3475),v=a(52676);t.default=function(e){var t=e.currentNode,a=e.handleCancel,i=e.visible,r=d.Z.useForm(),c=s()(r,1)[0],A=(0,u.useState)(!1),P=s()(A,2),b=P[0],y=P[1],k=function(){var e=o()(n()().mark((function e(i){var r,o;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.prev=1,e.next=4,m.W.put("".concat(h.Z.apiPrefix,"scripts/rename"),{filename:t.title,path:t.parent||"",newFilename:i.name});case 4:r=e.sent,o=r.code,r.data,200===o&&(p.ZP.success(l.ZP.get("更新名称成功")),a()),y(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),y(!1);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}();return(0,u.useEffect)((function(){c.resetFields()}),[t,i]),(0,v.jsx)(f.Z,{title:l.ZP.get("重命名"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:b,children:(0,v.jsx)(d.Z,{form:c,initialValues:{name:null==t?void 0:t.title},layout:"vertical",name:"edit_name_modal",children:(0,v.jsx)(d.Z.Item,{name:"name",rules:[{required:!0,message:l.ZP.get("请输入新名称")}],children:(0,v.jsx)(g.Z,{placeholder:l.ZP.get("请输入新名称")})})})})}},90310:function(e,t,a){"use strict";a.r(t);var i=a(90228),n=a.n(i),r=a(26068),o=a.n(r),c=a(87999),s=a.n(c),l=a(48305),u=a.n(l),d=a(72317),p=a(75271),f=a(72338),g=a(61508),m=a(45520),h=a(17082),v=a(16314),A=a(3475),P=a(52676);t.default=function(e){var t=e.file,a=e.handleCancel,i=e.visible,r=f.Z.useForm(),c=u()(r,1)[0],l=(0,p.useState)(!1),b=u()(l,2),y=b[0],k=b[1],Z=function(){var e=s()(n()().mark((function e(i){var r;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k(!0),r=o()(o()(o()({},t),i),{},{originFilename:t.title}),v.W.post("".concat(A.Z.apiPrefix,"scripts"),r).then((function(e){var t=e.code,i=e.data;200===t&&(g.ZP.success(d.ZP.get("保存文件成功")),a(i))})).finally((function(){k(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){c.resetFields(),k(!1)}),[t,i]),(0,P.jsx)(m.Z,{title:d.ZP.get("保存文件"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){Z(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:y,children:(0,P.jsxs)(f.Z,{form:c,layout:"vertical",name:"script_modal",initialValues:{filename:null==t?void 0:t.title,path:(null==t?void 0:t.parent)||""},children:[(0,P.jsx)(f.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")}],children:(0,P.jsx)(h.Z,{placeholder:d.ZP.get("请输入文件名")})}),(0,P.jsx)(f.Z.Item,{name:"path",label:d.ZP.get("保存目录"),children:(0,P.jsx)(h.Z,{placeholder:d.ZP.get("请输入保存目录,默认scripts目录")})})]})})}},3843:function(e,t,a){"use strict";a.r(t);a(90228),a(26068),a(87999);var i=a(48305),n=a.n(i),r=a(72317),o=a(75271),c=a(72338),s=(a(61508),a(45520)),l=a(17082),u=(a(16314),a(3475),a(52676));t.default=function(e){var t=e.file,a=e.handleCancel,i=e.visible,d=c.Z.useForm(),p=n()(d,1)[0],f=(0,o.useState)(!1),g=n()(f,2),m=(g[0],g[1]);return(0,o.useEffect)((function(){p.resetFields(),m(!1)}),[t,i]),(0,u.jsx)(s.Z,{title:r.ZP.get("运行设置"),open:i,forceRender:!0,centered:!0,onCancel:function(){return a()},children:(0,u.jsx)(c.Z,{form:p,layout:"vertical",name:"setting_modal",initialValues:t,children:(0,u.jsx)(c.Z.Item,{name:"filename",label:r.ZP.get("待开发"),rules:[{required:!0,message:r.ZP.get("待开发")}],children:(0,u.jsx)(l.Z,{placeholder:r.ZP.get("待开发")})})})})}},3475:function(e,t,a){"use strict";var i=a(72317),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:i.ZP.get("青龙"),baseUrl:n,apiPrefix:"".concat(n,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:i.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:i.ZP.get("定时任务"),value:"crons"},{name:i.ZP.get("环境变量"),value:"envs"},{name:i.ZP.get("订阅管理"),value:"subscriptions"},{name:i.ZP.get("配置文件"),value:"configs"},{name:i.ZP.get("脚本管理"),value:"scripts"},{name:i.ZP.get("日志管理"),value:"logs"},{name:i.ZP.get("依赖管理"),value:"dependencies"},{name:i.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:i.ZP.get("定时任务"),envs:i.ZP.get("环境变量"),subscriptions:i.ZP.get("订阅管理"),configs:i.ZP.get("配置文件"),scripts:i.ZP.get("脚本管理"),logs:i.ZP.get("日志管理"),dependencies:i.ZP.get("依赖管理"),system:i.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:i.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:i.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:i.ZP.get("钉钉机器人")},{value:"weWorkBot",label:i.ZP.get("企业微信机器人")},{value:"weWorkApp",label:i.ZP.get("企业微信应用")},{value:"aibotk",label:i.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:i.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:i.ZP.get("群晖chat")},{value:"email",label:i.ZP.get("邮箱")},{value:"lark",label:i.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:i.ZP.get("自定义通知")},{value:"closed",label:i.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:i.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:i.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:i.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:i.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:i.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:i.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:i.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:i.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:i.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:i.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:i.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:i.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:i.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:i.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:i.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:i.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:i.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:i.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:i.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:i.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:i.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:i.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:i.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:i.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:i.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:i.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:i.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:i.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:i.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:i.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:i.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:i.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:i.ZP.get("请输入要发送的目标"),items:[{value:"room",label:i.ZP.get("群聊")},{value:"contact",label:i.ZP.get("好友")}]},{label:"aibotkName",tip:i.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:i.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:i.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:i.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:i.ZP.get("发送模板")},{label:"pushplusChannel",tip:i.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:i.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:i.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:i.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:i.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:i.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:i.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:i.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:i.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:i.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:i.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:i.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:i.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:i.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:i.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:i.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:i.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:i.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:i.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:i.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:i.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:i.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:i.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:i.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":i.ZP.get("登录"),"/initialization":i.ZP.get("初始化"),"/crontab":i.ZP.get("定时任务"),"/env":i.ZP.get("环境变量"),"/subscription":i.ZP.get("订阅管理"),"/config":i.ZP.get("配置文件"),"/script":i.ZP.get("脚本管理"),"/diff":i.ZP.get("对比工具"),"/log":i.ZP.get("日志管理"),"/setting":i.ZP.get("系统设置"),"/error":i.ZP.get("错误日志"),"/dependence":i.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},97302:function(e,t,a){"use strict";a.d(t,{eY:function(){return i},um:function(){return n},z:function(){return r}});var i="     ",n={".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"]},9364:function(e,t,a){"use strict";a.d(t,{F:function(){return s},e:function(){return c}});var i=a(48305),n=a.n(i),r=a(75271),o=a(48916),c=function(){var e=(0,r.useState)("100%"),t=n()(e,2),a=t[0],i=t[1],c=(0,r.useState)(0),s=n()(c,2),l=s[0],u=s[1],d=(0,r.useState)(-48),p=n()(d,2),f=p[0],g=p[1],m=(0,r.useState)(!1),h=n()(m,2),v=h[0],A=h[1],P=(0,r.useMemo)((function(){return(0,o.ZP)()}),[]).platform;return(0,r.useEffect)((function(){"mobile"===P&&document.body.offsetWidth<768?(i("auto"),u(0),g(0),A(!0),document.body.setAttribute("data-mode","phone")):(i("100%"),u(0),g(-48),A(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:f,width:a,marginLeft:l},isPhone:v}},s=function(){var e=(0,r.useState)(),t=n()(e,2),a=t[0],i=t[1];return(0,r.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),a=e.matches&&"light"!==t||"dark"===t;i(a?"vs-dark":"vs");var n=function(e){"auto"!==t&&t||(e.matches?i("vs-dark"):i("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",n):"function"==typeof e.addListener&&e.addListener(n)}),[]),{theme:a,reloadTheme:function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),a=e.matches&&"light"!==t||"dark"===t;i(a?"vs-dark":"vs")}}}},16314:function(e,t,a){"use strict";a.d(t,{W:function(){return v}});var i=a(90228),n=a.n(i),r=a(87999),o=a.n(r),c=a(72317),s=a(61508),l=a(33839),u=a(3475),d=a(98783),p=a(69313),f=a(52676);s.ZP.config({duration:2});var g=Date.now(),m=p.Z.create({timeout:6e4,params:{t:g}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];m.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),m.interceptors.response.use(function(){var e=o()(n()().mark((function e(t){var a,i,r;return n()().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!==(i=t.data).code&&(r=i.message||i.data)&&l.Z.error({message:r,description:null!=i&&i.errors?(0,f.jsx)(f.Fragment,{children:null==i?void 0:i.errors.map((function(e){return(0,f.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",i);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&&(s.ZP.error(c.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var i,n,r,o;if("function"==typeof(null===(i=e.config)||void 0===i?void 0:i.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&l.Z.error({message:t,description:null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&n.errors?(0,f.jsx)(f.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,f.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var v=m},48916:function(e,t,a){"use strict";a.d(t,{DY:function(){return f},FA:function(){return m},H$:function(){return A},I1:function(){return p},W9:function(){return u},ZP:function(){return l},o4:function(){return P},rS:function(){return v},w7:function(){return d},x$:function(){return g}});var i=a(15558),n=a.n(i),r=a(72317),o=a(97302),c=a(94046),s=a.n(c);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,".")},i="unknow";t(/windows|win32|win64|wow32|wow64/g)?i="windows":t(/macintosh|macintel/g)?i="macos":t(/x11/g)?i="linux":t(/android|adr/g)?i="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios");var n="unknow";"windows"===i?t(/windows nt 5.0|windows 2000/g)?n="2000":t(/windows nt 5.1|windows xp/g)?n="xp":t(/windows nt 5.2|windows 2003/g)?n="2003":t(/windows nt 6.0|windows vista/g)?n="vista":t(/windows nt 6.1|windows 7/g)?n="7":t(/windows nt 6.2|windows 8/g)?n="8":t(/windows nt 6.3|windows 8.1/g)?n="8.1":t(/windows nt 10.0|windows 10/g)&&(n="10"):"macos"===i?n=a(/os x [\d._]+/g):"android"===i?n=a(/android [\d._]+/g):"ios"===i&&(n=a(/os [\d._]+/g));var r="unknow";"windows"===i||"macos"===i||"linux"===i?r="desktop":("android"===i||"ios"===i||t(/mobile/g))&&(r="mobile");var o="unknow",c="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?c="edge":t(/opr/g)?c="opera":t(/chrome/g)?c="chrome":t(/safari/g)&&(c="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",c="firefox"):t(/presto/g)?(o="presto",c="opera"):t(/trident|compatible|msie/g)&&(o="trident",c="iexplore");var s="unknow";"webkit"===o?s=a(/applewebkit\/[\d._]+/g):"gecko"===o?s=a(/gecko\/[\d._]+/g):"presto"===o?s=a(/presto\/[\d._]+/g):"trident"===o&&(s=a(/trident\/[\d._]+/g));var l="unknow";"chrome"===c?l=a(/chrome\/[\d._]+/g):"safari"===c?l=a(/version\/[\d._]+/g):"firefox"===c?l=a(/firefox\/[\d._]+/g):"opera"===c?l=a(/opr\/[\d._]+/g):"iexplore"===c?l=a(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===c&&(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:s,platform:r,supporter:c,supporterVs:l,system:i,systemVs:n},"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 i=null,n=0;(i=a||document.querySelector(".ant-table-wrapper"))&&(n=i.getBoundingClientRect().top);var r=document.body.clientHeight-n-t;return r}function d(e,t){var a,i,n=window.URL||window.webkitURL||window,r=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=n.createObjectURL(r),o.download=e,a=o,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(i)}function p(e,t,a){var i=n()(e),r=[];return function e(i){if(i)for(var n=0;n<(null==i?void 0:i.length);n++){if(t(i[n]))return a?void(i[n].children?i[n].children.unshift(a):i[n].children=[a]):void i.splice(n,1);i[n].children&&(r.push(i[n].key),e(i[n].children))}}(i),i}function f(e,t){var a;return function e(i){if(i)for(var n=0;n<(null==i?void 0:i.length);n++)t(i[n])?a=i[n]:i[n].children&&e(i[n].children)}(n()(e)),a}function g(e){return[o.eY,r.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function m(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 i,n,r="".concat(window.__ENV__QL_DIR,"/data/scripts");a.startsWith(r)&&(a=a.replace(r,""));var o=a.lastIndexOf("/");return o>=0?(n=a.slice(o+1),i=a.slice(0,o)):(n=a,i=""),[n,i]}}function h(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function v(e,t){var a=h(e);return null!=t&&t.length&&t.forEach((function(e){var t=h(e.schedule);t&&(!a||t<a)&&(a=t)})),a}function A(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o.um[t]}function P(){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 i=a(15558),n=a.n(i),r=a(67825),o=a.n(r),c=a(90228),s=a.n(c),l=a(87999),u=a.n(l),d=a(25298),p=a.n(d),f=a(17069),g=a.n(f),m=a(82092),h=a.n(m),v=a(78078),A=a.n(v),P=["type"],b=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,e),h()(this,"url",void 0),h()(this,"socket",null),h()(this,"subscriptions",new Map),h()(this,"options",void 0),h()(this,"reconnectAttempts",0),h()(this,"heartbeatTimeout",null),h()(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 g()(e,[{key:"init",value:(a=u()(s()().mark((function e(){var t=this;return s()().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(A())(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()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===A().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 i={action:"subscribe",topic:e};this.send(i)}}},{key:"unsubscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(a.has(t)){a.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)===A().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,a=o()(e,P),i=this.subscriptions.get(t)||new Set;n()(i).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)===A().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}();h()(b,"instance",null),t.Z=b},50810:function(){}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6877],{53626:function(e,t,r){"use strict";r.r(t);var n=r(26068),o=r.n(n),i=r(48305),a=r.n(i),s=r(72317),u=r(75271),l=r(72338),c=r(61508),p=r(17082),h=r(93481),f=r(3475),d=r(16314),g=(r(68251),r(78060)),v=r.n(g),b=r(19334),y=r.n(b),P=r(65814),x=r(52676),m={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,u.useState)(),t=a()(e,2),r=t[0],n=t[1],i=l.Z.useForm(),g=a()(i,1)[0],b=(0,u.useState)(""),Z=a()(b,2),k=Z[0],w=Z[1],_=(0,u.useState)(!1),q=a()(_,2),B=q[0],C=q[1],j=function(e){C(!0),w("in progress...\n"),d.W.put("".concat(f.Z.apiPrefix,"system/config/").concat(e),y()(r,m[e])).then((function(e){})).catch((function(){C(!1),w((function(e){return"".concat(e,"update mirror error")}))}))},S=function(e){C(!0),w(""),d.W.put("".concat(f.Z.apiPrefix,"system/config/").concat(e),y()(r,m[e])).then((function(e){var t=e.code;e.data;200===t&&c.ZP.success(s.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return C(!1)}))},T=function(e){var t=e.message;w((function(e){return"".concat(e).concat(t)})),(t.includes("update node mirror end")||t.includes("update linux mirror end"))&&C(!1)};return(0,u.useEffect)((function(){var e=P.Z.getInstance();return e.subscribe("updateNodeMirror",T),e.subscribe("updateLinuxMirror",T),function(){e.subscribe("updateNodeMirror",T),e.unsubscribe("updateLinuxMirror",T)}}),[]),(0,u.useEffect)((function(){d.W.get("".concat(f.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,r=e.data;200===t&&r.info&&n(r.info)})).catch((function(e){console.log(e)}))}),[]),(0,x.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,x.jsxs)(l.Z,{layout:"vertical",form:g,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)(p.Z.Group,{compact:!0,children:[(0,x.jsx)(p.Z,{placeholder:"http://1.1.1.1:8080",style:{width:250},value:null==r?void 0:r.dependenceProxy,onChange:function(e){n(o()(o()({},r),{},{dependenceProxy:e.target.value}))}}),(0,x.jsx)(h.Z,{type:"primary",loading:B,onClick:function(){S("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)(p.Z.Group,{compact:!0,children:[(0,x.jsx)(p.Z,{style:{width:250},placeholder:"https://registry.npmmirror.com",value:null==r?void 0:r.nodeMirror,onChange:function(e){n(o()(o()({},r),{},{nodeMirror:e.target.value}))}}),(0,x.jsx)(h.Z,{type:"primary",loading:B,onClick:function(){j("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)(p.Z.Group,{compact:!0,children:[(0,x.jsx)(p.Z,{style:{width:250},placeholder:"https://pypi.doubanio.com/simple/",value:null==r?void 0:r.pythonMirror,onChange:function(e){n(o()(o()({},r),{},{pythonMirror:e.target.value}))}}),(0,x.jsx)(h.Z,{type:"primary",loading:B,onClick:function(){S("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)(p.Z.Group,{compact:!0,children:[(0,x.jsx)(p.Z,{style:{width:250},placeholder:"http://mirrors.aliyun.com",value:null==r?void 0:r.linuxMirror,onChange:function(e){n(o()(o()({},r),{},{linuxMirror:e.target.value}))}}),(0,x.jsx)(h.Z,{type:"primary",loading:B,onClick:function(){j("linux-mirror")},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)(v(),{children:k})})]})}},3475:function(e,t,r){"use strict";var n=r(72317),o=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:o,apiPrefix:"".concat(o,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:n.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},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:"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("推送消息的优先级")}],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}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],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}],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("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,r){"use strict";r.d(t,{W:function(){return b}});var n=r(90228),o=r.n(n),i=r(87999),a=r.n(i),s=r(72317),u=r(61508),l=r(33839),c=r(3475),p=r(98783),h=r(69313),f=r(52676);u.ZP.config({duration:2});var d=Date.now(),g=h.Z.create({timeout:6e4,params:{t:d}}),v=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];g.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!v.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),g.interceptors.response.use(function(){var e=a()(o()().mark((function e(t){var r,n,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(i=n.message||n.data)&&l.Z.error({message:i,description:null!=n&&n.errors?(0,f.jsx)(f.Fragment,{children:null==n?void 0:n.errors.map((function(e){return(0,f.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,r=e.response.status;if([502,504].includes(r))p.history.push("/error");else if(401===r)"/login"!==p.history.location.pathname&&(u.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),p.history.push("/login"));else{var n,o,i,a;if("function"==typeof(null===(n=e.config)||void 0===n?void 0:n.onError))return null===(a=e.config)||void 0===a?void 0:a.onError(e.response);t&&l.Z.error({message:t,description:null!==(o=e.response)&&void 0!==o&&null!==(o=o.data)&&void 0!==o&&o.errors?(0,f.jsx)(f.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,f.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var b=g},65814:function(e,t,r){"use strict";var n=r(15558),o=r.n(n),i=r(67825),a=r.n(i),s=r(90228),u=r.n(s),l=r(87999),c=r.n(l),p=r(25298),h=r.n(p),f=r(17069),d=r.n(f),g=r(82092),v=r.n(g),b=r(78078),y=r.n(b),P=["type"],x=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(this,e),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=t,this.options={maxReconnectAttempts:r.maxReconnectAttempts||5,reconnectInterval:r.reconnectInterval||3e3,heartbeatInterval:r.heartbeatInterval||3e4},this.init()}var t,r;return d()(e,[{key:"init",value:(r=c()(u()().mark((function e(){var t=this;return u()().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(y())(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 r.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 r=JSON.parse(t.data);e.dispatchMessage(r)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=c()(u()().mark((function e(){var t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().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 r=this.subscriptions.get(e)||new Set;if(!r.has(t)){r.add(t),this.subscriptions.set(e,r);var n={action:"subscribe",topic:e};this.send(n)}}},{key:"unsubscribe",value:function(e,t){var r=this.subscriptions.get(e)||new Set;if(r.has(t)){r.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)===y().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,r=a()(e,P),n=this.subscriptions.get(t)||new Set;o()(n).forEach((function(e){return e(r)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===y().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]:"",r=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,r)),e.instance}}]),e}();v()(x,"instance",null),t.Z=x},68251:function(){},43541:function(e,t,r){"use strict";r.d(t,{fk:function(){return a},jD:function(){return i}});var n,o=r(71254),i=function(){return(0,o.Z)()&&window.document.documentElement},a=function(){if(!i())return!1;if(void 0!==n)return n;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),n=1===e.scrollHeight,document.body.removeChild(e),n}},88987:function(e,t,r){var n=r(71519),o=r(82999),i=r(76111),a=r(50506),s=r(80845);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},175:function(e,t,r){var n=r(2173),o=r(33752),i=r(10548),a=r(63410),s=r(3564);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},35922:function(e,t,r){var n=r(47758)(r(29165),"Map");e.exports=n},9440:function(e,t,r){var n=r(7140),o=r(56504),i=r(88833),a=r(80953),s=r(70724);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},93501:function(e){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},28486:function(e){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},93719:function(e,t,r){var n=r(30404),o=r(42448),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},62718:function(e,t,r){var n=r(42448);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},30404:function(e,t,r){var n=r(34082);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},98768:function(e,t,r){var n=r(28486),o=r(89465);e.exports=function e(t,r,i,a,s){var u=-1,l=t.length;for(i||(i=o),s||(s=[]);++u<l;){var c=t[u];r>0&&i(c)?r>1?e(c,r-1,i,a,s):n(s,c):a||(s[s.length]=c)}return s}},97499:function(e,t,r){var n=r(60399),o=r(77817);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},71664:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},84742:function(e,t,r){var n=r(80732),o=r(55073);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},58939:function(e,t,r){var n=r(92042),o=r(90654),i=r(36838),a=r(51059),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:s).test(a(e))}},54822:function(e,t,r){var n=r(32648),o=r(28281);e.exports=function(e,t){return n(e,t,(function(t,r){return o(e,r)}))}},32648:function(e,t,r){var n=r(97499),o=r(85713),i=r(60399);e.exports=function(e,t,r){for(var a=-1,s=t.length,u={};++a<s;){var l=t[a],c=n(e,l);r(c,l)&&o(u,i(l,e),c)}return u}},85713:function(e,t,r){var n=r(93719),o=r(60399),i=r(91010),a=r(36838),s=r(77817);e.exports=function(e,t,r,u){if(!a(e))return e;for(var l=-1,c=(t=o(t,e)).length,p=c-1,h=e;null!=h&&++l<c;){var f=s(t[l]),d=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=p){var g=h[f];void 0===(d=u?u(g,f,h):void 0)&&(d=a(g)?g:i(t[l+1])?[]:{})}n(h,f,d),h=h[f]}return e}},56447:function(e,t,r){var n=r(64806),o=r(34082),i=r(48148),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},60399:function(e,t,r){var n=r(24669),o=r(2610),i=r(77057),a=r(8389);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},36633:function(e,t,r){var n=r(29165)["__core-js_shared__"];e.exports=n},34082:function(e,t,r){var n=r(47758),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},54874:function(e,t,r){var n=r(22612),o=r(20323),i=r(71564);e.exports=function(e){return i(o(e,void 0,n),e+"")}},67707:function(e,t,r){var n=r(3880);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},47758:function(e,t,r){var n=r(58939),o=r(9149);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},9149:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},18554:function(e,t,r){var n=r(60399),o=r(30353),i=r(24669),a=r(91010),s=r(17216),u=r(77817);e.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,p=!1;++l<c;){var h=u(t[l]);if(!(p=null!=e&&r(e,h)))break;e=e[h]}return p||++l!=c?p:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(i(e)||o(e))}},71519:function(e,t,r){var n=r(37722);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},82999:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},76111:function(e,t,r){var n=r(37722),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},50506:function(e,t,r){var n=r(37722),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},80845:function(e,t,r){var n=r(37722);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},89465:function(e,t,r){var n=r(74396),o=r(30353),i=r(24669),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},91010:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},2610:function(e,t,r){var n=r(24669),o=r(16764),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},3880:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},90654:function(e,t,r){var n,o=r(36633),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},2173:function(e){e.exports=function(){this.__data__=[],this.size=0}},33752:function(e,t,r){var n=r(62718),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},10548:function(e,t,r){var n=r(62718);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},63410:function(e,t,r){var n=r(62718);e.exports=function(e){return n(this.__data__,e)>-1}},3564:function(e,t,r){var n=r(62718);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},7140:function(e,t,r){var n=r(88987),o=r(175),i=r(35922);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},56504:function(e,t,r){var n=r(67707);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},88833:function(e,t,r){var n=r(67707);e.exports=function(e){return n(this,e).get(e)}},80953:function(e,t,r){var n=r(67707);e.exports=function(e){return n(this,e).has(e)}},70724:function(e,t,r){var n=r(67707);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},45171:function(e,t,r){var n=r(34736);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},37722:function(e,t,r){var n=r(47758)(Object,"create");e.exports=n},20323:function(e,t,r){var n=r(93501),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=i[a];return l[t]=r(u),n(e,this,l)}}},71564:function(e,t,r){var n=r(56447),o=r(15509)(n);e.exports=o},15509:function(e){var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},77057:function(e,t,r){var n=r(45171),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},77817:function(e,t,r){var n=r(16764);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},51059:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},64806:function(e){e.exports=function(e){return function(){return e}}},42448:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},22612:function(e,t,r){var n=r(98768);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},28281:function(e,t,r){var n=r(71664),o=r(18554);e.exports=function(e,t){return null!=e&&o(e,t,n)}},48148:function(e){e.exports=function(e){return e}},30353:function(e,t,r){var n=r(84742),o=r(55073),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},92042:function(e,t,r){var n=r(80732),o=r(36838);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},17216:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},34736:function(e,t,r){var n=r(9440);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},19334:function(e,t,r){var n=r(54822),o=r(54874)((function(e,t){return null==e?{}:n(e,t)}));e.exports=o}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,8851],{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",c="right___o0xXT",s="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:c,children:[(0,p.jsx)("span",{className:s,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),c=a(87999),s=a.n(c),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=e.visible,r=g.Z.useForm(),c=u()(r,1)[0],l=(0,p.useState)(!1),x=u()(l,2),A=x[0],b=x[1],k=function(){var e=s()(i()().mark((function e(n){var r,c,s,l,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),r=t?"put":"post",c=o()({},n),t&&(c.id=t.id),e.prev=4,e.next=7,Z.W[r]("".concat(v.Z.apiPrefix,"apps"),c);case 7:s=e.sent,l=s.code,u=s.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,p.useEffect)((function(){c.resetFields()}),[t,n]),(0,y.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:n,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:A,children:(0,y.jsxs)(g.Z,{form:c,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),c=a(16314),s=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],A=y[1],b=(0,f.useRef)(),k=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(){j(),c.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},w=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(){j(),c.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},j=function(){A(""),b.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){c.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=x.includes("失败,请检查");b.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 E=(0,f.useCallback)((function(e){var t=e.message;t.includes("失败,请检查")&&p.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&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(){b.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),A((function(e){return"".concat(e).concat(t)}))}),[]);return(0,f.useEffect)((function(){var e=s.Z.getInstance();return e.subscribe("updateSystemVersion",E),function(){e.unsubscribe("updateSystemVersion",E)}}),[]),(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),c.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?w(a):k(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),c=a(72317),s=a(75271),l=a(72338),u=a(61508),d=a(17082),p=a(93481),g=a(3475),h=a(16314),f=(a(68251),a(78060)),m=a.n(f),P=a(19334),Z=a.n(P),v=a(65814),y=a(52676),x={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,s.useState)(),t=o()(e,2),a=t[0],n=t[1],r=l.Z.useForm(),f=o()(r,1)[0],P=(0,s.useState)(""),A=o()(P,2),b=A[0],k=A[1],w=(0,s.useState)(!1),j=o()(w,2),C=j[0],E=j[1],S=function(e){E(!0),k("in progress...\n"),h.W.put("".concat(g.Z.apiPrefix,"system/config/").concat(e),Z()(a,x[e])).then((function(e){})).catch((function(){E(!1),k((function(e){return"".concat(e,"update mirror error")}))}))},M=function(e){E(!0),k(""),h.W.put("".concat(g.Z.apiPrefix,"system/config/").concat(e),Z()(a,x[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return E(!1)}))},T=function(e){var t=e.message;k((function(e){return"".concat(e).concat(t)})),(t.includes("update node mirror end")||t.includes("update linux mirror end"))&&E(!1)};return(0,s.useEffect)((function(){var e=v.Z.getInstance();return e.subscribe("updateNodeMirror",T),e.subscribe("updateLinuxMirror",T),function(){e.subscribe("updateNodeMirror",T),e.unsubscribe("updateLinuxMirror",T)}}),[]),(0,s.useEffect)((function(){h.W.get("".concat(g.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,y.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,y.jsxs)(l.Z,{layout:"vertical",form:f,style:{flexShrink:0},children:[(0,y.jsx)(l.Z.Item,{label:c.ZP.get("代理"),name:"proxy",extra:c.ZP.get("代理与镜像源二选一即可"),tooltip:{title:c.ZP.get("代理地址, 支持HTTP(S)/SOCK5"),placement:"topLeft"},children:(0,y.jsxs)(d.Z.Group,{compact:!0,children:[(0,y.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,y.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){M("dependence-proxy")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,y.jsx)(l.Z.Item,{label:c.ZP.get("Node 软件包镜像源"),name:"node",tooltip:c.ZP.get("NPM 镜像源"),children:(0,y.jsxs)(d.Z.Group,{compact:!0,children:[(0,y.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,y.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){S("node-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,y.jsx)(l.Z.Item,{label:c.ZP.get("Python 软件包镜像源"),name:"python",tooltip:c.ZP.get("PyPI 镜像源"),children:(0,y.jsxs)(d.Z.Group,{compact:!0,children:[(0,y.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,y.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){M("python-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,y.jsx)(l.Z.Item,{label:c.ZP.get("Linux 软件包镜像源"),name:"linux",tooltip:c.ZP.get("debian linux 镜像源"),children:(0,y.jsxs)(d.Z.Group,{compact:!0,children:[(0,y.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,y.jsx)(p.Z,{type:"primary",loading:C,onClick:function(){S("linux-mirror")},style:{width:100},children:c.ZP.get("确认")})]})})]}),(0,y.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,y.jsx)(m(),{children:b})})]})}},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),c=a(48305),s=a.n(c),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),A=a(16314),b=a(92294),k=a(28423),w=a(28068),j=a(88939),C=a(67303),E=a(59362),S=a(61160),M=a(85657),T=a(29774),B=a(98783),I=(a(68251),a(30502)),q=a(76433),_=a(53626),G=a(52676),D=d.Z.Text,R="demo"===window.__ENV__DeployEnv;t.default=function(){var e=(0,B.useOutletContext)(),t=e.headerStyle,a=e.isPhone,n=e.user,r=e.theme,c=e.reloadUser,d=e.reloadTheme,K=e.systemInfo,L=[{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)(D,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,G.jsx)(D,{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 xe(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 be(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,{})})})]})}}],W=(0,u.useState)(!0),F=s()(W,2),N=F[0],z=F[1],V=(0,u.useState)([]),H=s()(V,2),O=H[0],U=H[1],Y=(0,u.useState)(!1),Q=s()(Y,2),X=Q[0],J=Q[1],$=(0,u.useState)(),ee=s()($,2),te=ee[0],ae=ee[1],ne=(0,u.useState)("security"),ie=s()(ne,2),re=ie[0],oe=ie[1],ce=(0,u.useState)([]),se=s()(ce,2),le=se[0],ue=se[1],de=(0,u.useState)(),pe=s()(de,2),ge=pe[0],he=pe[1],fe=(0,u.useRef)(null),me=(0,u.useState)(0),Pe=s()(me,2),Ze=Pe[0],ve=Pe[1];(0,I.Z)(fe,(function(e){var t,a=null===(t=e.target)||void 0===t?void 0:t.offsetHeight;a&&Ze!==a-101&&ve(a-101)}));var ye=function(){z(!0),A.W.get("".concat(y.Z.apiPrefix,"apps")).then((function(e){var t=e.code,a=e.data;200===t&&U(a)})).finally((function(){return z(!1)}))},xe=function(e,t){ae(e),J(!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)(D,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){A.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),U(n)}}))}})},be=function(e,t){f.Z.confirm({title:l.ZP.get("确认重置"),content:(0,G.jsxs)(G.Fragment,{children:[l.ZP.get("确认重置应用")," ",(0,G.jsx)(D,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("的Secret吗"),(0,G.jsx)("br",{}),(0,G.jsx)(D,{type:"secondary",children:l.ZP.get("重置Secret会让当前应用所有token失效")})]}),onOk:function(){A.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("重置成功")),ke(a))}))}})},ke=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)),U(a)},we=function(){A.W.get("".concat(y.Z.apiPrefix,"user/notification")).then((function(e){var t=e.code,a=e.data;200===t&&he(a)})).catch((function(e){console.log(e)}))};return(0,u.useEffect)((function(){R&&ye()}),[]),(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"===re?[(0,G.jsx)(P.Z,{type:"primary",onClick:function(){return ae(null),void J(!0)},children:l.ZP.get("创建应用")},"2")]:[],children:[(0,G.jsx)("div",{ref:fe,style:{height:"100%"},children:(0,G.jsx)(Z.Z,{style:{height:"100%"},defaultActiveKey:"security",size:"small",tabPosition:"top",onChange:function(e){oe(e),"app"===e?ye():"login"===e?A.W.get("".concat(y.Z.apiPrefix,"user/login-log")).then((function(e){var t=e.code,a=e.data;200===t&&ue(a)})).catch((function(e){console.log(e)})):"notification"===e&&we()},destroyInactiveTabPane:!0,items:[].concat(o()(R?[]:[{key:"security",label:l.ZP.get("安全设置"),children:(0,G.jsx)(C.default,{user:n,userChange:c})}]),[{key:"app",label:l.ZP.get("应用设置"),children:(0,G.jsx)(v.Z,{columns:L,pagination:!1,dataSource:O,rowKey:"id",size:"middle",scroll:{x:1e3,y:Ze},loading:N})},{key:"notification",label:l.ZP.get("通知设置"),children:(0,G.jsx)(S.default,{data:ge})},{key:"syslog",label:l.ZP.get("系统日志"),children:(0,G.jsx)(q.default,{height:Ze,theme:r})},{key:"login",label:l.ZP.get("登录日志"),children:(0,G.jsx)(E.default,{height:Ze,data:le})},{key:"dependence",label:l.ZP.get("依赖设置"),children:(0,G.jsx)(_.default,{})},{key:"other",label:l.ZP.get("其他设置"),children:(0,G.jsx)(M.default,{reloadTheme:d,systemInfo:K})},{key:"about",label:l.ZP.get("关于"),children:(0,G.jsx)(T.default,{systemInfo:K})}])})}),(0,G.jsx)(b.default,{visible:X,handleCancel:function(e){J(!1),e&&ke(e)},app:te})]})}},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),c=a(16483),s=a.n(c),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 s()(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),c=a(72317),s=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,s.useState)(!1),n=o()(a,2),r=n[0],Z=n[1],v=(0,s.useState)("closed"),y=o()(v,2),x=y[0],A=y[1],b=(0,s.useState)([]),k=o()(b,2),w=k[0],j=k[1],C=u.Z.useForm(),E=o()(C,1)[0],S=function(e){A(e);var t=f.Z.notificationModeMap[e];j(t||[])};return(0,s.useEffect)((function(){t&&t.type&&(S(t.type),E.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?c.ZP.get("通知发送成功"):c.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return Z(!1)}))},form:E,layout:"vertical",children:[(0,m.jsx)(u.Z.Item,{label:c.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:x,children:(0,m.jsx)(l.Z,{onChange:S,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:e.tip,rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(l.Z,{placeholder:e.placeholder||"".concat(c.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(c.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:r,children:r?c.ZP.get("测试中..."):c.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),c=a(72317),s=a(75271),l=a(72338),u=a(61508),d=a(45520),p=a(94747),g=a(17082),h=a(56646),f=a(93481),m=a(35181),P=a(6367),Z=a(71571),v=a(3475),y=a(16314),x=a(73236),A=a(87105),b=(a(68251),a(79231)),k=a(84522),w=a(32916),j=a(19334),C=a.n(j),E=a(48916),S=a(97302),M=a(52676),T={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone"};t.default=function(e){var t=e.systemInfo,a=e.reloadTheme,n=localStorage.getItem("qinglong_dark_theme")||"auto",r=(0,s.useState)(),j=o()(r,2),B=j[0],I=j[1],q=l.Z.useForm(),_=o()(q,1)[0],G=(0,s.useState)(!1),D=o()(G,2),R=D[0],K=D[1],L=(0,w.default)(c.ZP.get("上传")),W=(0,w.default)(c.ZP.get("下载")),F=Z||{},N=F.enable,z=F.disable,V=(F.exportGeneratedCSS,F.setFetchMethod),H=F.auto,O=function(e){y.W.put("".concat(v.Z.apiPrefix,"system/config/").concat(e),C()(B,T[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)}))};return(0,s.useEffect)((function(){y.W.get("".concat(v.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&I(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,M.jsxs)(l.Z,{layout:"vertical",form:_,children:[(0,M.jsx)(l.Z.Item,{label:c.ZP.get("主题"),name:"theme",initialValue:n,children:(0,M.jsxs)(p.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),V(fetch),"dark"===t?N({}):"light"===t?z():H({}),a()},value:n,optionType:"button",buttonStyle:"solid",children:[(0,M.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:c.ZP.get("亮色")}),(0,M.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:c.ZP.get("暗色")}),(0,M.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:c.ZP.get("跟随系统")})]})}),(0,M.jsx)(l.Z.Item,{label:c.ZP.get("日志删除频率"),name:"frequency",tooltip:c.ZP.get("每x天自动删除x天以前的日志"),children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(h.Z,{addonBefore:c.ZP.get("每"),addonAfter:c.ZP.get("天"),style:{width:180},min:0,value:null==B?void 0:B.logRemoveFrequency,onChange:function(e){I(i()(i()({},B),{},{logRemoveFrequency:e}))}}),(0,M.jsx)(f.Z,{type:"primary",onClick:function(){O("log-remove-frequency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:c.ZP.get("定时任务并发数"),name:"frequency",children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(h.Z,{style:{width:180},min:1,value:null==B?void 0:B.cronConcurrency,onChange:function(e){I(i()(i()({},B),{},{cronConcurrency:e}))}}),(0,M.jsx)(f.Z,{type:"primary",onClick:function(){O("cron-concurrency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:c.ZP.get("时区"),name:"timezone",children:(0,M.jsxs)(g.Z.Group,{compact:!0,children:[(0,M.jsx)(m.Z,{value:null==B?void 0:B.timezone,style:{width:180},onChange:function(e){I(i()(i()({},B),{},{timezone:e}))},options:S.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)(f.Z,{type:"primary",onClick:function(){O("timezone")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,M.jsx)(l.Z.Item,{label:c.ZP.get("语言"),name:"lang",children:(0,M.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){localStorage.setItem("lang",e),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:c.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,M.jsxs)(l.Z.Item,{label:c.ZP.get("数据备份还原"),name:"frequency",children:[(0,M.jsx)(f.Z,{type:"primary",onClick:function(){K(!0),y.W.put("".concat(v.Z.apiPrefix,"system/data/export"),{},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&W(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,A.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){return K(!1)}))},loading:R,children:R?c.ZP.get("生成数据中..."):c.ZP.get("备份")}),(0,M.jsx)(P.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(v.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,a=e.event;null!=a&&a.percent&&L(Math.min(parseFloat(null==a?void 0:a.percent.toFixed(1)),99)),"done"===t.status&&(L(100),d.Z.confirm({width:600,maskClosable:!1,title:c.ZP.get("确认重启"),centered:!0,content:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{children:c.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,M.jsxs)("div",{children:[c.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:c.ZP.get("重启"),onOk:function(){y.W.put("".concat(v.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,M.jsxs)("span",{children:[c.ZP.get("系统将在"),(0,M.jsx)(k.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),c.ZP.get("秒后自动刷新")]}),duration:30}),(0,E.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&u.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(v.Z.authKey))},children:(0,M.jsx)(f.Z,{icon:(0,M.jsx)(b.Z,{}),style:{marginLeft:8},children:c.ZP.get("还原数据")})})]}),(0,M.jsx)(l.Z.Item,{label:c.ZP.get("检查更新"),name:"update",children:(0,M.jsx)(x.default,{systemInfo:t})})]})}},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),c=a(52676),s=function(e){var t=e.percent;return(0,c.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,c.jsx)(s,{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,c.jsx)(s,{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),c=a(50691),s=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),A=a(69822),b=(a(94095),a(52676)),k=c.Z.Title,w=c.Z.Link;t.default=function(e){var t=e.user,a=e.userChange,n=(0,o.useState)(!1),c=i()(n,2),P=c[0],j=c[1],C=(0,o.useState)(),E=i()(C,2),S=E[0],M=E[1],T=(0,o.useState)(!1),B=i()(T,2),I=B[0],q=B[1],_=(0,o.useState)(),G=i()(_,2),D=G[0],R=G[1],K=(0,o.useState)(),L=i()(K,2),W=L[0],F=L[1],N=(0,o.useState)(),z=i()(N,2),V=z[0],H=z[1],O=function(){h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,n=e.data;200===t&&n&&(M(!1),a())})).catch((function(e){console.log(e)}))},U=function(){h.W.get("".concat(f.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,a=e.data;200===t&&R(a)})).catch((function(e){console.log(e)}))};return(0,o.useEffect)((function(){M(t&&t.twoFactorActivated),H(t.avatar&&"".concat(f.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),I?(0,b.jsx)(b.Fragment,{children:D?(0,b.jsxs)("div",{children:[(0,b.jsx)(k,{level:5,children:r.ZP.get("第一步")}),r.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,b.jsx)(w,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,b.jsx)(w,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,b.jsx)(w,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,b.jsx)(w,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,b.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第二步")}),r.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==D?void 0:D.secret,(0,b.jsx)("div",{style:{marginTop:10},children:(0,b.jsx)(Z(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==D?void 0:D.url})}),(0,b.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第三步")}),r.ZP.get("输入手机应用上的6位数字"),(0,b.jsx)(l.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:W,onChange:function(e){return F(e.target.value)},placeholder:"123456"}),(0,b.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?(s.ZP.success(r.ZP.get("激活成功")),q(!1),M(!0),a()):s.ZP.success(r.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return j(!1)}))},children:r.ZP.get("完成设置")})]}):(0,b.jsx)(v.Z,{})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:r.ZP.get("修改用户名密码")}),(0,b.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,b.jsx)(d.Z.Item,{label:r.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,b.jsx)(l.Z,{autoComplete:"username",placeholder:r.ZP.get("用户名")})}),(0,b.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,b.jsx)(l.Z,{type:"password",autoComplete:"current-password",placeholder:r.ZP.get("密码")})}),(0,b.jsx)(u.Z,{type:"primary",htmlType:"submit",children:r.ZP.get("保存")})]}),(0,b.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("两步验证")}),(0,b.jsx)(u.Z,{type:"primary",danger:S,onClick:function(){S?O():(U(),q(!0))},children:S?r.ZP.get("禁用"):r.ZP.get("启用")}),(0,b.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("头像")}),(0,b.jsx)(p.C,{size:128,shape:"square",icon:(0,b.jsx)(y.Z,{}),src:V}),(0,b.jsx)(A.Z,{rotationSlider:!0,children:(0,b.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(H("".concat(f.Z.apiPrefix,"static/").concat(e.file.response.data)),a())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(f.Z.authKey))},children:(0,b.jsx)(u.Z,{icon:(0,b.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 O}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),c=a(48305),s=a.n(c),l=a(72317),u=a(75271),d=a(71742),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),A=a(11333),b=a.n(A),k=a(25298),w=a.n(k),j=a(17069),C=a.n(j),E=a(82092),S=a.n(E),M=a(5174),T=a(80403),B=/\[\ue6f5info\]/g,I=/\[\ue67fdebug\]/g,q=/\[\ue880warn\]/g,_=/\[\ue602error\]/g,G="system-log-info",D="system-warn-info",R="system-error-info",K="system-debug-info",L=M.lg.fromClass(function(){function e(t){w()(this,e),S()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=B.exec(n));){var i=M.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=M.lg.fromClass(function(){function e(t){w()(this,e),S()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=q.exec(n));){var i=M.p.mark({class:D});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),F=M.lg.fromClass(function(){function e(t){w()(this,e),S()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=I.exec(n));){var i=M.p.mark({class:K});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),N=M.lg.fromClass(function(){function e(t){w()(this,e),S()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=_.exec(n));){var i=M.p.mark({class:R});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),z=M.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),V=a(52676),H=p.Z.RangePicker,O=function(e){var t=e.height,a=e.theme,n=(0,u.useRef)(null),r=(0,u.useRef)(),c=(0,u.useState)(["",""]),p=s()(c,2),A=p[0],k=p[1],w=(0,u.useState)(""),j=s()(w,2),C=j[0],E=j[1],S=(0,x.Z)((function(){return v.W.get("".concat(y.Z.apiPrefix,"system/log?startTime=").concat(A[0],"&endTime=").concat(A[1]),{responseType:"blob"})}),{refreshDeps:[A],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=E,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),M=S.loading,T=S.refresh,B=function(e){n.current.scrollDOM.scrollTo({top:"start"===e?0:n.current.scrollDOM.scrollHeight})};return(0,V.jsxs)("div",{style:{position:"relative"},children:[(0,V.jsxs)("div",{children:[(0,V.jsx)(H,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>b()()||e<b()().subtract(7,"days")},defaultValue:[b()(),b()()],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,V.jsx)(h.Z,{onClick:function(){v.W.delete("".concat(y.Z.apiPrefix,"system/log")).then((function(e){g.ZP.success("删除成功"),T()}))},children:l.ZP.get("清空日志")})]}),C?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(d.ZP,{maxHeight:"".concat(t,"px"),value:C,onCreateEditor:function(e){n.current=e},extensions:[F,N,L,W,z],readOnly:!0,theme:a.includes("dark")?"dark":"light"}),(0,V.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,V.jsx)(h.Z,{size:"small",icon:(0,V.jsx)(P.Z,{}),onClick:function(){B("start")}}),(0,V.jsx)(h.Z,{size:"small",icon:(0,V.jsx)(Z.Z,{}),onClick:function(){B("end")}})]})]}):M?(0,V.jsx)(f.Z,{}):(0,V.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/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:n.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},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:"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("推送消息的优先级")}],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}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],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}],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("依赖管理")},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),c=a(72317),s=a(61508),l=a(33839),u=a(3475),d=a(98783),p=a(69313),g=a(52676);s.ZP.config({duration:2});var h=Date.now(),f=p.Z.create({timeout:6e4,params:{t:h}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/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&&(s.ZP.error(c.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),c=a(94046),s=a.n(c);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",c="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?c="edge":t(/opr/g)?c="opera":t(/chrome/g)?c="chrome":t(/safari/g)&&(c="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",c="firefox"):t(/presto/g)?(o="presto",c="opera"):t(/trident|compatible|msie/g)&&(o="trident",c="iexplore");var s="unknow";"webkit"===o?s=a(/applewebkit\/[\d._]+/g):"gecko"===o?s=a(/gecko\/[\d._]+/g):"presto"===o?s=a(/presto\/[\d._]+/g):"trident"===o&&(s=a(/trident\/[\d._]+/g));var l="unknow";"chrome"===c?l=a(/chrome\/[\d._]+/g):"safari"===c?l=a(/version\/[\d._]+/g):"firefox"===c?l=a(/firefox\/[\d._]+/g):"opera"===c?l=a(/opr\/[\d._]+/g):"iexplore"===c?l=a(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===c&&(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:s,platform:r,supporter:c,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=s().parseExpression(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),c=a(90228),s=a.n(c),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()(s()().mark((function e(){var t=this;return s()().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()(s()().mark((function e(){var t;return s()().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(){},50810:function(){}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7213],{61160:function(e,t,a){a.r(t);var o=a(26068),r=a.n(o),n=a(48305),l=a.n(n),i=a(72317),s=a(75271),u=a(35181),c=a(72338),p=a(61508),d=a(17082),g=a(93481),h=a(16314),P=a(3475),m=a(52676),b=u.Z.Option;t.default=function(e){var t=e.data,a=(0,s.useState)(!1),o=l()(a,2),n=o[0],Z=o[1],f=(0,s.useState)("closed"),v=l()(f,2),E=v[0],y=v[1],C=(0,s.useState)([]),x=l()(C,2),w=x[0],S=x[1],k=c.Z.useForm(),T=l()(k,1)[0],_=function(e){y(e);var t=P.Z.notificationModeMap[e];S(t||[])};return(0,s.useEffect)((function(){t&&t.type&&(_(t.type),T.setFieldsValue(r()({},t)))}),[t]),(0,m.jsx)("div",{children:(0,m.jsxs)(c.Z,{onFinish:function(e){Z(!0),"closed"==e.type&&(e.type=""),h.W.put("".concat(P.Z.apiPrefix,"user/notification"),e).then((function(t){var a=t.code;t.data;200===a&&p.ZP.success(e.type?i.ZP.get("通知发送成功"):i.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return Z(!1)}))},form:T,layout:"vertical",children:[(0,m.jsx)(c.Z.Item,{label:i.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:E,children:(0,m.jsx)(u.Z,{onChange:_,disabled:n,children:P.Z.notificationModes.map((function(e){return(0,m.jsx)(b,{value:e.value,children:e.label},e.value)}))})}),w.map((function(e){return(0,m.jsx)(c.Z.Item,{label:e.label,name:e.label,extra:e.tip,rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(u.Z,{placeholder:e.placeholder||"".concat(i.ZP.get("请选择")," ").concat(e.label),disabled:n,children:e.items.map((function(e){return(0,m.jsx)(b,{value:e.value,children:e.label||e.value},e.value)}))}):(0,m.jsx)(d.Z.TextArea,{disabled:n,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(i.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:n,children:n?i.ZP.get("测试中..."):i.ZP.get("保存")})]})})}},3475:function(e,t,a){var o=a(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:o.ZP.get("青龙"),baseUrl:r,apiPrefix:"".concat(r,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:o.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:o.ZP.get("定时任务"),value:"crons"},{name:o.ZP.get("环境变量"),value:"envs"},{name:o.ZP.get("订阅管理"),value:"subscriptions"},{name:o.ZP.get("配置文件"),value:"configs"},{name:o.ZP.get("脚本管理"),value:"scripts"},{name:o.ZP.get("日志管理"),value:"logs"},{name:o.ZP.get("依赖管理"),value:"dependencies"},{name:o.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:o.ZP.get("定时任务"),envs:o.ZP.get("环境变量"),subscriptions:o.ZP.get("订阅管理"),configs:o.ZP.get("配置文件"),scripts:o.ZP.get("脚本管理"),logs:o.ZP.get("日志管理"),dependencies:o.ZP.get("依赖管理"),system:o.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:o.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:o.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:o.ZP.get("钉钉机器人")},{value:"weWorkBot",label:o.ZP.get("企业微信机器人")},{value:"weWorkApp",label:o.ZP.get("企业微信应用")},{value:"aibotk",label:o.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:o.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:o.ZP.get("群晖chat")},{value:"email",label:o.ZP.get("邮箱")},{value:"lark",label:o.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:o.ZP.get("自定义通知")},{value:"closed",label:o.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:o.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:o.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:o.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:o.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:o.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:o.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:o.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:o.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:o.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:o.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:o.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:o.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:o.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:o.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:o.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:o.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:o.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:o.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:o.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:o.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:o.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:o.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:o.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:o.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:o.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:o.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:o.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:o.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:o.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:o.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:o.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:o.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:o.ZP.get("请输入要发送的目标"),items:[{value:"room",label:o.ZP.get("群聊")},{value:"contact",label:o.ZP.get("好友")}]},{label:"aibotkName",tip:o.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:o.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:o.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:o.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:o.ZP.get("发送模板")},{label:"pushplusChannel",tip:o.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:o.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:o.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:o.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:o.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:o.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:o.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:o.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:o.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:o.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:o.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:o.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:o.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:o.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:o.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:o.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:o.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:o.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:o.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:o.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:o.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:o.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:o.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:o.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":o.ZP.get("登录"),"/initialization":o.ZP.get("初始化"),"/crontab":o.ZP.get("定时任务"),"/env":o.ZP.get("环境变量"),"/subscription":o.ZP.get("订阅管理"),"/config":o.ZP.get("配置文件"),"/script":o.ZP.get("脚本管理"),"/diff":o.ZP.get("对比工具"),"/log":o.ZP.get("日志管理"),"/setting":o.ZP.get("系统设置"),"/error":o.ZP.get("错误日志"),"/dependence":o.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,a){a.d(t,{W:function(){return b}});var o=a(90228),r=a.n(o),n=a(87999),l=a.n(n),i=a(72317),s=a(61508),u=a(33839),c=a(3475),p=a(98783),d=a(69313),g=a(52676);s.ZP.config({duration:2});var h=Date.now(),P=d.Z.create({timeout:6e4,params:{t:h}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];P.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),P.interceptors.response.use(function(){var e=l()(r()().mark((function e(t){var a,o,n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(n=o.message||o.data)&&u.Z.error({message:n,description:null!=o&&o.errors?(0,g.jsx)(g.Fragment,{children:null==o?void 0:o.errors.map((function(e){return(0,g.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",o);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))p.history.push("/error");else if(401===a)"/login"!==p.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),p.history.push("/login"));else{var o,r,n,l;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(l=e.config)||void 0===l?void 0:l.onError(e.response);t&&u.Z.error({message:t,description:null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.errors?(0,g.jsx)(g.Fragment,{children:null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.errors)||void 0===n?void 0:n.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 b=P},43541:function(e,t,a){a.d(t,{fk:function(){return l},jD:function(){return n}});var o,r=a(71254),n=function(){return(0,r.Z)()&&window.document.documentElement},l=function(){if(!n())return!1;if(void 0!==o)return o;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),o=1===e.scrollHeight,document.body.removeChild(e),o}},35181:function(e,t,a){var o=a(57904),r=a(2053),n=a(82187),l=a.n(n),i=a(77168),s=a(2021),u=a(75271),c=a(96820),p=a(83289),d=a(30107),g=a(38470),h=a(5663),P=a(21485),m=a(28800),b=a(50528),Z=a(81393),f=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]])}return a},v="SECRET_COMBOBOX_MODE_DO_NOT_USE",E=function(e,t){var a,n=e.prefixCls,E=e.bordered,y=void 0===E||E,C=e.className,x=e.getPopupContainer,w=e.dropdownClassName,S=e.popupClassName,k=e.listHeight,T=void 0===k?256:k,_=e.placement,N=e.listItemHeight,M=void 0===N?32:N,O=e.size,I=e.disabled,U=e.notFoundContent,A=e.status,B=e.showArrow,R=f(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),q=u.useContext(c.E_),K=q.getPopupContainer,L=q.getPrefixCls,D=q.renderEmpty,F=q.direction,H=q.virtual,W=q.dropdownMatchSelectWidth,G=u.useContext(g.Z),Q=L("select",n),j=L(),X=(0,Z.ri)(Q,F),V=X.compactSize,z=X.compactItemClassnames,Y=u.useMemo((function(){var e=R.mode;if("combobox"!==e)return e===v?"combobox":e}),[R.mode]),$="multiple"===Y||"tags"===Y,J=void 0!==B?B:R.loading||!($||"combobox"===Y),ee=(0,u.useContext)(h.aM),te=ee.status,ae=ee.hasFeedback,oe=ee.isFormItemInput,re=ee.feedbackIcon,ne=(0,m.F)(te,A);a=void 0!==U?U:"combobox"===Y?null:(D||p.Z)("Select");var le=(0,b.Z)((0,r.Z)((0,r.Z)({},R),{multiple:$,hasFeedback:ae,feedbackIcon:re,showArrow:J,prefixCls:Q})),ie=le.suffixIcon,se=le.itemIcon,ue=le.removeIcon,ce=le.clearIcon,pe=(0,s.Z)(R,["suffixIcon","itemIcon"]),de=l()(S||w,(0,o.Z)({},"".concat(Q,"-dropdown-").concat(F),"rtl"===F)),ge=V||O||G,he=u.useContext(d.Z),Pe=null!=I?I:he,me=l()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(Q,"-lg"),"large"===ge),"".concat(Q,"-sm"),"small"===ge),"".concat(Q,"-rtl"),"rtl"===F),"".concat(Q,"-borderless"),!y),"".concat(Q,"-in-form-item"),oe),(0,m.Z)(Q,ne,ae),z,C);return u.createElement(i.ZP,(0,r.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:W},pe,{transitionName:(0,P.mL)(j,(0,P.q0)(_),R.transitionName),listHeight:T,listItemHeight:M,mode:Y,prefixCls:Q,placement:void 0!==_?_:"rtl"===F?"bottomRight":"bottomLeft",direction:F,inputIcon:ie,menuItemSelectedIcon:se,removeIcon:ue,clearIcon:ce,notFoundContent:a,className:me,getPopupContainer:x||K,dropdownClassName:de,showArrow:ae||B,disabled:Pe}))},y=u.forwardRef(E);y.SECRET_COMBOBOX_MODE_DO_NOT_USE=v,y.Option=i.Wx,y.OptGroup=i.Xo,t.Z=y},1260:function(e,t){var a={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=a.F1&&t<=a.F12)return!1;switch(t){case a.ALT:case a.CAPS_LOCK:case a.CONTEXT_MENU:case a.CTRL:case a.DOWN:case a.END:case a.ESC:case a.HOME:case a.INSERT:case a.LEFT:case a.MAC_FF_META:case a.META:case a.NUMLOCK:case a.NUM_CENTER:case a.PAGE_DOWN:case a.PAGE_UP:case a.PAUSE:case a.PRINT_SCREEN:case a.RIGHT:case a.SHIFT:case a.UP:case a.WIN_KEY:case a.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=a.ZERO&&e<=a.NINE)return!0;if(e>=a.NUM_ZERO&&e<=a.NUM_MULTIPLY)return!0;if(e>=a.A&&e<=a.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case a.SPACE:case a.QUESTION_MARK:case a.NUM_PLUS:case a.NUM_MINUS:case a.NUM_PERIOD:case a.NUM_DIVISION:case a.SEMICOLON:case a.DASH:case a.EQUALS:case a.COMMA:case a.PERIOD:case a.SLASH:case a.APOSTROPHE:case a.SINGLE_QUOTE:case a.OPEN_SQUARE_BRACKET:case a.BACKSLASH:case a.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=a},41045:function(e,t,a){a.d(t,{Z:function(){return s}});var o=a(98037),r="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),n="aria-",l="data-";function i(e,t){return 0===e.indexOf(t)}function s(e){var t,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===a?{aria:!0,data:!0,attr:!0}:!0===a?{aria:!0}:(0,o.Z)({},a);var s={};return Object.keys(e).forEach((function(a){(t.aria&&("role"===a||i(a,n))||t.data&&i(a,l)||t.attr&&r.includes(a))&&(s[a]=e[a])})),s}}}]);