@whyour/qinglong 2.19.2-1 → 2.19.2-2
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/package.json +1 -1
- package/static/build/api/system.js +4 -4
- package/static/build/services/cron.js +1 -1
- package/static/build/services/system.js +3 -2
- package/static/dist/index.html +2 -2
- package/static/dist/{preload_helper.0d173b72.js → preload_helper.9c086410.js} +1 -1
- package/static/dist/{src__pages__crontab__detail.64ec3a2b.async.js → src__pages__crontab__detail.ee431270.async.js} +1 -1
- package/static/dist/src__pages__crontab__index.af4cb04a.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.5fa54b25.async.js → src__pages__crontab__logModal.57501983.async.js} +1 -1
- package/static/dist/src__pages__setting__checkUpdate.46efe057.async.js +1 -0
- package/static/dist/src__pages__setting__index.9be4775c.async.js +1 -0
- package/static/dist/src__pages__setting__other.60924a56.async.js +1 -0
- package/static/dist/{umi.35a646c6.js → umi.5b8ae363.js} +1 -1
- package/static/dist/src__pages__crontab__index.74e7828f.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.c152dfaf.async.js +0 -1
- package/static/dist/src__pages__setting__index.32b260ce.async.js +0 -1
- package/static/dist/src__pages__setting__other.8b77afcd.async.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4473,4555,5812,8851,2208],{44224:function(e,t,n){"use strict";var a=(0,n(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=a},72439:function(e,t,n){"use strict";var a=n(48305),i=n.n(a),r=n(75271),o=n(30502),c=n(48916);t.Z=function(e,t){var n=(0,r.useState)(0),a=i()(n,2),s=a[0],l=a[1];return(0,o.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),l((0,c.W9)({extraHeight:t,target:n}))})),s}},41860:function(e,t,n){"use strict";n.r(t),n.d(t,{getScheduleType:function(){return c},scheduleTypeMap:function(){return o}});var a=n(82092),i=n.n(a),r=n(44860),o=i()(i()(i()({},r.ScheduleType.Normal,""),r.ScheduleType.Once,"@once"),r.ScheduleType.Boot,"@boot"),c=function(e){return null!=e&&e.startsWith("@once")?r.ScheduleType.Once:null!=e&&e.startsWith("@boot")?r.ScheduleType.Boot:r.ScheduleType.Normal}},94526:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return L}});var a=n(26068),i=n.n(a),r=n(48305),o=n.n(r),c=n(72317),s=n(75271),l=n(50691),u=n(19293),d=n(45520),m=n(61508),g=n(48758),p=n(47667),f=n(59816),h=n(93481),Z=n(66633),P=n(70175),x=n(33886),v=n(9798),b=n(15631),y=n(56958),A=n(89709),k=n(86935),j=n(72523),w=n(44860),S=n(62348),C=n(16314),E=n(3475),B=n(63549),T=n(83383),M=n(44224),_=n(48916),q=n(17355),N=n(30502),I=n(16483),R=n.n(I),D=n(52676),O=l.Z.Text,G=[{key:"log",tab:c.ZP.get("日志")},{key:"script",tab:c.ZP.get("脚本")}],L=function(e){var t,n,a,r,I=e.cron,L=void 0===I?{}:I,W=e.handleCancel,K=e.theme,z=e.isPhone,F=(0,s.useState)("log"),V=o()(F,2),H=V[0],U=V[1],Y=(0,s.useState)(!0),Q=o()(Y,2),J=(Q[0],Q[1]),X=(0,s.useState)([]),$=o()(X,2),ee=$[0],te=$[1],ne=(0,s.useState)(""),ae=o()(ne,2),ie=ae[0],re=ae[1],oe=(0,s.useState)(""),ce=o()(oe,2),se=ce[0],le=ce[1],ue=(0,s.useState)(!1),de=o()(ue,2),me=de[0],ge=de[1],pe=(0,s.useRef)(null),fe=(0,s.useState)({}),he=o()(fe,2),Ze=he[0],Pe=he[1],xe=(0,s.useState)(""),ve=o()(xe,2),be=ve[0],ye=ve[1],Ae=(0,s.useState)(G),ke=o()(Ae,2),je=ke[0],we=ke[1],Se=(0,s.useState)({}),Ce=o()(Se,2),Ee=Ce[0],Be=Ce[1],Te=(0,s.useRef)(null),Me=function(e){var t=(0,s.useState)(0),n=o()(t,2),a=n[0],i=n[1];return(0,N.Z)(e,(function(e){var t=e.target.clientHeight;a!==t&&i(t)})),a}(Te),_e={log:(0,D.jsx)("div",{ref:Te,children:(0,D.jsx)(u.ZP,{children:(0,D.jsx)(q.Z,{data:ee,height:Me,itemHeight:47,itemKey:"filename",children:function(e){return(0,D.jsxs)(u.ZP.Item,{className:"log-item",onClick:function(){return qe(e)},children:[(0,D.jsx)(P.Z,{style:{marginRight:10}}),e.directory,"/",e.filename]})}})})}),script:Ze.filename&&(0,D.jsx)(T.ZP,{language:(0,_.H$)(Ze.filename),theme:K,value:se,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e,t){pe.current=e}})},qe=function(e){var t="".concat(E.Z.apiPrefix,"logs/detail?file=").concat(e.filename,"&path=").concat(e.directory||"");localStorage.setItem("logCron",t),ye(t),C.W.get(t).then((function(e){var t=e.code,n=e.data;200===t&&(re(n),ge(!0))}))},Ne=function(){J(!0),C.W.get("".concat(E.Z.apiPrefix,"crons/").concat(L.id,"/logs")).then((function(e){var t=e.code,n=e.data;200===t&&te(n)})).finally((function(){return J(!1)}))};return(0,s.useEffect)((function(){L&&L.id&&(Be(L),Ne(),function(){var e=(0,_.FA)(L.command);if(Array.isArray(e)){we(je);var t=o()(e,2),n=t[0],a=t[1];Pe({parent:a,filename:n}),C.W.get("".concat(E.Z.apiPrefix,"scripts/detail?file=").concat(n,"&path=").concat(a||"")).then((function(e){var t=e.code,n=e.data;200===t&&le(n)}))}else we([je[0]]),U("log")}())}),[L]),(0,D.jsxs)(d.Z,{title:(0,D.jsxs)("div",{className:"crontab-title-wrapper",children:[(0,D.jsxs)("div",{style:{minWidth:0,display:"flex",alignItems:"center"},children:[(0,D.jsx)(l.Z.Text,{style:{width:200,boxSizing:"content-box"},ellipsis:{onEllipsis:function(e){return e},tooltip:Ee.name},children:Ee.name}),(null===(t=Ee.labels)||void 0===t?void 0:t.length)>0&&""!==Ee.labels[0]&&(0,D.jsx)(g.Z,{type:"vertical"}),(null===(n=Ee.labels)||void 0===n?void 0:n.length)>0&&""!==Ee.labels[0]&&(null===(a=Ee.labels)||void 0===a?void 0:a.map((function(e,t){return(0,D.jsx)(p.Z,{color:"blue",style:{marginRight:5},children:e},e)})))]}),(0,D.jsxs)("div",{className:"operations",children:[(0,D.jsx)(f.Z,{title:Ee.status===w.CrontabStatus.idle?c.ZP.get("运行"):c.ZP.get("停止"),children:(0,D.jsx)(h.Z,{type:"link",icon:Ee.status===w.CrontabStatus.idle?(0,D.jsx)(x.Z,{}):(0,D.jsx)(v.Z,{}),size:"small",onClick:Ee.status===w.CrontabStatus.idle?function(){d.Z.confirm({title:c.ZP.get("确认运行"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认运行定时任务")," ",(0,D.jsx)(O,{style:{wordBreak:"break-all"},type:"warning",children:Ee.name})," ",c.ZP.get("吗")]}),onOk:function(){C.W.put("".concat(E.Z.apiPrefix,"crons/run"),[Ee.id]).then((function(e){var t=e.code;e.data;200===t&&(Be(i()(i()({},Ee),{},{status:w.CrontabStatus.running})),setTimeout((function(){Ne()}),1e3))}))}})}:function(){d.Z.confirm({title:c.ZP.get("确认停止"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认停止定时任务")," ",(0,D.jsx)(O,{style:{wordBreak:"break-all"},type:"warning",children:Ee.name})," ",c.ZP.get("吗")]}),onOk:function(){C.W.put("".concat(E.Z.apiPrefix,"crons/stop"),[Ee.id]).then((function(e){var t=e.code;e.data;200===t&&Be(i()(i()({},Ee),{},{status:w.CrontabStatus.idle}))}))}})}})}),(0,D.jsx)(f.Z,{title:1===Ee.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),children:(0,D.jsx)(h.Z,{type:"link",icon:(0,D.jsx)(M.Z,{type:1===Ee.isDisabled?"ql-icon-enable":"ql-icon-disable"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Ee.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用")),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认"),1===Ee.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),c.ZP.get("定时任务")," ",(0,D.jsx)(O,{style:{wordBreak:"break-all"},type:"warning",children:Ee.name})," ",c.ZP.get("吗")]}),onOk:function(){C.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===Ee.isDisabled?"enable":"disable"),[Ee.id]).then((function(e){var t=e.code;e.data;200===t&&Be(i()(i()({},Ee),{},{isDisabled:1===Ee.isDisabled?0:1}))}))}})}})}),(0,D.jsx)(f.Z,{title:1===Ee.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),children:(0,D.jsx)(h.Z,{type:"link",icon:(0,D.jsx)(M.Z,{type:1===Ee.isPinned?"ql-icon-untop":"ql-icon-top"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Ee.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶")),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认"),1===Ee.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),c.ZP.get("定时任务")," ",(0,D.jsx)(O,{style:{wordBreak:"break-all"},type:"warning",children:Ee.name})," ",c.ZP.get("吗")]}),onOk:function(){C.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===Ee.isPinned?"unpin":"pin"),[Ee.id]).then((function(e){var t=e.code;e.data;200===t&&Be(i()(i()({},Ee),{},{isPinned:1===Ee.isPinned?0:1}))}))}})}})})]})]}),centered:!0,open:!0,forceRender:!0,footer:!1,onCancel:function(){return W()},wrapClassName:"crontab-detail",width:z?"":"80vw",children:[(0,D.jsxs)("div",{className:"card-wrapper",children:[(0,D.jsx)(Z.Z,{children:(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("任务")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Ee.command})]})}),(0,D.jsxs)(Z.Z,{style:{marginTop:10},children:[(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("状态")}),(0,D.jsxs)("div",{className:"cron-detail-info-value",children:[(!Ee.isDisabled||Ee.status!==w.CrontabStatus.idle)&&(0,D.jsxs)(D.Fragment,{children:[Ee.status===w.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(b.Z,{}),color:"default",children:c.ZP.get("空闲中")}),Ee.status===w.CrontabStatus.running&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(y.Z,{spin:!0}),color:"processing",children:c.ZP.get("运行中")}),Ee.status===w.CrontabStatus.queued&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(A.Z,{}),color:"default",children:c.ZP.get("队列中")})]}),1===Ee.isDisabled&&Ee.status===w.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(k.Z,{}),color:"error",children:c.ZP.get("已禁用")})]})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("定时")}),(0,D.jsxs)("div",{className:"cron-detail-info-value",children:[(0,D.jsx)("div",{children:Ee.schedule}),null===(r=Ee.extra_schedules)||void 0===r?void 0:r.map((function(e){return(0,D.jsx)("div",{children:e.schedule},e.schedule)}))]})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("最后运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Ee.last_execution_time?R()(1e3*Ee.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("最后运行时长")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Ee.last_running_time?(0,S.E)(Ee.last_running_time):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("下次运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Ee.nextRunTime&&R()(Ee.nextRunTime).format("YYYY-MM-DD HH:mm:ss")})]})]}),(0,D.jsx)(Z.Z,{style:{marginTop:10},tabList:je,activeTabKey:H,onTabChange:function(e){!function(e){U(e)}(e)},tabBarExtraContent:"script"===H&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){d.Z.confirm({title:"确认保存",content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认保存文件"),(0,D.jsxs)(O,{style:{wordBreak:"break-all"},type:"warning",children:[" ",Ze.filename]}),c.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=pe.current?pe.current.getValue().replace(/\r\n/g,"\n"):se;return new Promise((function(t,n){C.W.put("".concat(E.Z.apiPrefix,"scripts"),{filename:Ze.filename,path:Ze.parent||"",content:e}).then((function(n){var a=n.code;n.data;200===a&&(le(e),m.ZP.success("保存成功")),t(null)})).catch((function(e){return n(e)}))}))}})},children:c.ZP.get("保存")}),(0,D.jsx)(h.Z,{type:"primary",icon:(0,D.jsx)(j.Z,{}),onClick:function(){var e;null===(e=pe.current._domElement.parentElement)||void 0===e||e.requestFullscreen()}})]}),children:_e[H]})]}),me&&(0,D.jsx)(B.default,{handleCancel:function(){ge(!1)},cron:L,data:ie,logUrl:be})]})}},26932:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ue}});var a=n(90228),i=n.n(a),r=n(15558),o=n.n(r),c=n(87999),s=n.n(c),l=n(48305),u=n.n(l),d=n(26068),m=n.n(d),g=n(72439),p=n(48916),f=n(3475),h=n(62348),Z=n(16314),P=n(15631),x=n(56958),v=n(89709),b=n(86935),y=n(28423),A=n(44084),k=n(1704),j=n(13868),w=n(88939),S=n(96553),C=n(97953),E=n(88629),B=n(83649),T=n(21288),M=n(76991),_=n(7802),q=n(47508),N=n(98783),I=n(50691),R=n(17082),D=n(47667),O=n(63505),G=n(45520),L=n(61508),W=n(85950),K=n(93481),z=n(46035),F=n(10948),V=n(16483),H=n.n(V),U=n(32699),Y=n(75271),Q=n(72317),J=n(19610),X=n(41860),$=n(94526),ee=n(63549),te=n(97583),ne=n(44860),ae=n(42208),ie=n(36199),re=n(52676),oe=I.Z.Text,ce=I.Z.Paragraph,se=I.Z.Link,le=R.Z.Search,ue=function(){var e=(0,N.useOutletContext)(),t=e.headerStyle,n=e.isPhone,a=e.theme,r=[{title:Q.ZP.get("名称"),dataIndex:"name",key:"name",fixed:"left",width:120,render:function(e,t){return(0,re.jsx)(ce,{style:{wordBreak:"break-all",marginBottom:0,color:"#1890ff",cursor:"pointer"},ellipsis:{tooltip:e,rows:2},onClick:function(){tt(t),Je(!0)},children:(0,re.jsx)(se,{children:t.name||"-"})})},sorter:{compare:function(e,t){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.name)}}},{title:Q.ZP.get("命令/脚本"),dataIndex:"command",key:"command",width:240,render:function(e,t){return(0,re.jsx)(ce,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:(0,re.jsx)("a",{onClick:function(){It(t)},children:e})})},sorter:{compare:function(e,t){return e.command.localeCompare(t.command)}}},{title:Q.ZP.get("状态"),key:"status",dataIndex:"status",width:100,filters:[{text:Q.ZP.get("运行中"),value:ne.CrontabStatus.running},{text:Q.ZP.get("空闲中"),value:ne.CrontabStatus.idle},{text:Q.ZP.get("已禁用"),value:ne.CrontabStatus.disabled},{text:Q.ZP.get("队列中"),value:ne.CrontabStatus.queued}],render:function(e,t){return(0,re.jsxs)(re.Fragment,{children:[(!t.isDisabled||t.status!==ne.CrontabStatus.idle)&&(0,re.jsxs)(re.Fragment,{children:[t.status===ne.CrontabStatus.idle&&(0,re.jsx)(D.Z,{icon:(0,re.jsx)(P.Z,{}),color:"default",children:Q.ZP.get("空闲中")}),t.status===ne.CrontabStatus.running&&(0,re.jsx)(D.Z,{icon:(0,re.jsx)(x.Z,{spin:!0}),color:"processing",children:Q.ZP.get("运行中")}),t.status===ne.CrontabStatus.queued&&(0,re.jsx)(D.Z,{icon:(0,re.jsx)(v.Z,{}),color:"default",children:Q.ZP.get("队列中")})]}),1===t.isDisabled&&t.status===ne.CrontabStatus.idle&&(0,re.jsx)(D.Z,{icon:(0,re.jsx)(b.Z,{}),color:"error",children:Q.ZP.get("已禁用")})]})}},{title:Q.ZP.get("定时规则"),dataIndex:"schedule",key:"schedule",width:150,sorter:{compare:function(e,t){return e.schedule.localeCompare(t.schedule)}},render:function(e,t){var n;return(0,re.jsx)(ce,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:{placement:"right",title:(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{children:e}),null===(n=t.extra_schedules)||void 0===n?void 0:n.map((function(e){return(0,re.jsx)("div",{children:e.schedule},e.schedule)}))]})},rows:2},children:e})}},{title:Q.ZP.get("最后运行时长"),width:167,dataIndex:"last_running_time",key:"last_running_time",sorter:{compare:function(e,t){return e.last_running_time-t.last_running_time}},render:function(e,t){return t.last_running_time?(0,h.E)(t.last_running_time):"-"}},{title:Q.ZP.get("最后运行时间"),dataIndex:"last_execution_time",key:"last_execution_time",width:141,sorter:{compare:function(e,t){return(e.last_execution_time||0)-(t.last_execution_time||0)}},render:function(e,t){return(0,re.jsx)("span",{style:{display:"block"},children:t.last_execution_time?H()(1e3*t.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})}},{title:Q.ZP.get("下次运行时间"),width:144,sorter:{compare:function(e,t){return e.nextRunTime-t.nextRunTime}},render:function(e,t){return t.nextRunTime?H()(t.nextRunTime).format("YYYY-MM-DD HH:mm:ss"):"-"}},{title:Q.ZP.get("关联订阅"),width:185,render:function(e,t){var n;return(null==t||null===(n=t.subscription)||void 0===n?void 0:n.name)||"-"}},{title:Q.ZP.get("操作"),key:"action",width:140,fixed:n?void 0:"right",render:function(e,t,n){return(0,re.jsxs)(O.Z,{size:"middle",children:[t.status===ne.CrontabStatus.idle&&(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),Ot(t,n)},children:Q.ZP.get("运行")}),t.status!==ne.CrontabStatus.idle&&(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),Gt(t,n)},children:Q.ZP.get("停止")}),(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),Ne(m()(m()({},t),{},{timestamp:Date.now()}))},children:Q.ZP.get("日志")}),(0,re.jsx)(Wt,{record:t,index:n},"more")]})}}],c=(0,Y.useState)([]),l=u()(c,2),d=l[0],I=l[1],R=(0,Y.useState)(!0),V=u()(R,2),ue=V[0],de=V[1],me=(0,Y.useState)(!1),ge=u()(me,2),pe=ge[0],fe=ge[1],he=(0,Y.useState)(!1),Ze=u()(he,2),Pe=Ze[0],xe=Ze[1],ve=(0,Y.useState)(),be=u()(ve,2),ye=be[0],Ae=be[1],ke=(0,Y.useState)(""),je=u()(ke,2),we=je[0],Se=je[1],Ce=(0,Y.useState)(!1),Ee=u()(Ce,2),Be=Ee[0],Te=Ee[1],Me=(0,Y.useState)(),_e=u()(Me,2),qe=_e[0],Ne=_e[1],Ie=(0,Y.useState)([]),Re=u()(Ie,2),De=Re[0],Oe=Re[1],Ge=(0,Y.useState)({}),Le=u()(Ge,2),We=Le[0],Ke=Le[1],ze=(0,Y.useState)(),Fe=u()(ze,2),Ve=Fe[0],He=Fe[1],Ue=(0,Y.useState)(!1),Ye=u()(Ue,2),Qe=Ye[0],Je=Ye[1],Xe=(0,Y.useState)(),$e=u()(Xe,2),et=$e[0],tt=$e[1],nt=(0,Y.useState)(""),at=u()(nt,2),it=at[0],rt=at[1],ot=(0,Y.useState)(),ct=u()(ot,2),st=ct[0],lt=ct[1],ut=(0,Y.useState)(!1),dt=u()(ut,2),mt=dt[0],gt=dt[1],pt=(0,Y.useState)(!1),ft=u()(pt,2),ht=ft[0],Zt=ft[1],Pt=(0,Y.useState)([]),xt=u()(Pt,2),vt=xt[0],bt=xt[1],yt=(0,Y.useState)([]),At=u()(yt,2),kt=At[0],jt=At[1],wt=(0,Y.useState)(!1),St=u()(wt,2),Ct=St[0],Et=St[1],Bt=(0,Y.useRef)(null),Tt=(0,g.Z)(Bt),Mt=(0,Y.useState)(""),_t=u()(Mt,2),qt=_t[0],Nt=_t[1],It=function(e){var t=(0,p.FA)(e.command);if(Array.isArray(t)){var n=u()(t,2),a=n[0],i=n[1];N.history.push("/script?p=".concat(i,"&s=").concat(a))}else t&&(location.href=t)},Rt=function(){de(!0);var e=We.page,t=We.size,n=We.sorter,a=We.filters,r="".concat(f.Z.apiPrefix,"crons?searchValue=").concat(we,"&page=").concat(e,"&size=").concat(t,"&filters=").concat(JSON.stringify(a));n&&n.column&&n.order&&(r+="&sorter=".concat(JSON.stringify({field:n.column.key,type:"ascend"===n.order?"ASC":"DESC"}))),Ve&&(r+="&queryString=".concat(JSON.stringify({filters:Ve.filters,sorts:Ve.sorts,filterRelation:Ve.filterRelation||"and"}))),Z.W.get(r).then(function(){var e=s()(i()().mark((function e(t){var n,a,r,c,s,l,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.code,a=t.data,200!==n){e.next=9;break}return c=a.data,s=a.total,e.next=5,Z.W.get("".concat(f.Z.apiPrefix,"subscriptions?ids=").concat(JSON.stringify(o()(new Set(c.map((function(e){return e.sub_id})).filter(Boolean))))),{onError:U.noop});case 5:l=e.sent,u=Object.fromEntries(null==l||null===(r=l.data)||void 0===r?void 0:r.map((function(e){return[e.id,e]}))),I(c.map((function(e){var t=(0,X.getScheduleType)(e.schedule)===ne.ScheduleType.Normal?(0,p.rS)(e.schedule,e.extra_schedules):null;return m()(m()({},e),{},{nextRunTime:t,subscription:null==u?void 0:u[e.sub_id]})}))),lt(s);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).finally((function(){return de(!1)}))},Dt=function(e,t){Ae(e),fe(!0)},Ot=function(e,t){G.Z.confirm({title:Q.ZP.get("确认运行"),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认运行定时任务")," ",(0,re.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",Q.ZP.get("吗")]}),onOk:function(){Z.W.put("".concat(f.Z.apiPrefix,"crons/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var a=o()(d),i=a.findIndex((function(t){return t.id===e.id}));-1!==i&&(a.splice(i,1,m()(m()({},e),{},{status:ne.CrontabStatus.running})),I(a))}}))}})},Gt=function(e,t){G.Z.confirm({title:Q.ZP.get("确认停止"),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认停止定时任务")," ",(0,re.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",Q.ZP.get("吗")]}),onOk:function(){Z.W.put("".concat(f.Z.apiPrefix,"crons/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var a=o()(d),i=a.findIndex((function(t){return t.id===e.id}));-1!==i&&(a.splice(i,1,m()(m()({},e),{},{pid:null,status:ne.CrontabStatus.idle})),I(a))}}))}})},Lt=function(e){return[{label:Q.ZP.get("编辑"),key:"edit",icon:(0,re.jsx)(y.Z,{})},{label:1===e.isDisabled?Q.ZP.get("启用"):Q.ZP.get("禁用"),key:"enableOrDisable",icon:1===e.isDisabled?(0,re.jsx)(A.Z,{}):(0,re.jsx)(k.Z,{})},{label:Q.ZP.get("复制"),key:"copy",icon:(0,re.jsx)(j.Z,{})},{label:Q.ZP.get("删除"),key:"delete",icon:(0,re.jsx)(w.Z,{})},{label:1===e.isPinned?Q.ZP.get("取消置顶"):Q.ZP.get("置顶"),key:"pinOrUnPin",icon:1===e.isPinned?(0,re.jsx)(k.Z,{}):(0,re.jsx)(S.Z,{})}]},Wt=function(e){var t=e.record,n=e.index;return(0,re.jsx)(W.Z,{placement:"bottomRight",trigger:["click"],menu:{items:Lt(t),onClick:function(e){var a=e.key;e.domEvent.stopPropagation(),Kt(a,t,n)}},children:(0,re.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,re.jsx)(C.Z,{})})})},Kt=function(e,t,n){switch(e){case"edit":Dt(t);break;case"copy":Dt((0,U.omit)(t,"id"));break;case"enableOrDisable":!function(e,t){G.Z.confirm({title:"确认".concat(1===e.isDisabled?Q.ZP.get("启用"):Q.ZP.get("禁用")),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认"),1===e.isDisabled?Q.ZP.get("启用"):Q.ZP.get("禁用"),Q.ZP.get("定时任务")," ",(0,re.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",Q.ZP.get("吗")]}),onOk:function(){Z.W.put("".concat(f.Z.apiPrefix,"crons/").concat(1===e.isDisabled?"enable":"disable"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var a=1===e.isDisabled?0:1,i=o()(d),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,m()(m()({},e),{},{isDisabled:a})),I(i))}}))}})}(t);break;case"delete":!function(e,t){G.Z.confirm({title:Q.ZP.get("确认删除"),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认删除定时任务")," ",(0,re.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",Q.ZP.get("吗")]}),onOk:function(){Z.W.delete("".concat(f.Z.apiPrefix,"crons"),{data:[e.id]}).then((function(t){var n=t.code;if(t.data,200===n){L.ZP.success(Q.ZP.get("删除成功"));var a=o()(d),i=a.findIndex((function(t){return t.id===e.id}));-1!==i&&(a.splice(i,1),I(a))}}))}})}(t);break;case"pinOrUnPin":!function(e,t){G.Z.confirm({title:"确认".concat(1===e.isPinned?Q.ZP.get("取消置顶"):Q.ZP.get("置顶")),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认"),1===e.isPinned?Q.ZP.get("取消置顶"):Q.ZP.get("置顶"),Q.ZP.get("定时任务")," ",(0,re.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",Q.ZP.get("吗")]}),onOk:function(){Z.W.put("".concat(f.Z.apiPrefix,"crons/").concat(1===e.isPinned?"unpin":"pin"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var a=1===e.isPinned?0:1,i=o()(d),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,m()(m()({},e),{},{isPinned:a})),I(i))}}))}})}(t)}},zt={selectedRowKeys:De,onChange:function(e){Oe(e)}},Ft=function(e){G.Z.confirm({title:"确认".concat(ne.OperationName[e]),content:(0,re.jsxs)(re.Fragment,{children:[Q.ZP.get("确认"),ne.OperationName[e],Q.ZP.get("选中的定时任务吗")]}),onOk:function(){Z.W.put("".concat(f.Z.apiPrefix,"crons/").concat(ne.OperationPath[e]),De).then((function(e){var t=e.code;e.data;200===t&&Rt()}))}})};(0,Y.useEffect)((function(){qe&&(localStorage.setItem("logCron",qe.id),Te(!0))}),[qe]),(0,Y.useEffect)((function(){Ke(m()(m()({},We),{},{page:1}))}),[we]),(0,Y.useEffect)((function(){We.page&&We.size&&Rt(),Ve&&Ve.id&&Nt(Ve.id)}),[We,Ve]),(0,Y.useEffect)((function(){if(Ve&&kt&&kt.length>0){var e=kt.slice(10).find((function(e){return e.id===Ve.id}));Et(!!e)}}),[Ve,kt]),(0,Y.useEffect)((function(){Ht()}),[]);var Vt={onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"new":gt(!0);break;case"manage":Zt(!0);break;default:Ut(e)}}(t)},items:[].concat(o()(o()(kt).slice(10).map((function(e){return{label:(0,re.jsxs)(O.Z,{style:{display:"flex",justifyContent:"space-between"},children:[(0,re.jsx)("span",{children:e.name}),(null==Ve?void 0:Ve.id)===e.id&&(0,re.jsx)(E.Z,{style:{color:"#1890ff"}})]}),key:e.id,icon:(0,re.jsx)(B.Z,{})}}))),[{type:"divider"},{label:Q.ZP.get("创建视图"),key:"new",icon:(0,re.jsx)(T.Z,{})},{label:Q.ZP.get("视图管理"),key:"manage",icon:(0,re.jsx)(M.Z,{})}]),style:{maxHeight:350,overflowY:"auto"}},Ht=function(){de(!0),Z.W.get("".concat(f.Z.apiPrefix,"crons/views")).then((function(e){var t=e.code,n=e.data;if(200===t){bt(n);var a=n.filter((function(e){return!e.isDisabled})).map((function(e){return m()(m()({},e),{},{name:"全部任务"===e.name?Q.ZP.get("全部任务"):e.name})}));jt(a),Ke({page:1,size:parseInt(localStorage.getItem("pageSize")||"20"),sorter:{},filters:{}}),He(m()({},a[0]))}})).finally((function(){de(!1)}))},Ut=function(e){var t=kt.find((function(t){return t.id==e}));Oe([]),Ke(m()(m()({},We),{},{page:1})),He(t||null)},Yt=(0,J.u)((function(){return{scroll:{y:Tt}}}),[Tt]),Qt=u()(Yt,1)[0];return(0,re.jsxs)(q.ZP,{className:"ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab",title:Q.ZP.get("定时任务"),extra:[(0,re.jsx)(le,{placeholder:Q.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:ue,value:it,onChange:function(e){return rt(e.target.value)},onSearch:function(e){Se(e.trim())}}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ae(null),void fe(!0)},children:Q.ZP.get("创建任务")},"2")],header:{style:t},children:[(0,re.jsx)(z.Z,{defaultActiveKey:"all",size:"small",activeKey:qt,tabPosition:"top",className:"crontab-view ".concat(Ct?"more-active":""),tabBarExtraContent:(0,re.jsx)(W.Z,{menu:Vt,trigger:["click"],overlayStyle:{minWidth:200},children:(0,re.jsxs)("div",{className:"view-more ".concat(Ct?"active":""),children:[(0,re.jsxs)(O.Z,{children:[Q.ZP.get("更多"),(0,re.jsx)(_.Z,{})]}),(0,re.jsx)("div",{className:"ant-tabs-ink-bar ant-tabs-ink-bar-animated"})]})}),onTabClick:Ut,items:o()(o()(kt).slice(0,10).map((function(e){return{key:e.id,label:e.name}})))}),(0,re.jsxs)("div",{ref:Bt,children:[De.length>0&&(0,re.jsxs)("div",{style:{marginBottom:16},children:[(0,re.jsx)(K.Z,{type:"primary",style:{marginBottom:5},onClick:function(){G.Z.confirm({title:Q.ZP.get("确认删除"),content:(0,re.jsx)(re.Fragment,{children:Q.ZP.get("确认删除选中的定时任务吗")}),onOk:function(){Z.W.delete("".concat(f.Z.apiPrefix,"crons"),{data:De}).then((function(e){var t=e.code;e.data;200===t&&(L.ZP.success(Q.ZP.get("批量删除成功")),Oe([]),Rt())}))}})},children:Q.ZP.get("批量删除")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ft(0)},style:{marginLeft:8,marginBottom:5},children:Q.ZP.get("批量启用")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ft(1)},style:{marginLeft:8,marginRight:8},children:Q.ZP.get("批量禁用")}),(0,re.jsx)(K.Z,{type:"primary",style:{marginRight:8},onClick:function(){return Ft(2)},children:Q.ZP.get("批量运行")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ft(3)},children:Q.ZP.get("批量停止")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ft(4)},style:{marginLeft:8,marginRight:8},children:Q.ZP.get("批量置顶")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return Ft(5)},style:{marginLeft:8,marginRight:8},children:Q.ZP.get("批量取消置顶")}),(0,re.jsx)(K.Z,{type:"primary",onClick:function(){return xe(!0)},style:{marginLeft:8,marginRight:8},children:Q.ZP.get("批量修改标签")}),(0,re.jsxs)("span",{style:{marginLeft:8},children:[Q.ZP.get("已选择"),(0,re.jsx)("a",{children:null==De?void 0:De.length}),Q.ZP.get("项")]})]}),(0,re.jsx)(F.Z,{columns:r,pagination:{current:We.page,pageSize:We.size,showSizeChanger:!0,simple:n,total:st,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条/总共 ").concat(e," 条")},pageSizeOptions:[10,20,50,100,200,500,st||1e4].sort((function(e,t){return e-t}))},dataSource:d,rowKey:"id",size:"middle",scroll:{x:1200,y:Tt},loading:ue,rowSelection:zt,rowClassName:function(e,t){return e.isPinned?"pinned-cron cron":"cron"},onChange:function(e,t,n){var a=e.current,i=e.pageSize;Ke({page:a,size:i,sorter:n,filters:t}),localStorage.setItem("pageSize",String(i))},components:n||We.size<50?void 0:Qt})]}),Be&&(0,re.jsx)(ee.default,{handleCancel:function(){var e;e=qe,Z.W.get("".concat(f.Z.apiPrefix,"crons/").concat(e.id)).then((function(t){var n=t.code,a=t.data;if(200===n){var i=d.findIndex((function(t){return t.id===e.id})),r=o()(d);a.nextRunTime=(0,p.rS)(a.schedule,a.extra_schedules),-1!==i&&(r.splice(i,1,m()(m()({},e),a)),I(r))}})).finally((function(){return de(!1)})),Te(!1)},cron:qe}),pe&&(0,re.jsx)(te.default,{handleCancel:function(){fe(!1),Rt()},cron:ye}),Pe&&(0,re.jsx)(te.CronLabelModal,{handleCancel:function(e){xe(!1),e&&Rt()},ids:De}),Qe&&(0,re.jsx)($.default,{handleCancel:function(){Je(!1)},cron:et,theme:a,isPhone:n}),mt&&(0,re.jsx)(ae.default,{handleCancel:function(e){gt(!1),Ht()}}),ht&&(0,re.jsx)(ie.default,{cronViews:vt,handleCancel:function(){Zt(!1)},cronViewChange:function(e){Ht()}})]})}},63549:function(e,t,n){"use strict";n.r(t);var a=n(48305),i=n.n(a),r=n(72317),o=n(75271),c=n(32890),s=n(50691),l=n(45520),u=n(93481),d=n(16314),m=n(3475),g=n(56958),p=n(44084),f=n(34014),h=n(48916),Z=n(78060),P=n.n(Z),x=n(52676);c.Z.Countdown;t.default=function(e){var t=e.cron,n=e.handleCancel,a=e.data,c=e.logUrl,Z=(0,o.useState)(r.ZP.get("启动中...")),v=i()(Z,2),b=v[0],y=v[1],A=(0,o.useState)(!0),k=i()(A,2),j=k[0],w=k[1],S=(0,o.useState)(!0),C=i()(S,2),E=C[0],B=C[1],T=(0,o.useState)(!1),M=i()(T,2),_=M[0],q=M[1],N=(0,o.useRef)({value:0,down:!0}),I=c||String(null==t?void 0:t.id),R=function e(n){n&&w(!0),d.W.get(c||"".concat(m.Z.apiPrefix,"crons/").concat(t.id,"/log")).then((function(t){var n=t.code,a=t.data;if(200===n&&localStorage.getItem("logCron")===I&&a!==b){var i=a;y(i||r.ZP.get("暂无日志"));var o=Boolean(i&&!(0,h.x$)(i)&&!i.includes("任务未运行"));o||(0,h.x$)(b)||b===r.ZP.get("启动中...")||setTimeout((function(){D()})),B(o),o&&setTimeout((function(){D(),e()}),2e3)}})).finally((function(){n&&w(!1)}))},D=function(){N.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},O=function(){localStorage.removeItem("logCron"),n()};return(0,o.useEffect)((function(){t&&t.id&&R(!0)}),[t]),(0,o.useEffect)((function(){a&&y(a)}),[a]),(0,o.useEffect)((function(){q(document.body.clientWidth<768)}),[]),(0,x.jsx)(l.Z,{title:(0,x.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(E||j)&&(0,x.jsx)(g.Z,{spin:!0}),!E&&!j&&(0,x.jsx)(p.Z,{}),(0,x.jsx)(s.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:t&&t.name})]}),open:!0,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return O()},onCancel:function(){return O()},footer:[(0,x.jsx)(u.Z,{type:"primary",onClick:function(){return O()},children:r.ZP.get("知道了")})],children:(0,x.jsxs)("div",{onScroll:function(e){var t=e.target.scrollTop;N.current.down&&(N.current={value:t,down:t-N.current.value>-5||!t})},className:"log-container",children:[j?(0,x.jsx)(f.Z,{}):(0,x.jsx)("pre",{style:_?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,x.jsx)(P(),{children:b})}),(0,x.jsx)("div",{id:"log-flag"})]})})}},97583:function(e,t,n){"use strict";n.r(t),n.d(t,{CronLabelModal:function(){return D},default:function(){return R}});var a=n(67825),i=n.n(a),r=n(90228),o=n.n(r),c=n(26068),s=n.n(c),l=n(87999),u=n.n(l),d=n(48305),m=n.n(d),g=n(15558),p=n.n(g),f=n(72317),h=n(47667),Z=n(17082),P=n(78646),x=n(21288),v=n(75271),b=n(52676),y=function(e){var t=e.value,n=e.onChange,a=(0,v.useState)(""),i=m()(a,2),r=i[0],o=i[1],c=(0,v.useState)(!1),s=m()(c,2),l=s[0],u=s[1],d=(0,v.useState)([]),g=m()(d,2),y=g[0],A=g[1],k=(0,v.useRef)(),j=function(){r&&!y.includes(r)&&(A([].concat(p()(y),[r])),null==n||n([].concat(p()(y),[r]))),u(!1),o("")},w=y.map((function(e){var t=(0,b.jsx)(h.Z,{closable:!0,onClose:function(t){var a,i;t.preventDefault(),a=e,i=y.filter((function(e){return e!==a})),A(i),null==n||n(i)},children:e});return(0,b.jsx)("span",{style:{display:"inline-block",marginBottom:8},children:t},e)}));return(0,v.useEffect)((function(){l&&k&&k.current.focus()}),[l]),(0,v.useEffect)((function(){t&&A(t)}),[t]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(P.Z,{enter:{scale:.8,opacity:0,type:"from",duration:100},leave:{opacity:0,width:0,scale:0,duration:200},appear:!1,children:w}),l&&(0,b.jsx)(Z.Z,{ref:k,type:"text",size:"small",style:{width:78},value:r,onChange:function(e){o(e.target.value)},onBlur:j,onPressEnter:j}),!l&&(0,b.jsxs)(h.Z,{onClick:function(){u(!0)},style:{borderStyle:"dashed",cursor:"pointer"},children:[(0,b.jsx)(x.Z,{})," ",f.ZP.get("新建")]})]})},A=n(3475),k=n(16314),j=n(37559),w=n(72338),S=n(61508),C=n(35181),E=n(63505),B=n(45520),T=n(93481),M=n(94046),_=n.n(M),q=n(41860),N=n(44860),I=["key","name"],R=function(e){var t=e.cron,n=e.handleCancel,a=w.Z.useForm(),r=m()(a,1)[0],c=(0,v.useState)(!1),l=m()(c,2),d=l[0],g=l[1],p=(0,v.useState)(t?(0,q.getScheduleType)(t.schedule):N.ScheduleType.Normal),h=m()(p,2),P=h[0],T=h[1],M=function(){var e=u()(o()().mark((function e(a){var i,r,c,l,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.prev=1,i=null!=t&&t.id?"put":"post",r=s()(s()({},a),{},{schedule:P!==N.ScheduleType.Normal?q.scheduleTypeMap[P]:a.schedule}),null!=t&&t.id&&(r.id=t.id),e.next=7,k.W[i]("".concat(A.Z.apiPrefix,"crons"),r);case 7:c=e.sent,l=c.code,u=c.data,200===l&&(S.ZP.success(null!=t&&t.id?f.ZP.get("更新任务成功"):f.ZP.get("创建任务成功")),n(u)),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),console.error(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[1,13,16,19]])})));return function(t){return e.apply(this,arguments)}}(),R=function(e){T(e),r.setFieldValue("schedule","")};return(0,b.jsx)(B.Z,{title:null!=t&&t.id?f.ZP.get("编辑任务"):f.ZP.get("创建任务"),open:!0,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){return r.validateFields().then(M)},onCancel:function(){return n()},confirmLoading:d,children:(0,b.jsxs)(w.Z,{form:r,layout:"vertical",name:"form_in_modal",initialValues:t,children:[(0,b.jsx)(w.Z.Item,{name:"name",label:f.ZP.get("名称"),rules:[{required:!0,whitespace:!0}],children:(0,b.jsx)(Z.Z,{placeholder:f.ZP.get("请输入任务名称")})}),(0,b.jsx)(w.Z.Item,{name:"command",label:f.ZP.get("命令/脚本"),rules:[{required:!0,whitespace:!0}],children:(0,b.jsx)(Z.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("支持输入脚本路径/任意系统可执行命令/task 脚本路径")})}),(0,b.jsx)(w.Z.Item,{label:f.ZP.get("定时类型"),required:!0,children:(0,b.jsxs)(C.Z,{defaultValue:P,value:P,onChange:R,children:[(0,b.jsx)(C.Z.Option,{value:N.ScheduleType.Normal,children:f.ZP.get("常规定时")}),(0,b.jsx)(C.Z.Option,{value:N.ScheduleType.Once,children:f.ZP.get("手动运行")}),(0,b.jsx)(C.Z.Option,{value:N.ScheduleType.Boot,children:f.ZP.get("开机运行")})]})}),P!==N.ScheduleType.Normal?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w.Z.Item,{name:"schedule",label:f.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){return!t||_().parseExpression(t).hasNext()?Promise.resolve():Promise.reject(f.ZP.get("Cron表达式格式有误"))}}],children:(0,b.jsx)(Z.Z,{placeholder:f.ZP.get("秒(可选) 分 时 天 月 周")})}),(0,b.jsx)(w.Z.List,{name:"extra_schedules",children:function(e,t,n){var a=t.add,r=t.remove,o=n.errors;return(0,b.jsxs)(b.Fragment,{children:[e.map((function(e){var t=e.key,n=e.name,a=i()(e,I);return(0,b.jsx)(w.Z.Item,{noStyle:!0,children:(0,b.jsxs)(E.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,b.jsx)(w.Z.Item,s()(s()({},a),{},{name:[n,"schedule"],rules:[{required:!0}],children:(0,b.jsx)(Z.Z,{placeholder:f.ZP.get("秒(可选) 分 时 天 月 周")})})),(0,b.jsx)(j.Z,{className:"dynamic-delete-button",onClick:function(){return r(n)}})]})},t)})),(0,b.jsx)(w.Z.Item,{children:(0,b.jsxs)("a",{onClick:function(){return a({schedule:""})},children:[(0,b.jsx)(x.Z,{})," ",f.ZP.get("新增定时规则")]})}),(0,b.jsx)(w.Z.ErrorList,{errors:o})]})}})]}),(0,b.jsx)(w.Z.Item,{name:"labels",label:f.ZP.get("标签"),children:(0,b.jsx)(y,{})}),(0,b.jsx)(w.Z.Item,{name:"task_before",label:f.ZP.get("执行前"),tooltip:f.ZP.get("运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(f.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,b.jsx)(Z.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("请输入运行任务前要执行的命令,不能包含 task 命令")})}),(0,b.jsx)(w.Z.Item,{name:"task_after",label:f.ZP.get("执行后"),tooltip:f.ZP.get("运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(f.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,b.jsx)(Z.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("请输入运行任务后要执行的命令,不能包含 task 命令")})})]})})},D=function(e){var t=e.ids,n=e.handleCancel,a=w.Z.useForm(),i=m()(a,1)[0],r=(0,v.useState)(!1),c=m()(r,2),s=c[0],l=c[1],d=function(){var e=u()(o()().mark((function e(a){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.validateFields().then(function(){var e=u()(o()().mark((function e(i){var r,c,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),r={ids:t,labels:i.labels},e.prev=2,e.next=5,k.W[a]("".concat(A.Z.apiPrefix,"crons/labels"),r);case 5:c=e.sent,s=c.code,c.data,200===s&&(S.ZP.success("post"===a?f.ZP.get("添加Labels成功"):f.ZP.get("删除Labels成功")),n(!0)),l(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),l(!1);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("Validate Failed:",e)}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=[(0,b.jsx)(T.Z,{onClick:function(){return n(!1)},children:f.ZP.get("取消")}),(0,b.jsx)(T.Z,{type:"primary",danger:!0,onClick:function(){return d("delete")},children:f.ZP.get("删除")}),(0,b.jsx)(T.Z,{type:"primary",onClick:function(){return d("post")},children:f.ZP.get("添加")})];return(0,b.jsx)(B.Z,{title:f.ZP.get("批量修改标签"),open:!0,footer:g,centered:!0,maskClosable:!1,forceRender:!0,onCancel:function(){return n(!1)},confirmLoading:s,children:(0,b.jsx)(w.Z,{form:i,layout:"vertical",name:"form_in_label_modal",children:(0,b.jsx)(w.Z.Item,{name:"labels",label:f.ZP.get("标签"),children:(0,b.jsx)(y,{})})})})}},44860:function(e,t,n){"use strict";n.r(t),n.d(t,{CrontabStatus:function(){return a},OperationName:function(){return i},OperationPath:function(){return r},ScheduleType:function(){return o}});var a=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),i=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),r=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({}),o=function(e){return e.Normal="normal",e.Once="once",e.Boot="boot",e}({})},42208:function(e,t,n){"use strict";n.r(t);var a=n(67825),i=n.n(a),r=n(90228),o=n.n(r),c=n(26068),s=n.n(c),l=n(87999),u=n.n(l),d=n(48305),m=n.n(d),g=n(72317),p=n(75271),f=n(72338),h=n(35181),Z=n(45520),P=n(17082),x=n(93481),v=n(63505),b=n(16314),y=n(3475),A=n(37559),k=n(21288),j=n(44224),w=n(44860),S=n(31352),C=n(52676),E=["name"],B=["key","name"],T=["key","name"],M=[{name:g.ZP.get("命令"),value:"command"},{name:g.ZP.get("名称"),value:"name"},{name:g.ZP.get("定时规则"),value:"schedule"},{name:g.ZP.get("状态"),value:"status",onlySelect:!0},{name:g.ZP.get("标签"),value:"labels"},{name:g.ZP.get("订阅"),value:"sub_id",onlySelect:!0}],_={Reg:"",NotReg:"",In:"select",Nin:"select"},q=[{name:g.ZP.get("包含"),value:"Reg"},{name:g.ZP.get("不包含"),value:"NotReg"},{name:g.ZP.get("属于"),value:"In",type:"select"},{name:g.ZP.get("不属于"),value:"Nin",type:"select"}],N=[{name:g.ZP.get("顺序"),value:"ASC"},{name:g.ZP.get("倒序"),value:"DESC"}],I=function(e){return e.and="且",e.or="或",e}(I||{});t.default=function(e){var t=e.view,n=e.handleCancel,a=f.Z.useForm(),r=m()(a,1)[0],c=(0,p.useState)(!1),l=m()(c,2),d=l[0],R=l[1],D=(0,p.useState)("and"),O=m()(D,2),G=O[0],L=O[1],W=f.Z.useWatch("filters",r),K=(0,S.Z)((function(){return b.W.get("".concat(y.Z.apiPrefix,"subscriptions"))}),{cacheKey:"subscriptions"}).data,z={status:[{name:g.ZP.get("运行中"),value:w.CrontabStatus.running},{name:g.ZP.get("空闲中"),value:w.CrontabStatus.idle},{name:g.ZP.get("已禁用"),value:w.CrontabStatus.disabled}],sub_id:null==K?void 0:K.data.map((function(e){return{name:e.name,value:e.id}}))},F=function(){var e=u()(o()().mark((function e(a){var i,r,c,l;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),a.filterRelation=G,i=t?"put":"post",e.prev=3,e.next=6,b.W[i]("".concat(y.Z.apiPrefix,"crons/views"),t?s()(s()({},a),{},{id:t.id}):a);case 6:r=e.sent,c=r.code,l=r.data,200===c&&n(l),R(!1),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),R(!1);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}(),V=function(e){var t=e.name,n=i()(e,E),a=r.getFieldValue(["filters",t,"property"]);return(0,C.jsx)(h.Z,s()(s()({style:{width:120},placeholder:g.ZP.get("请选择操作符")},n),{},{children:q.filter((function(e){return z[a]?"select"===e.type:e})).map((function(e){return(0,C.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))}))},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.jsx)(h.Z,{style:t,children:e.map((function(e){return(0,C.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})},U=(0,C.jsx)(h.Z,{style:{width:80},children:N.map((function(e){return(0,C.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))});return(0,C.jsx)(Z.Z,{title:t?g.ZP.get("编辑视图"):g.ZP.get("创建视图"),open:!0,forceRender:!0,width:580,centered:!0,maskClosable:!1,onOk:function(){r.validateFields().then((function(e){F(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:d,children:(0,C.jsxs)(f.Z,{form:r,layout:"vertical",initialValues:t||{filters:[{property:"command"}]},name:"env_modal",children:[(0,C.jsx)(f.Z.Item,{name:"name",label:g.ZP.get("视图名称"),rules:[{required:!0,message:g.ZP.get("请输入视图名称")}],children:(0,C.jsx)(P.Z,{placeholder:g.ZP.get("请输入视图名称")})}),(0,C.jsx)(f.Z.List,{name:"filters",children:function(e,t,n){var a=t.add,r=t.remove,o=n.errors;return(0,C.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,C.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,C.jsx)(x.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},onClick:function(){L("and"===G?"or":"and")},children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{children:I[G]}),(0,C.jsx)(j.Z,{type:"ql-icon-d-caret"})]})})}),(0,C.jsxs)("div",{children:[e.map((function(e){var t,n,a=e.key,o=e.name,c=i()(e,B);return(0,C.jsx)(f.Z.Item,{label:0===o?g.ZP.get("筛选条件"):"",style:{marginBottom:0},required:!0,className:"filter-item",children:(0,C.jsxs)(v.Z,{className:"view-create-modal-filters",align:"baseline",children:[(0,C.jsx)(f.Z.Item,s()(s()({},c),{},{name:[o,"property"],rules:[{required:!0}],children:H(M,{width:120})})),(0,C.jsx)(f.Z.Item,s()(s()({},c),{},{name:[o,"operation"],rules:[{required:!0,message:g.ZP.get("请选择操作符")}],children:(0,C.jsx)(V,{name:o})})),(0,C.jsx)(f.Z.Item,s()(s()({},c),{},{name:[o,"value"],rules:[{required:!0,message:g.ZP.get("请输入内容")}],children:"select"===_[null==W?void 0:W[o].operation]?(t=null==W?void 0:W[o].property,(0,C.jsx)(h.Z,{mode:"tags",allowClear:!0,placeholder:g.ZP.get("输入后回车增加自定义选项"),children:null===(n=z[t])||void 0===n?void 0:n.map((function(e){return(0,C.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})):(0,C.jsx)(P.Z,{placeholder:g.ZP.get("请输入内容")})})),0!==o&&(0,C.jsx)(A.Z,{onClick:function(){return r(o)}})]})},a)})),(0,C.jsx)(f.Z.Item,{children:(0,C.jsxs)("a",{onClick:function(){return a({property:"command",operation:"Reg"})},children:[(0,C.jsx)(k.Z,{}),g.ZP.get("新增筛选条件")]})}),(0,C.jsx)(f.Z.ErrorList,{errors:o})]})]})}}),(0,C.jsx)(f.Z.List,{name:"sorts",children:function(e,t,n){var a=t.add,r=t.remove,o=n.errors;return(0,C.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,C.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,C.jsx)(x.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},children:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)("span",{children:I[G]})})})}),(0,C.jsxs)("div",{children:[e.map((function(e){var t=e.key,n=e.name,a=i()(e,T);return(0,C.jsx)(f.Z.Item,{label:0===n?g.ZP.get("排序方式"):"",style:{marginBottom:0},className:"filter-item",children:(0,C.jsxs)(v.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,C.jsx)(f.Z.Item,s()(s()({},a),{},{name:[n,"property"],rules:[{required:!0}],children:H(M)})),(0,C.jsx)(f.Z.Item,s()(s()({},a),{},{name:[n,"type"],rules:[{required:!0}],children:U})),(0,C.jsx)(A.Z,{onClick:function(){return r(n)}})]})},t)})),(0,C.jsx)(f.Z.Item,{children:(0,C.jsxs)("a",{onClick:function(){return a({property:"command",type:"ASC"})},children:[(0,C.jsx)(k.Z,{}),g.ZP.get("新增排序方式")]})}),(0,C.jsx)(f.Z.ErrorList,{errors:o})]})]})}})]})})}},36199:function(e,t,n){"use strict";n.r(t);var a=n(15558),i=n.n(a),r=n(26068),o=n.n(r),c=n(48305),s=n.n(c),l=n(67825),u=n.n(l),d=n(72317),m=n(75271),g=n(50691),p=n(9171),f=n(63505),h=n(45520),Z=n(61508),P=n(93481),x=n(10948),v=n(16314),b=n(3475),y=n(28423),A=n(88939),k=n(12363),j=n(18708),w=n(78637),S=n(4690),C=n(42208),E=n(52676),B=["index","moveRow","className","style"],T=g.Z.Text,M="DragableBodyRow",_=function(e){var t=e.index,n=e.moveRow,a=e.className,i=e.style,r=u()(e,B),c=(0,m.useRef)(),l=(0,k.L)({accept:M,collect:function(e){var n=(e.getItem()||{}).index;return n===t?{}:{isOver:e.isOver(),dropClassName:n<t?" drop-over-downward":" drop-over-upward"}},drop:function(e){n(e.index,t)}}),d=s()(l,2),g=d[0],p=g.isOver,f=g.dropClassName,h=d[1],Z=(0,j.c)({type:M,item:{index:t},collect:function(e){return{isDragging:e.isDragging()}}});return h((0,s()(Z,2)[1])(c)),(0,E.jsx)("tr",o()({ref:c,className:"".concat(a).concat(p?f:""),style:o()({cursor:"move"},i)},r))};t.default=function(e){var t=e.cronViews,n=e.handleCancel,a=e.cronViewChange,r=function(e){return g.filter((function(e){return!e.isDisabled})).length<=1&&!e.isDisabled},c=[{title:d.ZP.get("名称"),dataIndex:"name",key:"name",render:function(e){return"全部任务"===e?d.ZP.get("全部任务"):e}},{title:d.ZP.get("类型"),dataIndex:"type",key:"type",render:function(e){return 1===e?d.ZP.get("系统"):d.ZP.get("个人")}},{title:d.ZP.get("显示"),key:"isDisabled",dataIndex:"isDisabled",width:100,render:function(e,t,n){return(0,E.jsx)(p.Z,{disabled:r(t),checked:!t.isDisabled,onChange:function(e){return L(e,t,n)}})}},{title:d.ZP.get("操作"),key:"action",width:100,render:function(e,t,n){return 1!==t.type?(0,E.jsxs)(f.Z,{size:"middle",children:[(0,E.jsx)("a",{onClick:function(){return O(t,n)},children:(0,E.jsx)(y.Z,{})}),!r(t)&&(0,E.jsx)("a",{onClick:function(){return G(t,n)},children:(0,E.jsx)(A.Z,{})})]}):"-"}}],l=(0,m.useState)([]),u=s()(l,2),g=u[0],k=u[1],j=(0,m.useState)(!1),B=s()(j,2),M=B[0],q=B[1],N=(0,m.useState)(null),I=s()(N,2),R=I[0],D=I[1],O=function(e,t){D(e),q(!0)},G=function(e,t){h.Z.confirm({title:d.ZP.get("确认删除"),content:(0,E.jsxs)(E.Fragment,{children:[d.ZP.get("确认删除视图")," ",(0,E.jsx)(T,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",d.ZP.get("吗")]}),onOk:function(){v.W.delete("".concat(b.Z.apiPrefix,"crons/views"),{data:[e.id]}).then((function(e){var t=e.code;e.data;200===t&&(Z.ZP.success(d.ZP.get("删除成功")),a())}))}})},L=function(e,t,n){v.W.put("".concat(b.Z.apiPrefix,"crons/views/").concat(e?"enable":"disable"),[t.id]).then((function(t){var r=t.code;t.data;if(200===r){var c=i()(g);c.splice(n,1,o()(o()({},g[n]),{},{isDisabled:!e})),k(c),a()}}))},W={body:{row:_}},K=(0,m.useCallback)((function(e,t){if(e!==t){var n=g[e];v.W.put("".concat(b.Z.apiPrefix,"crons/views/move"),{fromIndex:e,toIndex:t,id:n.id}).then((function(r){var c=r.code,s=r.data;if(200===c){var l=i()(g);l.splice(e,1),l.splice(t,0,o()(o()({},n),s)),k(l),a()}}))}}),[g]);return(0,m.useEffect)((function(){k(t)}),[t]),(0,E.jsxs)(h.Z,{title:d.ZP.get("视图管理"),open:!0,centered:!0,width:620,onCancel:function(){return n()},className:"view-manage-modal",forceRender:!0,footer:!1,maskClosable:!1,children:[(0,E.jsx)(f.Z,{style:{display:"flex",justifyContent:"flex-end",marginBottom:10},children:(0,E.jsx)(P.Z,{type:"primary",onClick:function(){D(null),q(!0)},children:d.ZP.get("创建视图")},"2")}),(0,E.jsx)(w.W,{backend:S.PD,children:(0,E.jsx)(x.Z,{bordered:!0,columns:c,pagination:!1,dataSource:g,rowKey:"id",size:"middle",style:{marginBottom:20},components:W,onRow:function(e,t){return{index:t,moveRow:K}}})}),M&&(0,E.jsx)(C.default,{view:R,handleCancel:function(e){q(!1),a(e)}})]})}},3475:function(e,t,n){"use strict";var a=n(72317),i=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.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:a.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:a.ZP.get("定时任务"),value:"crons"},{name:a.ZP.get("环境变量"),value:"envs"},{name:a.ZP.get("订阅管理"),value:"subscriptions"},{name:a.ZP.get("配置文件"),value:"configs"},{name:a.ZP.get("脚本管理"),value:"scripts"},{name:a.ZP.get("日志管理"),value:"logs"},{name:a.ZP.get("依赖管理"),value:"dependencies"},{name:a.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:a.ZP.get("定时任务"),envs:a.ZP.get("环境变量"),subscriptions:a.ZP.get("订阅管理"),configs:a.ZP.get("配置文件"),scripts:a.ZP.get("脚本管理"),logs:a.ZP.get("日志管理"),dependencies:a.ZP.get("依赖管理"),system:a.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:a.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:a.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:a.ZP.get("钉钉机器人")},{value:"weWorkBot",label:a.ZP.get("企业微信机器人")},{value:"weWorkApp",label:a.ZP.get("企业微信应用")},{value:"aibotk",label:a.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:a.ZP.get("群晖chat")},{value:"email",label:a.ZP.get("邮箱")},{value:"lark",label:a.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:a.ZP.get("自定义通知")},{value:"closed",label:a.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:a.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:a.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:a.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")},{label:"ntfyToken",tip:a.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:a.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:a.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:a.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:a.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:a.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:a.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:a.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:a.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:a.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:a.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:a.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:a.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:a.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:a.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:a.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:a.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:a.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:a.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:a.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:a.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:a.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:a.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:a.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:a.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:a.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:a.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:a.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:a.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:a.ZP.get("请输入要发送的目标"),items:[{value:"room",label:a.ZP.get("群聊")},{value:"contact",label:a.ZP.get("好友")}]},{label:"aibotkName",tip:a.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:a.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:a.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:a.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:a.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:a.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:a.ZP.get("邮箱认证地址"),required:!0},{label:"emailPass",tip:a.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0},{label:"emailTo",tip:a.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:a.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:a.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:a.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:a.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:a.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:a.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:a.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:a.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:a.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":a.ZP.get("登录"),"/initialization":a.ZP.get("初始化"),"/crontab":a.ZP.get("定时任务"),"/env":a.ZP.get("环境变量"),"/subscription":a.ZP.get("订阅管理"),"/config":a.ZP.get("配置文件"),"/script":a.ZP.get("脚本管理"),"/diff":a.ZP.get("对比工具"),"/log":a.ZP.get("日志管理"),"/setting":a.ZP.get("系统设置"),"/error":a.ZP.get("错误日志"),"/dependence":a.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},97302:function(e,t,n){"use strict";n.d(t,{eY:function(){return a},um:function(){return i},z:function(){return r}});var a=" ",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"]},62348:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var a=n(72317);function i(e){var t=1e3*e,n=Math.floor(t/864e5),i=t%864e5,r=Math.floor(i/36e5),o=i%36e5,c=Math.floor(o/6e4),s=o%6e4,l=Math.round(s/1e3),u="".concat(l," ").concat(a.ZP.get("秒"));return c>0&&(u="".concat(c," ").concat(a.ZP.get("分")," ")+u),r>0&&(u="".concat(r," ").concat(a.ZP.get("时")," ")+u),n>0&&(u="".concat(n," ").concat(a.ZP.get("天")," ")+u),u}},16314:function(e,t,n){"use strict";n.d(t,{W:function(){return Z}});var a=n(90228),i=n.n(a),r=n(87999),o=n.n(r),c=n(72317),s=n(61508),l=n(33839),u=n(3475),d=n(98783),m=n(69313),g=n(52676);s.ZP.config({duration:2});var p=Date.now(),f=m.Z.create({timeout:6e4,params:{t:p}}),h=["/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&&!h.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 n,a,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}d.history.push("/error"),e.next=18;break;case 5:if(401!==n){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!==(a=t.data).code&&(r=a.message||a.data)&&l.Z.error({message:r,description:null!=a&&a.errors?(0,g.jsx)(g.Fragment,{children:null==a?void 0:a.errors.map((function(e){return(0,g.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,n=e.response.status;if([502,504].includes(n))d.history.push("/error");else if(401===n)"/login"!==d.history.location.pathname&&(s.ZP.error(c.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var a,i,r,o;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&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 Z=f},48916:function(e,t,n){"use strict";n.d(t,{DY:function(){return g},FA:function(){return f},H$:function(){return P},I1:function(){return m},W9:function(){return u},ZP:function(){return l},o4:function(){return x},rS:function(){return Z},w7:function(){return d},x$:function(){return p}});var a=n(15558),i=n.n(a),r=n(72317),o=n(97302),c=n(94046),s=n.n(c);function l(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},a="unknow";t(/windows|win32|win64|wow32|wow64/g)?a="windows":t(/macintosh|macintel/g)?a="macos":t(/x11/g)?a="linux":t(/android|adr/g)?a="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(a="ios");var i="unknow";"windows"===a?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"===a?i=n(/os x [\d._]+/g):"android"===a?i=n(/android [\d._]+/g):"ios"===a&&(i=n(/os [\d._]+/g));var r="unknow";"windows"===a||"macos"===a||"linux"===a?r="desktop":("android"===a||"ios"===a||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=n(/applewebkit\/[\d._]+/g):"gecko"===o?s=n(/gecko\/[\d._]+/g):"presto"===o?s=n(/presto\/[\d._]+/g):"trident"===o&&(s=n(/trident\/[\d._]+/g));var l="unknow";"chrome"===c?l=n(/chrome\/[\d._]+/g):"safari"===c?l=n(/version\/[\d._]+/g):"firefox"===c?l=n(/firefox\/[\d._]+/g):"opera"===c?l=n(/opr\/[\d._]+/g):"iexplore"===c?l=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===c&&(l=n(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=n(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=n(/maxthon\/[\d._]+/g));var m=Object.assign({engine:o,engineVs:s,platform:r,supporter:c,supporterVs:l,system:a,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(m.system,"/").concat(m.systemVs,"\n浏览器:").concat(m.supporter,"/").concat(m.supporterVs,"\n内核:").concat(m.engine,"/").concat(m.engineVs),"color: green;font-size: 14px;font-weight: bold;"),m}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,n=e.target;void 0===t&&(t=99);var a=null,i=0;(a=n||document.querySelector(".ant-table-wrapper"))&&(i=a.getBoundingClientRect().top);var r=document.body.clientHeight-i-t;return r}function d(e,t){var n,a,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,n=o,(a=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(a)}function m(e,t,n){var a=i()(e),r=[];return function e(a){if(a)for(var i=0;i<(null==a?void 0:a.length);i++){if(t(a[i]))return n?void(a[i].children?a[i].children.unshift(n):a[i].children=[n]):void a.splice(i,1);a[i].children&&(r.push(a[i].key),e(a[i].children))}}(a),a}function g(e,t){var n;return function e(a){if(a)for(var i=0;i<(null==a?void 0:a.length);i++)t(a[i])?n=a[i]:a[i].children&&e(a[i].children)}(i()(e)),n}function p(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 n=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(n){var a,i,r="".concat(window.__ENV__QL_DIR,"/data/scripts");n.startsWith(r)&&(n=n.replace(r,""));var o=n.lastIndexOf("/");return o>=0?(i=n.slice(o+1),a=n.slice(0,o)):(i=n,a=""),[i,a]}}function h(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function Z(e,t){var n=h(e);return null!=t&&t.length&&t.forEach((function(e){var t=h(e.schedule);t&&(!n||t<n)&&(n=t)})),n}function P(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o.um[t]}function x(){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"}},50810:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3830],{73236:function(t,e,n){n.r(e);var i=n(48305),o=n.n(i),s=n(48916),r=n(3475),c=n(16314),a=n(65814),u=n(78060),l=n.n(u),h=n(32890),d=n(61508),f=n(45520),p=n(93481),v=n(75271),g=n(72317),m=n(52676),k=h.Z.Countdown;e.default=function(t){var e=t.systemInfo,n=(0,v.useState)(!1),i=o()(n,2),u=i[0],h=i[1],b=(0,v.useState)(""),y=o()(b,2),Z=y[0],x=y[1],P=(0,v.useRef)(),w=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(),c.W.put("".concat(r.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},S=function(t){var n=t.lastVersion,i=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)(l(),{children:i})}),okText:g.ZP.get("下载更新"),cancelText:g.ZP.get("以后再说"),onOk:function(){j(),c.W.put("".concat(r.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},j=function(){x(""),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)(l(),{children:Z})})})},E=function(t){c.W.put("".concat(r.Z.apiPrefix,"update/").concat(t)).then((function(t){d.ZP.success({content:(0,m.jsxs)("span",{children:[g.ZP.get("系统将在"),(0,m.jsx)(k,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),g.ZP.get("秒后自动刷新")]}),duration:30}),(0,s.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))};(0,v.useEffect)((function(){if(Z){var t=Z.includes("失败,请检查");P.current.update({maskClosable:t,closable:t,okButtonProps:{disabled:!t},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(l(),{children:Z})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[Z]);var T=(0,v.useCallback)((function(t){var e=t.message;e.includes("失败,请检查")&&d.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(){E("system")},onCancel:function(){P.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),x((function(t){return"".concat(t).concat(e)}))}),[]);return(0,v.useEffect)((function(){var t=a.Z.getInstance();return t.subscribe("updateSystemVersion",T),function(){t.unsubscribe("updateSystemVersion",T)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(p.Z,{type:"primary",onClick:function(){u||(h(!0),d.ZP.loading(g.ZP.get("检查更新中..."),0),c.W.put("".concat(r.Z.apiPrefix,"system/update-check")).then((function(t){var e=t.code,n=t.data;d.ZP.destroy(),200===e&&(n.hasNewVersion?S(n):w(n))})).catch((function(t){d.ZP.destroy(),console.log(t)})).finally((function(){h(!1)})))},children:g.ZP.get("检查更新")}),(0,m.jsx)(p.Z,{type:"primary",onClick:function(){return E("reload")},style:{marginLeft:8},children:g.ZP.get("重新启动")})]})}},65814:function(t,e,n){var i=n(15558),o=n.n(i),s=n(67825),r=n.n(s),c=n(90228),a=n.n(c),u=n(87999),l=n.n(u),h=n(25298),d=n.n(h),f=n(17069),p=n.n(f),v=n(82092),g=n.n(v),m=n(78078),k=n.n(m),b=["type"],y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d()(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 p()(t,[{key:"init",value:(n=l()(a()().mark((function t(){var e=this;return a()().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(k())(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=l()(a()().mark((function t(){var e;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(e=this.socket)||void 0===e?void 0:e.readyState)===k().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 i={action:"subscribe",topic:t};this.send(i)}}},{key:"unsubscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(n.has(e)){n.delete(e);var i={action:"unsubscribe",topic:t};this.send(i)}}},{key:"send",value:function(t){var e;(null===(e=this.socket)||void 0===e?void 0:e.readyState)===k().OPEN&&this.socket.send(JSON.stringify(t))}},{key:"dispatchMessage",value:function(t){var e=t.type,n=r()(t,b),i=this.subscriptions.get(e)||new Set;o()(i).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)===k().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()(y,"instance",null),e.Z=y},27916:function(t,e,n){n.d(e,{Z:function(){return s}});var i=n(99459),o=n(75271);function s(){var t=o.useReducer((function(t){return t+1}),0);return(0,i.Z)(t,2)[1]}},21485:function(t,e,n){n.d(e,{mL:function(){return a},q0:function(){return c}});var i=function(){return{height:0,opacity:0}},o=function(t){return{height:t.scrollHeight,opacity:1}},s=function(t,e){return!0===(null==e?void 0:e.deadline)||"height"===e.propertyName},r={motionName:"ant-motion-collapse",onAppearStart:i,onEnterStart:i,onAppearActive:o,onEnterActive:o,onLeaveStart:function(t){return{height:t?t.offsetHeight:0}},onLeaveActive:i,onAppearEnd:s,onEnterEnd:s,onLeaveEnd:s,motionDeadline:500},c=((0,n(86428).b)("bottomLeft","bottomRight","topLeft","topRight"),function(t){return void 0===t||"topLeft"!==t&&"topRight"!==t?"slide-up":"slide-down"}),a=function(t,e,n){return void 0!==n?n:"".concat(t,"-").concat(e)};e.ZP=r}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,8851],{29774:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return h}});var n=a(72317),i=(a(75271),a(50691)),r=a(18015),o="container___nww32",c="right___o0xXT",s="title___DHxWh",l="desc___frhI6",u=a(16483),d=a.n(u),p=a(52676),g=i.Z.Link,h=function(e){var t=e.systemInfo;return(0,p.jsxs)("div",{className:o,children:[(0,p.jsx)("img",{alt:"logo",style:{width:140,marginRight:20},src:"https://qn.whyour.cn/logo.png"}),(0,p.jsxs)("div",{className:c,children:[(0,p.jsx)("span",{className:s,children:n.ZP.get("青龙")}),(0,p.jsx)("span",{className:l,children:n.ZP.get("支持python3、javascript、shell、typescript 的定时任务管理面板")}),(0,p.jsxs)(r.Z,{children:[(0,p.jsxs)(r.Z.Item,{label:n.ZP.get("版本"),span:3,children:["develop"===(null==t?void 0:t.branch)?n.ZP.get("开发版"):n.ZP.get("正式版")," ","v",t.version]}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新时间"),span:3,children:d()(1e3*t.publishTime).format("YYYY-MM-DD HH:mm")}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新日志"),span:3,children:(0,p.jsx)(g,{href:"https://qn.whyour.cn/version.yaml?t=".concat(Date.now()),target:"_blank",children:n.ZP.get("查看")})})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong",target:"_blank",style:{marginRight:15},children:"Github"}),(0,p.jsx)(g,{href:"https://t.me/jiao_long",target:"_blank",style:{marginRight:15},children:n.ZP.get("Telegram频道")}),(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong/issues",target:"_blank",children:n.ZP.get("提交BUG")})]})]})]})}},92294:function(e,t,a){"use strict";a.r(t);var n=a(90228),i=a.n(n),r=a(26068),o=a.n(r),c=a(87999),s=a.n(c),l=a(48305),u=a.n(l),d=a(72317),p=a(75271),g=a(72338),h=a(61508),f=a(45520),m=a(17082),P=a(35181),Z=a(16314),v=a(3475),y=a(52676);t.default=function(e){var t=e.app,a=e.handleCancel,n=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(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
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}}}]);
|