@whyour/qinglong 2.19.0-9 → 2.19.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/back/protos/api.proto +123 -8
- package/docker/docker-entrypoint.sh +1 -1
- package/package.json +1 -1
- package/sample/config.sample.sh +8 -0
- package/sample/notify.js +15 -1
- package/sample/notify.py +12 -1
- package/shell/preload/sitecustomize.js +2 -4
- package/shell/preload/sitecustomize.py +2 -4
- package/shell/pub.sh +4 -8
- package/shell/share.sh +1 -1
- package/static/build/api/script.js +4 -1
- package/static/build/api/system.js +20 -2
- package/static/build/app.js +131 -26
- package/static/build/config/const.js +24 -1
- package/static/build/config/index.js +4 -3
- package/static/build/config/util.js +21 -1
- package/static/build/data/dependence.js +1 -7
- package/static/build/data/notify.js +4 -0
- package/static/build/loaders/initFile.js +2 -1
- package/static/build/protos/api.js +1374 -70
- package/static/build/schedule/api.js +5 -1
- package/static/build/services/cron.js +22 -9
- package/static/build/services/dependence.js +7 -11
- package/static/build/services/notify.js +27 -6
- package/static/build/services/system.js +26 -4
- package/static/dist/2208.3bc521b1.async.js +1 -0
- package/static/dist/2995.2eb218b3.async.js +1 -0
- package/static/dist/3191.cc1e31cd.async.js +1 -0
- package/static/dist/540.481d4708.async.js +1 -0
- package/static/dist/5713.8519f547.async.js +1 -0
- package/static/dist/7355.b7c0562f.async.js +1 -0
- package/static/dist/786.59fc381c.async.js +1 -0
- package/static/dist/8826.3ab4ad84.async.js +1 -0
- package/static/dist/8851.503b1e64.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.8dcf1576.async.js +1 -0
- package/static/dist/preload_helper.0d173b72.js +1 -0
- package/static/dist/src__pages__crontab__detail.64ec3a2b.async.js +1 -0
- package/static/dist/src__pages__crontab__index.74e7828f.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.0767c532.async.js → src__pages__crontab__logModal.5fa54b25.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.21258e08.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.c2724575.async.js +1 -0
- package/static/dist/{src__pages__dependence__index.c31e50f0.async.js → src__pages__dependence__index.3d87ceac.async.js} +1 -1
- package/static/dist/src__pages__dependence__modal.6639424a.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.665393cd.async.js +1 -0
- package/static/dist/src__pages__env__index.70340ba7.async.js +1 -0
- package/static/dist/src__pages__env__modal.168498f9.async.js +1 -0
- package/static/dist/{src__pages__error__index.18520dbf.async.js → src__pages__error__index.d9beeda3.async.js} +1 -1
- package/static/dist/src__pages__initialization__index.2403c031.async.js +1 -0
- package/static/dist/src__pages__script__editModal.f1741417.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.e36cd111.async.js +1 -0
- package/static/dist/src__pages__script__index.82b42e11.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.f9756f26.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.e885e133.async.js +1 -0
- package/static/dist/src__pages__script__setting.8c2727b4.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.5a39121e.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.a46e873d.async.js +1 -0
- package/static/dist/src__pages__setting__index.32b260ce.async.js +1 -0
- package/static/dist/src__pages__setting__notification.299f6b96.async.js +1 -0
- package/static/dist/src__pages__setting__other.8b77afcd.async.js +1 -0
- package/static/dist/src__pages__setting__security.e7371daa.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.fc5bdc78.async.js +1 -0
- package/static/dist/{src__pages__subscription__index.850531a4.async.js → src__pages__subscription__index.d0ab2abc.async.js} +1 -1
- package/static/dist/{src__pages__subscription__logModal.9bf0b4f6.async.js → src__pages__subscription__logModal.0caa7283.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.a7fd6a3c.async.js +1 -0
- package/static/dist/{umi.80b4d6a9.js → umi.35a646c6.js} +1 -1
- package/version.yaml +9 -12
- package/static/dist/2208.98ccac5f.async.js +0 -1
- package/static/dist/3191.f56b00f8.async.js +0 -1
- package/static/dist/6439.7ef6c5e3.async.js +0 -1
- package/static/dist/7355.5e5e573b.async.js +0 -1
- package/static/dist/7528.d8b76d8a.async.js +0 -1
- package/static/dist/874.ae8edb1a.async.js +0 -1
- package/static/dist/8826.faecf076.async.js +0 -1
- package/static/dist/8851.cf7e0ebc.async.js +0 -1
- package/static/dist/8982.d2dba153.async.js +0 -1
- package/static/dist/layouts__index.8451cde4.async.js +0 -1
- package/static/dist/preload_helper.6f133e1a.js +0 -1
- package/static/dist/src__pages__crontab__detail.ebbb4abf.async.js +0 -1
- package/static/dist/src__pages__crontab__index.d6d37f6a.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.dcd053b5.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.c4bfd6a2.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.7f588c0b.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.411043e2.async.js +0 -1
- package/static/dist/src__pages__env__index.5a863036.async.js +0 -1
- package/static/dist/src__pages__env__modal.7d952f26.async.js +0 -1
- package/static/dist/src__pages__initialization__index.5bd471c5.async.js +0 -1
- package/static/dist/src__pages__script__editModal.10dd9857.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.32bb2f80.async.js +0 -1
- package/static/dist/src__pages__script__index.53f99bee.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.8232c924.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.8e358e84.async.js +0 -1
- package/static/dist/src__pages__script__setting.dcdd7253.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.25adf30e.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.95dd01e7.async.js +0 -1
- package/static/dist/src__pages__setting__index.3b426f9f.async.js +0 -1
- package/static/dist/src__pages__setting__notification.989e57d6.async.js +0 -1
- package/static/dist/src__pages__setting__other.45f67bd2.async.js +0 -1
- package/static/dist/src__pages__setting__security.7623a492.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.2e8cc7a0.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.46a69195.async.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6877],{53626:function(e,t,n){"use strict";n.r(t);var r=n(26068),o=n.n(r),a=n(48305),i=n.n(a),s=n(72317),l=n(75271),c=n(72338),u=n(61508),p=n(17082),d=n(93481),h=n(35181),f=n(3475),g=n(16314),v=(n(68251),n(78060)),m=n.n(v),b=n(19334),y=n.n(b),P=n(65814),x=n(52676),Z={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,l.useState)(),t=i()(e,2),n=t[0],r=t[1],a=c.Z.useForm(),v=i()(a,1)[0],b=(0,l.useState)(""),_=i()(b,2),E=_[0],k=_[1],w=(0,l.useState)(!1),C=i()(w,2),S=C[0],O=C[1],M=(0,l.useState)("node"),T=i()(M,2),N=T[0],I=T[1],A=function(e){O(!0),k("in progress...\n"),g.W.put("".concat(f.Z.apiPrefix,"system/config/").concat(e),y()(n,Z[e])).then((function(e){})).catch((function(){O(!1),k((function(e){return"".concat(e,"update mirror error")}))}))},U=function(e){O(!0),k(""),g.W.put("".concat(f.Z.apiPrefix,"system/config/").concat(e),y()(n,Z[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(s.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return O(!1)}))},R=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"))&&O(!1)};return(0,l.useEffect)((function(){var e=P.Z.getInstance();return e.subscribe("updateNodeMirror",R),e.subscribe("updateLinuxMirror",R),function(){e.subscribe("updateNodeMirror",R),e.unsubscribe("updateLinuxMirror",R)}}),[]),(0,l.useEffect)((function(){g.W.get("".concat(f.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&r(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,x.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,x.jsxs)(c.Z,{layout:"vertical",form:v,style:{flexShrink:0},children:[(0,x.jsx)(c.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==n?void 0:n.dependenceProxy,onChange:function(e){r(o()(o()({},n),{},{dependenceProxy:e.target.value}))}}),(0,x.jsx)(d.Z,{type:"primary",loading:S,onClick:function(){U("dependence-proxy")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(c.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==n?void 0:n.nodeMirror,onChange:function(e){r(o()(o()({},n),{},{nodeMirror:e.target.value}))}}),(0,x.jsx)(d.Z,{type:"primary",loading:S,onClick:function(){A("node-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(c.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==n?void 0:n.pythonMirror,onChange:function(e){r(o()(o()({},n),{},{pythonMirror:e.target.value}))}}),(0,x.jsx)(d.Z,{type:"primary",loading:S,onClick:function(){U("python-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(c.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==n?void 0:n.linuxMirror,onChange:function(e){r(o()(o()({},n),{},{linuxMirror:e.target.value}))}}),(0,x.jsx)(d.Z,{type:"primary",loading:S,onClick:function(){A("linux-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,x.jsx)(c.Z.Item,{label:s.ZP.get("清除依赖缓存"),name:"clean",tooltip:{title:s.ZP.get("清除依赖缓存"),placement:"topLeft"},children:(0,x.jsxs)(p.Z.Group,{compact:!0,children:[(0,x.jsx)(h.Z,{defaultValue:"node",style:{width:100},onChange:function(e){I(e)},options:[{label:"node",value:"node"},{label:"python3",value:"python3"}]}),(0,x.jsx)(d.Z,{type:"primary",loading:S,onClick:function(){var e;e=N,O(!0),k(""),g.W.put("".concat(f.Z.apiPrefix,"system/config/dependence-clean"),{type:e}).then((function(e){var t=e.code;e.data,200===t&&u.ZP.success(s.ZP.get("清除成功"))})).catch((function(e){console.log(e)})).finally((function(){return O(!1)}))},style:{width:100},children:s.ZP.get("确认")})]})})]}),(0,x.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,x.jsx)(m(),{children:E})})]})}},3475:function(e,t,n){"use strict";var r=n(72317),o=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.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:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:r.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:r.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:r.ZP.get("ntfy应用topic"),required:!0},{label:"ntfyPriority",tip:r.ZP.get("推送消息的优先级")},{label:"ntfyToken",tip:r.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:r.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:r.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:r.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:r.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:r.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:r.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:r.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:r.ZP.get("发送模板")},{label:"pushplusChannel",tip:r.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:r.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:r.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:r.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:r.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:r.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:r.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:r.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:r.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:r.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱认证地址"),required:!0},{label:"emailPass",tip:r.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0},{label:"emailTo",tip:r.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:r.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:r.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:r.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:r.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.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:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var r=n(90228),o=n.n(r),a=n(87999),i=n.n(a),s=n(72317),l=n(61508),c=n(33839),u=n(3475),p=n(98783),d=n(69313),h=n(52676);l.ZP.config({duration:2});var f=Date.now(),g=d.Z.create({timeout:6e4,params:{t:f}}),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(u.Z.authKey);return t&&!v.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),g.interceptors.response.use(function(){var e=i()(o()().mark((function e(t){var n,r,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(a=r.message||r.data)&&c.Z.error({message:a,description:null!=r&&r.errors?(0,h.jsx)(h.Fragment,{children:null==r?void 0:r.errors.map((function(e){return(0,h.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",r);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,n=e.response.status;if([502,504].includes(n))p.history.push("/error");else if(401===n)"/login"!==p.history.location.pathname&&(l.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login"));else{var r,o,a,i;if("function"==typeof(null===(r=e.config)||void 0===r?void 0:r.onError))return null===(i=e.config)||void 0===i?void 0:i.onError(e.response);t&&c.Z.error({message:t,description:null!==(o=e.response)&&void 0!==o&&null!==(o=o.data)&&void 0!==o&&o.errors?(0,h.jsx)(h.Fragment,{children:null===(a=e.response)||void 0===a||null===(a=a.data)||void 0===a||null===(a=a.errors)||void 0===a?void 0:a.map((function(e){return(0,h.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var m=g},65814:function(e,t,n){"use strict";var r=n(15558),o=n.n(r),a=n(67825),i=n.n(a),s=n(90228),l=n.n(s),c=n(87999),u=n.n(c),p=n(25298),d=n.n(p),h=n(17069),f=n.n(h),g=n(82092),v=n.n(g),m=n(78078),b=n.n(m),y=["type"],P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d()(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:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return f()(e,[{key:"init",value:(n=u()(l()().mark((function e(){var t=this;return l()().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(b())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(l()().mark((function e(){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===b().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var r={action:"subscribe",topic:e};this.send(r)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var r={action:"unsubscribe",topic:e};this.send(r)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===b().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=i()(e,y),r=this.subscriptions.get(t)||new Set;o()(r).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===b().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();v()(P,"instance",null),t.Z=P},68251:function(){},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return i},jD:function(){return a}});var r,o=n(71254),a=function(){return(0,o.Z)()&&window.document.documentElement},i=function(){if(!a())return!1;if(void 0!==r)return r;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),r=1===e.scrollHeight,document.body.removeChild(e),r}},35181:function(e,t,n){"use strict";var r=n(57904),o=n(2053),a=n(82187),i=n.n(a),s=n(77168),l=n(2021),c=n(75271),u=n(96820),p=n(83289),d=n(30107),h=n(38470),f=n(5663),g=n(21485),v=n(28800),m=n(50528),b=n(81393),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},P="SECRET_COMBOBOX_MODE_DO_NOT_USE",x=function(e,t){var n,a=e.prefixCls,x=e.bordered,Z=void 0===x||x,_=e.className,E=e.getPopupContainer,k=e.dropdownClassName,w=e.popupClassName,C=e.listHeight,S=void 0===C?256:C,O=e.placement,M=e.listItemHeight,T=void 0===M?32:M,N=e.size,I=e.disabled,A=e.notFoundContent,U=e.status,R=e.showArrow,B=y(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),q=c.useContext(u.E_),L=q.getPopupContainer,j=q.getPrefixCls,H=q.renderEmpty,F=q.direction,K=q.virtual,D=q.dropdownMatchSelectWidth,G=c.useContext(h.Z),W=j("select",a),Q=j(),X=(0,b.ri)(W,F),z=X.compactSize,$=X.compactItemClassnames,V=c.useMemo((function(){var e=B.mode;if("combobox"!==e)return e===P?"combobox":e}),[B.mode]),Y="multiple"===V||"tags"===V,J=void 0!==R?R:B.loading||!(Y||"combobox"===V),ee=(0,c.useContext)(f.aM),te=ee.status,ne=ee.hasFeedback,re=ee.isFormItemInput,oe=ee.feedbackIcon,ae=(0,v.F)(te,U);n=void 0!==A?A:"combobox"===V?null:(H||p.Z)("Select");var ie=(0,m.Z)((0,o.Z)((0,o.Z)({},B),{multiple:Y,hasFeedback:ne,feedbackIcon:oe,showArrow:J,prefixCls:W})),se=ie.suffixIcon,le=ie.itemIcon,ce=ie.removeIcon,ue=ie.clearIcon,pe=(0,l.Z)(B,["suffixIcon","itemIcon"]),de=i()(w||k,(0,r.Z)({},"".concat(W,"-dropdown-").concat(F),"rtl"===F)),he=z||N||G,fe=c.useContext(d.Z),ge=null!=I?I:fe,ve=i()((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(W,"-lg"),"large"===he),"".concat(W,"-sm"),"small"===he),"".concat(W,"-rtl"),"rtl"===F),"".concat(W,"-borderless"),!Z),"".concat(W,"-in-form-item"),re),(0,v.Z)(W,ae,ne),$,_);return c.createElement(s.ZP,(0,o.Z)({ref:t,virtual:K,dropdownMatchSelectWidth:D},pe,{transitionName:(0,g.mL)(Q,(0,g.q0)(O),B.transitionName),listHeight:S,listItemHeight:T,mode:V,prefixCls:W,placement:void 0!==O?O:"rtl"===F?"bottomRight":"bottomLeft",direction:F,inputIcon:se,menuItemSelectedIcon:le,removeIcon:ce,clearIcon:ue,notFoundContent:n,className:ve,getPopupContainer:E||L,dropdownClassName:de,showArrow:ne||R,disabled:ge}))},Z=c.forwardRef(x);Z.SECRET_COMBOBOX_MODE_DO_NOT_USE=P,Z.Option=s.Wx,Z.OptGroup=s.Xo,t.Z=Z},88987:function(e,t,n){var r=n(71519),o=n(82999),a=n(76111),i=n(50506),s=n(80845);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},175:function(e,t,n){var r=n(2173),o=n(33752),a=n(10548),i=n(63410),s=n(3564);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},35922:function(e,t,n){var r=n(47758)(n(29165),"Map");e.exports=r},9440:function(e,t,n){var r=n(7140),o=n(56504),a=n(88833),i=n(80953),s=n(70724);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},93501:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},28486:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},93719:function(e,t,n){var r=n(30404),o=n(42448),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},62718:function(e,t,n){var r=n(42448);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},30404:function(e,t,n){var r=n(34082);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},98768:function(e,t,n){var r=n(28486),o=n(89465);e.exports=function e(t,n,a,i,s){var l=-1,c=t.length;for(a||(a=o),s||(s=[]);++l<c;){var u=t[l];n>0&&a(u)?n>1?e(u,n-1,a,i,s):r(s,u):i||(s[s.length]=u)}return s}},97499:function(e,t,n){var r=n(60399),o=n(77817);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},71664:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},84742:function(e,t,n){var r=n(80732),o=n(55073);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},58939:function(e,t,n){var r=n(92042),o=n(90654),a=n(36838),i=n(51059),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?d:s).test(i(e))}},54822:function(e,t,n){var r=n(32648),o=n(28281);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},32648:function(e,t,n){var r=n(97499),o=n(85713),a=n(60399);e.exports=function(e,t,n){for(var i=-1,s=t.length,l={};++i<s;){var c=t[i],u=r(e,c);n(u,c)&&o(l,a(c,e),u)}return l}},85713:function(e,t,n){var r=n(93719),o=n(60399),a=n(91010),i=n(36838),s=n(77817);e.exports=function(e,t,n,l){if(!i(e))return e;for(var c=-1,u=(t=o(t,e)).length,p=u-1,d=e;null!=d&&++c<u;){var h=s(t[c]),f=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(c!=p){var g=d[h];void 0===(f=l?l(g,h,d):void 0)&&(f=i(g)?g:a(t[c+1])?[]:{})}r(d,h,f),d=d[h]}return e}},56447:function(e,t,n){var r=n(64806),o=n(34082),a=n(48148),i=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=i},60399:function(e,t,n){var r=n(24669),o=n(2610),a=n(77057),i=n(8389);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},36633:function(e,t,n){var r=n(29165)["__core-js_shared__"];e.exports=r},34082:function(e,t,n){var r=n(47758),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},54874:function(e,t,n){var r=n(22612),o=n(20323),a=n(71564);e.exports=function(e){return a(o(e,void 0,r),e+"")}},67707:function(e,t,n){var r=n(3880);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},47758:function(e,t,n){var r=n(58939),o=n(9149);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},9149:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},18554:function(e,t,n){var r=n(60399),o=n(30353),a=n(24669),i=n(91010),s=n(17216),l=n(77817);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,p=!1;++c<u;){var d=l(t[c]);if(!(p=null!=e&&n(e,d)))break;e=e[d]}return p||++c!=u?p:!!(u=null==e?0:e.length)&&s(u)&&i(d,u)&&(a(e)||o(e))}},71519:function(e,t,n){var r=n(37722);e.exports=function(){this.__data__=r?r(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,n){var r=n(37722),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},50506:function(e,t,n){var r=n(37722),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},80845:function(e,t,n){var r=n(37722);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},89465:function(e,t,n){var r=n(74396),o=n(30353),a=n(24669),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||o(e)||!!(i&&e&&e[i])}},91010:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},2610:function(e,t,n){var r=n(24669),o=n(16764),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.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,n){var r,o=n(36633),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},2173:function(e){e.exports=function(){this.__data__=[],this.size=0}},33752:function(e,t,n){var r=n(62718),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},10548:function(e,t,n){var r=n(62718);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},63410:function(e,t,n){var r=n(62718);e.exports=function(e){return r(this.__data__,e)>-1}},3564:function(e,t,n){var r=n(62718);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},7140:function(e,t,n){var r=n(88987),o=n(175),a=n(35922);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},56504:function(e,t,n){var r=n(67707);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},88833:function(e,t,n){var r=n(67707);e.exports=function(e){return r(this,e).get(e)}},80953:function(e,t,n){var r=n(67707);e.exports=function(e){return r(this,e).has(e)}},70724:function(e,t,n){var r=n(67707);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},45171:function(e,t,n){var r=n(34736);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},37722:function(e,t,n){var r=n(47758)(Object,"create");e.exports=r},20323:function(e,t,n){var r=n(93501),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=o(a.length-t,0),l=Array(s);++i<s;)l[i]=a[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=a[i];return c[t]=n(l),r(e,this,c)}}},71564:function(e,t,n){var r=n(56447),o=n(15509)(r);e.exports=o},15509:function(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},77057:function(e,t,n){var r=n(45171),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)})),t}));e.exports=i},77817:function(e,t,n){var r=n(16764);e.exports=function(e){if("string"==typeof e||r(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,n){var r=n(98768);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},28281:function(e,t,n){var r=n(71664),o=n(18554);e.exports=function(e,t){return null!=e&&o(e,t,r)}},48148:function(e){e.exports=function(e){return e}},30353:function(e,t,n){var r=n(84742),o=n(55073),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},92042:function(e,t,n){var r=n(80732),o=n(36838);e.exports=function(e){if(!o(e))return!1;var t=r(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,n){var r=n(9440);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},19334:function(e,t,n){var r=n(54822),o=n(54874)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},1260:function(e,t){"use strict";var n={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>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE)return!0;if(e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY)return!0;if(e>=n.A&&e<=n.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},41045:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(98037),o="".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]+/),a="aria-",i="data-";function s(e,t){return 0===e.indexOf(t)}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,r.Z)({},n);var l={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||s(n,a))||t.data&&s(n,i)||t.attr&&o.includes(n))&&(l[n]=e[n])})),l}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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=g.Z.useForm(),r=u()(n,1)[0],c=(0,p.useState)(!1),l=u()(c,2),x=l[0],b=l[1],A=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,y.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:!0,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){r.validateFields().then((function(e){A(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:x,children:(0,y.jsxs)(g.Z,{form:r,layout:"vertical",name:"form_app_modal",initialValues:t,children:[(0,y.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{validator:function(e,t){return["system"].includes(t)?Promise.reject(new Error(d.ZP.get("名称不能为保留关键字"))):Promise.resolve()}}],children:(0,y.jsx)(m.Z,{placeholder:d.ZP.get("请输入应用名称")})}),(0,y.jsx)(g.Z.Item,{name:"scopes",label:d.ZP.get("权限"),rules:[{required:!0}],children:(0,y.jsx)(P.Z,{mode:"multiple",placeholder:d.ZP.get("请选择模块权限"),allowClear:!0,style:{width:"100%"},children:v.Z.scopes.map((function(e){return(0,y.jsx)(P.Z.Option,{value:e.value,children:e.name},e.value)}))})})]})})}},73236:function(e,t,a){"use strict";a.r(t);var n=a(48305),i=a.n(n),r=a(48916),o=a(3475),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],b=y[1],A=(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(){b(""),A.current=g.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})})})},C=function(e){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("失败,请检查");A.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})}),(0,P.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[x]);var S=(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(){A.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),b((function(e){return"".concat(e).concat(t)}))}),[]);return(0,f.useEffect)((function(){var e=s.Z.getInstance();return e.subscribe("updateSystemVersion",S),function(){e.unsubscribe("updateSystemVersion",S)}}),[]),(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(35181),h=a(3475),f=a(16314),m=(a(68251),a(78060)),P=a.n(m),Z=a(19334),v=a.n(Z),y=a(65814),x=a(52676),b={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,s.useState)(),t=o()(e,2),a=t[0],n=t[1],r=l.Z.useForm(),m=o()(r,1)[0],Z=(0,s.useState)(""),A=o()(Z,2),k=A[0],w=A[1],j=(0,s.useState)(!1),C=o()(j,2),S=C[0],E=C[1],M=(0,s.useState)("node"),T=o()(M,2),B=T[0],I=T[1],q=function(e){E(!0),w("in progress...\n"),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){})).catch((function(){E(!1),w((function(e){return"".concat(e,"update mirror error")}))}))},_=function(e){E(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return E(!1)}))},G=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"))&&E(!1)};return(0,s.useEffect)((function(){var e=y.Z.getInstance();return e.subscribe("updateNodeMirror",G),e.subscribe("updateLinuxMirror",G),function(){e.subscribe("updateNodeMirror",G),e.unsubscribe("updateLinuxMirror",G)}}),[]),(0,s.useEffect)((function(){f.W.get("".concat(h.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&n(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,x.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,x.jsxs)(l.Z,{layout:"vertical",form:m,style:{flexShrink:0},children:[(0,x.jsx)(l.Z.Item,{label:c.ZP.get("代理"),name:"proxy",extra:c.ZP.get("代理与镜像源二选一即可"),tooltip:{title:c.ZP.get("代理地址, 支持HTTP(S)/SOCK5"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{placeholder:"http://1.1.1.1:8080",style:{width:250},value:null==a?void 0:a.dependenceProxy,onChange:function(e){n(i()(i()({},a),{},{dependenceProxy:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){_("dependence-proxy")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Node 软件包镜像源"),name:"node",tooltip:c.ZP.get("NPM 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://registry.npmmirror.com",value:null==a?void 0:a.nodeMirror,onChange:function(e){n(i()(i()({},a),{},{nodeMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){q("node-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Python 软件包镜像源"),name:"python",tooltip:c.ZP.get("PyPI 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://pypi.doubanio.com/simple/",value:null==a?void 0:a.pythonMirror,onChange:function(e){n(i()(i()({},a),{},{pythonMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){_("python-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Linux 软件包镜像源"),name:"linux",tooltip:c.ZP.get("debian linux 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"http://mirrors.aliyun.com",value:null==a?void 0:a.linuxMirror,onChange:function(e){n(i()(i()({},a),{},{linuxMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){q("linux-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("清除依赖缓存"),name:"clean",tooltip:{title:c.ZP.get("清除依赖缓存"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(g.Z,{defaultValue:"node",style:{width:100},onChange:function(e){I(e)},options:[{label:"node",value:"node"},{label:"python3",value:"python3"}]}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){var e;e=B,E(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/dependence-clean"),{type:e}).then((function(e){var t=e.code;e.data,200===t&&u.ZP.success(c.ZP.get("清除成功"))})).catch((function(e){console.log(e)})).finally((function(){return E(!1)}))},style:{width:100},children:c.ZP.get("确认")})]})})]}),(0,x.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,x.jsx)(P(),{children:k})})]})}},42716:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(15558),o=a.n(r),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),b=a(16314),A=a(92294),k=a(28423),w=a(28068),j=a(88939),C=a(67303),S=a(59362),E=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,L="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,R=e.systemInfo,W=[{title:l.ZP.get("名称"),dataIndex:"name",key:"name"},{title:"Client ID",dataIndex:"client_id",key:"client_id",render:function(e,t){return(0,G.jsx)(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 Ae(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 be(t,n)},children:(0,G.jsx)(j.Z,{})})})]})}}],K=(0,u.useState)(!0),F=s()(K,2),N=F[0],V=F[1],z=(0,u.useState)([]),H=s()(z,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(){V(!0),b.W.get("".concat(y.Z.apiPrefix,"apps")).then((function(e){var t=e.code,a=e.data;200===t&&U(a)})).finally((function(){return V(!1)}))},xe=function(e,t){ae(e),J(!0)},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("吗")]}),onOk:function(){b.W.delete("".concat(y.Z.apiPrefix,"apps"),{data:[e.id]}).then((function(e){var a=e.code;e.data;if(200===a){m.ZP.success(l.ZP.get("删除成功"));var n=o()(O);n.splice(t,1),U(n)}}))}})},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("的Secret吗"),(0,G.jsx)("br",{}),(0,G.jsx)(D,{type:"secondary",children:l.ZP.get("重置Secret会让当前应用所有token失效")})]}),onOk:function(){b.W.put("".concat(y.Z.apiPrefix,"apps/").concat(e.id,"/reset-secret")).then((function(e){var t=e.code,a=e.data;200===t&&(m.ZP.success(l.ZP.get("重置成功")),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(){b.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(){L&&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?b.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()(L?[]:[{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:W,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)(E.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)(S.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:R})},{key:"about",label:l.ZP.get("关于"),children:(0,G.jsx)(T.default,{systemInfo:R})}])})}),X&&(0,G.jsx)(A.default,{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],b=y[1],A=(0,s.useState)([]),k=o()(A,2),w=k[0],j=k[1],C=u.Z.useForm(),S=o()(C,1)[0],E=function(e){b(e);var t=f.Z.notificationModeMap[e];j(t||[])};return(0,s.useEffect)((function(){t&&t.type&&(E(t.type),S.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:S,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:E,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(32253),v=a(71571),y=a(3475),x=a(16314),b=a(73236),A=a(87105),k=(a(68251),a(79231)),w=a(84522),j=a(32916),C=a(19334),S=a.n(C),E=a(48916),M=a(97302),T=a(52676),B={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone"},I=[{value:"base",label:c.ZP.get("基础数据"),disabled:!0},{value:"config",label:c.ZP.get("配置文件")},{value:"scripts",label:c.ZP.get("脚本文件")},{value:"log",label:c.ZP.get("日志文件")},{value:"deps",label:c.ZP.get("依赖文件")},{value:"syslog",label:c.ZP.get("系统日志")},{value:"dep_cache",label:c.ZP.get("依赖缓存")},{value:"raw",label:c.ZP.get("远程脚本缓存")},{value:"repo",label:c.ZP.get("远程仓库缓存")},{value:"ssh.d",label:c.ZP.get("SSH 文件缓存")}];t.default=function(e){var t=e.systemInfo,a=e.reloadTheme,n=localStorage.getItem("qinglong_dark_theme")||"auto",r=(0,s.useState)(),C=o()(r,2),q=C[0],_=C[1],G=l.Z.useForm(),D=o()(G,1)[0],L=(0,s.useState)(!1),R=o()(L,2),W=R[0],K=R[1],F=(0,j.default)(c.ZP.get("上传")),N=(0,j.default)(c.ZP.get("下载")),V=(0,s.useState)(!1),z=o()(V,2),H=z[0],O=z[1],U=(0,s.useState)(["base"]),Y=o()(U,2),Q=Y[0],X=Y[1],J=v||{},$=J.enable,ee=J.disable,te=(J.exportGeneratedCSS,J.setFetchMethod),ae=J.auto,ne=function(e){x.W.put("".concat(y.Z.apiPrefix,"system/config/").concat(e),S()(q,B[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(){x.W.get("".concat(y.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&_(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(l.Z,{layout:"vertical",form:D,children:[(0,T.jsx)(l.Z.Item,{label:c.ZP.get("主题"),name:"theme",initialValue:n,children:(0,T.jsxs)(p.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),te(fetch),"dark"===t?$({}):"light"===t?ee():ae({}),a()},value:n,optionType:"button",buttonStyle:"solid",children:[(0,T.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:c.ZP.get("亮色")}),(0,T.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:c.ZP.get("暗色")}),(0,T.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:c.ZP.get("跟随系统")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("日志删除频率"),name:"frequency",tooltip:c.ZP.get("每x天自动删除x天以前的日志"),children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(h.Z,{addonBefore:c.ZP.get("每"),addonAfter:c.ZP.get("天"),style:{width:180},min:0,value:null==q?void 0:q.logRemoveFrequency,onChange:function(e){_(i()(i()({},q),{},{logRemoveFrequency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("log-remove-frequency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("定时任务并发数"),name:"frequency",children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(h.Z,{style:{width:180},min:1,value:null==q?void 0:q.cronConcurrency,onChange:function(e){_(i()(i()({},q),{},{cronConcurrency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("cron-concurrency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("时区"),name:"timezone",children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(m.Z,{value:null==q?void 0:q.timezone,style:{width:180},onChange:function(e){_(i()(i()({},q),{},{timezone:e}))},options:M.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,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("timezone")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("语言"),name:"lang",children:(0,T.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,T.jsxs)(l.Z.Item,{label:c.ZP.get("数据备份还原"),name:"frequency",children:[(0,T.jsx)(f.Z,{type:"primary",onClick:function(){X(["base"]),O(!0)},loading:W,children:W?c.ZP.get("生成数据中..."):c.ZP.get("备份")}),(0,T.jsx)(P.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(y.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,a=e.event;null!=a&&a.percent&&F(Math.min(parseFloat(null==a?void 0:a.percent.toFixed(1)),99)),"done"===t.status&&(F(100),d.Z.confirm({width:600,maskClosable:!1,title:c.ZP.get("确认重启"),centered:!0,content:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{children:c.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,T.jsxs)("div",{children:[c.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:c.ZP.get("重启"),onOk:function(){x.W.put("".concat(y.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,T.jsxs)("span",{children:[c.ZP.get("系统将在"),(0,T.jsx)(w.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(y.Z.authKey))},children:(0,T.jsx)(f.Z,{icon:(0,T.jsx)(k.Z,{}),style:{marginLeft:8},children:c.ZP.get("还原数据")})})]}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("检查更新"),name:"update",children:(0,T.jsx)(b.default,{systemInfo:t})})]}),(0,T.jsx)(d.Z,{title:c.ZP.get("选择备份模块"),open:H,onOk:function(){K(!0),x.W.put("".concat(y.Z.apiPrefix,"system/data/export"),{type:Q},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&N(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,A.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){K(!1),O(!1)}))},onCancel:function(){return O(!1)},okText:c.ZP.get("开始备份"),cancelText:c.ZP.get("取消"),okButtonProps:{loading:W},children:(0,T.jsx)(Z.Z.Group,{value:Q,onChange:function(e){X(e)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:I.map((function(e){return(0,T.jsx)(Z.Z,{value:e.value,disabled:e.disabled,style:{marginLeft:0},children:e.label},e.value)}))})})]})}},32916:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l}});var n=a(72317),i=a(46016),r=a(45520),o=a(75271),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),b=a(69822),A=(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)(),S=i()(C,2),E=S[0],M=S[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],L=G[1],R=(0,o.useState)(),W=i()(R,2),K=W[0],F=W[1],N=(0,o.useState)(),V=i()(N,2),z=V[0],H=V[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&&L(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,A.jsx)(A.Fragment,{children:D?(0,A.jsxs)("div",{children:[(0,A.jsx)(k,{level:5,children:r.ZP.get("第一步")}),r.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,A.jsx)(w,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,A.jsx)(w,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,A.jsx)(w,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,A.jsx)(w,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第二步")}),r.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==D?void 0:D.secret,(0,A.jsx)("div",{style:{marginTop:10},children:(0,A.jsx)(Z(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==D?void 0:D.url})}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第三步")}),r.ZP.get("输入手机应用上的6位数字"),(0,A.jsx)(l.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:K,onChange:function(e){return F(e.target.value)},placeholder:"123456"}),(0,A.jsx)(u.Z,{type:"primary",loading:P,onClick:function(){j(!0),h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/active"),{code:K}).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,A.jsx)(v.Z,{})}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:r.ZP.get("修改用户名密码")}),(0,A.jsxs)(d.Z,{onFinish:function(e){h.W.put("".concat(f.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(f.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,A.jsx)(d.Z.Item,{label:r.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{autoComplete:"username",placeholder:r.ZP.get("用户名")})}),(0,A.jsx)(d.Z.Item,{label:r.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:r.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{type:"password",autoComplete:"current-password",placeholder:r.ZP.get("密码")})}),(0,A.jsx)(u.Z,{type:"primary",htmlType:"submit",children:r.ZP.get("保存")})]}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("两步验证")}),(0,A.jsx)(u.Z,{type:"primary",danger:E,onClick:function(){E?O():(U(),q(!0))},children:E?r.ZP.get("禁用"):r.ZP.get("启用")}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("头像")}),(0,A.jsx)(p.C,{size:128,shape:"square",icon:(0,A.jsx)(y.Z,{}),src:z}),(0,A.jsx)(b.Z,{rotationSlider:!0,children:(0,A.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(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,A.jsx)(u.Z,{icon:(0,A.jsx)(x.Z,{}),style:{marginLeft:8},children:r.ZP.get("更换头像")})})})]})}},76433:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return 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),b=a(11333),A=a.n(b),k=a(25298),w=a.n(k),j=a(17069),C=a.n(j),S=a(82092),E=a.n(S),M=a(5174),T=a(80403),B=/\[ℹ️info/g,I=/\[⚠️debug/g,q=/\[❌warn/g,_=/\[🐛error/g,G="system-log-info",D="system-warn-info",L="system-error-info",R="system-debug-info",W=M.lg.fromClass(function(){function e(t){w()(this,e),E()(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}}),K=M.lg.fromClass(function(){function e(t){w()(this,e),E()(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),E()(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:R});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),E()(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:L});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),V=M.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),z=a(52676),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),b=p[0],k=p[1],w=(0,u.useState)(""),j=s()(w,2),C=j[0],S=j[1],E=(0,x.Z)((function(){return v.W.get("".concat(y.Z.apiPrefix,"system/log?startTime=").concat(b[0],"&endTime=").concat(b[1]),{responseType:"blob"})}),{refreshDeps:[b],onSuccess:function(e){return o()(i()().mark((function t(){return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=S,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=E.loading,T=E.refresh,B=function(e){n.current.scrollDOM.scrollTo({top:"start"===e?0:n.current.scrollDOM.scrollHeight})};return(0,z.jsxs)("div",{style:{position:"relative"},children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(H,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>A()()||e<A()().subtract(7,"days")},defaultValue:[A()(),A()()],onOpenChange:function(e){r.current=!!e&&["",""]},onCalendarChange:function(e,t,a){var n=a.range;r.current&&"boolean"!=typeof r.current&&("start"===n&&(r.current[0]=t[0]),"end"===n&&(r.current[1]=t[1]),r.current[0]&&r.current[1]&&k(t))}}),(0,z.jsx)(h.Z,{onClick:function(){v.W.delete("".concat(y.Z.apiPrefix,"system/log")).then((function(e){g.ZP.success("删除成功"),T()}))},children:l.ZP.get("清空日志")})]}),C?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(d.ZP,{maxHeight:"".concat(t,"px"),value:C,onCreateEditor:function(e){n.current=e},extensions:[F,N,W,K,V],readOnly:!0,theme:a.includes("dark")?"dark":"light"}),(0,z.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(P.Z,{}),onClick:function(){B("start")}}),(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(Z.Z,{}),onClick:function(){B("end")}})]})]}):M?(0,z.jsx)(f.Z,{}):(0,z.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_SIMPLE})]})}},3475:function(e,t,a){"use strict";var n=a(72317),i=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:i,apiPrefix:"".concat(i,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],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("推送消息的优先级")},{label:"ntfyToken",tip:n.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:n.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:n.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:n.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:n.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:n.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:n.ZP.get("发送模板")},{label:"pushplusChannel",tip:n.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:n.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:n.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:n.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:n.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:n.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:n.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:n.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:n.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:n.ZP.get("wxPusherBot的uids"),required:!1}],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},{label:"emailTo",tip:n.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:n.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理")},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(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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),y=v[0],E=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){E(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:y,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("推送消息的优先级")},{label:"ntfyToken",tip:o.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:o.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:o.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:o.ZP.get("ntfy用户动作")}],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},{label:"emailTo",tip:o.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],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",y=function(e,t){var a,n=e.prefixCls,y=e.bordered,E=void 0===y||y,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"),!E),"".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}))},E=u.forwardRef(y);E.SECRET_COMBOBOX_MODE_DO_NOT_USE=v,E.Option=i.Wx,E.OptGroup=i.Xo,t.Z=E},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}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465],{73236:function(t,e,n){"use strict";n.r(e);var o=n(48305),r=n.n(o),i=n(48916),s=n(3475),a=n(16314),c=n(65814),l=n(78060),u=n.n(l),d=n(32890),p=n(61508),f=n(45520),h=n(93481),v=n(75271),g=n(72317),m=n(52676),x=d.Z.Countdown;e.default=function(t){var e=t.systemInfo,n=(0,v.useState)(!1),o=r()(n,2),l=o[0],d=o[1],y=(0,v.useState)(""),Z=r()(y,2),b=Z[0],P=Z[1],_=(0,v.useRef)(),k=function(t){f.Z.confirm({width:500,title:g.ZP.get("更新"),content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("已经是最新版了!")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("青龙")," ",t.lastVersion," ",g.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:g.ZP.get("重新下载"),onOk:function(){j(),a.W.put("".concat(s.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},w=function(t){var n=t.lastVersion,o=t.lastLog;f.Z.confirm({width:500,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("更新可用")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("新版本")," ",n," ",g.ZP.get("可用,你使用的版本为")," ",e.version,"。"]})]}),content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:o})}),okText:g.ZP.get("下载更新"),cancelText:g.ZP.get("以后再说"),onOk:function(){j(),a.W.put("".concat(s.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},j=function(){P(""),_.current=f.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:g.ZP.get("下载更新中..."),centered:!0,content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})})})},C=function(t){a.W.put("".concat(s.Z.apiPrefix,"update/").concat(t)).then((function(t){p.ZP.success({content:(0,m.jsxs)("span",{children:[g.ZP.get("系统将在"),(0,m.jsx)(x,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),g.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))};(0,v.useEffect)((function(){if(b){var t=b.includes("失败,请检查");_.current.update({maskClosable:t,closable:t,okButtonProps:{disabled:!t},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[b]);var I=(0,v.useCallback)((function(t){var e=t.message;e.includes("失败,请检查")&&p.ZP.error(g.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),e.includes("更新包下载成功")&&setTimeout((function(){f.Z.confirm({width:600,maskClosable:!1,title:g.ZP.get("确认重启"),centered:!0,content:g.ZP.get("系统安装包下载成功,确认重启"),okText:g.ZP.get("重启"),onOk:function(){C("system")},onCancel:function(){_.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),P((function(t){return"".concat(t).concat(e)}))}),[]);return(0,v.useEffect)((function(){var t=c.Z.getInstance();return t.subscribe("updateSystemVersion",I),function(){t.unsubscribe("updateSystemVersion",I)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(h.Z,{type:"primary",onClick:function(){l||(d(!0),p.ZP.loading(g.ZP.get("检查更新中..."),0),a.W.put("".concat(s.Z.apiPrefix,"system/update-check")).then((function(t){var e=t.code,n=t.data;p.ZP.destroy(),200===e&&(n.hasNewVersion?w(n):k(n))})).catch((function(t){p.ZP.destroy(),console.log(t)})).finally((function(){d(!1)})))},children:g.ZP.get("检查更新")}),(0,m.jsx)(h.Z,{type:"primary",onClick:function(){return C("reload")},style:{marginLeft:8},children:g.ZP.get("重新启动")})]})}},85657:function(t,e,n){"use strict";n.r(e);var o=n(26068),r=n.n(o),i=n(48305),s=n.n(i),a=n(72317),c=n(75271),l=n(72338),u=n(61508),d=n(45520),p=n(94747),f=n(17082),h=n(56646),v=n(93481),g=n(35181),m=n(6367),x=n(32253),y=n(71571),Z=n(3475),b=n(16314),P=n(73236),_=n(87105),k=(n(68251),n(79231)),w=n(84522),j=n(32916),C=n(19334),I=n.n(C),S=n(48916),O=n(97302),F=n(52676),T={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone"},z=[{value:"base",label:a.ZP.get("基础数据"),disabled:!0},{value:"config",label:a.ZP.get("配置文件")},{value:"scripts",label:a.ZP.get("脚本文件")},{value:"log",label:a.ZP.get("日志文件")},{value:"deps",label:a.ZP.get("依赖文件")},{value:"syslog",label:a.ZP.get("系统日志")},{value:"dep_cache",label:a.ZP.get("依赖缓存")},{value:"raw",label:a.ZP.get("远程脚本缓存")},{value:"repo",label:a.ZP.get("远程仓库缓存")},{value:"ssh.d",label:a.ZP.get("SSH 文件缓存")}];e.default=function(t){var e=t.systemInfo,n=t.reloadTheme,o=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,c.useState)(),C=s()(i,2),E=C[0],N=C[1],A=l.Z.useForm(),B=s()(A,1)[0],q=(0,c.useState)(!1),R=s()(q,2),W=R[0],M=R[1],H=(0,j.default)(a.ZP.get("上传")),L=(0,j.default)(a.ZP.get("下载")),D=(0,c.useState)(!1),G=s()(D,2),V=G[0],$=G[1],J=(0,c.useState)(["base"]),U=s()(J,2),X=U[0],K=U[1],Q=y||{},Y=Q.enable,tt=Q.disable,et=(Q.exportGeneratedCSS,Q.setFetchMethod),nt=Q.auto,ot=function(t){b.W.put("".concat(Z.Z.apiPrefix,"system/config/").concat(t),I()(E,T[t])).then((function(t){var e=t.code;t.data;200===e&&u.ZP.success(a.ZP.get("更新成功"))})).catch((function(t){console.log(t)}))};return(0,c.useEffect)((function(){b.W.get("".concat(Z.Z.apiPrefix,"system/config")).then((function(t){var e=t.code,n=t.data;200===e&&n.info&&N(n.info)})).catch((function(t){console.log(t)}))}),[]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(l.Z,{layout:"vertical",form:B,children:[(0,F.jsx)(l.Z.Item,{label:a.ZP.get("主题"),name:"theme",initialValue:o,children:(0,F.jsxs)(p.ZP.Group,{onChange:function(t){var e=t.target.value;localStorage.setItem("qinglong_dark_theme",t.target.value),et(fetch),"dark"===e?Y({}):"light"===e?tt():nt({}),n()},value:o,optionType:"button",buttonStyle:"solid",children:[(0,F.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:a.ZP.get("亮色")}),(0,F.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:a.ZP.get("暗色")}),(0,F.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:a.ZP.get("跟随系统")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("日志删除频率"),name:"frequency",tooltip:a.ZP.get("每x天自动删除x天以前的日志"),children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(h.Z,{addonBefore:a.ZP.get("每"),addonAfter:a.ZP.get("天"),style:{width:180},min:0,value:null==E?void 0:E.logRemoveFrequency,onChange:function(t){N(r()(r()({},E),{},{logRemoveFrequency:t}))}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("log-remove-frequency")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("定时任务并发数"),name:"frequency",children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(h.Z,{style:{width:180},min:1,value:null==E?void 0:E.cronConcurrency,onChange:function(t){N(r()(r()({},E),{},{cronConcurrency:t}))}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("cron-concurrency")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("时区"),name:"timezone",children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(g.Z,{value:null==E?void 0:E.timezone,style:{width:180},onChange:function(t){N(r()(r()({},E),{},{timezone:t}))},options:O.z.map((function(t){return{value:t,label:t}})),showSearch:!0,filterOption:function(t,e){var n;return(null==e||null===(n=e.value)||void 0===n?void 0:n.toLowerCase().indexOf(t.toLowerCase()))>=0}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("timezone")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("语言"),name:"lang",children:(0,F.jsx)(g.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(t){localStorage.setItem("lang",t),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:a.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,F.jsxs)(l.Z.Item,{label:a.ZP.get("数据备份还原"),name:"frequency",children:[(0,F.jsx)(v.Z,{type:"primary",onClick:function(){K(["base"]),$(!0)},loading:W,children:W?a.ZP.get("生成数据中..."):a.ZP.get("备份")}),(0,F.jsx)(m.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(Z.Z.apiPrefix,"system/data/import"),onChange:function(t){var e=t.file,n=t.event;null!=n&&n.percent&&H(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===e.status&&(H(100),d.Z.confirm({width:600,maskClosable:!1,title:a.ZP.get("确认重启"),centered:!0,content:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{children:a.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,F.jsxs)("div",{children:[a.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:a.ZP.get("重启"),onOk:function(){b.W.put("".concat(Z.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,F.jsxs)("span",{children:[a.ZP.get("系统将在"),(0,F.jsx)(w.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),a.ZP.get("秒后自动刷新")]}),duration:30}),(0,S.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))}})),"error"===e.status&&u.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(Z.Z.authKey))},children:(0,F.jsx)(v.Z,{icon:(0,F.jsx)(k.Z,{}),style:{marginLeft:8},children:a.ZP.get("还原数据")})})]}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("检查更新"),name:"update",children:(0,F.jsx)(P.default,{systemInfo:e})})]}),(0,F.jsx)(d.Z,{title:a.ZP.get("选择备份模块"),open:V,onOk:function(){M(!0),b.W.put("".concat(Z.Z.apiPrefix,"system/data/export"),{type:X},{responseType:"blob",timeout:864e5,onDownloadProgress:function(t){t.progress&&L(parseFloat((100*t.progress).toFixed(1)))}}).then((function(t){(0,_.saveAs)(t,"data.tgz")})).catch((function(t){console.log(t)})).finally((function(){M(!1),$(!1)}))},onCancel:function(){return $(!1)},okText:a.ZP.get("开始备份"),cancelText:a.ZP.get("取消"),okButtonProps:{loading:W},children:(0,F.jsx)(x.Z.Group,{value:X,onChange:function(t){K(t)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:z.map((function(t){return(0,F.jsx)(x.Z,{value:t.value,disabled:t.disabled,style:{marginLeft:0},children:t.label},t.value)}))})})]})}},32916:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return l}});var o=n(72317),r=n(46016),i=n(45520),s=n(75271),a=n(52676),c=function(t){var e=t.percent;return(0,a.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:e})};function l(t){var e=(0,s.useRef)();return function(n){e.current?(e.current.update({title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,a.jsx)(c,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var t;null===(t=e.current)||void 0===t||t.destroy(),e.current=null}))):e.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,a.jsx)(c,{percent:n}),okButtonProps:{disabled:!0}})}}},65814:function(t,e,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),s=n.n(i),a=n(90228),c=n.n(a),l=n(87999),u=n.n(l),d=n(25298),p=n.n(d),f=n(17069),h=n.n(f),v=n(82092),g=n.n(v),m=n(78078),x=n.n(m),y=["type"],Z=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,t),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=e,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var e,n;return h()(t,[{key:"init",value:(n=u()(c()().mark((function t(){var e=this;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){t.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),t.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,t.next=14,new Promise((function(t){return setTimeout(t,e.options.reconnectInterval)}));case 14:t.next=3;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),this.handleError(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var t=this;this.socket&&(this.socket.onopen=function(){t.state="open",t.emit("open")},this.socket.onmessage=function(e){var n=JSON.parse(e.data);t.dispatchMessage(n)},this.socket.onclose=function(){t.state="closed",t.emit("close")})}},{key:"waitForClose",value:(e=u()(c()().mark((function t(){var e;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().CLOSED){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,100)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"subscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(!n.has(e)){n.add(e),this.subscriptions.set(t,n);var o={action:"subscribe",topic:t};this.send(o)}}},{key:"unsubscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(n.has(e)){n.delete(e);var o={action:"unsubscribe",topic:t};this.send(o)}}},{key:"send",value:function(t){var e;(null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&this.socket.send(JSON.stringify(t))}},{key:"dispatchMessage",value:function(t){var e=t.type,n=s()(t,y),o=this.subscriptions.get(e)||new Set;r()(o).forEach((function(t){return t(n)}))}},{key:"startHeartbeat",value:function(){var t=this;this.heartbeatTimeout=setInterval((function(){var e;(null===(e=t.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&t.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(t){console.error("WebSocket错误:",t),this.emit("error",t)}},{key:"on",value:function(t,e){}},{key:"emit",value:function(t,e){}}],[{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.instance||(t.instance=new t(e,n)),t.instance}}]),t}();g()(Z,"instance",null),e.Z=Z},68251:function(){},27916:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var o=n(99459),r=n(75271);function i(){var t=r.useReducer((function(t){return t+1}),0);return(0,o.Z)(t,2)[1]}},35181:function(t,e,n){"use strict";var o=n(57904),r=n(2053),i=n(82187),s=n.n(i),a=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),p=n(30107),f=n(38470),h=n(5663),v=n(21485),g=n(28800),m=n(50528),x=n(81393),y=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n},Z="SECRET_COMBOBOX_MODE_DO_NOT_USE",b=function(t,e){var n,i=t.prefixCls,b=t.bordered,P=void 0===b||b,_=t.className,k=t.getPopupContainer,w=t.dropdownClassName,j=t.popupClassName,C=t.listHeight,I=void 0===C?256:C,S=t.placement,O=t.listItemHeight,F=void 0===O?32:O,T=t.size,z=t.disabled,E=t.notFoundContent,N=t.status,A=t.showArrow,B=y(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),q=l.useContext(u.E_),R=q.getPopupContainer,W=q.getPrefixCls,M=q.renderEmpty,H=q.direction,L=q.virtual,D=q.dropdownMatchSelectWidth,G=l.useContext(f.Z),V=W("select",i),$=W(),J=(0,x.ri)(V,H),U=J.compactSize,X=J.compactItemClassnames,K=l.useMemo((function(){var t=B.mode;if("combobox"!==t)return t===Z?"combobox":t}),[B.mode]),Q="multiple"===K||"tags"===K,Y=void 0!==A?A:B.loading||!(Q||"combobox"===K),tt=(0,l.useContext)(h.aM),et=tt.status,nt=tt.hasFeedback,ot=tt.isFormItemInput,rt=tt.feedbackIcon,it=(0,g.F)(et,N);n=void 0!==E?E:"combobox"===K?null:(M||d.Z)("Select");var st=(0,m.Z)((0,r.Z)((0,r.Z)({},B),{multiple:Q,hasFeedback:nt,feedbackIcon:rt,showArrow:Y,prefixCls:V})),at=st.suffixIcon,ct=st.itemIcon,lt=st.removeIcon,ut=st.clearIcon,dt=(0,c.Z)(B,["suffixIcon","itemIcon"]),pt=s()(j||w,(0,o.Z)({},"".concat(V,"-dropdown-").concat(H),"rtl"===H)),ft=U||T||G,ht=l.useContext(p.Z),vt=null!=z?z:ht,gt=s()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===ft),"".concat(V,"-sm"),"small"===ft),"".concat(V,"-rtl"),"rtl"===H),"".concat(V,"-borderless"),!P),"".concat(V,"-in-form-item"),ot),(0,g.Z)(V,it,nt),X,_);return l.createElement(a.ZP,(0,r.Z)({ref:e,virtual:L,dropdownMatchSelectWidth:D},dt,{transitionName:(0,v.mL)($,(0,v.q0)(S),B.transitionName),listHeight:I,listItemHeight:F,mode:K,prefixCls:V,placement:void 0!==S?S:"rtl"===H?"bottomRight":"bottomLeft",direction:H,inputIcon:at,menuItemSelectedIcon:ct,removeIcon:lt,clearIcon:ut,notFoundContent:n,className:gt,getPopupContainer:k||R,dropdownClassName:pt,showArrow:nt||A,disabled:vt}))},P=l.forwardRef(b);P.SECRET_COMBOBOX_MODE_DO_NOT_USE=Z,P.Option=a.Wx,P.OptGroup=a.Xo,e.Z=P},88987:function(t,e,n){var o=n(71519),r=n(82999),i=n(76111),s=n(50506),a=n(80845);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},175:function(t,e,n){var o=n(2173),r=n(33752),i=n(10548),s=n(63410),a=n(3564);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},35922:function(t,e,n){var o=n(47758)(n(29165),"Map");t.exports=o},9440:function(t,e,n){var o=n(7140),r=n(56504),i=n(88833),s=n(80953),a=n(70724);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},62718:function(t,e,n){var o=n(42448);t.exports=function(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}},58939:function(t,e,n){var o=n(92042),r=n(90654),i=n(36838),s=n(51059),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(o(t)?p:a).test(s(t))}},36633:function(t,e,n){var o=n(29165)["__core-js_shared__"];t.exports=o},67707:function(t,e,n){var o=n(3880);t.exports=function(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}},47758:function(t,e,n){var o=n(58939),r=n(9149);t.exports=function(t,e){var n=r(t,e);return o(n)?n:void 0}},9149:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},71519:function(t,e,n){var o=n(37722);t.exports=function(){this.__data__=o?o(null):{},this.size=0}},82999:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},76111:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},50506:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return o?void 0!==e[t]:r.call(e,t)}},80845:function(t,e,n){var o=n(37722);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this}},3880:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},90654:function(t,e,n){var o,r=n(36633),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";t.exports=function(t){return!!i&&i in t}},2173:function(t){t.exports=function(){this.__data__=[],this.size=0}},33752:function(t,e,n){var o=n(62718),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},10548:function(t,e,n){var o=n(62718);t.exports=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}},63410:function(t,e,n){var o=n(62718);t.exports=function(t){return o(this.__data__,t)>-1}},3564:function(t,e,n){var o=n(62718);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},7140:function(t,e,n){var o=n(88987),r=n(175),i=n(35922);t.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},56504:function(t,e,n){var o=n(67707);t.exports=function(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}},88833:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).get(t)}},80953:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).has(t)}},70724:function(t,e,n){var o=n(67707);t.exports=function(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},37722:function(t,e,n){var o=n(47758)(Object,"create");t.exports=o},51059:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},42448:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},92042:function(t,e,n){var o=n(80732),r=n(36838);t.exports=function(t){if(!r(t))return!1;var e=o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5530],{69870:function(e,t){t.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(e,t,r){var n=r(98037),a=r(75271),o=r(69870),l=r(64720),i=function(e,t){return a.createElement(l.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:o.Z}))},s=a.forwardRef(i);t.Z=s},67303:function(e,t,r){r.r(t);var n=r(48305),a=r.n(n),o=r(72317),l=r(75271),i=r(50691),s=r(61508),c=r(17082),u=r(93481),p=r(72338),g=r(70892),f=r(6367),d=r(16314),h=r(3475),m=r(98783),b=r(63392),P=r.n(b),y=r(34014),v=r(1371),Z=r(79231),x=r(69822),w=(r(94095),r(52676)),k=i.Z.Title,j=i.Z.Link;t.default=function(e){var t=e.user,r=e.userChange,n=(0,l.useState)(!1),i=a()(n,2),b=i[0],B=i[1],q=(0,l.useState)(),C=a()(q,2),S=C[0],E=C[1],O=(0,l.useState)(!1),_=a()(O,2),T=_[0],A=_[1],R=(0,l.useState)(),U=a()(R,2),K=U[0],z=U[1],I=(0,l.useState)(),W=a()(I,2),H=W[0],M=W[1],N=(0,l.useState)(),Q=a()(N,2),X=Q[0],D=Q[1],G=function(){d.W.put("".concat(h.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,n=e.data;200===t&&n&&(E(!1),r())})).catch((function(e){console.log(e)}))},L=function(){d.W.get("".concat(h.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,r=e.data;200===t&&z(r)})).catch((function(e){console.log(e)}))};return(0,l.useEffect)((function(){E(t&&t.twoFactorActivated),D(t.avatar&&"".concat(h.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),T?(0,w.jsx)(w.Fragment,{children:K?(0,w.jsxs)("div",{children:[(0,w.jsx)(k,{level:5,children:o.ZP.get("第一步")}),o.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,w.jsx)(j,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,w.jsx)(j,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,w.jsx)(j,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,w.jsx)(j,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:o.ZP.get("第二步")}),o.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==K?void 0:K.secret,(0,w.jsx)("div",{style:{marginTop:10},children:(0,w.jsx)(P(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==K?void 0:K.url})}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:o.ZP.get("第三步")}),o.ZP.get("输入手机应用上的6位数字"),(0,w.jsx)(c.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:H,onChange:function(e){return M(e.target.value)},placeholder:"123456"}),(0,w.jsx)(u.Z,{type:"primary",loading:b,onClick:function(){B(!0),d.W.put("".concat(h.Z.apiPrefix,"user/two-factor/active"),{code:H}).then((function(e){var t=e.code,n=e.data;200===t&&(n?(s.ZP.success(o.ZP.get("激活成功")),A(!1),E(!0),r()):s.ZP.success(o.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return B(!1)}))},children:o.ZP.get("完成设置")})]}):(0,w.jsx)(y.Z,{})}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:o.ZP.get("修改用户名密码")}),(0,w.jsxs)(p.Z,{onFinish:function(e){d.W.put("".concat(h.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(h.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,w.jsx)(p.Z.Item,{label:o.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{autoComplete:"username",placeholder:o.ZP.get("用户名")})}),(0,w.jsx)(p.Z.Item,{label:o.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:o.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{type:"password",autoComplete:"current-password",placeholder:o.ZP.get("密码")})}),(0,w.jsx)(u.Z,{type:"primary",htmlType:"submit",children:o.ZP.get("保存")})]}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:o.ZP.get("两步验证")}),(0,w.jsx)(u.Z,{type:"primary",danger:S,onClick:function(){S?G():(L(),A(!0))},children:S?o.ZP.get("禁用"):o.ZP.get("启用")}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:o.ZP.get("头像")}),(0,w.jsx)(g.C,{size:128,shape:"square",icon:(0,w.jsx)(v.Z,{}),src:X}),(0,w.jsx)(x.Z,{rotationSlider:!0,children:(0,w.jsx)(f.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(h.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(D("".concat(h.Z.apiPrefix,"static/").concat(e.file.response.data)),r())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(h.Z.authKey))},children:(0,w.jsx)(u.Z,{icon:(0,w.jsx)(Z.Z,{}),style:{marginLeft:8},children:o.ZP.get("更换头像")})})})]})}},3475:function(e,t,r){var n=r(72317),a=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:a,apiPrefix:"".concat(a,"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("推送消息的优先级")},{label:"ntfyToken",tip:n.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:n.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:n.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:n.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:n.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:n.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:n.ZP.get("发送模板")},{label:"pushplusChannel",tip:n.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:n.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:n.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:n.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:n.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:n.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:n.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:n.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:n.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:n.ZP.get("wxPusherBot的uids"),required:!1}],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},{label:"emailTo",tip:n.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:n.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,r){r.d(t,{W:function(){return b}});var n=r(90228),a=r.n(n),o=r(87999),l=r.n(o),i=r(72317),s=r(61508),c=r(33839),u=r(3475),p=r(98783),g=r(69313),f=r(52676);s.ZP.config({duration:2});var d=Date.now(),h=g.Z.create({timeout:6e4,params:{t:d}}),m=["/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(u.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=l()(a()().mark((function e(t){var r,n,o;return a()().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(u.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(o=n.message||n.data)&&c.Z.error({message:o,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&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login"));else{var n,a,o,l;if("function"==typeof(null===(n=e.config)||void 0===n?void 0:n.onError))return null===(l=e.config)||void 0===l?void 0:l.onError(e.response);t&&c.Z.error({message:t,description:null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&a.errors?(0,f.jsx)(f.Fragment,{children:null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o||null===(o=o.errors)||void 0===o?void 0:o.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=h},27916:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(99459),a=r(75271);function o(){var e=a.useReducer((function(e){return e+1}),0);return(0,n.Z)(e,2)[1]}},70892:function(e,t,r){r.d(t,{C:function(){return O}});var n=r(2053),a=r(57904),o=r(24744),l=r(99459),i=r(82187),s=r.n(i),c=r(28526),u=r(3083),p=r(75271),g=r(96820),f=r(71343),d=r(46555),h=p.createContext("default"),m=function(e){var t=e.children,r=e.size;return p.createElement(h.Consumer,null,(function(e){return p.createElement(h.Provider,{value:r||e},t)}))},b=h,P=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},y=function(e,t){var r=p.useContext(b),i=p.useState(1),h=(0,l.Z)(i,2),m=h[0],y=h[1],v=p.useState(!1),Z=(0,l.Z)(v,2),x=Z[0],w=Z[1],k=p.useState(!0),j=(0,l.Z)(k,2),B=j[0],q=j[1],C=p.useRef(null),S=p.useRef(null),E=(0,u.sQ)(t,C),O=p.useContext(g.E_).getPrefixCls,_=function(){if(S.current&&C.current){var t=S.current.offsetWidth,r=C.current.offsetWidth;if(0!==t&&0!==r){var n=e.gap,a=void 0===n?4:n;2*a<r&&y(r-2*a<t?(r-2*a)/t:1)}}};p.useEffect((function(){w(!0)}),[]),p.useEffect((function(){q(!0),y(1)}),[e.src]),p.useEffect((function(){_()}),[e.gap]);var T,A=e.prefixCls,R=e.shape,U=void 0===R?"circle":R,K=e.size,z=void 0===K?"default":K,I=e.src,W=e.srcSet,H=e.icon,M=e.className,N=e.alt,Q=e.draggable,X=e.children,D=e.crossOrigin,G=P(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),L="default"===z?r:z,F=Object.keys("object"===(0,o.Z)(L)&&L||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),$=(0,f.Z)(F),V=p.useMemo((function(){if("object"!==(0,o.Z)(L))return{};var e=d.c4.find((function(e){return $[e]})),t=L[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:H?t/2:18}:{}}),[$,L]),J=O("avatar",A),Y=s()((0,a.Z)((0,a.Z)({},"".concat(J,"-lg"),"large"===L),"".concat(J,"-sm"),"small"===L)),ee=p.isValidElement(I),te=s()(J,Y,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(J,"-").concat(U),!!U),"".concat(J,"-image"),ee||I&&B),"".concat(J,"-icon"),!!H),M),re="number"==typeof L?{width:L,height:L,lineHeight:"".concat(L,"px"),fontSize:H?L/2:18}:{};if("string"==typeof I&&B)T=p.createElement("img",{src:I,draggable:Q,srcSet:W,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&q(!1)},alt:N,crossOrigin:D});else if(ee)T=I;else if(H)T=H;else if(x||1!==m){var ne="scale(".concat(m,") translateX(-50%)"),ae={msTransform:ne,WebkitTransform:ne,transform:ne},oe="number"==typeof L?{lineHeight:"".concat(L,"px")}:{};T=p.createElement(c.Z,{onResize:_},p.createElement("span",{className:"".concat(J,"-string"),ref:S,style:(0,n.Z)((0,n.Z)({},oe),ae)},X))}else T=p.createElement("span",{className:"".concat(J,"-string"),style:{opacity:0},ref:S},X);return delete G.onError,delete G.gap,p.createElement("span",(0,n.Z)({},G,{style:(0,n.Z)((0,n.Z)((0,n.Z)({},re),V),G.style),className:te,ref:E}),T)};var v=p.forwardRef(y),Z=r(22615),x=function(e){return e?"function"==typeof e?e():e:null},w=r(21485),k=r(59816),j=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},B=function(e){var t=e.title,r=e.content,n=e.prefixCls;return p.createElement(p.Fragment,null,t&&p.createElement("div",{className:"".concat(n,"-title")},x(t)),p.createElement("div",{className:"".concat(n,"-inner-content")},x(r)))};var q=p.forwardRef((function(e,t){var r=e.prefixCls,a=e.title,o=e.content,l=e._overlay,i=e.placement,s=void 0===i?"top":i,c=e.trigger,u=void 0===c?"hover":c,f=e.mouseEnterDelay,d=void 0===f?.1:f,h=e.mouseLeaveDelay,m=void 0===h?.1:h,b=e.overlayStyle,P=void 0===b?{}:b,y=j(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),v=p.useContext(g.E_).getPrefixCls,Z=v("popover",r),x=v(),q=p.useMemo((function(){return l||(a||o?p.createElement(B,{prefixCls:Z,title:a,content:o}):null)}),[l,a,o,Z]);return p.createElement(k.Z,(0,n.Z)({placement:s,trigger:u,mouseEnterDelay:d,mouseLeaveDelay:m,overlayStyle:P},y,{prefixCls:Z,ref:t,overlay:q,transitionName:(0,w.mL)(x,"zoom-big",y.transitionName)}))})),C=r(5555),S=function(e){var t=p.useContext(g.E_),r=t.getPrefixCls,n=t.direction,o=e.prefixCls,l=e.className,i=void 0===l?"":l,c=e.maxCount,u=e.maxStyle,f=e.size,d=r("avatar-group",o),h=s()(d,(0,a.Z)({},"".concat(d,"-rtl"),"rtl"===n),i),b=e.children,P=e.maxPopoverPlacement,y=void 0===P?"top":P,x=e.maxPopoverTrigger,w=void 0===x?"hover":x,k=(0,Z.Z)(b).map((function(e,t){return(0,C.Tm)(e,{key:"avatar-key-".concat(t)})})),j=k.length;if(c&&c<j){var B=k.slice(0,c),S=k.slice(c,j);return B.push(p.createElement(q,{key:"avatar-popover-key",content:S,trigger:w,placement:y,overlayClassName:"".concat(d,"-popover")},p.createElement(v,{style:u},"+".concat(j-c)))),p.createElement(m,{size:f},p.createElement("div",{className:h,style:e.style},B))}return p.createElement(m,{size:f},p.createElement("div",{className:h,style:e.style},k))},E=v;E.Group=S;var O=E},71343:function(e,t,r){var n=r(75271),a=r(27916),o=r(46555);t.Z=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,n.useRef)({}),r=(0,a.Z)();return(0,n.useEffect)((function(){var n=o.ZP.subscribe((function(n){t.current=n,e&&r()}));return function(){return o.ZP.unsubscribe(n)}}),[]),t.current}},58504:function(e,t,r){r(5860)},15767:function(e,t,r){r.d(t,{CR:function(){return c},Jh:function(){return s},ZT:function(){return a},_T:function(){return l},ev:function(){return u},mG:function(){return i},pi:function(){return o}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function l(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function i(e,t,r,n){return new(r||(r=Promise))((function(a,o){function l(e){try{s(n.next(e))}catch(e){o(e)}}function i(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(l,i)}s((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)l.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return l}function u(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError}}]);
|