filecat 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/1149.cbeaf4f434dffe8aa534.js +1 -0
- package/build/dist/{1893.f142d5709dc62fbd5385.js → 1893.c1053a2905d62db34d28.js} +1 -1
- package/build/dist/2851.965eb7476fea48962f44.js +1 -0
- package/build/dist/3328.98c3000736863aaa904f.js +1 -0
- package/build/dist/5877.c200f0882c61c4fca268.js +1 -0
- package/build/dist/{5937.47fe3c8460bd56b2784e.js → 5937.a80359e7e94cf8d00a45.js} +1 -1
- package/build/dist/6505.ade0bac4db1c9b922f35.js +1 -0
- package/build/dist/{676.c674f478ab4413ea910b.js → 676.44e642b4ef2b6a7a0fd0.js} +1 -1
- package/build/dist/6805.fc152a28ee35083b9cf9.js +1 -0
- package/build/dist/6919.233769cf0439b571c2be.js +1 -0
- package/build/dist/6966.2432063a0d9349aff6b4.js +1 -0
- package/build/dist/7759.f7992b7ccdaa3bd07578.js +1 -0
- package/build/dist/8302.e7a6d156582a0132eb31.js +1 -0
- package/build/dist/{8714.bf18d28e4641be164b30.js → 8714.8fcad52f220ca72a1b6f.js} +1 -1
- package/build/dist/8765.4b41dd887f09c4c1a556.js +1 -0
- package/build/dist/9546.421e124c9297955f5a4d.js +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.f7d3e41cbec1e3c89682.js +2 -0
- package/build/main.js +1 -1
- package/build/threads.work.filecat.js +1 -1
- package/package.json +1 -1
- package/build/dist/1149.7da2123c4f08574dd45f.js +0 -1
- package/build/dist/2851.4b018efbab28bccfeef8.js +0 -1
- package/build/dist/3328.2e0cb7e7579ccd119da6.js +0 -1
- package/build/dist/5877.3e4d78f19b08f948b547.js +0 -1
- package/build/dist/6505.f37ff577812fccac9b45.js +0 -1
- package/build/dist/6805.f2561ba5509cc4e9cadc.js +0 -1
- package/build/dist/6919.423a2e831e713be54ea0.js +0 -1
- package/build/dist/6966.f0d2adb09965f20c3f18.js +0 -1
- package/build/dist/7759.868061de8d33d120b740.js +0 -1
- package/build/dist/8302.e0f4d085e33b3b95b7a3.js +0 -1
- package/build/dist/8765.c7095ad906a9b71315c0.js +0 -1
- package/build/dist/9546.3240869de641c3dfd5b8.js +0 -1
- package/build/dist/main.8ee4ca5baecfc0267edb.js +0 -2
- /package/build/dist/{main.8ee4ca5baecfc0267edb.js.LICENSE.txt → main.f7d3e41cbec1e3c89682.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1149],{18840(e,t,n){n.d(t,{I:()=>i,gE:()=>s});class i{open;key;option_keys;port}class s{client_name;client_num_id;open=!1;serverIp;serverPort;key="";note;status;is_new;index}n.d(t,["FG",0,{content_max_width:"70%",content_padding:"4%",font_size:"16px",line_height:"1.8"},"mo",0,"\nnode_modules\n.venv\n.gradle\n.cache\nvendor\n"])},69918(e,t,n){n.d(t,{Ce:()=>l,FG:()=>i.FG,fy:()=>d,gC:()=>r});var i=n(18840),s=n(14284),c=n(53459);async function r(){try{const e=await s.XO.get("md_editor_setting/get");return{...i.FG,...e?.data??{}}}catch(e){return{...i.FG}}}async function d(e){const t=await s.XO.post("md_editor_setting/save",e);return t?.code!==c.m.Success?null:{...i.FG,...t.data??e}}function l(e,t){e&&(e.style.setProperty("--md-editor-max-width",t.content_max_width),e.style.setProperty("--md-editor-padding",t.content_padding),e.style.setProperty("--md-editor-font-size",t.font_size),e.style.setProperty("--md-editor-line-height",t.line_height))}},11149(e,t,n){n.r(t),n.d(t,{default:()=>g});var i=n(96540),s=n(86149),c=n(86090),r=n(85997),d=n(4412),l=n(75725),a=n(70447),o=n(61443),h=n(62042),_=n(78247),m=n(23430),x=n(69918),p=n(74848);const y=[{key:"content_max_width",label:"正文最大宽度"},{key:"content_padding",label:"正文左右边距"},{key:"font_size",label:"正文字号"},{key:"line_height",label:"行高"}],u=/^\d+(\.\d+)?(px|%|rem|em|vw|vh|ch)?$/;function g(){const{t:e}=(0,s.B)(),t=(0,c.Zp)(),{check_user_auth:n}=(0,_.MH)(),g=n(m.oV.md_editor_setting),[f,k]=(0,i.useState)({}),[j,v]=(0,i.useState)(!0),[w,b]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(0,x.gC)().then(e=>{const t={};y.forEach(n=>t[n.key]=e[n.key]??""),k(t)}).finally(()=>v(!1))},[]);const F=e=>{const t=(f[e]??"").trim();return u.test(t)?t:x.FG[e]};return(0,p.jsxs)("div",{children:[(0,p.jsx)(d.aZ,{position:"right",children:(0,p.jsx)(r.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>t(-1)})}),(0,p.jsx)(l.jW,{isFull:!0,more:!0,children:(0,p.jsx)(l.NN,{children:(0,p.jsx)(l.xh,{children:(0,p.jsxs)(l.fI,{children:[(0,p.jsx)(l.VP,{widthPer:33,maxWidth:"30rem",children:(0,p.jsx)(a.Zp,{title:e("编辑器设置"),titleCom:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.C3,{text:e("恢复默认"),clickFun:()=>{const e={};y.forEach(t=>e[t.key]=x.FG[t.key]),k(e)}}),g&&(0,p.jsx)(r.$n,{text:e(w?"保存中":"保存"),clickFun:()=>{w||(async()=>{for(const t of y){const n=(f[t.key]??"").trim();if(!u.test(n))return void(0,h.zN)(`${e(t.label)}: ${e("请输入合法的 CSS 值,例如 10px、3rem、80%")}`)}const t={};y.forEach(e=>t[e.key]=f[e.key].trim()),b(!0);try{const n=await(0,x.fy)(t);if(n){(0,h.SK)(e("保存成功"));const t={};y.forEach(e=>t[e.key]=n[e.key]??""),k(t)}else(0,h.zN)(e("保存失败"))}finally{b(!1)}})()}})]}),children:j?(0,p.jsxs)("div",{className:"common-box common-box-center",children:[e("加载中"),"..."]}):(0,p.jsxs)(i.Fragment,{children:[y.map(t=>(0,p.jsx)(o.BC,{label:e(t.label),label_width:"8rem",children:(0,p.jsx)("input",{className:"input input--block",type:"text",spellCheck:!1,disabled:!g,placeholder:x.FG[t.key],value:f[t.key]??"",onChange:e=>k(n=>({...n,[t.key]:e.target.value}))})},t.key)),!g&&(0,p.jsx)("p",{className:"md-editor-setting-page__desc",children:e("你没有修改该设置的权限,以下为当前配置。")})]})})}),(0,p.jsx)(l.VP,{widthPer:50,maxWidth:"60rem",children:(0,p.jsx)(a.Zp,{title:e("预览"),children:(0,p.jsx)("div",{className:"md-editor-setting-page__preview",ref:e=>(0,x.Ce)(e,{content_max_width:F("content_max_width"),content_padding:F("content_padding"),font_size:F("font_size"),line_height:F("line_height")}),children:(0,p.jsxs)("div",{className:"md-editor-setting-page__preview-sheet",children:[(0,p.jsx)("h3",{children:e("标题")}),(0,p.jsx)("p",{children:e("这是一段用于预览正文宽度、边距、字号和行高的示例文字。调整左侧数值即可看到这里的变化,与实际编辑器使用的是同一套样式变量。")}),(0,p.jsx)("p",{children:e("第二段文字,用来更清楚地看出行高。")})]})})})})]})})})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2851],{8694(e,t,s){s.d(t,{$K:()=>a,RB:()=>r,l5:()=>i,qB:()=>n,vo:()=>c,vr:()=>l});class n{targetProxyUrl;proxyPort;sysProxyPort}let o=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({});class a{open=!1;port;key="";async_ips=[]}class c{client_num_id;client_name;open=!1;ip;mask;serverIp;serverPort;key="";model=o.udp}let r=function(e){return e[e.row=1]="row",e[e.json=2]="json",e[e.form=3]="form",e}({});class l{body_type;header_type;url;method;headers;data;form_data_list;local_download_path}class i{enabled;ip;port;bypass;useForLocal;type}},77481(e,t,s){s.d(t,{S:()=>r,X:()=>c});var n=s(96540),o=s(61443),a=s(74848);function c(e){const[t,s]=n.useState([]),c=(0,n.useRef)(-1),[r,l]=(0,n.useState)(-1),[i,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?s(Array.isArray(e.children)?e.children:[e.children]):s(e.rows)},[e.rows,e.children]);const p=()=>{c.current=-1,l(-1),d(-1)};return(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:e.headers?.map((t,s)=>{const n=!!e.filter&&(e.filter.column??0)===s;let c=t;if(n){const s=e.filter,n=s.options.find(e=>e.value===s.value);null!=s.value&&n&&(c=`${t} (${n.label})`)}return(0,a.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,a.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:c}):t},s)})})}),(0,a.jsx)("tbody",{children:t.map((t,s)=>{const n=!!e.onRowDrag;return(0,a.jsx)("tr",{className:n?(r===s?"row-dragging":"")+(i===s?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(c.current=s,l(s),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||c.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(s))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=c.current,s=i;p(),t<0||s<0||t===s||e.onRowDrag?.(t,s)})())},onDragEnd:p,children:t.map((s,n)=>{const o=n===t.length-1?"small":"";return(0,a.jsx)("td",{className:o,style:{width:e.width??"auto"},children:s},n)})},s)})})]})}function r(e){return(0,a.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,a.jsx)("div",{children:e},t))})}},42851(e,t,s){s.r(t),s.d(t,{default:()=>$});var n=s(96540),o=s(75725),a=s(14284),c=s(62042),r=s(53459),l=s(70447),i=s(61443),d=s(85997),p=s(77481),h=s(8694),u=s(14944),x=s(92275),j=s(86149),m=s(4412),v=s(74848);function g(e){const{t}=(0,j.B)(),[s,g]=(0,n.useState)(void 0),[y,f]=(0,n.useState)(!1),[S,_]=(0,n.useState)(""),[w,C]=(0,n.useState)([t(`${t("名称")}`),t(`${t("虚拟")}ip`),`${t("物理")}`,t("在线状态"),t("选择")]),[k,b]=(0,n.useState)([]),[I,A]=(0,n.useState)({}),[P,U]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{const e=new x.hf(x.HK.vir_net_serverIno_get);u.ws.addMsg(x.HK.vir_net_serverIno_get,e=>{(e=>{for(const s of e){const e=s[s.length-1];s[s.length-1]=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l.fq,{ok:e}),t(e?"在线":"离线")]}),s[0]=(0,v.jsx)(l.xP,{context:s[0],tip_context:s[0]}),s[2]=(0,v.jsx)(l.xP,{context:s[2],tip_context:s[2]})}})(e.context),b(e.context)}),await u.ws.send(e)})();return(async()=>{const e=await a._U.get("vir/server/get");if(e.code!==r.m.Success)return;const t=e.data;g(t.port),_(t.key),f(t.open)})(),()=>{}},[]);return(0,v.jsxs)("div",{children:[(0,v.jsxs)(m.aZ,{position:"right",children:[!!Object.keys(I).length&&I[0],!!Object.keys(I).length&&(0,v.jsx)(d.rA,{icon:"delete",title:"删除",onClick:async()=>{await a._U.post("vir/server/delete/client",{ips:Object.keys(I)}),A({})}})]}),(0,v.jsx)(o.fI,{children:(0,v.jsxs)(o.VP,{children:[(0,v.jsxs)(l.Zp,{title:"",rightBottomCom:(0,v.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new h.$K;e.open=y,e.key=S,P&&(e.async_ips=Object.keys(I)),s&&(e.port=parseInt(s));(await a._U.post("vir/server/save",e)).code===r.m.Success?((0,c.SK)("保存成功"),U(!1)):(0,c.zN)("网络错误")}}),children:[(0,v.jsx)(i.Sm,{placeholder:"port",value:s,handleInputChange:e=>{g(e)}}),(0,v.jsx)(i.Sm,{type:"password",placeholder:"key ",value:S,handleInputChange:e=>{_(e)}}),(0,v.jsxs)("form",{children:[t("状态"),":",(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:y,onchange:()=>{f(!y)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!y,onchange:()=>{f(!y)}})]})]}),!!Object.keys(I).length&&(0,v.jsx)(i.GL,{context:t("同步信息给选中服务器"),selected:P,onchange:()=>{U(!P)}})]}),(0,v.jsx)(l.Zp,{title:"",children:(0,v.jsx)(p.X,{headers:w,rows:k.map(e=>[...e,(0,v.jsx)(i.GL,{context:t(""),selected:I[e[1]],onchange:()=>{const t={...I};t[e[1]]?delete t[e[1]]:t[e[1]]=e,A(t)}})]),width:"10rem"})})]})})]})}function y(e){const{t}=(0,j.B)(),[s,m]=(0,n.useState)(""),[g,y]=(0,n.useState)(void 0),[f,S]=(0,n.useState)(""),[_,w]=(0,n.useState)(""),[C,k]=(0,n.useState)(void 0),[b,I]=(0,n.useState)(!1),[A,P]=(0,n.useState)(""),[U,K]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{const e=await a._U.get("vir/client/get");if(e.code!==r.m.Success)return;const t=e.data;if(k(t.serverPort),S(t.serverIp),m(t.ip),y(t.mask),P(t.key),I(t.open),w(t.client_name),t.open){const e=new x.hf(x.HK.vir_net_client_get),t=(await u.ws.send(e)).context.state;K(t),u.ws.addMsg(x.HK.vir_net_client_get,e=>{K(e.context.state)})}})()},[]);return(0,v.jsx)("div",{children:(0,v.jsx)(o.fI,{children:(0,v.jsxs)(o.VP,{children:[(0,v.jsxs)(l.Zp,{title:"",rightBottomCom:(0,v.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new h.vo;e.ip=s,e.mask=parseInt(g),e.key=A,e.serverIp=f,e.serverPort=parseInt(C),e.open=b,e.client_name=_;(await a._U.post("vir/client/save",e)).code===r.m.Success?(0,c.SK)("保存成功"):(0,c.zN)("网络错误")}}),titleCom:(0,v.jsxs)("div",{children:[t("连接状态"),(0,v.jsx)(l.fq,{ok:U})]}),children:[(0,v.jsx)(i.Sm,{placeholder:"ip ",value:s,handleInputChange:e=>{m(e)}}),(0,v.jsx)(i.Sm,{placeholder:"mask",value:g,handleInputChange:e=>{y(e)}}),(0,v.jsx)(i.Sm,{placeholder:`${t("服务器")} ip`,value:f,handleInputChange:e=>{S(e)}}),(0,v.jsx)(i.Sm,{placeholder:`${t("服务器")} part`,value:C,handleInputChange:e=>{k(e)}}),(0,v.jsx)(i.Sm,{placeholder:"名称 ",value:_,handleInputChange:e=>{w(e)}}),(0,v.jsx)(i.Sm,{type:"password",placeholder:"key ",value:A,handleInputChange:e=>{P(e)}}),(0,v.jsxs)("form",{children:[t("状态"),(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:b,onchange:()=>{I(!b)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!b,onchange:()=>{I(!b)}})]})]})]}),(0,v.jsxs)(l.Zp,{title:"",children:[(0,v.jsx)("div",{children:"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"}),(0,v.jsx)("div",{children:"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"}),(0,v.jsx)("div",{children:"key:用于验证身份信息并加密的和服务器设置的一样"})]})]})})})}var f=s(34843),S=s(82893),_=s(23430),w=s(78247),C=s(21499),k=s(24659),b=s(64694);function I(e){const{t}=(0,j.B)(),[s,u]=(0,n.useState)(""),[x,m]=(0,n.useState)(""),[g,y]=(0,n.useState)(""),[I,A]=(0,n.useState)(!1),[P,U]=(0,n.useState)(!1),[K,F]=(0,n.useState)({list:[]}),[$,H]=(0,f.fp)(S.AG.editorSetting),[N,Z]=(0,f.fp)(S.AG.user_base_info),O=[t("端口"),t("目标地址"),t("目标端口"),t("开启"),t("备注"),t("删除")],[B,D]=(0,n.useState)([]),E=[t("port"),t("ip"),t("type"),t("开启")],[z,V]=(0,n.useState)([]),M=[t("编辑"),t("开启"),t("备注"),t("删除")],T=(0,k.K)(),X=async()=>{const e=[a._U.post("vir/client/tcp_proxy/get"),a._U.post("http/proxy/server/get")];let t;N.sys===_.XM.mac?t=(async()=>{const e=await a._U.post("http/proxy/get/mac");if(e.code!==r.m.Success)return;const t=[],s=[];for(const n of e.data)"Wi-Fi"===n.name?t.push(n):s.push(n);V([...t,...s])})():N.sys===_.XM.win&&(t=(async()=>{const e=await a._U.post("http/proxy/get/win");if(e.code===r.m.Success){const t=e.data;u(t.ip),m(t.port),A(t.enabled),y(t.bypass),U(t.useForLocal)}})()),t&&e.push(t);const[s,n]=await Promise.all(e);s.code===r.m.Success&&D(s.data),n.code===r.m.Success&&F(n.data)};(0,n.useEffect)(()=>{X()},[]);return(0,v.jsx)("div",{children:(0,v.jsxs)(o.fI,{children:[N.sys===_.XM.win&&(0,v.jsx)(o.VP,{widthPer:33,children:(0,v.jsxs)(l.Zp,{title:"Http Proxy",rightBottomCom:(0,v.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new h.l5;e.port=parseInt(x),e.enabled=I,e.useForLocal=P,e.ip=s,e.bypass=g;(await a._U.post("http/proxy/set/win",e)).code===r.m.Success&&(X(),(0,c.SK)("保存成功"))}}),children:[(0,v.jsx)(i.Sm,{placeholder:"ip (default localhost) ",value:s,handleInputChange:e=>{u(e)}}),(0,v.jsx)(i.Sm,{placeholder:"port ",value:x,handleInputChange:e=>{m(e)}}),(0,v.jsx)(i.Sm,{placeholder:t("忽略ip"),value:g,handleInputChange:e=>{y(e)}}),(0,v.jsxs)("form",{children:[t("请勿将代理服务器用于本地(Intranet)地址"),(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:P,onchange:()=>{U(!P)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!P,onchange:()=>{U(!P)}})]})]}),(0,v.jsxs)("form",{children:[t("状态"),(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:I,onchange:()=>{A(!I)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!I,onchange:()=>{A(!I)}})]})]})]})}),N.sys===_.XM.mac&&(0,v.jsx)(o.VP,{children:z.map((e,s)=>(0,v.jsxs)(l.uF,{self_title:(0,v.jsxs)("span",{className:" div-row ",children:[(0,v.jsx)("h2",{children:e.name})," "]}),titleCom:(0,v.jsx)("div",{children:(0,v.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:()=>{(async e=>{const t=z[e];(await a._U.post("http/proxy/set/mac",[t])).code===r.m.Success&&(X(),(0,c.SK)("保存成功"))})(s)}})}),children:[(0,v.jsx)(p.X,{headers:E,rows:e.proxies.map((e,t)=>{const n=[(0,v.jsx)(i.Sm,{value:e.port,handleInputChange:t=>{e.port=parseInt(t)},no_border:!0}),(0,v.jsx)(i.Sm,{value:e.ip,handleInputChange:t=>{e.ip=t},no_border:!0}),(0,v.jsx)("div",{children:1===e.type?"http":"https"}),(0,v.jsx)(i.l6,{value:e.enabled,onChange:e=>{((e,t,s)=>{const n=[...z];n[e].proxies[t].enabled=s,V(n)})(s,t,e)},options:T,no_border:!0})];return n}),width:"10rem"}),"ignore ips",(0,v.jsx)(i.Sm,{value:e.bypass,handleInputChange:e=>{z[s].bypass=e},no_border:!0})]},s))}),(0,v.jsxs)(o.VP,{children:[(0,v.jsx)(l.uF,{self_title:(0,v.jsxs)("span",{className:" div-row ",children:[(0,v.jsx)("h2",{children:t("Tcp Proxy")})," "]}),titleCom:(0,v.jsxs)("div",{children:[(0,v.jsx)(d.rA,{icon:"add",title:t("添加"),onClick:()=>{D([...B,{note:"",open:!1,port:0,target_port:0,target_ip:""}])}}),(0,v.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:async()=>{const e=[];for(let t=0;t<B.length;t++)B[t].index=t,e.push(B[t]);(await a._U.post("vir/client/tcp_proxy/save",e)).code===r.m.Success&&((0,c.SK)("保存成功"),X())}})]}),children:(0,v.jsx)(p.X,{headers:O,rows:B.map((e,s)=>{const n=[(0,v.jsx)(i.Sm,{value:e.port,handleInputChange:t=>{e.port=parseInt(t)},no_border:!0}),(0,v.jsx)(i.Sm,{value:e.target_ip,handleInputChange:t=>{e.target_ip=t},no_border:!0}),(0,v.jsx)(i.Sm,{value:e.target_port,handleInputChange:t=>{e.target_port=parseInt(t)},no_border:!0}),(0,v.jsx)(i.l6,{value:e.open,onChange:e=>{B[s].open=e,D([...B])},options:T,no_border:!0}),(0,v.jsx)(i.Sm,{value:e.note,handleInputChange:t=>{e.note=t},no_border:!0}),(0,v.jsx)("div",{children:(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>(e=>{B.splice(e,1),D([...B])})(s)})})];return n}),width:"10rem",onRowDrag:(e,t)=>{D((0,b.TI)(B,e,t))}})}),(0,v.jsx)(l.uF,{self_title:(0,v.jsxs)("span",{className:" div-row ",children:[(0,v.jsx)("h2",{children:t("Http Proxy Server")})," "]}),titleCom:(0,v.jsxs)("div",{children:[(0,v.jsx)(d.rA,{icon:"add",title:t("添加端口实例"),onClick:()=>{K.list.push({open:!1,port:0,note:"",list:[]}),F({...K})}}),(0,v.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:async()=>{(await a._U.post("http/proxy/server/save",K)).code===r.m.Success&&(0,c.SK)("保存成功")}})]}),children:K.list.map((e,s)=>(0,v.jsxs)("div",{className:"net-proxy-instance",children:[(0,v.jsxs)("div",{className:"net-proxy-instance__toolbar",children:[(0,v.jsxs)("span",{className:"net-proxy-instance__label",children:[t("端口实例")," #",s+1]}),(0,v.jsx)("span",{children:t("状态")}),(0,v.jsx)(i.l6,{value:e.open,width:"15%",onChange:t=>{e.open=t,F({...K})},options:T,no_border:!0}),(0,v.jsx)("span",{children:t("端口")}),(0,v.jsx)(i.Sm,{value:e.port||"",handleInputChange:t=>{e.port=t?parseInt(t):0,F({...K})},no_border:!0,width:"80px"}),(0,v.jsx)(d.rA,{icon:"add",title:t("添加规则"),onClick:()=>{e.list.push({note:"",open:!1}),F({...K})}}),(0,v.jsx)(d.rA,{icon:"delete",title:t("删除端口实例"),onClick:()=>{K.list.splice(s,1),F({...K})}}),(0,v.jsx)(i.Sm,{placeholder:t("备注"),width:"100%",value:e.note,handleInputChange:t=>{e.note=t,F({...K})},no_border:!0})]}),(0,v.jsx)(p.X,{headers:M,rows:e.list.map((n,o)=>{const c=[(0,v.jsx)("div",{children:(0,v.jsx)(d.rA,{icon:"edit",title:t("编辑"),onClick:()=>{(async(e,t)=>{const s=K.list[e];if(!s)return;const n=s.list[t];if(!n)return;n.random_key||(n.random_key=(0,C.hU)(),F({...K}));const o=await a._U.post("http/proxy/server/code/get",{key:n.random_key,name:n.random_key});H({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:async e=>{0===(await a._U.post("http/proxy/server/code/save",{context:e,key:n.random_key})).code&&(w.xK.set_value_temp(""),H({open:!1,model:"",fileName:"",save:null}))}}),w.xK.set_value_temp(o.data)})(s,o)}})}),(0,v.jsx)(i.l6,{value:n.open,onChange:t=>{e.list[o].open=t,F({...K})},options:T,no_border:!0}),(0,v.jsx)(i.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,v.jsx)("div",{children:(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{e.list.splice(o,1),F({...K})}})})];return c}),width:"10rem"})]},s))})]})]})})}var A=s(87361),P=s(82726),U=s(83529);function K(e){const{t}=(0,j.B)(),[s,h]=(0,n.useState)([]),[u,x]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[_,w]=(0,n.useState)(""),[C,k]=(0,n.useState)(!1),[b,I]=(0,f.fp)(S.AG.showPrompt),[A,K]=(0,f.fp)(S.AG.confirm);(0,n.useEffect)(()=>{(async()=>{const e=await a.ez.get("ips/dnspod");if(e.code!==r.m.Success)return;const t=e.data,s=[],n=[];for(const e of t.ips)e.isIPv4?s.push(e):n.push(e);h(s),x(n),t.account&&(y(t.account.id),w(t.account.token)),k(t.isOpen)})()},[]);const F=async e=>{K({open:!0,handle:async()=>{0===(await a.ez.post("http/del",e)).code&&(0,c.SK)("删除成功,稍后请刷新"),K({open:!1,handle:null})},title:t("确定删除吗")})};return(0,v.jsxs)("div",{children:[(0,v.jsx)(m.aZ,{position:"right",children:(0,v.jsx)(d.rA,{icon:"add",title:t("添加http获取ip"),onClick:()=>{I({show:!0,type:U.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})}),(0,v.jsxs)(o.fI,{children:[(0,v.jsxs)(o.VP,{children:[(0,v.jsx)(l.Zp,{title:"ipv4",children:s.length>0&&s.map((e,s)=>(0,v.jsxs)("div",{children:[`${e.ifaceOrWww}(${e.ip})`,(0,v.jsx)(i.Sm,{right_placeholder:(0,v.jsx)("div",{children:e.source_type===P.tC.http_get&&(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{F(e)}})}),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:t=>{e.ddnsHost=t}})]},s))}),(0,v.jsx)(l.Zp,{title:"ipv6",children:u.length>0&&u.map((e,s)=>(0,v.jsxs)("div",{children:[`${e.ifaceOrWww}(${e.ip})`,(0,v.jsx)(i.Sm,{right_placeholder:(0,v.jsx)("div",{children:e.source_type===P.tC.http_get&&(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{F(e)}})}),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:t=>{e.ddnsHost=t}})]},s))})]}),(0,v.jsxs)(o.VP,{children:[(0,v.jsxs)(l.Zp,{title:t("账号设置"),rightBottomCom:(0,v.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{if(C&&(!g||!_))return void(0,c.zN)("id和token都不能为空");const e=new P.yL,t=[];for(const e of[...s,...u])e.ddnsHost&&t.push(e);e.ips=t,e.account={id:g,token:_},e.isOpen=C,e.ddnsType=P.E2.dnspod;(await a.ez.post("save",e)).code===r.m.DdnsAuthFail?(0,c.zN)("鉴权失败"):(0,c.SK)("success")}}),children:[(0,v.jsx)(i.Sm,{placeholder:"ID",value:g,handleInputChange:e=>{y(e)}}),(0,v.jsx)(i.cA,{placeholder:"TOKEN",value:_,handleInputChange:e=>{w(e)}}),(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:C,onchange:()=>{k(!C)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!C,onchange:()=>{k(!C)}})]})]}),(0,v.jsx)(l.Zp,{title:t("说明"),children:"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"})]})]})]})}function F(e){const{t}=(0,j.B)(),[s,h]=(0,n.useState)([]),[u,x]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[_,w]=(0,n.useState)(""),[C,k]=(0,n.useState)(!1),[b,I]=(0,f.fp)(S.AG.showPrompt),[A,K]=(0,f.fp)(S.AG.confirm);(0,n.useEffect)(()=>{(async()=>{const e=await a.ez.get("ips/tx");if(e.code!==r.m.Success)return;const t=e.data,s=[],n=[];for(const e of t.ips)e.isIPv4?s.push(e):n.push(e);h(s),x(n),t.account&&(y(t.account.secretid),w(t.account.secretkey)),k(t.isOpen)})()},[]);const F=async e=>{K({open:!0,handle:async()=>{0===(await a.ez.post("http/del",e)).code&&(0,c.SK)("删除成功,稍后请刷新"),K({open:!1,handle:null})},title:t("确定删除吗")})};return(0,v.jsxs)("div",{children:[(0,v.jsx)(m.aZ,{position:"right",children:(0,v.jsx)(d.rA,{icon:"add",title:t("添加http获取ip"),onClick:()=>{I({show:!0,type:U.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})}),(0,v.jsxs)(o.fI,{children:[(0,v.jsxs)(o.VP,{children:[(0,v.jsx)(l.Zp,{title:"ipv4",children:s.length>0&&s.map((e,s)=>(0,v.jsxs)("div",{children:[`${e.ifaceOrWww}(${e.ip})`,(0,v.jsx)(i.Sm,{right_placeholder:(0,v.jsx)("div",{children:e.source_type===P.tC.http_get&&(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{F(e)}})}),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:t=>{e.ddnsHost=t}})]},s))}),(0,v.jsx)(l.Zp,{title:"ipv6",children:u.length>0&&u.map((e,s)=>(0,v.jsxs)("div",{children:[`${e.ifaceOrWww}(${e.ip})`,(0,v.jsx)(i.Sm,{right_placeholder:(0,v.jsx)("div",{children:e.source_type===P.tC.http_get&&(0,v.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{F(e)}})}),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:t=>{e.ddnsHost=t}})]},s))})]}),(0,v.jsxs)(o.VP,{children:[(0,v.jsxs)(l.Zp,{title:t("账号设置"),rightBottomCom:(0,v.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{if(C&&(!g||!_))return void(0,c.zN)("SecretId和SecretKey都不能为空");const e=new P.yL,t=[];for(const e of[...s,...u])e.ddnsHost&&t.push(e);e.ips=t,e.account={secretid:g,secretkey:_},e.isOpen=C,e.ddnsType=P.E2.tengxun;(await a.ez.post("save",e)).code===r.m.DdnsAuthFail?(0,c.zN)("鉴权失败"):(0,c.SK)("成功")}}),children:[(0,v.jsx)(i.Sm,{placeholder:"SecretId",value:g,handleInputChange:e=>{y(e)}}),(0,v.jsx)(i.cA,{placeholder:"SecretKey",value:_,handleInputChange:e=>{w(e)}}),(0,v.jsx)(p.S,{isFlex:!0,columns:[(0,v.jsx)(i.U6,{value:1,context:t("开启"),selected:C,onchange:()=>{k(!C)}}),(0,v.jsx)(i.U6,{value:1,context:t("关闭"),selected:!C,onchange:()=>{k(!C)}})]})]}),(0,v.jsx)(l.Zp,{title:t("说明"),children:"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"})]})]})]})}function $(){const{t:e}=(0,j.B)(),{check_user_auth:t}=(0,w.MH)(),s=[];return t(_.oV.vir_net)&&s.push({index:1,name:e("系统代理"),rto:"proxy_sys/",component:(0,v.jsx)(I,{})},{index:2,name:"Tun proxy "+e("客户端"),rto:"client/",component:(0,v.jsx)(y,{})},{index:3,name:"Tun proxy "+e("服务端"),rto:"server/",component:(0,v.jsx)(g,{})}),t(_.oV.ddns)&&s.push({index:4,name:`ddns-dnspod(${e("腾讯")})`,rto:"dnspod/",component:(0,v.jsx)(K,{})},{index:5,name:`ddns-${e("腾讯")}${e("云")}`,rto:"tengxun/",component:(0,v.jsx)(F,{})}),(0,v.jsx)(o.W1,{optionList:s,father_route:A.o.net})}},24659(e,t,s){var n=s(86149);s.d(t,["K",0,()=>{const{t:e}=(0,n.B)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3328],{77481(e,t,s){s.d(t,{S:()=>o,X:()=>l});var n=s(96540),i=s(61443),a=s(74848);function l(e){const[t,s]=n.useState([]),l=(0,n.useRef)(-1),[o,r]=(0,n.useState)(-1),[c,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?s(Array.isArray(e.children)?e.children:[e.children]):s(e.rows)},[e.rows,e.children]);const h=()=>{l.current=-1,r(-1),d(-1)};return(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:e.headers?.map((t,s)=>{const n=!!e.filter&&(e.filter.column??0)===s;let l=t;if(n){const s=e.filter,n=s.options.find(e=>e.value===s.value);null!=s.value&&n&&(l=`${t} (${n.label})`)}return(0,a.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,a.jsx)(i.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:l}):t},s)})})}),(0,a.jsx)("tbody",{children:t.map((t,s)=>{const n=!!e.onRowDrag;return(0,a.jsx)("tr",{className:n?(o===s?"row-dragging":"")+(c===s?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(l.current=s,r(s),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||l.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(s))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=l.current,s=c;h(),t<0||s<0||t===s||e.onRowDrag?.(t,s)})())},onDragEnd:h,children:t.map((s,n)=>{const i=n===t.length-1?"small":"";return(0,a.jsx)("td",{className:i,style:{width:e.width??"auto"},children:s},n)})},s)})})]})}function o(e){return(0,a.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,a.jsx)("div",{children:e},t))})}},53328(e,t,s){s.r(t),s.d(t,{default:()=>U});var n=s(96540),i=s(75725),a=s(23430),l=s(70447),o=s(85997),r=s(61443),c=s(14284),d=s(53459),h=s(77481),u=s(86149),p=s(82893),x=s(40505),_=s(62042),m=s(21499),j=s(21469),v=s(64694),f=s(74848);function g(e){const{t}=(0,u.B)(),[s,a]=(0,n.useState)([]);(0,n.useEffect)(()=>{(async()=>{if(e.getItems){const t=await e.getItems();a(t)}})()},[]);return(0,f.jsx)(i.xh,{children:(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e.title}),e.info_click&&(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{e.info_click()},title:"信息"})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:t("添加"),onClick:()=>{const t=[];for(let s=0;s<e.headers.length-1;s++)t.push("");a([t,...s])}}),(0,f.jsx)(o.rA,{icon:"save",title:t("保存"),onClick:async()=>{e.save&&await e.save(s)}})]}),children:(0,f.jsx)(h.X,{headers:e.headers,rows:s.map((n,i)=>{const l=[];for(let t=0;t<e.headers.length;t++)l.push((0,f.jsx)(r.Sm,{value:n[t],handleInputChange:e=>{n[t]=e,a([...s])},no_border:!0}));return l.push((0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"delete",title:t("删除"),onClick:()=>(e=>{s.splice(e,1),a([...s])})(i)}),n[0]&&(0,f.jsx)(o.rA,{icon:"content_copy",title:t("复制地址"),onClick:()=>{const e=(0,m.bi)(`${window.location.origin}${j.m.base_url}`,n[0]);(0,x.lW)(e),(0,_.SK)(e)}}),n[0]&&e.need_copy&&(0,f.jsx)(o.rA,{icon:"open_in_new",title:t("打开新页面"),onClick:()=>{const e=(0,m.bi)(`${window.location.origin}${j.m.base_url}`,n[0]);window.open(e)}})]})),l}),width:"10rem",onRowDrag:(e,t)=>{a((0,v.TI)(s,e,t))}})})})}var w=s(34843),S=s(78247),y=s(24659);function C(){const{t:e}=(0,u.B)(),[t,s]=(0,w.fp)(p.AG.prompt_card),a=(0,y.K)(),g=[e("路由"),e("auth"),e("备注")],[C,k]=(0,w.fp)(p.AG.editorSetting),[b,A]=(0,n.useState)([]);(0,n.useEffect)(()=>{(async()=>{const e=await c.XO.get("api/customer_router");e.code===d.m.Success&&A(e.data)})()},[]);return(0,f.jsx)(i.xh,{children:(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("自定义api路由")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{(()=>{let e=(0,f.jsx)("div",{children:'默认需要以 "/api" 开头的路由。'});s({open:!0,title:"信息",context_div:(0,f.jsx)("div",{children:e})})})()},title:"信息"})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{A([{note:"",needAuth:!1,router:""},...b])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("api/customer_router/save",b)).code===d.m.Success&&(0,_.SK)("保存成功")}})]}),children:(0,f.jsx)(h.X,{headers:g,rows:b.map((t,s)=>{const n=[(0,f.jsx)(r.Sm,{value:t.router,handleInputChange:e=>{t.router=e,A([...b])},no_border:!0}),(0,f.jsx)(r.l6,{defaultValue:t.needAuth,onChange:e=>{t.needAuth=e,A([...b])},options:a,no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e,A([...b])},no_border:!0}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{b.splice(e,1),A([...b])})(s)}),(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>(async e=>{if(!e.router)return void(0,_.zN)("路由不能为空");const t=await c.XO.get(`jscode/${encodeURIComponent(e.router)}`);k({model:"ace/mode/javascript",open:!0,fileName:e.router,save:async t=>{const s={context:t,router:e.router};(await c.XO.post("jscode/save",s)).code===d.m.Success&&(S.xK.set_value_temp(""),k({open:!1,model:"",fileName:"",save:null}),(0,_.SK)("成功"))}}),S.xK.set_value_temp(t.data)})(t)}),t.router&&(0,f.jsx)(o.rA,{icon:"content_copy",title:e("复制地址"),onClick:()=>{(0,x.lW)((0,m.bi)(window.location.origin+j.m.base_url,t.router)),(0,_.SK)(e("已复制"))}})]})];return n}),width:"10rem",onRowDrag:(e,t)=>{A((0,v.TI)(b,e,t))}})})})}var k=s(23496),b=s(4412);function A(){const{t:e}=(0,u.B)(),[t,s]=(0,w.fp)(p.AG.prompt_card),[a,l]=(0,w.fp)(p.AG.router_jump),o=[e("路由"),e("路径"),e("过期时间(s)"),e("备注")],r=[e("路由"),e("文件路径"),"token","user id",e("备注")];return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(b.aZ,{position:"right"}),(0,f.jsxs)(i.fI,{children:[(0,f.jsxs)(i.VP,{children:[(0,f.jsx)(g,{title:e("页面资源路由"),headers:o,getItems:async()=>{const e=await c.XO.get(k.s.setting_customer_router);if(e.code===d.m.Success){if(a?.page_self_router_api_data){for(const t of e.data)t[1]===a?.page_self_router_api_data[1]&&(0,_.N9)("已经存在的页面资源路由配置目录设置");const t={};Object.assign(t,a?.page_self_router_api_data),e.data=[t,...e.data],l({})}return e.data}return[]},save:async e=>{(await c.XO.post(k.s.setting_customer_router_save,e)).code===d.m.Success&&(0,_.SK)("success")},info_click:()=>{let e=(0,f.jsx)("div",{children:'默认需要以 "/api" 开头的路由,会自动识别地址,将页面转到对应结果。路径支持文件路径(如果是文件夹路径的最后最后一个名字将会成为资源实际地址,整个目录将会变成一个http目录),http地址。'});s({open:!0,title:"信息",context_div:(0,f.jsx)("div",{children:e})})},need_copy:!0}),(0,f.jsx)(g,{title:e("workflow触发路由"),headers:r,getItems:async()=>{const e=await c.XO.get(k.s.setting_customer_workflow_router);return e.code===d.m.Success?e.data:[]},save:async e=>{(await c.XO.post(k.s.setting_customer_workflow_router_save,e)).code===d.m.Success&&(0,_.SK)("保存成功")},info_click:()=>{let e=(0,f.jsx)("div",{children:'默认需要以 "/api" 开头的路由,文件路径是有效的workflow路径。token也可以是文件绝对路径,请求的时候请设置同样的authorization请求头字段。'});s({open:!0,title:"信息",context_div:(0,f.jsx)("div",{children:e})})}})]}),(0,f.jsx)(i.VP,{children:(0,f.jsx)(C,{})})]})]})}var I=s(74777),V=s(6960),N=s(7523);function K(){const{t:e}=(0,u.B)(),{check_user_auth:t}=(0,S.MH)(),[s,i]=(0,n.useState)(!1),[h,x]=(0,n.useState)("https://registry.npmjs.org"),[m,j]=(0,n.useState)(""),[v,g]=(0,n.useState)(180),[y,C]=(0,n.useState)(!1),[k,b]=(0,w.fp)(p.AG.prompt_card);(0,n.useEffect)(()=>{(async()=>{const e=await c.XO.get("auto_upgrade_setting");if(e.code===d.m.Success){const t=e.data;i(t.open||!1),x(t.version_check_url||"https://registry.npmjs.org"),j(t.exe_download_url||""),g(t.check_interval_seconds||180)}})()},[]);return t(a.oV.sys_setting_page)?(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("自动升级")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{b({open:!0,title:e("信息"),context_div:(0,f.jsx)("div",{children:e("自动升级在 windows 下目前可能不稳定")})})},title:e("信息")})]}),rightBottomCom:(0,f.jsx)(o.C3,{text:e("保存"),clickFun:async()=>{if(!h)return void(0,_.zN)(e("版本检测地址不能为空"));if(s&&(!v||v<10))return void(0,_.zN)(e("检测间隔不能小于10秒"));const t=new I.Mm;t.open=s,t.version_check_url=h,t.exe_download_url=m,t.check_interval_seconds=v;(await c.XO.post("auto_upgrade_setting/save",t)).code===d.m.Success&&(0,_.SK)(e("保存成功"))}}),children:[(0,f.jsx)("div",{children:e("系统版本检测地址")}),(0,f.jsx)(r.Sm,{placeholder:"https://registry.npmjs.org",value:h,handleInputChange:e=>{x(e)}}),(0,f.jsx)(r.l6,{value:s,onChange:e=>{i(e)},options:[{title:e("开启"),value:!0},{title:e("关闭"),value:!1}]}),s&&(0,f.jsxs)(f.Fragment,{children:[!1,(0,f.jsx)("div",{children:e("检测频率(秒)")}),(0,f.jsx)(r.Sm,{placeholder:e("默认180秒(3分钟)"),value:v,handleInputChange:e=>{g(Number(e)||180)}}),(0,f.jsx)("div",{style:{marginTop:"12px"},children:(0,f.jsx)(o.C3,{text:e(y?"升级检测中...":"立即升级"),clickFun:async()=>{C(!0);try{(await c.XO.post("auto_upgrade_setting/upgrade_now",{})).code===d.m.Success&&(0,_.SK)(e("已触发升级检测,请查看服务端日志"))}catch(t){(0,_.zN)(e("触发升级失败"))}finally{C(!1)}}})})]})]}):null}function X(){const[e,t]=(0,n.useState)(""),[s,a]=(0,n.useState)(""),[x,m]=(0,n.useState)(!1),[j,v]=(0,n.useState)(""),[g,y]=(0,n.useState)(!1),[C,A]=(0,n.useState)(""),[X,z]=(0,w.fp)(p.AG.prompt_card),[O,F]=(0,n.useState)(!1),[P,$]=(0,n.useState)(""),[B,T]=(0,n.useState)(""),[D,M]=(0,n.useState)(I.aM.close),[E,G]=(0,n.useState)(!1),[H,R]=(0,n.useState)(void 0),{t:Z,i18n:q}=(0,u.B)(),[U,W]=(0,w.fp)(p.AG.user_base_info),{check_user_auth:L}=(0,S.MH)(),{initUserInfo:Q}=(0,n.useContext)(N.F);(0,n.useEffect)(()=>{(async()=>{const e=await c.XO.get("sys_option/status");if(e.code===d.m.Success){y(e.data.recycle_open),A(e.data.recycle_dir);const s=e.data.sys_env;t(s?.web_site_title),a(s?.logo||""),m(s?.show_login_user_info),v(s?.http_proxy||"");const n=e.data.https_setting;n&&(F(n.open),$(n.cert_path||""),T(n.key_path||""))}const s=await c.XO.get("token");if(s.code===d.m.Success){const e=s.data;if(!e)return;e.length&&R(e.length),e.mode&&M(e.mode),void 0!==e.persist&&G(e.persist)}})()},[]);return(0,f.jsxs)("div",{children:[(0,f.jsx)(b.aZ,{children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("span",{className:"credits",children:[Z("系统运行于"),": ",(0,V.s)(U.runing_time_length)]}),(0,f.jsx)("span",{className:"credits",children:(0,f.jsxs)("a",{href:"https://github.com/xiaobaidadada/filecat",target:"_blank",children:["version:7.0.0",null!=U.latest_version&&"7.0.0"!==U.latest_version?` -> ${U.latest_version}`:""]})}),(0,f.jsx)("span",{className:"credits",children:(0,f.jsx)("a",{href:Z("官网地址"),target:"_blank",children:`filecat ${Z("功能文档")}`})}),(0,f.jsxs)("span",{className:"credits",children:[Z("安装方式")," :",U.process_env_run_env]})]})}),(0,f.jsx)(i.xh,{children:(0,f.jsxs)(i.fI,{children:[(0,f.jsxs)(i.VP,{widthPer:33,children:[(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:Z("通用设置")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{z({open:!0,title:Z("信息"),context_div:(0,f.jsx)("div",{children:Z("HTTP 代理说明")})})},title:Z("信息")})]}),rightBottomCom:(0,f.jsx)(o.C3,{text:Z("确定修改"),clickFun:async()=>{(await c.XO.post(k.s.setting_sys_option_status_save,{type:I.Mu.sys_env,value:{web_site_title:e,show_login_user_info:x,http_proxy:j,logo:s}})).code===d.m.Success&&((0,_.SK)("修改成功"),Q())}}),children:[Z("网站标题"),(0,f.jsx)(r.Sm,{value:e,handleInputChange:e=>{t(e)}}),Z("网站 Logo"),(0,f.jsx)(r.Sm,{placeholder:Z("本地文件路径或 http(s) 图片地址"),value:s,handleInputChange:e=>{a(e)}}),(0,f.jsx)("div",{children:Z("HTTP 代理地址")}),(0,f.jsx)(r.Sm,{placeholder:"http://127.0.0.1:7890",value:j,handleInputChange:e=>{v(e)}}),Z("登陆展示用户信息"),(0,f.jsx)("input",{type:"checkbox",checked:x,onChange:()=>{m(!x)}})]}),(0,f.jsxs)(l.Zp,{title:Z("HTTPS 设置"),rightBottomCom:(0,f.jsx)(o.C3,{text:Z("确定修改"),clickFun:async()=>{if(O){if(!P)return void(0,_.zN)("证书路径不能为空");if(!B)return void(0,_.zN)("私钥路径不能为空")}const e=new I.CH;e.open=O,e.cert_path=P,e.key_path=B;(await c.XO.post(k.s.setting_sys_option_status_save,{type:I.Mu.https,value:e,open:O})).code===d.m.Success&&(0,_.SK)("HTTPS 设置已保存,需重启服务器才能生效")}}),children:[(0,f.jsx)(r.l6,{value:O,onChange:e=>{F(e)},options:[{title:Z("开启"),value:!0},{title:Z("关闭"),value:!1}]}),O&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{children:Z("SSL 证书路径")}),(0,f.jsx)(r.Sm,{placeholder:Z("证书文件路径(cert.pem/fullchain.pem)"),value:P,handleInputChange:e=>{$(e)}}),(0,f.jsx)("div",{children:Z("SSL 私钥路径")}),(0,f.jsx)(r.Sm,{placeholder:Z("私钥文件路径(privkey.pem)"),value:B,handleInputChange:e=>{T(e)}})]})]}),(0,f.jsx)(K,{})]}),(0,f.jsxs)(i.VP,{widthPer:33,children:[(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:Z("文件回收站")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{z({open:!0,title:Z("信息"),context_div:(0,f.jsx)("div",{children:Z("格式:[被删除的文件所在父目录] 回收站目录 [; ...]")})})},title:Z("信息")})]}),rightBottomCom:(0,f.jsx)(o.C3,{text:Z("确定修改"),clickFun:async()=>{if(g&&!C)return void(0,_.zN)("目录不能为空");(await c.XO.post(k.s.setting_sys_option_status_save,{type:I.Mu.cyc,value:C,open:g})).code===d.m.Success&&(0,_.SK)("修改成功")}}),children:[(0,f.jsx)(r.Sm,{placeholder:Z("目录"),value:C,handleInputChange:e=>{A(e)}}),(0,f.jsx)(r.l6,{value:g,onChange:e=>{y(e)},options:[{title:Z("开启"),value:!0},{title:Z("关闭"),value:!1}]})]}),(0,f.jsxs)(l.Zp,{title:Z("token过期时间"),rightBottomCom:(0,f.jsx)(h.S,{isFlex:!0,columns:[(0,f.jsx)(o.C3,{text:Z("清空token"),clickFun:async()=>{(await c.XO.get("token/clear")).code===d.m.Success&&(0,_.SK)("清理完成,重新登录")}}),(0,f.jsx)(o.C3,{text:Z("保存"),clickFun:async()=>{const e=new I.Gd;e.mode=D,e.persist=E,I.aM.length!==e.mode||H||(0,_.zN)("秒数不能为空"),e.length=parseInt(H);(await c.XO.post("token/save",e)).code===d.m.Success&&(0,_.SK)("保存成功")}})]}),children:[(0,f.jsx)(h.S,{isFlex:!0,columns:[(0,f.jsx)(r.U6,{value:1,context:Z("关闭"),selected:D===I.aM.close,onchange:()=>{M(I.aM.close)}}),(0,f.jsx)(r.U6,{value:1,context:Z("指定时间"),selected:D===I.aM.length,onchange:()=>{M(I.aM.length)}}),(0,f.jsx)(r.U6,{value:1,context:Z("永不过期"),selected:D===I.aM.forver,onchange:()=>{M(I.aM.forver)}})]}),D===I.aM.length&&(0,f.jsx)(r.Sm,{placeholder:Z("秒"),value:H,handleInputChange:e=>{R(e)}}),(0,f.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginTop:8,whiteSpace:"nowrap"},children:[(0,f.jsx)("input",{type:"checkbox",checked:E,onChange:()=>G(!E)}),Z("持久化")]})]})]})]})})]})}var z=s(92350);function O(){const{t:e,i18n:t}=(0,u.B)(),{initUserInfo:s,reloadUserInfo:a}=(0,n.useContext)(N.F),[x,m]=(0,n.useState)([]),[j,g]=(0,n.useState)([]),[C,k]=(0,w.fp)(p.AG.prompt_card),[,b]=(0,w.fp)(p.AG.editorSetting),[A,I]=(0,n.useState)([]),[V,K]=(0,n.useState)([]),[X,O]=(0,n.useState)([]),[F,P]=(0,n.useState)([]),[$,B]=(0,n.useState)(""),[T,D]=(0,n.useState)([]),M=(0,y.K)(),E=[e("软件"),e("是否安装"),e("路径")],G=[e("编号"),e("路径"),e("备注")],H=[e("编号"),e("路径"),e("是否开启"),e("备注")],R=[e("编号"),e("文件路径"),e("是否开启"),e("系统启动执行"),e("corn表达式"),e("用户id"),e("备注")],Z=[e("编号"),e("路径"),e("单用户并发数量"),e("系统并发数量"),e("是否开启大文件断点"),e("大文件判断大小MB"),e("大文件并发数量"),e("大文件分块大小MB"),e("备注")],q=[e("编号"),e("名称"),e("路径"),e("是否开启"),e("params"),e("备注")],{check_user_auth:U}=(0,S.MH)(),W=async()=>{const e=await c.XO.get("env/path/get");e.code===d.m.Success&&O(e.data)},L=async()=>{const e=await c.XO.get("workflow_setting_get");e.code===d.m.Success&&P(e.data)};(0,n.useEffect)(()=>{(async()=>{const e=await c.XO.get("outside/software/get");e.code===d.m.Success&&g(e.data);const t=await c.XO.get("pty_cmd");t.code===d.m.Success&&B(t.data),W(),L();const s=await c.XO.get("protection_dir/sys");s.code===d.m.Success&&I(s.data??[]);const n=await c.XO.get("dir_upload_max_num");n.code===d.m.Success&&K(n.data??[]);const i=await c.XO.get("plugin/list");i.code===d.m.Success&&D(i.data??[])})()},[]);const Q=(0,z.Q)(),J=async()=>{(await c.XO.post("plugin/list/save",T)).code===d.m.Success&&(0,_.SK)(e("保存成功"))};return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(i.J,{widthPer:100,children:(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("文件上传最大并发限制")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("文件上传")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{K([...V,{path:"",note:"",user_upload_num:2,sys_upload_num:6,ws_file_standard_size:52428800,ws_file_parallel_num:2,ws_file_block_mb_size:524288}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{for(const e of V)if(e.open_ws_file){if("number"!=typeof e.ws_file_block_mb_size)return void(0,_.zN)(`编号:${e.index??""} 文件块的大小设置有问题`);if("number"!=typeof e.ws_file_parallel_num)return void(0,_.zN)(`编号:${e.index??""} 并发数量设置有问题`);if("number"!=typeof e.ws_file_standard_size)return void(0,_.zN)(`编号:${e.index??""} 大文件size设置有问题`)}(0,v.di)(V,e=>e.index??0);(await c.XO.post("dir_upload_max_num/save",V)).code===d.m.Success&&((0,_.SK)("保存成功"),a())}})]}),children:(0,f.jsx)(h.X,{headers:Z,rows:V.map((t,s)=>{const n=[(0,f.jsx)(r.Sm,{value:t.index,placeholder:s,handleInputChange:e=>{t.index=parseInt(e)},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.user_upload_num,handleInputChange:e=>{t.user_upload_num=parseInt(e)},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.sys_upload_num,handleInputChange:e=>{t.sys_upload_num=parseInt(e)},no_border:!0}),(0,f.jsx)(r.l6,{value:!0===t.open_ws_file,onChange:e=>{t.open_ws_file=e,K([...V])},options:M,no_border:!0}),(0,f.jsx)(r.Sm,{value:"number"==typeof t.ws_file_standard_size?t.ws_file_standard_size/1024/1024:void 0,handleInputChange:e=>{t.ws_file_standard_size=1024*parseInt(e)*1024},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.ws_file_parallel_num,handleInputChange:e=>{t.ws_file_parallel_num=parseInt(e)},no_border:!0}),(0,f.jsx)(r.Sm,{value:"number"==typeof t.ws_file_block_mb_size?t.ws_file_block_mb_size/1024/1024:void 0,handleInputChange:e=>{t.ws_file_block_mb_size=1024*parseInt(e)*1024},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{V.splice(e,1),K([...V])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{K((0,v.TI)(V,e,t))}})})}),(0,f.jsxs)(i.fI,{children:[(0,f.jsx)(i.VP,{widthPer:50,children:(0,f.jsxs)(i.xh,{children:[(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("PATH")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("环境路径")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"list",title:e("查看"),onClick:async()=>{const t=await c.XO.get("env/process/view");t.code===d.m.Success?k({open:!0,title:e("进程环境变量"),context_div:(0,f.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-all",maxHeight:"60vh",overflow:"auto",margin:0,fontSize:"0.85rem",lineHeight:"1.5"},children:t.data})}):(0,_.zN)(e("获取失败"))}}),(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:async()=>{const t=await c.XO.get("env/process/get");t.code===d.m.Success?(S.xK.set_value_temp(t.data??""),b({model:"ace/mode/ini",open:!0,fileName:"",save:async t=>{(await c.XO.post("env/process/save",{text:t})).code===d.m.Success?(0,_.SK)(e("保存成功")):(0,_.zN)(e("保存失败")),S.xK.set_value_temp("")}})):(0,_.zN)(e("获取失败"))}}),(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{O([...X,{path:"",note:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("env/path/save",{paths:X})).code===d.m.Success&&((0,_.SK)("保存成功"),W(),s())}})]}),children:(0,f.jsx)(h.X,{headers:H,rows:X.map((t,s)=>{const n=[(0,f.jsx)("div",{children:s}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.l6,{value:!!t.open,onChange:e=>{t.open=e,O([...X])},options:M,no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{X.splice(e,1),O([...X])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{O((0,v.TI)(X,e,t))}})}),(0,f.jsx)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("PTY CMD")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("pty")},title:e("信息")})]}),rightBottomCom:(0,f.jsx)(o.C3,{text:e("更新"),clickFun:async()=>{(await c.XO.post("pty_cmd/save",{str:$})).code===d.m.Success&&((0,_.SK)("保存成功"),a())}}),children:(0,f.jsx)(r.Sm,{placeholder:e("cmd need pty env"),value:$,handleInputChange:e=>{B(e)}})}),(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("Workflow Job")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("Workflow")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{P([...F,{open:!1}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("workflow_setting_save",F)).code===d.m.Success&&((0,_.SK)("ok"),L())}})]}),children:(0,f.jsx)(h.X,{headers:R,rows:F.map((t,s)=>{const n=[(0,f.jsx)("div",{children:s}),(0,f.jsx)(r.Sm,{value:t.file_path,handleInputChange:e=>{t.file_path=e},no_border:!0}),(0,f.jsx)(r.l6,{value:!!t.open,onChange:e=>{t.open=e,P([...F])},options:M,no_border:!0}),(0,f.jsx)(r.l6,{value:!!t.sys_power_on,onChange:e=>{t.sys_power_on=e,P([...F])},options:M,no_border:!0}),(0,f.jsx)(r.Sm,{value:t.cron_str,handleInputChange:e=>{t.cron_str=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.user_id,handleInputChange:e=>{t.user_id=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{F.splice(e,1),P([...F])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{P((0,v.TI)(F,e,t))}})}),(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("插件配置")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("插件配置")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{D([...T,{name:"",path:"",note:"",open:!1}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:J})]}),children:(0,f.jsx)(h.X,{headers:q,rows:T.map((t,s)=>{const n=[s,(0,f.jsx)(r.Sm,{value:t.name,handleInputChange:e=>{t.name=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.l6,{value:!!t.open,onChange:e=>{t.open=e,D([...T])},options:M,no_border:!0}),(0,f.jsx)(o.mu,{icon:"edit",save:async e=>{t.params=e,await J()},title:""}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{T.splice(e,1),D([...T])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{D((0,v.TI)(T,e,t))}})})]})}),(0,f.jsx)(i.VP,{children:(0,f.jsxs)(i.xh,{children:[(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("系统保护路径")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q("保护目录")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{I([...A,{path:"",note:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("protection_dir/sys/save",A)).code===d.m.Success&&((0,_.SK)("保存成功"),a())}})]}),children:(0,f.jsx)(h.X,{headers:G,rows:A.map((t,s)=>{const n=[(0,f.jsx)("div",{children:s}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{A.splice(e,1),I([...A])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{I((0,v.TI)(A,e,t))}})}),(0,f.jsx)(l.uF,{title:e("外部软件"),titleCom:(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("outside/software/save",j)).code===d.m.Success&&((0,_.SK)("保存成功"),s())}}),children:(0,f.jsx)(h.X,{headers:E,rows:j.map((t,s)=>[(0,f.jsx)("div",{children:t.id}),(0,f.jsx)(l.fq,{ok:t.installed}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0,placeholder:e("默认使用环境变量")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{Q(t.id)},title:e("信息")})]),width:"10rem"})})]})})]})]})}function F(e){const{t,i18n:s}=(0,u.B)(),[i,l]=(0,w.fp)(p.AG.user_base_info),o=[{title:t("用户权限"),list:[{title:t("用户管理"),permission:a.oV.user_manage},{title:t("角色管理"),permission:a.oV.role_manage}]},{title:t("系统管理权限"),list:[{title:t("系统信息"),permission:a.oV.all_sys},{title:t("系统进程关闭"),permission:a.oV.sys_process_close},{title:t("docker容器停止、删除"),permission:a.oV.docker_container_update},{title:t("docker镜像删除"),permission:a.oV.docker_images_delete},{title:t("systemd管理"),permission:a.oV.systemd},{title:t("防火墙管理"),permission:a.oV.firewall}]},{title:t("网络功能权限"),list:[{title:t("系统网络"),permission:a.oV.vir_net},{title:t("内网穿透"),permission:a.oV.tcp_proxy},{title:"ddns",permission:a.oV.ddns}]},{title:t("Ai 设置权限"),list:[{title:t("Ai 配置"),permission:a.oV.ai_agent_setting},{title:t("Ai Chat Page"),permission:a.oV.ai_agent_page},{title:t("允许切换 AI 模型"),permission:a.oV.ai_model_switch}]},{title:t("文件权限"),list:[{title:t("文件删除、剪切、重命名"),permission:a.oV.filecat_file_delete_cut_rename},{title:t("文件创建、上传、内容更新、解压缩"),permission:a.oV.filecat_file_context_update_upload_created_copy_decompression},{title:t("内容更新"),permission:a.oV.filecat_file_context_update},{title:t("文件回收站修改"),permission:a.oV.recycle_file_save},{title:t("文件分享"),permission:a.oV.share_file}]},{title:t("系统设置权限"),list:[{title:t("系统页面"),permission:a.oV.sys_setting_page},{title:t("htts"),permission:a.oV.https_file},{title:t("token时间修改"),permission:a.oV.token_update},{title:t("修改密码"),permission:a.oV.update_password},{title:t("磁盘挂载"),permission:a.oV.sys_disk_mount},{title:t("通用设置"),permission:a.oV.sys_env_setting_key},{title:t("MD 编辑器设置"),permission:a.oV.md_editor_setting},{title:t("目录挂载"),permission:a.oV.file_mount}]},{title:t("系统环境设置"),list:[{title:t("系统环境设置页面"),permission:a.oV.sys_env_page},{title:t("目录文件上传数量限制修改"),permission:a.oV.dir_upload_max_num},{title:t("PATH路径修改"),permission:a.oV.env_path_update},{title:"pty cmd "+t("更新"),permission:a.oV.pty_cmd_update},{title:"workflow job",permission:a.oV.workflow_job},{title:t("系统保护路径更新"),permission:a.oV.sys_protection_dir},{title:t("外部软件路径"),permission:a.oV.outside_software_path}]},{title:t("个人环境设置"),list:[{title:t("个性化设置"),permission:a.oV.private_sys_env}]},{title:t("自定义路由"),list:[{title:t("自定义路由页面"),permission:a.oV.auth_router_page},{title:t("workflow触发api 修改"),permission:a.oV.workflow_api},{title:t("自定义资源路由"),permission:a.oV.code_resource},{title:t("自定义api路由"),permission:a.oV.code_api}]},{title:t("标签编辑权限"),list:[{title:t("ssh代理"),permission:a.oV.ssh_proxy_tag_update},{title:t("http代理"),permission:a.oV.http_proxy_tag_update},{title:t("浏览器代理"),permission:a.oV.browser_proxy_tag_update},{title:t("rdp代理"),permission:a.oV.rdp_proxy_tag_update},{title:t("网络唤醒"),permission:a.oV.wol_proxy_tag_update},{title:t("rtsp播放器"),permission:a.oV.rtsp_proxy_tag_update}]},{title:t("代理功能"),list:[{title:t("ssh代理"),permission:a.oV.ssh_proxy},{title:t("http代理"),permission:a.oV.http_proxy},{title:t("http代理下载关闭"),permission:a.oV.http_proxy_download_cancel},{title:t("浏览器代理"),permission:a.oV.browser_proxy},{title:t("rdp代理"),permission:a.oV.rdp_proxy}]},{title:t("其他功能"),list:[{title:t("workflow 执行"),permission:a.oV.workflow_exe},{title:t("workflow 执行用户"),permission:a.oV.workflow_exe_user,noDisable:!0},{title:t("网络唤醒"),permission:a.oV.wol_proxy},{title:t("端口扫描"),permission:a.oV.port_scan},{title:t("rtsp播放器"),permission:a.oV.rtsp_proxy},{title:t("ssh密钥保存到磁盘"),permission:a.oV.crypto_ssh_file},{title:t("filecat-restart重启命令"),permission:a.oV.shell_cmd_filecat_restart},{title:t("filecat-upgrade升级命令"),permission:a.oV.shell_cmd_filecat_upgrade},{title:t("filecat-down关闭主进程命令"),permission:a.oV.shell_cmd_filecat_kill_self},{title:t("ai 命令(Ai 聊天)"),permission:a.oV.ai_chat_cmd}]}];return(0,f.jsx)(n.Fragment,{children:o.map((t,s)=>(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{children:t.title}),t.list.map((t,s)=>(0,f.jsxs)("div",{children:[(0,f.jsx)("input",{type:"checkbox",disabled:!t.noDisable&&e.is_disable(t.permission),checked:e.is_selected(t.permission,t.noDisable),onChange:()=>{e.select_auth(t.permission)}}),t.title]},s))]},s))})}const P=new Map;function $(){const{t:e,i18n:t}=(0,u.B)(),{initUserInfo:s,reloadUserInfo:x}=(0,n.useContext)(N.F),[j,g]=(0,w.fp)(p.AG.user_base_info),[S,y]=(0,n.useState)([]),[C,k]=(0,w.fp)(p.AG.prompt_card),[b,A]=(0,n.useState)(!1),[I,V]=(0,n.useState)(!1),[K,X]=(0,w.fp)(p.AG.confirm),[O,$]=(0,n.useState)(""),[B,T]=(0,n.useState)(""),[D,M]=(0,n.useState)(""),[E,G]=(0,n.useState)([]),[H,R]=(0,n.useState)([]),[Z,q]=(0,n.useState)([]),[U,W]=(0,n.useState)(""),[L,Q]=(0,n.useState)(""),[J,Y]=(0,n.useState)("en"),[ee,te]=(0,n.useState)(""),[se,ne]=(0,n.useState)([]),[ie,ae]=(0,n.useState)(""),[le,oe]=(0,n.useState)(!1),[re,ce]=(0,n.useState)(""),[de,he]=(0,n.useState)(""),[ue,pe]=(0,n.useState)({}),xe=(0,z.o)(),[_e,me]=(0,n.useState)([]),[je,ve]=(0,n.useState)(void 0),fe=[e("用户id"),e("用户名"),e("目录范围"),e("备注")],ge=async()=>{const e=await c.wm.get("all_users");if(e.code===d.m.Success){const t=e.data??[];if(je){const e=[];for(const s of t)`${s.id}${s.username}${s.cwd}${s.note}`.includes(je)&&e.push(s);y(e)}else y(t)}const t=await c.wm.get("all_roles");if(t.code===d.m.Success){me(t.data),P.clear();for(const e of t.data)P.set(e.role_id,e)}},we=e=>{$(e?.username??""),T(e?.password??""),M(e?.cwd??""),G(e?.access_dirs??[]),R(e?.not_access_dirs??[]),q(e?.only_read_dirs??[]),W(e?.access_cmd??""),Q(e?.not_access_cmd??""),Y(e?.language??""),te(e?.theme??""),ne(e?.auth_list??[]),ae(e?.note??""),oe(e?.is_root??!1),ce(e?.id??""),e?.bind_role_id?Se(e.bind_role_id,e.auth_list??[]):(he(""),pe({}))};(0,n.useEffect)(()=>{ge()},[]);const Se=(e,t=[])=>{if(!e)return he(""),void pe({});const s=P.get(e);if(s){if(s.cwd&&M(s.cwd),s.access_dirs&&s.access_dirs.length>0&&G(s.access_dirs),s.not_access_dirs&&s.not_access_dirs.length>0&&R(s.not_access_dirs),s.only_read_dirs&&s.only_read_dirs.length>0&&q(s.only_read_dirs),s.access_cmd&&W(s.access_cmd),s.not_access_cmd&&Q(s.not_access_cmd),s.language&&Y(s.language),s.theme&&te(s.theme),s.auth_list&&s.auth_list.length>0){const e=new Set(s.auth_list);for(const s of t)e.add(s);ne(Array.from(e))}he(e),pe(s)}},ye=()=>{if(!O)return void(0,_.zN)("username not empty");if((0,m.CB)(O))return void(0,_.zN)("username not empty char");if(!D)return void(0,_.zN)("cwd not empty");const e=new a.E0;return e.language=J,e.theme=ee,e.access_dirs=E,e.username=O,e.password=B,e.not_access_dirs=H,e.only_read_dirs=Z,e.cwd=D,e.note=ie,e.access_cmd=U,e.not_access_cmd=L,e.auth_list=se,e.bind_role_id=de,e};return(0,f.jsxs)(i.fI,{children:[(0,f.jsx)(i.VP,{widthPer:50,children:(0,f.jsx)(i.xh,{children:(0,f.jsx)(l.uF,{self_title:(0,f.jsx)("span",{className:" div-row ",children:(0,f.jsx)("h2",{children:e("用户")})}),titleCom:(0,f.jsxs)("div",{className:"div-row",style:{gap:"0.5rem"},children:[(0,f.jsx)(r.Sm,{placeholder:e("过滤"),value:je,handleInputChange:e=>{ve(e)},handlerEnter:()=>{ge()}}),(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{A(!0),V(!1),we(void 0)}})]}),children:(0,f.jsx)(h.X,{headers:fe,rows:S.map((t,s)=>{const n=[(0,f.jsx)("p",{children:t.id}),(0,f.jsx)(l.xP,{children:t.username}),(0,f.jsx)(l.xP,{children:t.cwd}),(0,f.jsx)(l.xP,{children:t.note}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{A(!1),V(!0),we(e)})(t)}),!t.is_root&&(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(async t=>{X({open:!0,title:e("确定删除吗"),handle:async()=>{const e=new a.E0;e.username=t,(await c.wm.post("delete_user",e)).code===d.m.Success&&((0,_.SK)("删除完成"),ge(),X({open:!1,handle:null}))}})})(t.username)})]})];return n}),width:"10rem"})})})}),(0,f.jsx)(i.VP,{widthPer:50,children:(b||I)&&(0,f.jsx)(i.xh,{children:(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e(""+(b?"添加":"编辑"))})," "]}),rightBottomCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"cancel",title:e("取消"),onClick:()=>{A(!1),V(!1),we(void 0)}}),b&&(0,f.jsx)(o.rA,{icon:"add_circle",title:e("添加"),onClick:async()=>{if(!B)return void(0,_.zN)("password not empty");if((0,m.CB)(B))return void(0,_.zN)("username not empty char");const e=ye(),t=await c.wm.post("create_user",e);ge(),t.code===d.m.Success&&((0,_.SK)("创建完成"),ge(),A(!1),V(!1),we(void 0))}}),I&&(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{const e=ye();if(!e)return;e.id=re;(await c.wm.post("save_user",e)).code===d.m.Success&&((0,_.SK)("保存完成"),ge())}})]}),children:[(0,f.jsx)("label",{children:e("用户名")}),(0,f.jsx)(r.Sm,{value:O,handleInputChange:e=>$(e)}),(0,f.jsx)("label",{children:e("密码")}),(0,f.jsx)(r.Sm,{type:"password",value:B,handleInputChange:e=>T(e)}),(0,f.jsxs)("label",{children:[!ue?.access_dirs?.length&&(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{G([...E,""])},title:"添加"}),e("目录范围")]}),(0,f.jsx)(r.Sm,{disabled:""!==ue.cwd&&void 0!==ue.cwd,value:D,handleInputChange:e=>M(e)}),(E??[]).map((t,s)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{disabled:0!==ue?.access_dirs?.length&&void 0!==ue?.access_dirs?.length,value:t,handleInputChange:e=>{E[s]=e,G([...E])}})}),0===ue?.access_dirs?.length||void 0===ue?.access_dirs?.length&&(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{E.splice(s,1),G([...E])},title:e("删除")})]},s)),(0,f.jsxs)("label",{children:[!ue?.not_access_dirs?.length&&(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{R([...H,""])},title:e("添加")}),e("禁止目录范围")]}),(H??[]).map((t,s)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{disabled:0!==ue?.not_access_dirs?.length&&void 0!==ue?.not_access_dirs?.length,value:t,handleInputChange:e=>{H[s]=e,R([...H])}})}),0===ue?.not_access_dirs?.length||void 0===ue?.not_access_dirs?.length&&(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{H.splice(s,1),R([...H])},title:e("删除")})]},s)),(0,f.jsxs)("label",{children:[!ue?.only_read_dirs?.length&&(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{q([...Z,""])},title:e("添加")}),e("只读目录范围")]}),(Z??[]).map((t,s)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{disabled:0!==ue?.only_read_dirs?.length&&void 0!==ue?.only_read_dirs?.length,value:t,handleInputChange:e=>{Z[s]=e,q([...Z])}})}),0===ue?.only_read_dirs?.length||void 0===ue?.only_read_dirs?.length&&(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{Z.splice(s,1),q([...Z])},title:e("删除")})]},s)),(0,f.jsx)("label",{children:e("可执行的命令")}),(0,f.jsx)(r.Sm,{disabled:""!==ue.access_cmd&&void 0!==ue.access_cmd,value:U,placeholder:"use blank split",handleInputChange:e=>W(e)}),(0,f.jsx)("label",{children:e("禁止执行的命令")}),(0,f.jsx)(r.Sm,{disabled:""!==ue.not_access_cmd&&void 0!==ue.not_access_cmd,value:L,placeholder:"use blank split",handleInputChange:e=>Q(e)}),!le&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("label",{children:e("角色")}),(0,f.jsx)(r.l6,{value:de,onChange:e=>{Se(e)},options:(()=>{const e=[];e.push({title:"NOT",value:""});for(let t of _e)e.push({title:t.role_name,value:t.role_id});return e})()})]}),(0,f.jsx)("label",{children:e("语言")}),(0,f.jsx)(r.l6,{disabled:""!==ue.language&&void 0!==ue.language,value:J,onChange:e=>{Y(e)},options:[{title:e("跟随系统"),value:"sys"},{title:"English",value:"en"},{title:"中文",value:"zh"}]}),(0,f.jsx)("label",{children:e("主题")}),(0,f.jsx)(r.l6,{disabled:""!==ue.theme&&void 0!==ue.theme,value:ee,onChange:e=>{te(e)},options:xe}),(0,f.jsx)(F,{is_disable:e=>{if(!0===le)return!0;if(de){const t=P.get(de);if(t)return(t.auth_list??[]).includes(e)}return!1},is_selected:(e,t)=>!t&&!0===le||void 0!==se?.find(t=>t===e),select_auth:e=>{se?se.includes(e)?((0,v.I)(se,t=>t===e),ne([...se])):ne([...se,e]):ne([e])}}),(0,f.jsx)("label",{children:e("备注")}),(0,f.jsx)(r.Sm,{value:ie,handleInputChange:e=>ae(e)})]})})})]})}function B(){const{t:e,i18n:t}=(0,u.B)(),{initUserInfo:s}=(0,n.useContext)(N.F),[x,m]=(0,n.useState)([]),[j,g]=(0,w.fp)(p.AG.prompt_card),[S,y]=(0,n.useState)(!1),[C,k]=(0,n.useState)(!1),[b,A]=(0,w.fp)(p.AG.confirm),[I,V]=(0,n.useState)(""),[K,X]=(0,n.useState)(""),[O,P]=(0,n.useState)([]),[$,B]=(0,n.useState)([]),[T,D]=(0,n.useState)([]),[M,E]=(0,n.useState)(""),[G,H]=(0,n.useState)(""),[R,Z]=(0,n.useState)(""),[q,U]=(0,n.useState)(""),[W,L]=(0,n.useState)([]),[Q,J]=(0,n.useState)(""),[Y,ee]=(0,n.useState)(""),te=(0,z.o)(),se=[e("角色id"),e("角色名"),e("备注")],ne=async()=>{const e=await c.wm.get("all_roles");e.code===d.m.Success&&m(e.data)},ie=e=>{V(e?.role_name??""),X(e?.cwd??""),P(e?.access_dirs??[]),B(e?.not_access_dirs??[]),D(e?.only_read_dirs??[]),E(e?.access_cmd??""),H(e?.not_access_cmd??""),Z(e?.language??""),U(e?.theme??""),L(e?.auth_list??[]),J(e?.role_id??""),ee(e?.role_note??"")};(0,n.useEffect)(()=>{ne()},[]);const ae=()=>{if(!I)return void(0,_.zN)("role_name not empty");const e=new a.E0;return e.language=R,e.theme=q,e.access_dirs=O,e.role_name=I,e.not_access_dirs=$,e.only_read_dirs=T,e.cwd=K,e.access_cmd=M,e.not_access_cmd=G,e.auth_list=W,e.role_note=Y,e};return(0,f.jsxs)(i.fI,{children:[(0,f.jsx)(i.VP,{widthPer:50,children:(0,f.jsx)(i.xh,{children:(0,f.jsx)(l.uF,{self_title:(0,f.jsx)("span",{className:" div-row ",children:(0,f.jsx)("h2",{children:e("角色")})}),titleCom:(0,f.jsx)("div",{children:(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{y(!0),k(!1),ie(void 0)}})}),children:(0,f.jsx)(h.X,{headers:se,rows:x.map((t,s)=>{const n=[(0,f.jsx)("p",{children:t.role_id}),(0,f.jsx)(l.xP,{children:t.role_name}),(0,f.jsx)(l.xP,{children:t.role_note}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{y(!1),k(!0),ie(e)})(t)}),!t.is_root&&(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(async t=>{A({open:!0,title:e("确定删除吗"),handle:async()=>{const e=new a.E0;e.role_id=t,(await c.wm.post("delete_role",e)).code===d.m.Success&&((0,_.SK)("删除完成"),ne(),A({open:!1,handle:null}))}})})(t.role_id)})]})];return n}),width:"10rem"})})})}),(0,f.jsx)(i.VP,{widthPer:50,children:(S||C)&&(0,f.jsx)(i.xh,{children:(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e(""+(S?"添加":"编辑"))})," "]}),rightBottomCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"cancel",title:e("取消"),onClick:()=>{y(!1),k(!1),ie(void 0)}}),S&&(0,f.jsx)(o.rA,{icon:"add_circle",title:e("添加"),onClick:async()=>{const e=ae();if(!e)return;const t=await c.wm.post("create_role",e);ne(),t.code===d.m.Success&&((0,_.SK)("创建完成"),ne(),y(!1),k(!1),ie(void 0))}}),C&&(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{const e=ae();if(!e)return;e.role_id=Q;(await c.wm.post("save_role",e)).code===d.m.Success&&((0,_.SK)("保存完成"),ne())}})]}),children:[(0,f.jsx)("label",{children:e("角色名")}),(0,f.jsx)(r.Sm,{value:I,handleInputChange:e=>V(e)}),(0,f.jsx)("label",{children:e("角色备注")}),(0,f.jsx)(r.Sm,{value:Y,handleInputChange:e=>ee(e)}),(0,f.jsxs)("label",{children:[(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{P([...O,""])},title:"添加"}),e("目录范围")]}),(0,f.jsx)(r.Sm,{value:K,handleInputChange:e=>X(e)}),(O??[]).map((e,t)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{value:e,handleInputChange:e=>{O[t]=e,P([...O])}})}),(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{O.splice(t,1),P([...O])},title:"删除"})]},t)),(0,f.jsxs)("label",{children:[(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{B([...$,""])},title:"添加"}),e("禁止目录范围")]}),($??[]).map((t,s)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{value:t,handleInputChange:e=>{$[s]=e,B([...$])}})}),(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{$.splice(s,1),B([...$])},title:e("删除")})]},s)),(0,f.jsxs)("label",{children:[(0,f.jsx)(o.rA,{icon:"add",onClick:()=>{D([...T,""])},title:e("添加")}),e("只读目录范围")]}),(T??[]).map((e,t)=>(0,f.jsxs)("div",{style:{display:"flex"},children:[(0,f.jsx)("div",{style:{width:"90%"},children:(0,f.jsx)(r.Sm,{value:e,handleInputChange:e=>{T[t]=e,D([...T])}})}),(0,f.jsx)(o.rA,{icon:"delete",onClick:()=>{T.splice(t,1),D([...T])},title:"删除"})]},t)),(0,f.jsx)("label",{children:e("可执行的命令")}),(0,f.jsx)(r.Sm,{value:M,placeholder:"use blank split",handleInputChange:e=>E(e)}),(0,f.jsx)("label",{children:e("禁止执行的命令")}),(0,f.jsx)(r.Sm,{value:G,placeholder:"use blank split",handleInputChange:e=>H(e)}),(0,f.jsx)("label",{children:e("语言")}),(0,f.jsx)(r.l6,{value:R,onChange:e=>{Z(e)},options:[{title:e("跟随系统"),value:"sys"},{title:"NOT",value:""},{title:"English",value:"en"},{title:"中文",value:"zh"}]}),(0,f.jsx)("label",{children:e("主题")}),(0,f.jsx)(r.l6,{value:q,onChange:e=>{U(e)},options:te}),(0,f.jsx)(F,{is_disable:()=>!1,is_selected:(e,t)=>void 0!==W?.find(t=>t===e),select_auth:e=>{W?(W.find(t=>t==e)?(0,v.I)(W,t=>t===e):W.push(e),L([...W])):L([e])}})]})})})]})}function T(){const{t:e,i18n:t}=(0,u.B)(),{initUserInfo:s,reloadUserInfo:x}=(0,n.useContext)(N.F),[m,j]=(0,n.useState)([]),[g,S]=(0,w.fp)(p.AG.prompt_card),[C,b]=(0,n.useState)([]),[A,V]=(0,n.useState)([]),[K,X]=(0,n.useState)([]),[O,F]=(0,w.fp)(p.AG.user_base_info),P=(0,y.K)(),$=(0,z.o)(),B=[e("编号"),e("路径"),e("是否默认"),e("备注")],T=[e("编号"),e("路径"),e("备注")],D=[e("编号"),e("命令"),e("父编号"),e("备注")],M=[e("文件后缀"),e("命令"),e("其他参数"),e("备注")],[E,G]=(0,n.useState)(""),[H,R]=(0,n.useState)(""),[Z,q]=(0,n.useState)(""),[U,W]=(0,n.useState)(!1),[L,Q]=(0,n.useState)(""),[J,Y]=(0,n.useState)(""),[ee,te]=(0,n.useState)("");(0,n.useEffect)(()=>{(async()=>{const e=await c.XO.get("filesSetting");e.code===d.m.Success&&(j(e.data.dirs),V(e.data.quick_cmd),X(e.data.file_quick_cmd));const t=await c.XO.get("protection_dir");t.code===d.m.Success&&b(t.data??[])})(),Q(O?.user_data?.language),Y(O?.user_data?.theme),te(O?.user_data?.upload_file_ignore)},[]);const se=(0,z.Q)();return(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(i.fI,{children:[(0,f.jsxs)(i.VP,{widthPer:33,children:[(0,f.jsx)(i.xh,{children:(0,f.jsxs)(l.Zp,{title:e("修改密码"),rightBottomCom:(0,f.jsx)(o.C3,{text:e("确定修改"),clickFun:async()=>{if(!E||!H)return void(0,_.zN)("账号密码不能为空");if(H!==Z)return void(0,_.zN)("两次密码不一样");const e=new a.tl;e.username=E,e.password=H,e.confirm_password=Z,e.user_id=O.user_data.id;(await c.wm.post("updatePassword",e)).code===d.m.Success&&(0,_.SK)("修改成功")}}),children:[(0,f.jsx)(r.Sm,{placeholder:e("新账号"),value:E,handleInputChange:e=>{G(e)}}),(0,f.jsx)(r.cA,{placeholder:e("新密码"),handleInputChange:e=>{R(e)}}),(0,f.jsx)(r.cA,{placeholder:e("确认密码"),handleInputChange:e=>{q(e)}})]})}),(0,f.jsx)(i.xh,{children:(0,f.jsxs)(l.Zp,{title:e("个性化设置"),rightBottomCom:(0,f.jsx)(o.C3,{text:e("确定修改"),clickFun:async()=>{(await c.XO.post(k.s.setting_sys_option_status_save,{type:I.Mu.private_sys_env,value:{language:L,theme:J,upload_file_ignore:ee}})).code===d.m.Success&&((0,_.SK)("修改成功"),s())}}),children:[e("语言"),(0,f.jsx)(r.l6,{value:L,onChange:e=>{Q(e)},options:[{title:e("跟随系统"),value:"sys"},{title:"English",value:"en"},{title:"中文",value:"zh"},{title:"Deutsch",value:"de"},{title:"ドイツ語",value:"ja"},{title:"독일어",value:"ko"},{title:"Немецкий язык",value:"ru"},{title:"Allemand",value:"fr"},{title:"Alemán",value:"es"}]}),e("主题"),(0,f.jsx)(r.l6,{value:J,onChange:e=>{Y(e)},options:$}),(0,f.jsx)(r.Sm,{value:ee,handleInputChange:e=>{te(e)},placeholderOut:e("拖拽文件上传忽略列表"),placeholder:"node_modules *.js",no_border:!0})]})})]}),(0,f.jsxs)(i.VP,{children:[(0,f.jsxs)(i.xh,{children:[(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("文件夹路径")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{se("文件夹路径")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{j([...m,{note:"",default:!1,path:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{for(let e=0;e<m.length;e++)m[e].index=e;(await c.XO.post("filesSetting/save",{dirs:m})).code===d.m.Success&&((0,_.SK)("保存成功"),x(),s())}})]}),children:(0,f.jsx)(h.X,{headers:B,rows:m.map((t,s)=>{const n=[(0,f.jsx)("div",{children:s}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.l6,{value:t.default,onChange:e=>{((e,t,s)=>{const n=[];for(let e=0;e<m.length;e++)m[e].default=e===s&&t,n.push(m[e]);j(n)})(0,e,s)},options:P,no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)("div",{children:0!==s&&(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{m.splice(e,1),j([...m])})(s)})})];return n}),width:"10rem",onRowDrag:(e,t)=>{0!==e&&0!==t&&j((0,v.TI)(m,e,t))}})}),(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("个人保护路径")})," ",(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{se("保护目录")},title:e("信息")})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{b([...C,{path:"",note:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("protection_dir/save",C)).code===d.m.Success&&((0,_.SK)("保存成功"),x())}})]}),children:(0,f.jsx)(h.X,{headers:T,rows:C.map((t,s)=>{const n=[(0,f.jsx)("div",{children:s}),(0,f.jsx)(r.Sm,{value:t.path,handleInputChange:e=>{t.path=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{C.splice(e,1),b([...C])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{b((0,v.TI)(C,e,t))}})})]}),(0,f.jsxs)(i.xh,{children:[(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("目录快捷命令")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{se("目录快捷命令")},title:"info"})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{V([...A,{cmd:"",note:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("filesSetting/save",{quick_cmd:A})).code===d.m.Success&&((0,_.SK)("保存成功"),s())}})]}),children:(0,f.jsx)(h.X,{headers:D,rows:A.map((t,s)=>{const n=[(0,f.jsx)(r.Sm,{value:t.index,handleInputChange:e=>{t.index=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.cmd,handleInputChange:e=>{t.cmd=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.father_index,handleInputChange:e=>{t.father_index=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{A.splice(e,1),V([...A])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{V((0,v.TI)(A,e,t))}})}),(0,f.jsx)(l.uF,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("文件快捷命令")}),(0,f.jsx)(o.rA,{icon:"info",onClick:()=>{se("文件快捷命令")},title:"info"})]}),titleCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:()=>{X([...K,{cmd:"",note:"",file_suffix:"",params:""}])}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await c.XO.post("filesSetting/save",{file_quick_cmd:K})).code===d.m.Success&&((0,_.SK)("保存成功"),s())}})]}),children:(0,f.jsx)(h.X,{headers:M,rows:K.map((t,s)=>{const n=[(0,f.jsx)(r.Sm,{value:t.file_suffix,handleInputChange:e=>{t.file_suffix=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.cmd,handleInputChange:e=>{t.cmd=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.params,handleInputChange:e=>{t.params=e},no_border:!0}),(0,f.jsx)(r.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{K.splice(e,1),X([...K])})(s)})];return n}),width:"10rem",onRowDrag:(e,t)=>{X((0,v.TI)(K,e,t))}})})]})]})]})})}const D=["password","private_key","secret_key"],M="webdav";function E(){const{t:e}=(0,u.B)(),[,t]=(0,w.fp)(p.AG.prompt_card),[s,i]=(0,n.useState)([]),[a,d]=(0,n.useState)([]),[x,m]=(0,n.useState)(""),[j,v]=(0,n.useState)(M),[g,S]=(0,n.useState)(""),[y,C]=(0,n.useState)({}),[k,b]=(0,n.useState)(!1),A=async()=>{try{const[e,t]=await Promise.all([c.I2.post("credential/list",{}),c.I2.post("credential/meta",{})]);i(Array.isArray(e?.data)?e.data:[]),d(Array.isArray(t?.data)?t.data:[])}catch(e){}};(0,n.useEffect)(()=>{A()},[]);const I=a.find(e=>e.type===j)?.fields??[],V=()=>{m(""),v(M),S(""),C({}),b(!1)};return(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:e("普通凭据管理")}),(0,f.jsx)(o.rA,{icon:"info",title:e("信息"),onClick:()=>{t({open:!0,title:e("信息"),context_div:(0,f.jsxs)("div",{children:[(0,f.jsxs)("ul",{children:[(0,f.jsx)("li",{children:e("凭据是连接网盘/远程主机的账号信息,可被多个挂载点复用,修改一次全部生效")}),(0,f.jsx)("li",{children:e("百度网盘账号不在这里维护,请到下方「百度网盘」面板授权,授权后自动生成对应账号")}),(0,f.jsx)("li",{children:e("编辑时密码类字段留空表示不修改原值")}),(0,f.jsx)("li",{children:e("保存前可以点「测试连接」验证账号是否可用")})]}),(0,f.jsxs)("ul",{children:[(0,f.jsxs)("li",{children:[(0,f.jsx)("b",{children:"WebDAV"}),":",e("通用文件协议,坚果云、群晖 NAS、Nextcloud、Alist 等都支持。需要一个服务地址和账号即可访问对方目录。")]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("b",{children:"SSH / SFTP"}),":",e("通过 SSH 协议访问远程服务器的目录,走 SFTP 子系统传文件。适合把另一台 Linux 机器的目录挂到本机。")]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("b",{children:"S3 兼容对象存储"}),":",e("用 S3 协议连接的对象存储服务,例如 MinIO、阿里云 OSS、腾讯云 COS、七牛、Cloudflare R2。需要服务地址、存储桶和一对密钥。")]})]})]})})}})]}),rightBottomCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"cancel",title:e("取消"),onClick:V}),(0,f.jsx)(o.rA,{icon:"network_check",title:e("测试连接"),onClick:async()=>{try{const t=await c.I2.post("credential/test",{id:x||void 0,type:j,config:y}),s=t?.data;s?.ok?(0,_.SK)(`${e("连接成功")}(${s.count??0})`):(0,_.zN)(`${e("连接失败")}:${s?.error??""}`)}catch(e){}}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{if(g.trim()){for(const t of I){const s=String(y[t.key]??"").trim()||x&&D.includes(t.key);if(t.required&&!s)return void(0,_.zN)(`${e("请填写")}${e(t.label)}`)}try{await c.I2.post(x?"credential/update":"credential/add",{id:x||void 0,type:j,name:g,config:y,enabled:!0}),(0,_.SK)(e("保存成功")),V(),await A()}catch(e){}}else(0,_.zN)(e("请填写名称"))}})]}),children:[(0,f.jsx)(r.Sm,{placeholder:e("名称"),value:g,handleInputChange:S}),(0,f.jsx)(r.l6,{value:j,options:a.map(e=>({title:e.name,value:e.type})),onChange:e=>{v(e),C({})}}),I.map(t=>(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(r.Sm,{type:D.includes(t.key)?"password":"text",placeholder:D.includes(t.key)&&k?e("留空表示不修改"):t.label,value:y[t.key]??"",handleInputChange:e=>C({...y,[t.key]:e})})},t.key)),(0,f.jsx)(h.X,{headers:[e("名称"),e("类型"),e("操作")],rows:s.map(t=>{return[(0,f.jsx)("p",{children:t.name}),(0,f.jsx)("p",{children:(s=t.type,a.find(e=>e.type===s)?.name??s)}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{m(e.id),v(e.type),S(e.name??""),C({...e.config??{}}),b(Boolean(e.has_password))})(t)}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(async t=>{try{await c.I2.post("credential/delete",{id:t.id}),(0,_.SK)(e("已删除")),await A()}catch(e){}})(t)})]})];var s})})]})}var G=s(17903);function H(){const{t:e}=(0,u.B)(),[t,s]=(0,n.useState)([]),[i,a]=(0,n.useState)([]),[d,p]=(0,n.useState)([]),[x,m]=(0,n.useState)([]),[j,v]=(0,n.useState)(""),[g,w]=(0,n.useState)("webdav"),[S,y]=(0,n.useState)(""),[C,k]=(0,n.useState)(""),[b,A]=(0,n.useState)(""),[I,V]=(0,n.useState)(""),N=async()=>{try{const[e,t,n,i]=await Promise.all([c.I2.post("list",{}),c.I2.post("credential/list",{}),c.I2.post("driver/list",{}),c.I2.post("baidu/app/get",{})]);s(Array.isArray(e?.data)?e.data:[]),a(Array.isArray(t?.data)?t.data:[]),p(Array.isArray(n?.data)?n.data:[]),m(Array.isArray(i?.data?.accounts)?i.data.accounts:[])}catch(e){}};(0,n.useEffect)(()=>{N()},[]);const K=()=>{v(""),w("webdav"),y(""),k(""),A(""),V("")};return(0,f.jsxs)(l.Zp,{self_title:(0,f.jsx)("span",{className:" div-row ",children:(0,f.jsx)("h2",{children:e("挂载列表")})}),rightBottomCom:(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"cancel",title:e("取消"),onClick:K}),(0,f.jsx)(o.rA,{icon:"network_check",title:e("测试连接"),onClick:async()=>{if(C)try{const t=await c.I2.post("test",{id:j||void 0,driver:g,credential_id:C,root_dir:b}),s=t?.data;s?.ok?(0,_.SK)(`${e("连接成功")}(${s.count??0})`):(0,_.zN)(`${e("连接失败")}:${s?.error??""}`)}catch(e){}else(0,_.zN)(e("请选择凭据"))}}),(0,f.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{if(C)if(S.trim())try{await c.I2.post(j?"update":"add",{id:j||void 0,driver:g,mount_path:S,credential_id:C,root_dir:b,name:I,color:G.OT,readonly:!1,enabled:!0}),(0,_.SK)(e("保存成功")),K(),await N()}catch(e){}else(0,_.zN)(e("挂载目录不能为空"));else(0,_.zN)(e("请选择凭据"))}})]}),children:[(0,f.jsx)(r.l6,{value:g,options:d.map(e=>({title:e.name,value:e.type})),onChange:e=>{w(e),k("")}}),(0,f.jsx)(r.l6,{value:C,options:(e=>{if("baidu"===e)return x.map(e=>({title:e.name||e.baidu_name||String(e.uk),value:String(e.uk)}));const t=G.UW[e];return i.filter(e=>!t||e.type===t).map(e=>({title:e.name,value:e.id}))})(g),onChange:k}),(0,f.jsx)(r.Sm,{placeholder:e("本地目录"),value:S,handleInputChange:y}),(0,f.jsx)(r.Sm,{placeholder:e("起始目录,留空表示根目录"),value:b,handleInputChange:A}),(0,f.jsx)(r.Sm,{placeholder:e("显示名称,留空则使用目录名"),value:I,handleInputChange:V}),(0,f.jsx)(h.X,{headers:[e("名称"),e("挂载类型"),e("凭据"),e("操作")],rows:t.map(t=>{const s=i.find(e=>e.id===t.credential_id),n="baidu"===t.driver?x.find(e=>String(e.uk)===String(t.credential_id)):void 0;return[(0,f.jsx)("p",{children:t.name}),(0,f.jsx)("p",{children:(a=t.driver,d.find(e=>e.type===a)?.name??a)}),(0,f.jsx)("p",{children:n?n.name||n.baidu_name||String(n.uk):s?s.name:e("凭据已丢失")}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{v(e.id),w(e.driver),y(e.mount_path??""),k(e.credential_id??""),A(e.root_dir??""),V(e.name??"")})(t)}),(0,f.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>(async t=>{try{await c.I2.post("delete",{id:t.id}),(0,_.SK)(e("已删除")),await N()}catch(e){}})(t)})]})];var a})})]})}function R({on_credential_change:e}){const{t}=(0,u.B)(),[,s]=(0,w.fp)(p.AG.prompt_card),[i,a]=(0,n.useState)(null),[d,x]=(0,n.useState)([]),[m,j]=(0,n.useState)("百度网盘"),[v,g]=(0,n.useState)(""),[S,y]=(0,n.useState)(""),[C,k]=(0,n.useState)(""),[b,A]=(0,n.useState)("oob"),[I,V]=(0,n.useState)(!0),[N,K]=(0,n.useState)(!0),X="oob"===b,[z,O]=(0,n.useState)(""),F=async()=>{try{const e=await c.I2.post("baidu/app/get",{}),t=e?.data?.app??null;a(t),x(e?.data?.accounts??[]),j(t?.name??"百度网盘"),g(t?.app_id??""),y(t?.app_key??""),A("one_click"===t?.auth_mode?"one_click":"oob"),V(!1!==t?.enabled),K(!1!==t?.auto_refresh)}catch(e){}};(0,n.useEffect)(()=>{F();const s=new URLSearchParams(window.location.search),n=s.get("baidu_auth");"success"===n?((0,_.SK)(`${t("授权成功")}:${s.get("name")??""}`),e()):"failed"===n&&(0,_.zN)(`${t("授权失败")}:${s.get("reason")??""}`),n&&window.history.replaceState({},"",window.location.pathname)},[]);const P=async()=>{if(i?.configured)try{const e=await c.I2.post("baidu/authorize_url",{mode:b});e?.data&&window.open(e.data,"_blank","noopener,noreferrer")}catch(e){}else(0,_.zN)(t("请先保存应用配置"))};return(0,f.jsxs)(l.Zp,{self_title:(0,f.jsxs)("span",{className:" div-row ",children:[(0,f.jsx)("h2",{children:t("百度网盘")}),(0,f.jsx)(o.rA,{icon:"info",title:t("信息"),onClick:()=>{s({open:!0,title:t("信息"),context_div:(0,f.jsxs)("ul",{children:[(0,f.jsx)("li",{children:t("一键授权:授权成功后会自动跳回本页,账号自动加入列表")}),(0,f.jsx)("li",{children:t("一键授权需要在百度控制台把回调地址登记为本服务的 /mount/baidu/callback")}),(0,f.jsx)("li",{children:t("手动授权:不依赖回调地址,授权后在百度页面复制授权码,粘贴到下方并点击完成授权")})]})})}})]}),rightBottomCom:(0,f.jsx)("div",{children:(0,f.jsx)(o.rA,{icon:"refresh",title:t("授权检测/刷新"),onClick:async()=>{try{await c.I2.post("baidu/verify/all",{}),(0,_.SK)(t("检测完成")),await F()}catch(e){}}})}),children:[(0,f.jsx)(r.Sm,{placeholder:t("名称"),value:m,handleInputChange:j}),(0,f.jsx)(r.Sm,{placeholder:"AppID",value:v,handleInputChange:g}),(0,f.jsx)(r.Sm,{placeholder:"AppKey",value:S,handleInputChange:y}),(0,f.jsx)(r.Sm,{type:"password",placeholder:i?.configured?t("SecretKey 留空表示不修改"):"SecretKey",value:C,handleInputChange:k}),(0,f.jsx)(r.BC,{label:t("授权方式"),label_width:"6rem",children:(0,f.jsx)(r.l6,{value:b,options:(0,G.K1)(t),onChange:e=>A("one_click"===e?"one_click":"oob")})}),(0,f.jsx)(r.BC,{label:t("网盘使用"),label_width:"6rem",children:(0,f.jsx)(r.l6,{value:I,options:(0,G.Dd)(t),onChange:V})}),(0,f.jsx)(r.BC,{label:t("自动刷新 token"),label_width:"6rem",children:(0,f.jsx)(r.l6,{value:N,options:(0,G.Dd)(t),onChange:K})}),(0,f.jsx)(o.rA,{icon:"save",title:t("保存应用配置"),onClick:async()=>{if(S.trim())if(i?.configured||C.trim())try{await c.I2.post("baidu/app/save",{name:m,app_id:v,app_key:S,secret_key:C,auth_mode:b,remark:i?.remark??"",enabled:I,auto_refresh:N}),(0,_.SK)(t("保存成功")),k(""),await F()}catch(e){}else(0,_.zN)(t("请填写 SecretKey"));else(0,_.zN)(t("请填写 AppKey"))}}),(0,f.jsx)("div",{children:X?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(o.rA,{icon:"link",title:t("去授权(手动)"),onClick:P}),(0,f.jsx)(r.Sm,{placeholder:t("粘贴授权码 code"),value:z,handleInputChange:O}),(0,f.jsx)(o.rA,{icon:"save",title:t("完成授权"),onClick:async()=>{if(z.trim())try{const s=await c.I2.post("baidu/exchange",{code:z.trim(),mode:b});(0,_.SK)(`${t("授权成功")}:${s?.data?.baidu_name??""}`),O(""),await F(),e()}catch(e){}else(0,_.zN)(t("请填写授权码"))}})]}):(0,f.jsx)(o.rA,{icon:"link",title:t("去授权(一键)"),onClick:P})}),(0,f.jsx)(h.X,{headers:[t("账号名"),t("百度账号"),t("授权状态"),t("使用"),t("授权时间"),t("操作")],rows:d.map(s=>{return[(0,f.jsx)(r.Sm,{value:s.name,no_border:!0,handleInputChange:t=>(async(t,s)=>{try{await c.I2.post("baidu/account/update",{uk:t.uk,name:s}),e()}catch(e){}})(s,t)}),(0,f.jsx)("p",{children:s.baidu_name||"-"}),(0,f.jsx)("p",{children:(n=s,n.authorized?n.expired?t("已过期"):t("已授权"):t("未授权"))}),(0,f.jsx)(r.l6,{value:s.enabled,no_border:!0,options:(0,G.Dd)(t),onChange:()=>(async t=>{try{await c.I2.post("baidu/account/update",{uk:t.uk,enabled:!t.enabled}),await F(),e()}catch(e){}})(s)}),(0,f.jsx)("p",{children:(0,G.eK)(s.created_at)}),(0,f.jsxs)("div",{children:[(0,f.jsx)(o.rA,{icon:"network_check",title:t("授权检测"),onClick:()=>(async e=>{try{const s=await c.I2.post("baidu/verify",{uk:e.uk});s?.data?.valid?(0,_.SK)(t("账号可用")):(0,_.zN)(`${t("账号不可用")}:${s?.data?.error??""}`),await F()}catch(e){}})(s)}),(0,f.jsx)(o.rA,{icon:"link_off",title:t("取消授权"),onClick:()=>(async e=>{try{await c.I2.post("baidu/deauthorize",{uk:e.uk}),(0,_.SK)(t("已取消授权")),await F()}catch(e){}})(s)}),(0,f.jsx)(o.rA,{icon:"delete",title:t("删除"),onClick:()=>(async s=>{try{await c.I2.post("baidu/delete",{uk:s.uk}),(0,_.SK)(t("已删除")),await F(),e()}catch(e){}})(s)})]})];var n})})]})}function Z(){const{t:e}=(0,u.B)(),{check_user_auth:t}=(0,S.MH)(),s=t(a.oV.file_mount),[r,d]=(0,w.fp)(p.AG.mount_enabled);(0,n.useEffect)(()=>{s&&(async()=>{try{const e=await c.I2.post("enabled/get",{});d(!0===e?.data)}catch(e){d(!1)}})()},[s]);return s?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(b.aZ,{position:"right",children:(0,f.jsx)(o.rA,{icon:!0===r?"cloud_done":"cloud_off",title:e(!0===r?"挂载已启用,点击停用":"挂载已停用,点击启用"),selected:!0===r,onClick:async()=>{const t=!r;try{const s=await c.I2.post("enabled/set",{enabled:t}),n=!0===s?.data;d(n),(0,_.SK)(e(n?"挂载已启用":"挂载已停用"))}catch(e){}}})}),(0,f.jsxs)(i.xh,{children:[(0,f.jsxs)(i.fI,{children:[(0,f.jsx)(i.VP,{widthPer:40,maxWidth:"40rem",children:(0,f.jsx)(R,{on_credential_change:()=>window.location.reload()})}),(0,f.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,f.jsx)(E,{})})]}),(0,f.jsx)(i.fI,{children:(0,f.jsx)(i.VP,{widthPer:40,maxWidth:"40rem",children:(0,f.jsx)(H,{})})})]})]}):(0,f.jsx)(i.fI,{children:(0,f.jsx)(i.VP,{children:(0,f.jsx)(l.Zp,{self_title:(0,f.jsx)("h2",{children:e("网盘挂载")}),children:(0,f.jsx)("p",{children:e("当前账号没有目录挂载权限")})})})})}var q=s(87361);function U(){const{t:e}=(0,u.B)(),{check_user_auth:t}=(0,S.MH)(),s=[{index:1,name:`${e("个人环境")}`,rto:"private_env_setting",component:(0,f.jsx)(T,{})}];return t(a.oV.sys_setting_page)&&s.unshift({index:1,name:e("系统"),rto:"password",component:(0,f.jsx)(X,{})}),t(a.oV.sys_env_page)&&s.push({index:1,name:`${e("系统环境")}`,rto:"env_setting/",component:(0,f.jsx)(O,{})}),t(a.oV.auth_router_page)&&s.push({index:1,name:e("自定义路由"),rto:"customer_router/",component:(0,f.jsx)(A,{})}),t(a.oV.user_manage)&&s.push({index:1,name:e("用户管理"),rto:"user_manager/",component:(0,f.jsx)($,{})}),t(a.oV.role_manage)&&s.push({index:1,name:e("角色管理"),rto:"role_manager/",component:(0,f.jsx)(B,{})}),t(a.oV.file_mount)&&s.push({index:1,name:e("网盘挂载"),rto:"mount_setting/",component:(0,f.jsx)(Z,{})}),(0,f.jsx)(i.W1,{optionList:s,father_route:q.o.setting})}},92350(e,t,s){s.d(t,{Q:()=>h,o:()=>p});var n=s(34843),i=s(82893),a=s(74777),l=s(96540),o=s(86149),r=s(23430),c=s(14284),d=s(74848);function h(){const[e,t]=(0,n.fp)(i.AG.prompt_card),{t:s,i18n:l}=(0,o.B)();return e=>{let n;e===a.jk.ffmpeg?n=(0,d.jsx)("div",{children:"视频转换,rtsp播放器等媒体功能都需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置"}):e===a.jk.smartmontools?n=(0,d.jsx)("div",{children:"磁盘检查需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置。"}):"保护目录"===e?n=(0,d.jsxs)("div",{children:["在删除的时候保护目录会拒绝删除。",(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"可以使用 /* 来表达该目录下所有文件都禁止删除"}),(0,d.jsx)("li",{children:"可以使用 /** 来表达该目录下所有子目录文件都禁止删除"})]})]}):"文件夹路径"===e?n=(0,d.jsx)("div",{children:"用于在文件夹下切换根目录"}):"环境路径"===e?n=(0,d.jsx)("div",{children:"当在不同用户环境下运行的时候由于没有执行终端去加载PATH,这里可以添加额外的PATH路径,点击这里的保存还会更新系统上的path路径"}):"pty"===e?n=(0,d.jsx)("div",{children:"一些需要Pty环境的命令"}):"文件上传"===e?n=(0,d.jsx)("div",{children:(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"对于不同的目录(包括所有子目录),可能是机械或者固态硬盘,机械硬盘在处理多个小文件的时候会做随机i/o,由于一般只有一个盘头所以会影响整体效率,特别是写操作,这里提供了上传时候的最大数量限制,对于下载数量目前不做限制."}),(0,d.jsx)("li",{children:"大文件支持断点和分块并发传输,建议并发数量设置为2,分块大小设置为10MB,大文件判断为500MB,设置过大的话会上传的时候会占据较大内存"})]})}):"目录快捷命令"===e?n=(0,d.jsx)("div",{children:"右键文件夹空白处用于,打开终端快捷执行命令"}):"文件快捷命令"===e?n=(0,d.jsx)("div",{children:"用于右键特定后缀的文件,执行一些快捷命令,文件后缀可以是多个,用空格分割"}):"Workflow"===e?n=(0,d.jsx)("div",{children:(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"在特定的时间启动系统中的workflow任务"}),(0,d.jsx)("li",{children:"cron表达式是定时器 格式为: 秒 分 时 日 月 星期"}),(0,d.jsxs)("li",{children:[(0,d.jsx)("li",{children:'1. "*"(通配符,所有值)'}),(0,d.jsx)("li",{children:'2. "," 是枚举: 0 0 1,15 * * *'}),(0,d.jsx)("li",{children:'3. "-" 是范围: 0 0 1-5 * * *'}),(0,d.jsx)("li",{children:'4. "/" 是步长,标识每隔n执行 */3 * * * * * 每隔三秒,必须配合 * 使用 ,/ 只能写一次 ,有了/就成了定时器,而不是指定时间执行'})]})]})}):"插件配置"===e?n=(0,d.jsx)("div",{children:s("路径可以是一个 js 文件也可以是一个node 项目目录")}):"机器人配置"===e&&(n=(0,d.jsxs)("div",{children:[(0,d.jsx)("dv",{children:"机器人功能用于开通各种第三方支持的机器人,让第三方机器人接入本地的 AI 模型。"}),(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:" 1. qq 机器人需要先在手机 app 中添加,然后在https://q.qq.com/qqbot/ 登录机器人配置页面,在开发管理中复制机器人的 appId,appSecret 到这里就完成了配置了。目前 qq 机器人不稳定,且创建后无法删除(2026.07.05)"}),(0,d.jsx)("li",{children:" 2. https://opensource.dingtalk.com/developerpedia/docs/explore/tutorials/stream/bot/nodejs/create-bot 这个是钉钉机器人开通教程,注意复制钉钉的 clientId 的是时候不要复制成appId 了。"}),(0,d.jsx)("li",{children:" 3. 企业微信机器人的开通甚至不需要 pc 操作,在通讯录中点击智能机器人,选择 api 模式,就创建完成了,手机上直接复制 id 和密钥。"}),(0,d.jsx)("li",{children:" 4. 飞书https://open.feishu.cn/document/develop-an-echo-bot/introduction?from=banner 登录这个开发者后台,按照这个地址教程创建机器人,使用的时候这个机器人是作为一个应用,可以在工作台内搜索你的这个机器人的名字。"})]})]})),t({open:!0,title:"信息",context_div:(0,d.jsx)("div",{children:n})})}}let u=r.Ky;function p(){const[e,t]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(async()=>{try{const e=await c.XO.get("themes");if(0===e.code){const s=e.data||[];u=[...r.Ky,...s],t(u)}else console.warn("获取主题列表失败,使用默认列表"),t(u)}catch(e){t(u)}})()},[]),e}},6960(e,t,s){s.d(t,{s:()=>l});var n=s(72635);const i=1440,a=525600;function l(e){e=e>1e12?e:1e3*e;const t=Date.now(),s=Math.abs(t-e)/6e4;return s<1?n.Ay.t("小于一分钟"):s<60?`${s.toFixed(0)} ${n.Ay.t("分钟前")}`:s<i?`${(s/60).toFixed(0)} ${n.Ay.t("小时前")}`:s<43200?`${(s/i).toFixed(0)} ${n.Ay.t("天前")}`:s<a?`${(s/43200).toFixed(0)} ${n.Ay.t("月前")}`:`${(s/a).toFixed(0)} ${n.Ay.t("年前")}`}},24659(e,t,s){var n=s(86149);s.d(t,["K",0,()=>{const{t:e}=(0,n.B)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5877],{77481(e,t,n){n.d(t,{S:()=>c,X:()=>l});var s=n(96540),a=n(61443),r=n(74848);function l(e){const[t,n]=s.useState([]),l=(0,s.useRef)(-1),[c,o]=(0,s.useState)(-1),[i,d]=(0,s.useState)(-1);(0,s.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const u=()=>{l.current=-1,o(-1),d(-1)};return(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:e.headers?.map((t,n)=>{const s=!!e.filter&&(e.filter.column??0)===n;let l=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(l=`${t} (${s.label})`)}return(0,r.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,r.jsx)(a.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:l}):t},n)})})}),(0,r.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,r.jsx)("tr",{className:s?(c===n?"row-dragging":"")+(i===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(l.current=n,o(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||l.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=l.current,n=i;u(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:u,children:t.map((n,s)=>{const a=s===t.length-1?"small":"";return(0,r.jsx)("td",{className:a,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function c(e){return(0,r.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,r.jsx)("div",{children:e},t))})}},83029(e,t,n){n.d(t,{N:()=>j});var s=n(96540),a=n(34843),r=n(82893),l=n(74848);function c(e){const[t,n]=(0,a.fp)(r.AG.user_base_info);return(0,l.jsx)("div",{children:e.div?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},onClick:()=>{"dir"!==e._type?e.clickItem&&e.clickItem(e):e.click_dir(e.item)},children:e.name}):(0,l.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var o=n(64694),i=n(61443),d=n(85997),u=n(86090),h=n(86149);const p=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let m,x,f=[];const _=[];function j(e){const[t,n]=(0,s.useState)([]),[j,v]=(0,s.useState)(-1),g=(0,u.zy)(),[S,y]=(0,s.useState)(!1),[C,w]=(0,s.useState)(!1),{t:k}=(0,h.B)(),[b,I]=(0,s.useState)([]),[N,D]=(0,a.fp)(r.AG.nav_index_add_item_by_now_list),A=e=>{-1!==j?_[j]._children=e:f=e};(0,s.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();f=t,n(f)})()},[g]);(0,s.useEffect)(()=>{if(N){const e=[...t,{name:"",color:(0,o.Lr)(p),...N}];A(e),n(e),y(!0),D(void 0)}},[N]);const K=e=>{v(j+1),n(e._children),_.push(e)};return(0,l.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==j&&(0,l.jsx)(d.rA,{title:"返回",icon:"arrow_back",onClick:()=>{n(0===j?f:_[j-1]._children),v(j-1),_.pop()}}),t.map((a,r)=>(0,l.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{m=t})(0,r),onDrop:e=>((e,s)=>{e.preventDefault();const a=t[m],r=t[s];if(r&&"dir"===r._type){const e=[...t];return e.splice(m,1),r._children||(r._children=[]),r._children.push(a),A(e),void n(e)}const l=[...t],c=l[m];l.splice(m,1),l.splice(s,0,c),A(l),n(l)})(e,r),style:{cursor:S?"move":"pointer"},children:[(0,l.jsx)(c,{name:a.name,item:a,...a,div:S,target:"_blank",click_dir:K,clickItem:e.clickItem}),S&&(void 0!==b.find(e=>e===r)||C)&&(0,l.jsxs)("div",{className:C?"":" site_edit ",children:["dir"===a._type?(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(i.Sm,{value:a.name,handleInputChange:e=>{a.name=e},placeholder:k("输入类目名"),no_border:!0}),(0,l.jsx)(i.Sm,{value:a.color,handleInputChange:e=>{a.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,l.jsx)("div",{children:(0,l.jsx)(i.Sm,{value:a[e.key],handleInputChange:t=>{a[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!C&&(0,l.jsx)(d.C3,{text:k("折叠"),clickFun:()=>{I((0,o.P1)(b,r))}})]}),S&&(0,l.jsx)("div",{style:{display:"block"},children:(0,l.jsxs)("span",{className:"div-row ",children:[(0,l.jsx)(d.C3,{text:k("删除"),clickFun:()=>{(e=>{const s=[...t];s.splice(e,1),A(s),n(s)})(r)}}),(0,l.jsx)(d.C3,{text:k("编辑"),clickFun:()=>{void 0===b.find(e=>e===r)&&I([...b,r])}})]})})]},r)),S&&(0,l.jsxs)("div",{style:{display:"block"},children:[(0,l.jsx)(d.rA,{title:k("取消"),icon:"cancel",onClick:()=>{I([]),y(!1),x&&(n(x),A(x)),w(!1)}}),(0,l.jsx)(d.rA,{title:k("添加"),icon:"add",onClick:async()=>{const s=[...t,{name:"",color:(0,o.Lr)(p),...e.get_pre_add_item&&await e.get_pre_add_item()}];A(s),n(s)}}),(0,l.jsx)(d.rA,{title:k("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];A(e),n(e)}}),(0,l.jsx)(d.rA,{title:k("全部编辑"),icon:C?"unfold_less":"unfold_more",onClick:()=>{w(!C)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,l.jsx)(d.rA,{icon:S?"save":"edit",title:k(S?"保存":"编辑"),onClick:async()=>{S?e.save&&await e.save(f):x=t,y(!S)}})]})}},65877(e,t,n){n.r(t),n.d(t,{default:()=>A});var s=n(96540),a=n(75725),r=n(61443),l=n(70447),c=n(85997),o=n(34289),i=n(86149),d=n(62042),u=n(14284),h=n(53459),p=n(74848);function m(e){const{t}=(0,i.B)(),[n,m]=(0,s.useState)(t("毫秒")),[x,f]=(0,s.useState)(""),[_,j]=(0,s.useState)(""),[v,g]=(0,s.useState)(null),[S,y]=(0,s.useState)(null),[C,w]=(0,s.useState)(Date.now());return(0,s.useEffect)(()=>{(async()=>{const e=await u.Yu.get("sys_time/get");if(e.code===h.m.Success){const t=await e.data;g(t.timestamp),y(t.timezone),w(t.timestamp)}})();const e=setInterval(()=>{w(e=>e+1e3)},1e3);return()=>clearInterval(e)},[]),(0,p.jsxs)(a.fI,{children:[(0,p.jsx)(a.VP,{widthPer:33,children:(0,p.jsxs)(l.Zp,{title:t("时间转换器"),rightBottomCom:(0,p.jsx)(c.C3,{text:t("确定"),clickFun:function(){if(!x&&!_)return void(0,d.zN)("不能都为空");let e=0;const t=""!==x&&0!==x;if(t){if(!(0,o.kf)(x))return void(0,d.zN)("must be number !");e=parseInt(x),"分秒"===n&&(e*=1e3)}const s=new Date(t?e:_),a=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(s);if(j(a),!x){const e=s.getTime();f("毫秒"===n?e:e/1e3)}}}),children:[(0,p.jsx)(r.l6,{value:n,options:[{title:t("毫秒"),value:"毫秒"},{title:t("分秒"),value:"分秒"}],onChange:function(e){m(e)}}),(0,p.jsx)(r.Sm,{placeholder:n,value:x,handleInputChange:e=>{f(e)}}),(0,p.jsx)(r.Sm,{placeholder:t("格式化时间"),value:_,handleInputChange:e=>{j(e)}})]})}),(0,p.jsx)(a.VP,{children:null!==v&&null!==S&&(0,p.jsxs)(l.Zp,{title:t("服务器时间"),children:[(0,p.jsxs)("h1",{children:[t("时区"),": ",S]}),(0,p.jsxs)("h1",{children:[t("时间"),": ",new Date(C).toLocaleString(navigator.language,{timeZone:S})]})]})})]})}var x=n(4412),f=n(83029),_=n(78247),j=n(23430);function v(e){const{t}=(0,i.B)(),{check_user_auth:n}=(0,_.MH)(),[a,l]=(0,s.useState)(""),o=async e=>{const t=e||a;if(!t)return void(0,d.zN)("mac地址不能为空");(await u._U.post("wol/exec",{mac:t})).code===h.m.Success&&(0,d.SK)("发送唤醒命令成功")};return(0,p.jsxs)("div",{children:[(0,p.jsxs)(x.aZ,{position:"right",children:[(0,p.jsx)(c.rA,{icon:"play_arrow",title:t("发送"),onClick:()=>{o()}}),(0,p.jsx)(r.$Z,{placeholder:t("目标设备mac地址"),icon:"laptop_mac",value:a,handleInputChange:e=>l(e)})]}),(0,p.jsx)(f.N,{have_auth_edit:n(j.oV.wol_proxy_tag_update),getItems:async()=>{const e=await u._U.get("wol/tag");return e.code===h.m.Success?e.data:[]},save:async e=>{(await u._U.post("wol/tag/save",e)).code!==h.m.Success&&(0,d.zN)("网络错误")},clickItem:async e=>{l(e.mac),o(e.mac)},items:[{key:"name",preName:t("名字")},{key:"mac",preName:"mac"+t("地址")},{key:"color",preName:"color"}]})]})}var g=n(77481),S=n(34843),y=n(82893),C=n(40505);let w;function k(){const[e,t]=(0,s.useState)("rsa"),[n,o]=(0,s.useState)("pem"),{t:m,i18n:f}=(0,i.B)(),[_,j]=(0,S.fp)(y.AG.confirm),[v,k]=(0,s.useState)(""),[b,I]=(0,s.useState)(""),N=async t=>{if(!b||!v)return void(0,d.zN)("密钥不能为空");let n="id_"+e;"pub"===t&&(n+=".pub"),j({open:!0,title:m("将覆盖密钥文件"),sub_title:`之前的密钥将作废。 将会作为 ${n} 文件保存到系统上的"${w}"目录下,此目录会作为openssh(git)所使用的默认目录。`,handle:async()=>{(await u.cD.post("save_openssh",{name:n,context:"pub"===t?v:b})).code===h.m.Success&&((0,d.SK)("完成"),j({open:!1,handle:null}))}})};return(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(x.aZ,{position:"right",children:(0,p.jsx)(g.S,{isFlex:!0,columns:[(0,p.jsx)(r.l6,{tip:m("加密算法"),value:e,width:"auto",onChange:e=>{t(e)},options:[{title:m("RSA"),value:"rsa"},{title:m("DSA"),value:"dsa"},{title:m("ECDSA"),value:"ecdsa"}]}),(0,p.jsx)(r.l6,{tip:m("输出格式"),value:n,width:"auto",onChange:e=>{o(e)},options:[{title:m("普通PEM"),value:"pem"},{title:m("opensshPEM"),value:"openssh_pem"}]}),(0,p.jsx)(c.rA,{icon:"play_arrow",title:m("生成"),onClick:()=>{(async()=>{const t=await u.cD.post("generate",{type:e,form:n});t.code===h.m.Success&&(k(t.data.public_key),I(t.data.private_key),w=t.data.home_path)})()}})]})}),(0,p.jsx)(a.xh,{children:(0,p.jsxs)(a.fI,{children:[(0,p.jsx)(a.VP,{children:(0,p.jsx)(l.Zp,{title:m("公钥"),titleCom:(0,p.jsx)(c.rA,{title:m("复制"),icon:"copy_all",onClick:()=>{v&&((0,C.lW)(v),(0,d.SK)("完成"))}}),rightBottomCom:"openssh_pem"===n&&(0,p.jsx)(c.C3,{text:m("保存到.ssh目录"),clickFun:()=>{N("pub")}}),children:(0,p.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:e=>{k(e.target.value)},value:v})})}),(0,p.jsx)(a.VP,{children:(0,p.jsx)(l.Zp,{title:m("私钥"),titleCom:(0,p.jsx)(c.rA,{title:m("复制"),icon:"copy_all",onClick:()=>{b&&((0,C.lW)(b),(0,d.SK)("成功"))}}),rightBottomCom:"openssh_pem"===n&&(0,p.jsx)(c.C3,{text:m("保存到.ssh目录"),clickFun:()=>{N("pri")}}),children:(0,p.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:b,onChange:e=>{I(e.target.value)}})})})]})})]})}var b=n(14944),I=n(92275);function N(){const{t:e}=(0,i.B)(),[t,n]=(0,s.useState)(""),[o,u]=(0,s.useState)("1"),[h,m]=(0,s.useState)("65535"),[x,f]=(0,s.useState)("100"),[_,j]=(0,s.useState)("2000"),[v,S]=(0,s.useState)(!1),[y,C]=(0,s.useState)(null),[w,k]=(0,s.useState)([]),[N,D]=(0,s.useState)(null),A=(0,s.useRef)([]),K=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!K.current)return K.current=!0,b.ws.addMsg(I.HK.port_scan_progress,e=>{C(e.context)}),b.ws.addMsg(I.HK.port_scan_result,e=>{const t=e.context,n=[...A.current,t];A.current=n,k(n)}),b.ws.addMsg(I.HK.port_scan_end,t=>{D(t.context),S(!1),t.context.cancelled?(0,d.zN)(e("扫描已取消")):(0,d.SK)(e("扫描完成"))}),()=>{b.ws.sendData(I.HK.port_scan_cancel,{}),b.ws.removeMsg(I.HK.port_scan_progress),b.ws.removeMsg(I.HK.port_scan_result),b.ws.removeMsg(I.HK.port_scan_end),K.current=!1}},[]);return(0,p.jsx)(a.xh,{children:(0,p.jsx)(a.fI,{children:(0,p.jsx)(a.VP,{children:(0,p.jsxs)(l.Zp,{title:e("TCP ")+e("端口扫描"),titleCom:(0,p.jsxs)("span",{children:[y&&(0,p.jsxs)("span",{children:[e("已发现"),": ",y.openCount]}),N&&(0,p.jsxs)("span",{children:[e("总计扫描"),": ",N.totalScanned," | ",e("开放"),": ",N.totalOpen]})]}),rightBottomCom:v?(0,p.jsx)(c.C3,{text:e("取消"),clickFun:()=>{b.ws.sendData(I.HK.port_scan_cancel,{}).catch(()=>{})}}):(0,p.jsx)(c.C3,{text:e("扫描"),clickFun:()=>(()=>{if(!t)return void(0,d.zN)(e("主机地址不能为空"));const n=parseInt(o),s=parseInt(h);isNaN(n)||isNaN(s)||n<1||s<1||n>65535||s>65535?(0,d.zN)(e("端口范围无效")):n>s?(0,d.zN)(e("起始端口不能大于结束端口")):(S(!0),C(null),k([]),A.current=[],D(null),b.ws.sendData(I.HK.port_scan_req,{host:t,startPort:n,endPort:s,concurrency:parseInt(x)||100,timeout:parseInt(_)||2e3}).catch(()=>{}))})()}),children:[(0,p.jsx)(r.Sm,{placeholder:e("目标主机"),value:t,handleInputChange:e=>n(e)}),(0,p.jsx)(r.Sm,{placeholder:e("起始端口"),value:o,handleInputChange:e=>u(e)}),(0,p.jsx)(r.Sm,{placeholder:e("结束端口"),value:h,handleInputChange:e=>m(e)}),(0,p.jsx)(r.Sm,{placeholder:e("并发数"),value:x,handleInputChange:e=>f(e)}),(0,p.jsx)(r.Sm,{placeholder:e("超时(ms)"),value:_,handleInputChange:e=>j(e)}),v&&y&&(0,p.jsxs)("div",{children:[(0,p.jsxs)("p",{children:[e("已扫描"),": ",y.scanned," / ",y.total]}),(0,p.jsx)(l.gz,{progress:y.percent})]}),w.length>0&&(0,p.jsx)(g.X,{headers:[e("端口"),e("状态")],rows:w.map(t=>[t.port,(0,p.jsx)("span",{children:e("开放")})])}),v&&0===w.length&&(0,p.jsx)("p",{children:e("正在扫描...")}),!v&&N&&0===w.length&&(0,p.jsx)("p",{children:e("未发现开放端口")}),!v&&!N&&0===w.length&&(0,p.jsx)("p",{children:e("请输入参数后点击扫描")})]})})})})}var D=n(87361);function A(e){const{t}=(0,i.B)(),{check_user_auth:n}=(0,_.MH)(),s=[];return s.push({index:1,name:t("时间工具"),rto:"timeutil/",component:(0,p.jsx)(m,{})},{index:1,name:t("非对称密钥"),rto:"crypto/",component:(0,p.jsx)(k,{})}),n(j.oV.port_scan)&&s.push({index:1,name:t("端口扫描"),rto:"portscan/",component:(0,p.jsx)(N,{})}),n(j.oV.wol_proxy)&&s.push({index:1,name:t("网络唤醒"),rto:"netwol/",component:(0,p.jsx)(v,{})}),(0,p.jsx)(a.W1,{optionList:s,father_route:D.o.toolbox})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6505],{26505(t,s,e){e.r(s),e.d(s,{default:()=>m});var a=e(96540),i=(e(82893),e(14284)),l=e(62042),c=e(86149),o=e(85997),n=e(57952),r=e(86090),d=e(34289),h=e(87361),u=e(2543),p=e(74848);const x={modified:"#f9ab00",added:"var(--secondary, #34a853)",deleted:"var(--accent, #ea4335)",untracked:"var(--textSecondary, #5f6368)",renamed:"var(--primary, #1a73e8)",conflict:"var(--accent, #ea4335)"},g={modified:"M",added:"A",deleted:"D",untracked:"?",renamed:"R",conflict:"!"};function m(){const{t}=(0,c.B)(),s=(0,r.Zp)();let e=decodeURIComponent((0,d.GG)(h.o.git_page,(0,d.vX)()));e=e.replace(/\/+$/,"");const[m,y]=(0,a.useState)([]),[j,v]=(0,a.useState)([]),[N,b]=(0,a.useState)({current:"",branches:[]}),[f,S]=(0,a.useState)(""),[w,C]=(0,a.useState)(new Set),[z,k]=(0,a.useState)("status"),[U,T]=(0,a.useState)(!1),[_,P]=(0,a.useState)(16),[K,W]=(0,a.useState)(!1),F=(0,a.useRef)(null),A=(0,a.useRef)(null),[R,L]=(0,a.useState)({name:"",email:""}),[D,E]=(0,a.useState)(""),[I,B]=(0,a.useState)(""),[G,X]=(0,a.useState)(!1),[H,M]=(0,a.useState)(null),[Z,$]=(0,a.useState)(!1),[q,J]=(0,a.useState)(""),[O,Q]=(0,a.useState)(""),[V,Y]=(0,a.useState)(""),[tt,st]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(et(),at(),it(),lt(),ct())},[e]);const et=async()=>{try{T(!0);const t=await i.TU.post("status",{path:e});0===t.code&&y(t.data||[])}catch(t){}finally{T(!1)}},at=async()=>{try{const t=await i.TU.post("log",{path:e,maxCount:50});0===t.code&&v(t.data||[])}catch(t){}},it=async()=>{try{const t=await i.TU.post("branches",{path:e});0===t.code&&b(t.data||{current:"",branches:[]})}catch(t){}},lt=async()=>{try{const t=await i.TU.post("get_user_config",{path:e});0===t.code&&(L(t.data),E(t.data.name||""),B(t.data.email||""))}catch(t){}},ct=async()=>{try{const t=await i.TU.post("get_proxy",{path:e});0===t.code&&(M(t.data),J(t.data.global?.http||""),Q(t.data.global?.https||""),Y(t.data.local?.http||""),st(t.data.local?.https||""))}catch(t){}},ot=()=>{w.size===m.length?C(new Set):C(new Set(m.map(t=>t.path)))},nt=async(s=!1)=>{try{T(!0);const a=await i.TU.post("push",{path:e,force:s});0===a.code?(0,l.SK)(t("推送成功")):(0,l.zN)(a.message)}catch(t){(0,l.zN)(t?.message)}finally{T(!1)}},rt=(0,a.useCallback)(u.throttle(t=>{const s=parseFloat(getComputedStyle(A.current).fontSize),e=window.innerWidth/s-4,a=t.clientX/s,i=2.25+F.current.offsetWidth/s;a<=e&&a>=i&&P(parseFloat(a.toFixed(2)))},32),[]),dt=()=>{W(!1),A.current.removeEventListener("pointermove",rt)},ht=e.split("/").filter(Boolean).pop()||e;return(0,p.jsxs)("div",{className:"studio",children:[(0,p.jsx)(n.A,{ignore_tags:!0,left_children:[(0,p.jsx)(o.rA,{title:t("取消"),icon:"close",onClick:()=>s(-1)},1),(0,p.jsx)("span",{children:decodeURIComponent(ht)})],children:(0,p.jsx)(o.rA,{icon:"refresh",title:t("刷新"),onClick:()=>{et(),at(),it(),lt(),ct()}})}),(0,p.jsxs)("div",{className:"studio-body",ref:A,children:[(0,p.jsxs)("div",{className:"studio-nav",style:{width:_-1+"em"},children:[(0,p.jsxs)("div",{className:"git-studio-tab-bar",children:[(0,p.jsxs)("button",{className:"git-studio-tab "+("status"===z?"git-studio-tab--active":""),onClick:()=>k("status"),children:["📝 ",t("变更")," (",m.length,")"]}),(0,p.jsxs)("button",{className:"git-studio-tab "+("log"===z?"git-studio-tab--active":""),onClick:()=>k("log"),children:["📜 ",t("提交记录")," (",j.length,")"]})]}),"status"===z&&(0,p.jsxs)("div",{style:{flex:1,overflow:"auto"},children:[m.length>0&&(0,p.jsxs)("div",{className:"git-studio-select-all",onClick:ot,children:[(0,p.jsx)("input",{type:"checkbox",checked:w.size===m.length&&m.length>0,onChange:ot}),(0,p.jsxs)("span",{children:[t("全选")," (",w.size,"/",m.length,")"]})]}),m.map(t=>(0,p.jsxs)("div",{className:"git-studio-file-item "+(w.has(t.path)?"git-studio-file-item--selected":""),onClick:()=>(t=>{const s=new Set(w);s.has(t)?s.delete(t):s.add(t),C(s)})(t.path),children:[(0,p.jsx)("input",{type:"checkbox",checked:w.has(t.path),onChange:()=>{}}),(0,p.jsx)("span",{className:"git-studio-status-badge",style:{background:x[t.status]||x.untracked},children:g[t.status]||t.status}),(0,p.jsxs)("span",{className:"git-studio-filename",children:[t.path,t.oldPath&&(0,p.jsxs)("span",{style:{color:"var(--textSecondary)",fontSize:11},children:[" (← ",t.oldPath,")"]})]})]},t.path)),0===m.length&&(0,p.jsx)("p",{style:{color:"var(--textSecondary)",textAlign:"center",padding:20,fontSize:12},children:t("没有变更")})]}),"log"===z&&(0,p.jsxs)("div",{style:{flex:1,overflow:"auto"},children:[j.map((t,s)=>(0,p.jsxs)("div",{className:"git-studio-log-entry",children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,p.jsx)("span",{className:"git-studio-log-hash",children:t.hash}),(0,p.jsx)("span",{style:{fontSize:13,color:"var(--textPrimary)",flex:1},children:t.message})]}),(0,p.jsxs)("div",{style:{fontSize:11,color:"var(--textSecondary)",paddingLeft:4},children:[t.author," · ",t.date]})]},s)),0===j.length&&(0,p.jsx)("p",{style:{color:"var(--textSecondary)",textAlign:"center",padding:20,fontSize:12},children:t("暂无提交记录")})]})]}),(0,p.jsx)("div",{className:"studio__divider",ref:F,onPointerDown:()=>{W(!0),A.current.addEventListener("pointermove",rt)},onPointerUp:dt}),K&&(0,p.jsx)("div",{className:"shell__overlay",onPointerUp:dt}),(0,p.jsx)("div",{className:"studio-editor",children:(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:"16px",gap:12,overflow:"auto"},children:[(0,p.jsxs)("div",{className:"git-studio-card",children:[(0,p.jsxs)("div",{className:"git-studio-card-title",children:["🌿 ",t("分支"),": ",(0,p.jsx)("span",{style:{color:"var(--secondary, #34a853)"},children:N.current})]}),(0,p.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:N.branches.map(s=>(0,p.jsx)("button",{className:"git-studio-branch-chip "+(s===N.current?"git-studio-branch-chip--current":""),onClick:()=>(async s=>{try{T(!0);const a=await i.TU.post("checkout",{path:e,branch:s});0===a.code?((0,l.SK)(t("切换分支成功")),et(),at(),it()):(0,l.zN)(a.message)}catch(t){(0,l.zN)(t?.message)}finally{T(!1)}})(s),disabled:s===N.current||s.startsWith("*"),children:s.replace("remotes/origin/","")},s))})]}),(0,p.jsxs)("div",{className:"git-studio-card",children:[(0,p.jsx)("textarea",{className:"git-studio-textarea",placeholder:t("输入提交信息..."),value:f,onChange:t=>S(t.target.value),rows:2}),(0,p.jsxs)("div",{className:"git-studio-btn-row",children:[(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{if(f.trim())try{T(!0);const s=await i.TU.post("commit",{path:e,message:f.trim(),allChanged:!0});0===s.code?((0,l.SK)(t("提交成功")),S(""),et(),at()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}finally{T(!1)}else(0,l.zN)(t("请输入提交信息"))},disabled:U||!f.trim(),style:{borderColor:"var(--secondary, #34a853)",color:"var(--secondary, #34a853)"},children:["✅ ",t("提交")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{const s=await i.TU.post("add_all",{path:e});0===s.code?((0,l.SK)(t("已暂存全部")),et()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}},children:["➕ ",t("暂存全部")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{if(0!==w.size)try{const s=await i.TU.post("add",{path:e,files:[...w]});0===s.code?((0,l.SK)(t("已暂存")),C(new Set),et()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}else(0,l.zN)(t("请先选择文件"))},children:["📥 ",t("暂存选中")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{if(0!==w.size)try{const s=await i.TU.post("reset",{path:e,files:[...w]});0===s.code?((0,l.SK)(t("已取消暂存")),C(new Set),et()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}else(0,l.zN)(t("请先选择文件"))},style:{borderColor:"#f9ab00",color:"#f9ab00"},children:["↩ ",t("取消暂存")]})]})]}),(0,p.jsxs)("div",{className:"git-studio-card",children:[(0,p.jsxs)("div",{className:"git-studio-card-title",children:["☁️ ",t("远程操作")]}),(0,p.jsxs)("div",{className:"git-studio-btn-row",children:[(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{T(!0);const s=await i.TU.post("pull",{path:e});0===s.code?((0,l.SK)(t("拉取成功")),et(),at()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}finally{T(!1)}},disabled:U,children:["⬇ ",t("拉取")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>nt(!1),disabled:U,children:["⬆ ",t("推送")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>nt(!0),disabled:U,style:{borderColor:"var(--accent, #ea4335)",color:"var(--accent, #ea4335)"},children:["⚠ ",t("强制推送")]})]}),(0,p.jsxs)("div",{className:"git-studio-btn-row",children:[(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{const s=await i.TU.post("stash",{path:e});0===s.code?((0,l.SK)(t("暂存工作区成功")),et()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}},style:{borderColor:"var(--textSecondary)",color:"var(--textSecondary)"},children:["📦 ",t("暂存工作区")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{const s=await i.TU.post("stash_pop",{path:e});0===s.code?((0,l.SK)(t("恢复工作区成功")),et()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}},style:{borderColor:"var(--textSecondary)",color:"var(--textSecondary)"},children:["📤 ",t("恢复工作区")]})]})]}),(0,p.jsxs)("div",{className:"git-studio-card",children:[(0,p.jsxs)("div",{className:"git-studio-card-title",children:["👤 ",t("用户配置")]}),G?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"git-studio-config-row",children:[(0,p.jsxs)("span",{className:"git-studio-config-label",children:[t("用户名"),":"]}),(0,p.jsx)("input",{className:"git-studio-input",value:D,onChange:t=>E(t.target.value),placeholder:"user.name"})]}),(0,p.jsxs)("div",{className:"git-studio-config-row",children:[(0,p.jsxs)("span",{className:"git-studio-config-label",children:[t("邮箱"),":"]}),(0,p.jsx)("input",{className:"git-studio-input",value:I,onChange:t=>B(t.target.value),placeholder:"user.email"})]}),(0,p.jsxs)("div",{className:"git-studio-btn-row",children:[(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{const s=await i.TU.post("set_user_config",{path:e,name:D,email:I});0===s.code?((0,l.SK)(t("用户配置已保存")),X(!1),lt()):(0,l.zN)(s.message)}catch(t){(0,l.zN)(t?.message)}},children:["💾 ",t("保存")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>{X(!1),E(R.name),B(R.email)},children:["✖ ",t("取消")]})]})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"git-studio-config-row",children:[(0,p.jsxs)("span",{className:"git-studio-config-label",children:[t("用户名"),":"]}),(0,p.jsx)("span",{style:{fontSize:13,color:"var(--textPrimary)"},children:R.name||"-"})]}),(0,p.jsxs)("div",{className:"git-studio-config-row",children:[(0,p.jsxs)("span",{className:"git-studio-config-label",children:[t("邮箱"),":"]}),(0,p.jsx)("span",{style:{fontSize:13,color:"var(--textPrimary)"},children:R.email||"-"})]}),(0,p.jsx)("div",{className:"git-studio-btn-row",children:(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>X(!0),children:["✏ ",t("修改")]})})]})]}),(0,p.jsxs)("div",{className:"git-studio-card",children:[(0,p.jsxs)("div",{className:"git-studio-card-title",children:["🌐 ",t("代理设置")]}),Z?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"var(--textSecondary)"},children:t("全局代理")}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"http.proxy:"}),(0,p.jsx)("input",{className:"git-studio-input",value:q,onChange:t=>J(t.target.value),placeholder:"http://127.0.0.1:7890"})]}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"https.proxy:"}),(0,p.jsx)("input",{className:"git-studio-input",value:O,onChange:t=>Q(t.target.value),placeholder:"http://127.0.0.1:7890"})]}),(0,p.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"var(--textSecondary)"},children:t("仓库代理")}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"http.proxy:"}),(0,p.jsx)("input",{className:"git-studio-input",value:V,onChange:t=>Y(t.target.value),placeholder:"http://127.0.0.1:7890"})]}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"https.proxy:"}),(0,p.jsx)("input",{className:"git-studio-input",value:tt,onChange:t=>st(t.target.value),placeholder:"http://127.0.0.1:7890"})]}),(0,p.jsx)("div",{style:{fontSize:11,color:"var(--textSecondary)"},children:t("留空清除该代理设置")}),(0,p.jsxs)("div",{className:"git-studio-btn-row",children:[(0,p.jsxs)("button",{className:"git-studio-btn",onClick:async()=>{try{const s=[{scope:"global",type:"http",value:q},{scope:"global",type:"https",value:O},{scope:"local",type:"http",value:V},{scope:"local",type:"https",value:tt}];for(const t of s)await i.TU.post("set_proxy",{path:e,...t});(0,l.SK)(t("代理配置已保存")),$(!1),ct()}catch(t){(0,l.zN)(t?.message)}},children:["💾 ",t("保存")]}),(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>{$(!1),ct()},children:["✖ ",t("取消")]})]})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"var(--textSecondary)"},children:t("全局代理")}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"http.proxy:"}),(0,p.jsx)("span",{style:{color:"var(--textPrimary)"},children:H?.global?.http||"-"})]}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"https.proxy:"}),(0,p.jsx)("span",{style:{color:"var(--textPrimary)"},children:H?.global?.https||"-"})]}),(0,p.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"var(--textSecondary)"},children:t("仓库代理")}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"http.proxy:"}),(0,p.jsx)("span",{style:{color:"var(--textPrimary)"},children:H?.local?.http||"-"})]}),(0,p.jsxs)("div",{className:"git-studio-proxy-item",children:[(0,p.jsx)("span",{className:"git-studio-proxy-label",children:"https.proxy:"}),(0,p.jsx)("span",{style:{color:"var(--textPrimary)"},children:H?.local?.https||"-"})]}),(0,p.jsx)("div",{className:"git-studio-btn-row",children:(0,p.jsxs)("button",{className:"git-studio-btn",onClick:()=>$(!0),children:["✏ ",t("修改")]})})]})]}),(0,p.jsxs)("div",{style:{padding:"12px",borderRadius:8,border:"1px solid var(--divider, rgba(0,0,0,0.08))",background:"var(--surfaceSecondary, #f1f3f4)",fontSize:11,color:"var(--textSecondary)",lineHeight:1.6},children:["💡 ",t("提示:"),(0,p.jsxs)("ul",{style:{margin:"4px 0",paddingLeft:16},children:[(0,p.jsx)("li",{children:t("左侧勾选文件后,使用「暂存选中」将其加入暂存区")}),(0,p.jsx)("li",{children:t("输入提交信息后点击「提交」")}),(0,p.jsx)("li",{children:t("如有冲突,请自行在shell中解决冲突后再提交")}),(0,p.jsx)("li",{children:t("「强制推送」会覆盖远程分支,请谨慎使用")}),(0,p.jsx)("li",{children:t("用户配置和全局代理修改后对所有仓库生效")})]})]})]})})]})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6805],{18840(e,n,t){t.d(n,{I:()=>s,gE:()=>l});class s{open;key;option_keys;port}class l{client_name;client_num_id;open=!1;serverIp;serverPort;key="";note;status;is_new;index}t.d(n,["FG",0,{content_max_width:"70%",content_padding:"4%",font_size:"16px",line_height:"1.8"},"mo",0,"\nnode_modules\n.venv\n.gradle\n.cache\nvendor\n"])},77481(e,n,t){t.d(n,{S:()=>o,X:()=>i});var s=t(96540),l=t(61443),r=t(74848);function i(e){const[n,t]=s.useState([]),i=(0,s.useRef)(-1),[o,a]=(0,s.useState)(-1),[c,d]=(0,s.useState)(-1);(0,s.useEffect)(()=>{e.children?t(Array.isArray(e.children)?e.children:[e.children]):t(e.rows)},[e.rows,e.children]);const _=()=>{i.current=-1,a(-1),d(-1)};return(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:e.headers?.map((n,t)=>{const s=!!e.filter&&(e.filter.column??0)===t;let i=n;if(s){const t=e.filter,s=t.options.find(e=>e.value===t.value);null!=t.value&&s&&(i=`${n} (${s.label})`)}return(0,r.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,r.jsx)(l.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:i}):n},t)})})}),(0,r.jsx)("tbody",{children:n.map((n,t)=>{const s=!!e.onRowDrag;return(0,r.jsx)("tr",{className:s?(o===t?"row-dragging":"")+(c===t?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(n)},onDragStart:e=>{s&&(i.current=t,a(t),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||i.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(t))},onDrop:n=>{s&&(n.preventDefault(),(()=>{const n=i.current,t=c;_(),n<0||t<0||n===t||e.onRowDrag?.(n,t)})())},onDragEnd:_,children:n.map((t,s)=>{const l=s===n.length-1?"small":"";return(0,r.jsx)("td",{className:l,style:{width:e.width??"auto"},children:t},s)})},t)})})]})}function o(e){return(0,r.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,n)=>(0,r.jsx)("div",{children:e},n))})}},36805(e,n,t){t.r(n),t.d(n,{default:()=>K});var s=t(96540),l=t(75725),r=t(86149),i=t(70447),o=t(85997),a=t(77481),c=t(61443),d=t(14284),_=t(53459),p=t(7523),x=t(34843),h=t(82893),u=t(62042),j=(t(23430),t(21499),t(14944)),m=t(92275),v=t(6960),f=t(40505),g=t(4412),y=t(24659),w=t(74848);let S={};function C(){const{t:e,i18n:n}=(0,r.B)(),{initUserInfo:t,reloadUserInfo:C}=(0,s.useContext)(p.F),[I,b]=(0,x.fp)(h.AG.user_base_info),[k,A]=(0,s.useState)([]),[P,$]=(0,x.fp)(h.AG.prompt_card),F=(0,y.K)(),[K,N]=(0,s.useState)(),[U,G]=(0,s.useState)(void 0),[E,D]=(0,s.useState)(null),[B,M]=(0,s.useState)([]),[V,X]=(0,s.useState)([]),Z=[e("序号"),e("名称"),e("在线状态"),e("时间"),e("备注")],z=[e("序号"),e("服务端口"),e("转发ip"),e("转发端口"),e("开启"),e("备注")],H=[e("序号"),e("服务端口"),e("转发Client名称"),e("转发ip"),e("转发端口"),e("开启"),e("备注")],q=e=>null==e?"":(0,v.s)(e),L=async e=>{const n=await d.s9.post("server_bridge_get_one_fig",{server_client_num_id:e});if(n.code===_.m.Success){const e=n.data;for(const n of e)n.client_name=S?.[n.client_num_id]?.client_name??"";X(e)}},R=async e=>{const n=void 0===e?E:e,t=await d.s9.get("server_client_get");if(t.code===_.m.Success){const e=t.data,s=[],l=[];S={};for(const t of e)null!==n&&!!t.status!==n||(U?`${t.index}${t.client_name}${t.note}`.includes(U)&&s.push(t):s.push(t),l.push({label:t.client_name,value:t.client_num_id}),S[t.client_num_id]=t);A(s),M(l)}};(0,s.useEffect)(()=>{j.ws.addMsg(m.HK.tcp_forward_server_load,e=>{R()}),R()},[]);return(0,w.jsxs)(s.Fragment,{children:[(0,w.jsx)(g.aZ,{position:"right",children:K&&(0,w.jsx)("span",{children:`${K.client_name}${K.note?`(${K.note})`:""}`})}),(0,w.jsxs)(l.fI,{children:[(0,w.jsx)(l.VP,{widthPer:50,children:(0,w.jsx)(l.xh,{children:(0,w.jsx)(i.uF,{self_title:(0,w.jsx)("span",{className:" div-row ",children:(0,w.jsx)("h2",{children:e("客户端列表")})}),titleCom:(0,w.jsx)(c.Sm,{placeholder:e("过滤"),value:U,handleInputChange:e=>{G(e)},handlerEnter:()=>{R()}}),children:(0,w.jsx)(a.X,{headers:Z,filter:{title:e("在线状态"),column:2,value:E,options:[{label:e("全部"),value:null},{label:e("在线"),value:!0},{label:e("离线"),value:!1}],onChange:e=>{D(e),R(e)}},rows:k.map((n,t)=>[(0,w.jsx)("p",{children:t}),(0,w.jsx)(i.xP,{children:n.client_name}),(0,w.jsx)(i.fq,{ok:n.status}),(0,w.jsx)(i.xP,{children:q(n.status?n.online_start_time:n.offline_time)}),(0,w.jsx)(i.xP,{children:n.note}),(0,w.jsxs)("div",{children:[(0,w.jsx)(o.rA,{icon:"edit",title:e("编辑"),onClick:()=>{N({...n}),L(n.client_num_id)}}),(0,w.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>{$({open:!0,title:"share file",confirm:async()=>{$({open:!1}),await(async e=>{(await d.s9.post("server_client_del",{client_num_id:e})).code===_.m.Success&&((0,u.SK)("成功"),R())})(n.client_num_id)},context_div:(0,w.jsx)("div",{className:"card-content",children:e("确定删除这个吗客户端吗?")})})}})]})]),width:"10rem"})})})}),(0,w.jsx)(l.VP,{widthPer:50,children:K?(0,w.jsxs)(l.xh,{children:[(0,w.jsxs)(i.Zp,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:e("代理配置")})," "]}),rightBottomCom:(0,w.jsx)("div",{children:(0,w.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await d.s9.post("server_client_save",K)).code===_.m.Success&&(0,u.SK)("成功")}})}),children:[(0,w.jsx)(l.Yh,{left:e("远程地址"),center:K?.client_remote_address??""}),(0,w.jsx)(l.Yh,{left:e(K?.status?"在线时间":"离线时间"),center:q(K?.status?K?.online_start_time:K?.offline_time)}),(0,w.jsx)(c.Sm,{placeholder:"名称",value:K.client_name,handleInputChange:e=>{K.client_name=e,N({...K})}}),(0,w.jsxs)("form",{children:[e("filecat代理访问"),":",(0,w.jsx)(a.S,{isFlex:!0,columns:[(0,w.jsx)(c.U6,{value:1,context:e("开启"),selected:K.open_filecat,onchange:()=>{K.open_filecat=!K.open_filecat,N({...K})}}),(0,w.jsx)(c.U6,{value:1,context:e("关闭"),selected:!K.open_filecat,onchange:()=>{K.open_filecat=!K.open_filecat,N({...K})}})]})]}),K.open_filecat&&(0,w.jsxs)(s.Fragment,{children:[(0,w.jsxs)("form",{children:[e("filecat代理访问使用服务器前端"),":",(0,w.jsx)(a.S,{isFlex:!0,columns:[(0,w.jsx)(c.U6,{value:1,context:e("开启"),selected:K.filecat_use_local_page,onchange:()=>{K.filecat_use_local_page=!K.filecat_use_local_page,N({...K})}}),(0,w.jsx)(c.U6,{value:1,context:e("关闭"),selected:!K.filecat_use_local_page,onchange:()=>{K.filecat_use_local_page=!K.filecat_use_local_page,N({...K})}})]})]}),(0,w.jsx)(c.Sm,{placeholderOut:e("自定义filecat代理地址"),placeholder:"127.0.0.1:5567",value:K.filecat_proxy_host_port,handleInputChange:e=>{K.filecat_proxy_host_port=e,N({...K})}}),(0,w.jsx)(o.rA,{icon:"content_copy",title:e("复制filecat代理url"),onClick:()=>{const e=`${window.location.origin}?tcp_client_num_id=${K.client_num_id}`;(0,f.lW)(e),(0,u.SK)(e)}})]}),(0,w.jsx)(c.Sm,{placeholder:"备注",value:K.note,handleInputChange:e=>{K.note=e,N({...K})}}),(0,w.jsx)(o.rA,{icon:"add",onClick:()=>{K.proxy_fig_list.push({open:!1}),N({...K})},title:e("添加")}),e("代理"),(0,w.jsx)(a.X,{headers:z,rows:K.proxy_fig_list.map((n,t)=>[(0,w.jsx)("p",{children:t}),(0,w.jsx)(c.Sm,{value:n.server_port,handleInputChange:e=>{n.server_port=parseInt(e)},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.proxy_host,handleInputChange:e=>{n.proxy_host=e},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.proxy_port,handleInputChange:e=>{n.proxy_port=parseInt(e)},no_border:!0}),(0,w.jsx)(c.l6,{value:!!n.open,onChange:e=>{n.open=e,N({...K})},options:F,no_border:!0}),(0,w.jsx)(c.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,w.jsx)("div",{children:(0,w.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>{const e=[];for(let n=0;n<(K.proxy_fig_list.length??0);n++)n!==t&&e.push(K.proxy_fig_list[n]);K.proxy_fig_list=e,N({...K})}})})]),width:"10rem"})]}),(0,w.jsxs)(i.Zp,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:e("桥接配置")})," "]}),children:[(0,w.jsx)(o.rA,{icon:"add",onClick:()=>{V.push({open:!1,server_client_num_id:K.client_num_id}),X([...V])},title:e("添加")}),e("代理"),(0,w.jsx)(a.X,{headers:H,rows:V.map((n,t)=>[(0,w.jsx)("p",{children:t}),(0,w.jsx)(c.Sm,{value:n.server_port,handleInputChange:e=>{n.server_port=parseInt(e)},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.client_name,options:B,handleInputChange:e=>{const t=(e=>B.find(n=>String(n.value)===String(e)))(e);n.client_num_id=parseInt(String(t.value)),n.client_name=t.label,X([...V])},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.client_proxy_host,handleInputChange:e=>{n.client_proxy_host=e},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.client_proxy_port,handleInputChange:e=>{n.client_proxy_port=parseInt(e)},no_border:!0}),(0,w.jsx)(c.l6,{value:!!n.open,onChange:e=>{n.open=e,X([...V])},options:F,no_border:!0}),(0,w.jsx)(c.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,w.jsxs)("div",{children:[(0,w.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:async()=>{if(null==n.id){const e=[];for(let n=0;n<(V.length??0);n++)n!==t&&e.push(V[n]);X([...e])}else await(async(e,n)=>{(await d.s9.post("server_bridge_del_fig",{id:e})).code===_.m.Success&&((0,u.SK)("成功"),L(n))})(n.id,n.server_client_num_id)}}),null==n.id?(0,w.jsx)(o.rA,{icon:"add",title:e("添加"),onClick:async()=>{await(async e=>{if(null==e.client_num_id)return void(0,u.zN)("未选择转发送 client");(await d.s9.post("server_bridge_add_fig",e)).code===_.m.Success&&((0,u.SK)("成功"),L(e.server_client_num_id))})(n)}}):(0,w.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:async()=>{await(async e=>{if(null==e.client_num_id)return void(0,u.zN)("未选择转发送 client");(await d.s9.post("server_bridge_edit_fig",e)).code===_.m.Success&&((0,u.SK)("成功"),L(e.server_client_num_id))})(n)}})]})]),width:"10rem"})]})]}):(0,w.jsx)(l.xh,{})})]})]})}var I=t(18840),b=t(7463);function k(e){const{t:n}=(0,r.B)(),[t,p]=(0,s.useState)([]),[x,h]=(0,s.useState)([]),[v,f]=(0,s.useState)([]),[g,S]=(0,s.useState)([]),C=[n("序号"),n("服务端口"),n("转发客户端名称")],k=[n("序号"),n("原客户端"),n("目标客户端"),n("待同步文件数量")],A=[n("序号"),n("port"),n("host"),n("名称"),n("key"),n("在线"),n("开启"),n("备注")],P=(0,y.K)(),$=async()=>{const e=await d.s9.get("client_get");if(e.code===_.m.Success){const n=e.data;p(n.list)}const n=await d.s9.get("client_bridge_get_all_fig");n.code===_.m.Success&&f(n.data);const t=await d.s9.get("client_sync_task_get");t.code===_.m.Success&&S(t.data)};(0,s.useEffect)(()=>($(),j.ws.sendData(m.HK.tcp_proxy_client_status,{}).then(()=>{const e=(0,b.sg)(()=>$(),500);j.ws.addMsg(m.HK.tcp_proxy_client_status,e)}),()=>{j.ws.removeMsg(m.HK.tcp_proxy_client_status)}),[]);const F=async e=>{const n=new I.gE;n.index=e.index,n.key=e.key,n.serverIp=e.serverIp,n.serverPort=e.serverPort,n.open=e.open,n.client_name=e.client_name,n.client_num_id=e.client_num_id;(await d.s9.post("client_save",n)).code===_.m.Success?(0,u.SK)("保存成功"):(0,u.zN)("网络错误")};return(0,w.jsxs)("div",{children:[(0,w.jsxs)(l.fI,{children:[(0,w.jsx)(l.VP,{widthPer:33,children:(0,w.jsxs)(i.Zp,{title:"",rightBottomCom:(0,w.jsx)(o.C3,{text:n("保存"),clickFun:()=>{t[0].index=0,F(t[0])}}),titleCom:(0,w.jsxs)("div",{children:[n("连接状态"),(0,w.jsx)(i.fq,{ok:!!t[0]?.status})]}),children:[(0,w.jsx)(c.Sm,{placeholder:`${n("服务器")} ip`,value:t[0]?.serverIp,handleInputChange:e=>{t[0].serverIp=e}}),(0,w.jsx)(c.Sm,{type:"number",placeholder:`${n("服务器")} port`,value:t[0]?.serverPort,handleInputChange:e=>{const n=parseInt(e);!isNaN(n)&&n>=0&&n<=65535&&(t[0].serverPort=n)}}),(0,w.jsx)(c.Sm,{placeholder:n("名称"),value:t[0]?.client_name,handleInputChange:e=>{t[0].client_name=e}}),(0,w.jsx)(c.Sm,{type:"password",placeholder:"key ",value:t[0]?.key,handleInputChange:e=>{t[0].key=e}}),(0,w.jsxs)("form",{children:[n("状态"),(0,w.jsx)(a.S,{isFlex:!0,columns:[(0,w.jsx)(c.U6,{value:1,context:n("开启"),selected:t[0]?.open,onchange:()=>{t[0].open=!t[0].open,p([...t])}}),(0,w.jsx)(c.U6,{value:1,context:n("关闭"),selected:!t[0]?.open,onchange:()=>{t[0].open=!t[0].open,p([...t])}})]})]})]})}),(0,w.jsx)(l.VP,{widthPer:40,children:(0,w.jsxs)(i.Zp,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:n("更多服务器")})," "]}),children:[(0,w.jsx)(o.rA,{icon:"add",onClick:()=>{t.push({open:!1,is_new:!0}),p([...t])},title:n("添加")}),n("代理"),(0,w.jsx)(a.X,{headers:A,rows:t.slice(1).map((e,s)=>[(0,w.jsx)("p",{children:s}),(0,w.jsx)(c.Sm,{type:"number",value:e.serverPort,handleInputChange:n=>{const t=parseInt(n);!isNaN(t)&&t>=0&&t<=65535&&(e.serverPort=t)},no_border:!0}),(0,w.jsx)(c.Sm,{value:e.serverIp,handleInputChange:n=>{e.serverIp=n},no_border:!0}),(0,w.jsx)(c.Sm,{value:e.client_name,handleInputChange:n=>{e.client_name=n},no_border:!0}),(0,w.jsx)(c.Sm,{value:e.key,handleInputChange:n=>{e.key=n},no_border:!0}),(0,w.jsx)(i.fq,{ok:!!e.status}),(0,w.jsx)(c.l6,{value:!!e.open,onChange:n=>{e.open=n,p([...t])},options:P,no_border:!0}),(0,w.jsx)(c.Sm,{value:e.note,handleInputChange:n=>{e.note=n},no_border:!0}),(0,w.jsxs)("div",{children:[(0,w.jsx)(o.rA,{icon:"delete",title:n("删除"),onClick:async()=>{if(e.is_new){const e=[];for(let n=0;n<(t.length??0);n++)n!==s&&e.push(t[n]);p([...e])}else await(async e=>{(await d.s9.post("client_del",{index:e})).code===_.m.Success?((0,u.SK)("保存成功"),$()):(0,u.zN)("网络错误")})(s+1)}}),e.is_new?(0,w.jsx)(o.rA,{icon:"add",title:n("添加"),onClick:async()=>{e.index=s+1,await F(e)}}):(0,w.jsx)(o.rA,{icon:"save",title:n("保存"),onClick:async()=>{e.index=s+1,await F(e)}})]})]),width:"10rem"})]})})]}),(0,w.jsxs)(l.fI,{children:[!!v?.length&&(0,w.jsx)(l.VP,{widthPer:40,children:(0,w.jsx)(i.Zp,{title:n("桥接服务端口列表"),children:(0,w.jsx)(a.X,{headers:C,rows:v.map((e,n)=>[(0,w.jsx)("p",{children:n}),(0,w.jsx)(i.xP,{children:e.server_port}),(0,w.jsx)(i.xP,{children:e.client_name})]),width:"10rem"})})}),!!g?.length&&(0,w.jsx)(l.VP,{widthPer:40,children:(0,w.jsx)(i.Zp,{title:n("文件同步列表"),children:(0,w.jsx)(a.X,{headers:k,rows:g.map((e,n)=>[(0,w.jsx)("p",{children:n}),(0,w.jsx)(i.xP,{children:e.source_client_name}),(0,w.jsx)(i.xP,{children:e.target_client_name}),(0,w.jsx)(i.xP,{children:e.running_num})]),width:"10rem"})})})]})]})}function A(){const{t:e,i18n:n}=(0,r.B)(),{initUserInfo:t,reloadUserInfo:v}=(0,s.useContext)(p.F),[f,g]=(0,x.fp)(h.AG.user_base_info),[y,S]=(0,x.fp)(h.AG.prompt_card),[C,b]=(0,s.useState)(!1),[k,A]=(0,s.useState)([]),[P,$]=(0,s.useState)(null),[F,K]=(0,s.useState)([]),[N,U]=(0,s.useState)(void 0),[G,E]=(0,s.useState)(void 0),D=(0,s.useMemo)(()=>{const e=[...k];return null!=P?(e.sort((e,n)=>P?e.server_port-n.server_port:n.server_port-e.server_port),e):e},[k,P]),B=async()=>{const e=await d.s9.get("get_all_open_server_client_proxy_fig");if(e.code===_.m.Success){const n=[];for(const t of e.data)G?`${t.server_port}${t.client_name}${t.proxy_host}${t.server_port}${t.server_port_note}`.includes(G)&&n.push(t):n.push(t);A(n)}},M=async()=>{const e=await d.s9.get("server_get");e.code===_.m.Success&&(U(e.data.port),b(!!e.data.open),K(e.data.option_keys??[])),B()};(0,s.useEffect)(()=>{j.ws.addMsg(m.HK.tcp_forward_server_load,e=>{M()}),M()},[]);const V=async e=>{const n=new I.I;n.port=N,n.open=C,n.option_keys=F;(await d.s9.post("server_save",{fig:n,notice_client:e})).code===_.m.Success&&(0,u.SK)("成功")};return(0,w.jsxs)(l.fI,{children:[(0,w.jsx)(l.VP,{widthPer:33,children:(0,w.jsx)(l.xh,{children:(0,w.jsxs)(i.Zp,{title:e("服务器配置"),rightBottomCom:(0,w.jsxs)("div",{children:[(0,w.jsx)(o.C3,{text:e("保存并通知客户端第一个key和port"),clickFun:()=>{V(!0)}}),(0,w.jsx)(o.C3,{text:e("保存"),clickFun:()=>{V(!1)}})]}),children:[(0,w.jsx)(c.Sm,{placeholder:"port",value:N,handleInputChange:e=>{U(e)}}),(0,w.jsxs)("label",{children:[(0,w.jsx)(o.rA,{icon:"add",onClick:()=>{K([...F,""])},title:e("添加")}),e("key")]}),(F??[]).map((n,t)=>(0,w.jsxs)("div",{style:{display:"flex"},children:[(0,w.jsx)("div",{style:{width:"90%"},children:(0,w.jsx)(c.Sm,{type:"password",value:n,handleInputChange:e=>{F[t]=e,K([...F])}})}),(0,w.jsx)(o.rA,{icon:"delete",onClick:()=>{F.splice(t,1),K([...F])},title:e("删除")})]},t)),(0,w.jsxs)("form",{children:[e("状态"),":",(0,w.jsx)(a.S,{isFlex:!0,columns:[(0,w.jsx)(c.U6,{value:1,context:e("开启"),selected:C,onchange:()=>{b(!C)}}),(0,w.jsx)(c.U6,{value:1,context:e("关闭"),selected:!C,onchange:()=>{b(!C)}})]})]})]})})}),(0,w.jsx)(l.VP,{widthPer:50,children:(0,w.jsx)(l.xh,{children:(0,w.jsx)(i.uF,{self_title:(0,w.jsx)("span",{className:" div-row ",children:(0,w.jsx)("h2",{children:e("服务器")+e("端口映射")})}),titleCom:(0,w.jsx)(c.Sm,{placeholder:e("过滤"),value:G,handleInputChange:e=>{E(e)},handlerEnter:()=>{B()}}),children:(0,w.jsx)(a.X,{headers:[e("序号"),(0,w.jsx)(o.rA,{title:e("服务端口"),onClick:()=>{$(e=>!e)}}),e("转发ip"),e("转发端口"),"client "+e("名称"),e("开启"),e("备注")],rows:D.map((e,n)=>[(0,w.jsx)("p",{children:n}),(0,w.jsx)(i.xP,{children:e.server_port}),(0,w.jsx)(i.xP,{children:e.proxy_host}),(0,w.jsx)(i.xP,{children:e.proxy_port}),(0,w.jsx)(i.xP,{children:e.client_name}),(0,w.jsx)(i.fq,{ok:!!e.open_success}),(0,w.jsx)(i.xP,{children:e.server_port_note})]),width:"10rem"})})})})]})}var P=t(78247);function $(){const{t:e,i18n:n}=(0,r.B)(),{initUserInfo:t,reloadUserInfo:j}=(0,s.useContext)(p.F),[m,v]=(0,x.fp)(h.AG.user_base_info),[f,g]=(0,x.fp)(h.AG.prompt_card),[,y]=(0,x.fp)(h.AG.confirm),[S,C]=(0,x.fp)(h.AG.editorSetting),[b,k]=(0,s.useState)([]),A=[e("编号"),e("原客户端"),e("原目录"),e("目标客户端"),e("目标目录"),e("忽略目录"),e("开启"),e("双向同步"),e("全量同步"),e("备注")],[$,F]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{const e=await d.s9.get("server_client_get");if(e.code===_.m.Success){const n=e.data,t=[];for(const e of n)t.push({label:e.client_name,value:e.client_num_id});F(t),await K()}})()},[]);const K=async()=>{const e=await d.s9.get("sync_task_get");e.code===_.m.Success&&k(e.data)},N=e=>$.find(n=>String(n.value)===String(e)),U=async e=>{const n=e;(await d.s9.post("sync_task_save",n)).code===_.m.Success&&((0,u.SK)("成功"),await K())};return(0,w.jsx)(l.fI,{children:(0,w.jsx)(l.VP,{widthPer:100,children:(0,w.jsx)(l.xh,{children:(0,w.jsxs)(i.Zp,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:e("客户端文件同步")}),(0,w.jsx)(o.rA,{icon:"info",onClick:()=>{g({open:!0,title:"信息",context_div:(0,w.jsx)("div",{children:(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:"目前只能同步较小的文件,例如配置文件,代码文件"}),(0,w.jsx)("li",{children:e("默认(没有选中全量同步)不会立即同步两个目录中的文件,而是有文件被修改或者改动后才会同步,如果开启全量同步,每次客户端一上线就会递归的同步全部的文件,如果文件非常多,这会造成很大的执行压力。")}),(0,w.jsx)("li",{children:e("如果开启了双向同步,如果两边初始化的时候各自又有很多文件,这是不太稳定的,暂时不建议这样做。")}),(0,w.jsx)("li",{children:e("同时开启全量同步和双向同步,目前性能也会很差,目前没有提供提供冲突冲突的机制。")}),(0,w.jsx)("li",{children:e("如果想用全量同步,一方的文件是空的,且文件数量比较少,几百这样的数量,效果是不错的,之后会一直走增量更新。")})]})})})},title:"信息"})]}),children:[(0,w.jsx)(o.rA,{icon:"add",onClick:()=>{b.push({open:!1,source_dir:"",target_dir:"",delete_missing:!0}),k([...b])},title:e("添加")}),(0,w.jsx)(a.X,{headers:A,rows:b.map((n,t)=>{const s=N(n.source_client_num_id),l=N(n.target_client_num_id);return[(0,w.jsx)("p",{children:t}),(0,w.jsx)(c.Sm,{value:s?.label??n.source_client_name,options:$,handleInputChange:e=>{const t=N(e);n.source_client_num_id=parseInt(String(t?.value)),n.source_client_name=t?.label,k([...b])},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.source_dir,handleInputChange:e=>{n.source_dir=e},no_border:!0}),(0,w.jsx)(c.Sm,{value:l?.label??n.target_client_name,options:$,handleInputChange:e=>{const t=N(e);n.target_client_num_id=parseInt(String(t?.value)),n.target_client_name=t?.label,k([...b])},no_border:!0}),(0,w.jsx)(c.Sm,{value:n.target_dir,handleInputChange:e=>{n.target_dir=e},no_border:!0}),(0,w.jsx)(o.rA,{icon:"edit",title:"额外参数设置",onClick:()=>{P.xK.set_value_temp(n.ignore_text??I.mo),C({model:"ace/mode/gitignore",open:!0,fileName:"",save:async e=>{n.ignore_text=e,k([...b]),P.xK.set_value_temp(""),U(n)}})}}),(0,w.jsx)(c.GL,{selected:!!n.open,onchange:()=>{n.open=!n.open,k([...b])}}),(0,w.jsx)(c.GL,{selected:!!n.two_way_sync,onchange:()=>{n.two_way_sync=!n.two_way_sync,k([...b])}}),(0,w.jsx)(c.GL,{selected:!!n.full_sync,onchange:()=>{n.full_sync=!n.full_sync,k([...b])}}),(0,w.jsx)(c.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,w.jsxs)("div",{children:[(0,w.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:()=>{U(n)}}),(0,w.jsx)(o.rA,{icon:"delete",title:e("删除"),onClick:()=>{n.id?y({open:!0,title:e("确定删除吗"),handle:async()=>{await(async e=>{(await d.s9.post("sync_task_del",{id:e})).code===_.m.Success&&((0,u.SK)("成功"),await K())})(n.id),y({open:!1,handle:null})}}):(b.splice(t,1),k([...b]))}})]})]}),width:"10rem"})]})})})})}var F=t(87361);function K(){const{t:e}=(0,r.B)(),n=[{index:1,name:e("客户端"),rto:"tcp_proxy_client/",component:(0,w.jsx)(k,{})},{index:2,name:e("服务端"),rto:"tcp_proxy_server_info/",component:(0,w.jsx)(A,{})},{index:3,name:e("服务端")+"-"+e("客户端列表"),rto:"tcp_proxy_server_client/",component:(0,w.jsx)(C,{})},{index:4,name:e("服务端")+"-"+e("客户端功能"),rto:"tcp_proxy_server_client_setting/",component:(0,w.jsx)($,{})}];return(0,w.jsx)(l.W1,{optionList:n,father_route:F.o.net_proxy})}},6960(e,n,t){t.d(n,{s:()=>i});var s=t(72635);const l=1440,r=525600;function i(e){e=e>1e12?e:1e3*e;const n=Date.now(),t=Math.abs(n-e)/6e4;return t<1?s.Ay.t("小于一分钟"):t<60?`${t.toFixed(0)} ${s.Ay.t("分钟前")}`:t<l?`${(t/60).toFixed(0)} ${s.Ay.t("小时前")}`:t<43200?`${(t/l).toFixed(0)} ${s.Ay.t("天前")}`:t<r?`${(t/43200).toFixed(0)} ${s.Ay.t("月前")}`:`${(t/r).toFixed(0)} ${s.Ay.t("年前")}`}},24659(e,n,t){var s=t(86149);t.d(n,["K",0,()=>{const{t:e}=(0,s.B)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6919],{86919(e,t,l){l.r(t),l.d(t,{default:()=>_});var r=l(96540),a=l(86149),i=l(86090),s=l(34843),n=l(4412),o=l(85997),h=l(75725),c=l(70447),d=l(61443),p=l(82893),u=l(14284),m=l(53459),x=l(62042),j=l(74848);function _(){const{t:e}=(0,a.B)(),t=(0,i.Zp)(),[l,_]=(0,s.fp)(p.AG.confirm),[,v]=(0,s.fp)(p.AG.prompt_card),[b,C]=(0,r.useState)(""),[g,S]=(0,r.useState)(""),[w,f]=(0,r.useState)(""),[k,y]=(0,r.useState)(""),[B,I]=(0,r.useState)(""),[W,N]=(0,r.useState)(""),[A,D]=(0,r.useState)(""),[P,T]=(0,r.useState)(""),[H,Y]=(0,r.useState)(!0),[z,F]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{const e=await u.Yu.get("docker/config");if(e?.code!==m.m.Success)return;const t=e.data??{};C(t.http_proxy??""),S(t.https_proxy??""),f(t.no_proxy??""),y((t.registry_mirrors||[]).join(",")),I((t.insecure_registries||[]).join(",")),N(t.data_root??""),D(t.storage_driver??""),T(t.log_driver??""),Y(t.iptables??!0),F(!!t.live_restore)})()},[]);return(0,j.jsxs)("div",{children:[(0,j.jsx)(n.aZ,{position:"right",children:(0,j.jsx)(o.rA,{icon:"arrow_back",title:e("返回"),onClick:()=>t(-1)})}),(0,j.jsx)(h.jW,{isFull:!0,more:!0,children:(0,j.jsx)(h.NN,{children:(0,j.jsx)(h.xh,{children:(0,j.jsx)(h.fI,{children:(0,j.jsx)(h.VP,{widthPer:35,children:(0,j.jsxs)(c.uF,{self_title:(0,j.jsxs)("span",{className:"div-row",children:[(0,j.jsx)("h2",{children:e("Docker 代理配置")}),(0,j.jsx)(o.rA,{icon:"info",title:e("信息"),onClick:()=>{v({open:!0,title:e("信息"),context_div:(0,j.jsx)("div",{style:{whiteSpace:"pre-wrap",lineHeight:"1.6"},children:e("代理写入 systemd 服务环境变量,其余写入 daemon.json;修改后需重启 Docker 生效,请谨慎操作(尤其数据存储目录变更)。")})})}})]}),titleCom:(0,j.jsx)(o.rA,{icon:"save",title:e("保存"),onClick:()=>(async()=>{const t=e=>e.split(/[\n,,]/).map(e=>e.trim()).filter(Boolean),l=await u.Yu.post("docker/config/save",{http_proxy:b,https_proxy:g,no_proxy:w,registry_mirrors:t(k),insecure_registries:t(B),data_root:W,storage_driver:A,log_driver:P,iptables:H,live_restore:z});l?.code===m.m.Success?_({open:!0,title:e("是否重启 Docker 服务以生效?"),sub_title:e("重启 Docker 会短暂中断容器服务,请确认当前没有关键任务在执行"),handle:async()=>{const t=await u.Yu.post("docker/restart");_({open:!1,handle:null}),t?.code===m.m.Success?(0,x.SK)(e("已重启 Docker,代理配置已生效")):(0,x.zN)(e("重启失败"))}}):(0,x.zN)(e("保存失败"))})()}),children:[(0,j.jsx)(d.BC,{label:e("HTTP 代理"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"http://127.0.0.1:3067",value:b,handleInputChange:e=>C(e)})}),(0,j.jsx)(d.BC,{label:e("HTTPS 代理"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"https://127.0.0.1:3067",value:g,handleInputChange:e=>S(e)})}),(0,j.jsx)(d.BC,{label:e("No Proxy"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"localhost,127.0.0.1",value:w,handleInputChange:e=>f(e)})}),(0,j.jsx)(d.BC,{label:e("镜像加速"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"https://docker.mirrors.ustc.edu.cn,https://hub-mirror.c.163.com",value:k,handleInputChange:e=>y(e)})}),(0,j.jsx)(d.BC,{label:e("不安全仓库"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"127.0.0.1:5000,registry.example.com",value:B,handleInputChange:e=>I(e)})}),(0,j.jsx)(d.BC,{label:e("数据存储目录"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"/var/lib/docker",value:W,handleInputChange:e=>N(e)})}),(0,j.jsx)(d.BC,{label:e("存储驱动"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"overlay2",value:A,handleInputChange:e=>D(e)})}),(0,j.jsx)(d.BC,{label:e("日志驱动"),label_width:"4rem",children:(0,j.jsx)(d.Sm,{maxWidth:"24rem",placeholder:"json-file",value:P,handleInputChange:e=>T(e)})}),(0,j.jsx)(d.BC,{label:e("启用 iptables"),label_width:"4rem",input_max_width:"8rem",children:(0,j.jsx)(d.l6,{options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],value:H,onChange:e=>Y(!!e)})}),(0,j.jsx)(d.BC,{label:e("Live Restore"),label_width:"4rem",input_max_width:"8rem",children:(0,j.jsx)(d.l6,{options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],value:z,onChange:e=>F(!!e)})})]})})})})})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6966],{18840(e,t,n){n.d(t,{I:()=>r,gE:()=>s});class r{open;key;option_keys;port}class s{client_name;client_num_id;open=!1;serverIp;serverPort;key="";note;status;is_new;index}n.d(t,["FG",0,{content_max_width:"70%",content_padding:"4%",font_size:"16px",line_height:"1.8"},"mo",0,"\nnode_modules\n.venv\n.gradle\n.cache\nvendor\n"])},26966(e,t,n){n.r(t),n.d(t,{default:()=>He});var r=n(96540),s=n(34843),o=n(82893),c=n(78247),a=n(23430),l=n(85997),i=n(57952),u=n(62042),d=n(53459),m=n(14284),h=n(57889),f=n(86149),p=n(42845),g=n(1575),_=n(89781),v=n(61396),k=n(46762),y=n(73337),b=n(89552),w=n(86059),x=n(58903);const M=(0,w.of)({tableGroup:"block",cellContent:"block+",cellAttributes:{}}),$={align:{default:null}},S={doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:$,parseDOM:[{tag:"p"}],toDOM:e=>["p",e.attrs.align?{style:`text-align:${e.attrs.align}`}:{},0]},heading:{content:"inline*",group:"block",attrs:{level:{default:1},...$},defining:!0,parseDOM:[1,2,3,4,5,6].map(e=>({tag:`h${e}`,attrs:{level:e}})),toDOM(e){const t=e.attrs.align?{style:`text-align:${e.attrs.align}`}:{};return[`h${e.attrs.level}`,t,0]}},bullet_list:{group:"block",content:"list_item+",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]},ordered_list:{group:"block",content:"list_item+",attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:Number(e.getAttribute("start")??1)})}],toDOM:e=>1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]},list_item:{content:"paragraph block*",defining:!0,attrs:{checked:{default:null}},parseDOM:[{tag:"li",getAttrs:e=>{const t=e,n=t.querySelector("input[type=checkbox]");if(n)return{checked:n.checked};const r=t.getAttribute("data-checked");return{checked:null===r?null:"true"===r}}}],toDOM:e=>null!==e.attrs.checked?["li",{"data-checked":String(e.attrs.checked)},0]:["li",0]},blockquote:{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},code_block:{content:"text*",group:"block",marks:"",defining:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{const t=e.querySelector("code"),n=/language-([\w-]+)/.exec(t?.className??"");return{language:n?n[1]:""}}}],toDOM:e=>["pre",{"data-language":e.attrs.language},["code",0]]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]},image:{inline:!0,group:"inline",draggable:!0,attrs:{src:{},alt:{default:null},title:{default:null}},parseDOM:[{tag:"img[src]",getAttrs:e=>{const t=e;return{src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title")}}}],toDOM(e){const{src:t,alt:n,title:r}=e.attrs,s={src:t};return n&&(s.alt=n),r&&(s.title=r),["img",s]}},text:{group:"inline"},...M},j={strong:{parseDOM:[{tag:"strong"},{tag:"b"},{style:"font-weight=bold"}],toDOM:()=>["strong",0]},em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]},strike:{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"}],toDOM:()=>["s",0]},code:{parseDOM:[{tag:"code",getAttrs:e=>"PRE"!==e.parentElement?.tagName&&null}],toDOM:()=>["code",0]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e;return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM(e){const{href:t,title:n}=e.attrs;return["a",{href:t,title:n,rel:"noopener noreferrer",target:"_blank"},0]}}},E=new x.Sj({nodes:S,marks:j});const C=new(n(22091).A)({html:!0,linkify:!0,breaks:!1,typographer:!1});function A(e){const t=C.render(e??""),n=document.createElement("div");return n.innerHTML=t,x.S4.fromSchema(E).parse(n)}function D(e){let t="";return e.forEach(e=>{if(e.isText){let n=e.marks.some(e=>"code"===e.type.name)?e.text??"":function(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}(e.text??"");for(const t of e.marks)switch(t.type.name){case"code":n=`\`${e.text??""}\``;break;case"strong":n=`**${n}**`;break;case"em":n=`*${n}*`;break;case"strike":n=`~~${n}~~`;break;case"link":n=`[${n}](${t.attrs.href}${t.attrs.title?` "${t.attrs.title}"`:""})`}t+=n}else if("image"===e.type.name){const{src:n,alt:r,title:s}=e.attrs;t+=``}else"hard_break"===e.type.name&&(t+=" \n")}),t}function O(e){const t=[];if(e.forEach(e=>{const n=[],r=[];e.forEach(e=>{var t;n.push((t=e.textContent,t.replace(/\|/g,"\\|").replace(/\n/g," ")).trim()),r.push("table_header"===e.type.name)}),t.push({cells:n,header_flags:r})}),0===t.length)return"";const n=Math.max(...t.map(e=>e.cells.length)),r=t[0].header_flags.some(e=>e),s=Array.from({length:n},(e,n)=>Math.max(3,...t.map(e=>N(e.cells[n]??"")))),o=e=>`| ${Array.from({length:n},(t,n)=>{return r=e[n]??"",o=s[n],r+" ".repeat(Math.max(0,o-N(r)));var r,o}).join(" | ")} |`,c=[];if(r){c.push(o(t[0].cells)),c.push(`| ${s.map(e=>"-".repeat(e)).join(" | ")} |`);for(let e=1;e<t.length;e++)c.push(o(t[e].cells))}else{c.push(o(new Array(n).fill(""))),c.push(`| ${s.map(e=>"-".repeat(e)).join(" | ")} |`);for(const e of t)c.push(o(e.cells))}return c.join("\n")}function N(e){let t=0;for(const n of e){const e=n.codePointAt(0)??0;t+=e>=4352&&e<=4447||e>=11904&&e<=42191||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510?2:1}return t}function L(e,t=""){switch(e.type.name){case"paragraph":default:return t+D(e);case"heading":return`${t}${"#".repeat(e.attrs.level)} ${D(e)}`;case"blockquote":return R(e,"").split("\n").map(e=>`${t}> ${e}`).join("\n");case"code_block":{const n=e.attrs.language??"";return`${t}\`\`\`${n}\n${e.textContent}\n${t}\`\`\``}case"horizontal_rule":return`${t}---`;case"bullet_list":{const n=[];return e.forEach((e,r,s)=>{n.push(z(e,t,`${t}- `,`${t} `,s))}),n.join("\n")}case"ordered_list":{const n=[],r=e.attrs.order??1;return e.forEach((e,s,o)=>{n.push(z(e,t,`${t}${r+o}. `,`${t} `,o))}),n.join("\n")}case"table":return O(e).split("\n").map(e=>t+e).join("\n")}}function z(e,t,n,r,s){const o=e.attrs.checked,c=null===o?"":o?"[x] ":"[ ] ",a=[];e.forEach((e,t,n)=>{a.push(L(e,0===n?"":r))});const l=a.join("\n").split("\n");return n+c+l[0]+(l.length>1?"\n"+l.slice(1).join("\n"):"")}function R(e,t=""){const n=[];return e.forEach(e=>{n.push(L(e,t))}),n.join("\n\n")}function F(e){return R(e).trim()+"\n"}var G=n(74848);function T(e){const{t}=(0,f.B)(),[n,s]=(0,r.useState)(new Set),o=(0,r.useMemo)(()=>function(e){const t=[],n=[];for(const r of e){const e={...r,children:[]};for(;n.length>0&&n[n.length-1].level>=e.level;)n.pop();0===n.length?t.push(e):n[n.length-1].children.push(e),n.push(e)}return t}(e.items),[e.items]),c=(r,o)=>r.map(r=>{const a=r.children.length>0,l=n.has(r.pos),i=r.pos===e.active_pos;return(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{className:`md-outline-item md-outline-item--h${r.level}${i?" md-outline-item--active":""}`,style:{paddingLeft:.4+.75*o+"em"},title:r.text,onClick:()=>e.on_click(r),children:[(0,G.jsx)("i",{className:"material-icons md-outline-arrow"+(a?"":" md-outline-arrow--empty"),onClick:a?e=>{return t=r.pos,e.stopPropagation(),void s(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t}:void 0,children:a?l?"arrow_right":"arrow_drop_down":""}),(0,G.jsx)("span",{className:"md-outline-text",children:r.text||t("未命名标题")})]}),a&&!l&&c(r.children,o+1)]},r.pos)});return 0===e.items.length?(0,G.jsxs)("div",{className:"md-outline md-outline--empty",children:[(0,G.jsx)("div",{className:"md-outline-header",children:t("大纲")}),(0,G.jsx)("div",{className:"md-outline-tip",children:t("正文里还没有标题")})]}):(0,G.jsxs)("div",{className:"md-outline",children:[(0,G.jsx)("div",{className:"md-outline-header",children:t("大纲")}),(0,G.jsx)("div",{className:"md-outline-list",children:c(o,0)})]})}var I=n(19878);const P=new p.hs("md_source_highlight");let W=!1;function q(e){W=e}function V(e,t,n){let r=t;for(const t of e){if("string"==typeof t){r+=t.length;continue}const e=r;Array.isArray(t.children)&&(r=V(t.children,r,n)),t.scope&&n.push({from:e,to:r,cls:`hljs-${t.scope}`})}return r}function B(e,t){const n=e.textContent;if(!n)return[];let r;try{r=I.A.highlight(n,{language:"markdown",ignoreIllegals:!0})}catch{return[]}const s=[],o=r._emitter?.rootNode;o?.children&&V(o.children,0,s);const c=t+1,a=[];for(const e of s){const t=Math.min(e.from,n.length),r=Math.min(e.to,n.length);t>=r||a.push(g.NZ.inline(c+t,c+r,{class:e.cls}))}return a}function H(e){const t=[];return e.descendants((e,n)=>"code_block"!==e.type.name||(t.push(...B(e,n)),!1)),g.zF.create(e,t)}var K=n(38341),J=n(3772);function U(e,t){return new K.fV(e,(e,n,r,s)=>{const o=e.schema.marks[t],c=n[1];if(!o||!c)return null;const a=n[0].indexOf(c);if(a<0)return null;const l=r+a,i=l+c.length,u=e.tr;return u.delete(i,s),u.delete(r,l),u.addMark(r,r+c.length,o.create()),u.removeStoredMark(o),u})}function X(){const e=E;return(0,K.sM)({rules:[(0,K.JJ)(/^(#{1,6})\s$/,e.nodes.heading,e=>({level:e[1].length})),(0,K.JJ)(/^#([1-6])\s$/,e.nodes.heading,e=>({level:Number(e[1])})),(0,K.JJ)(/^```([\w-]*)\s$/,e.nodes.code_block,e=>({language:e[1]??""})),(0,K.tG)(/^\s*>\s$/,e.nodes.blockquote),(0,K.tG)(/^\s*([-+*])\s$/,e.nodes.bullet_list),(0,K.tG)(/^(\d+)\.\s$/,e.nodes.ordered_list,e=>({order:Number(e[1])})),U(/(?:\*\*)([^*]+)(?:\*\*)$/,"strong"),U(/(?:__)([^_]+)(?:__)$/,"strong"),U(/(?<![*])\*([^*]+)\*$/,"em"),U(/(?<![_])_([^_]+)_$/,"em"),U(/(?:~~)([^~]+)(?:~~)$/,"strike"),U(/(?:`)([^`]+)(?:`)$/,"code"),...K.Fr,K.gO]})}const Z=(e,t)=>{const{$from:n,empty:r}=e.selection;if(!r||"paragraph"!==n.parent.type.name)return!1;const s=n.parent.textContent;if(!s.trim())return!1;const o=function(e){const t=e.trim(),n=/^#([1-6])$/.exec(t);if(n)return{type:"heading",attrs:{level:Number(n[1])}};const r=/^(#{1,6})$/.exec(t);if(r)return{type:"heading",attrs:{level:r[1].length}};const s=/^```([\w-]*)$/.exec(t);return s?{type:"code_block",attrs:{language:s[1]??""}}:/^(?:-{3,}|\*{3,}|_{3,})$/.test(t.replace(/\s+/g,""))?{type:"horizontal_rule"}:/^>\s*$/.test(t)?{type:"blockquote"}:/^[-+*]\s*$/.test(t)?{type:"bullet_list"}:/^\d+[.)]?$/.test(t)?{type:"ordered_list"}:null}(s);if(!o)return!1;if("blockquote"===o.type&&n.depth>1)return!1;const c=e.schema.nodes[o.type];if(!c)return!1;const a=n.before(n.depth),l=n.after(n.depth);if(t){const n=e.tr,r=c.createAndFill(o.attrs)??c.create(o.attrs);n.replaceWith(a,l,r),n.scrollIntoView(),t(n)}return!0};function Y(e){return(t,n)=>{const r=t.schema.marks[e];return!!r&&(0,k.wh)(r)(t,n)}}function Q(e,t={}){return(n,r)=>{const s=n.schema.nodes[e];if(!s)return!1;const{$from:o,$to:c}=n.selection,a=o.blockRange(c);if(!a)return!1;const l=o.parent,i=l.type===s&&Object.entries(t).every(([e,t])=>l.attrs[e]===t),u=i?n.schema.nodes.paragraph:s,d=i?{}:t;return r&&r(n.tr.setBlockType(a.start,a.end,u,d)),!0}}const ee=(e,t)=>(0,J.Sd)(e.schema.nodes.bullet_list)(e,t),te=(e,t)=>(0,J.Sd)(e.schema.nodes.ordered_list)(e,t),ne=(e,t)=>{const{blockquote:n}=e.schema.nodes,{$from:r,$to:s}=e.selection,o=r.blockRange(s);if(!o)return!1;if(o.parent.type===n&&o.depth>0){const n=r.before(o.depth),s=e.tr.doc.nodeAt(n);if(s&&1===s.childCount)return t&&t(e.tr.replaceWith(n,n+s.nodeSize,s.child(0)).scrollIntoView()),!0;if(t){const n=e.tr,s=r.parent,c=r.after(o.depth);n.delete(o.start,o.end),n.insert(c,s),t(n.scrollIntoView())}return!0}return t&&t(e.tr.wrap(o,[{type:n}]).scrollIntoView()),!0},re={sink:(0,J.$B)(E.nodes.list_item),lift:(0,J.T2)(E.nodes.list_item),split:(0,J.wn)(E.nodes.list_item),wrap_bullet:ee,wrap_ordered:te};n(41631),n(50576),n(70432);function se(e){return 0===e?Q("paragraph"):Q("heading",{level:e})}function oe(e){return!(!e.ctrlKey&&!e.metaKey)}function ce(e,t){return(0,w.D8)(1)(e,t)}function ae(e){if(1!==e.childCount)return!1;const t=e.firstChild;return!!t&&"code_block"===t.type.name&&"markdown"===t.attrs.language}const le=r.forwardRef(function(e,t){const n=(0,r.useRef)(null),s=(0,r.useRef)(null),o=(0,r.useRef)(e.on_change),c=(0,r.useRef)(e.on_save),a=(0,r.useRef)(e.on_selection_change),l=(0,r.useRef)(e.on_source_mode_change);return(0,r.useEffect)(()=>{o.current=e.on_change,c.current=e.on_save,a.current=e.on_selection_change,l.current=e.on_source_mode_change}),(0,r.useEffect)(()=>{if(!n.current)return;const r=p.$t.create({doc:A(e.value??""),plugins:[(0,_.b6)(),new p.k_({key:P,state:{init:(e,t)=>g.zF.empty,apply:(e,t,n,r)=>W?e.docChanged?H(r.doc):P.getState(r)??g.zF.empty:g.zF.empty},props:{decorations(e){if(!W)return null;const t=P.getState(e);return t&&t.find().length?t:H(e.doc)}}}),X(),(0,v.w)({"Mod-z":_.tN,"Mod-y":_.ZS,"Mod-Shift-z":_.ZS,"Mod-b":Y("strong"),"Mod-i":Y("em"),"Mod-Shift-x":Y("strike"),"Mod-`":Y("code"),"Mod-1":(e,t)=>se(1)(e,t),"Mod-2":(e,t)=>se(2)(e,t),"Mod-3":(e,t)=>se(3)(e,t),"Mod-0":(e,t)=>se(0)(e,t),"Mod-Shift-8":ee,"Mod-Shift-9":te,"Mod-Shift-.":ne,Tab:re.sink,"Shift-Tab":re.lift,"Mod-Enter":ce,"Mod-s":()=>(c.current?.(),!0)}),(0,w.LF)({allowTableNodeSelection:!0}),(0,w.AL)(),(0,y.A)({color:"var(--primary, #1a73e8)",width:2}),(0,b.z)(),(0,v.w)({Enter:(0,k.st)(Z,k.pC,re.split,k.Z1,k.iz,k.aw),"Shift-Enter":(e,t)=>{const{hard_break:n}=e.schema.nodes;return t&&t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0},"Mod-Enter":k.I$}),(0,v.w)(k.RV)]}),i=new g.Lz(n.current,{state:r,editable:()=>!1!==e.editable,handleClickOn(e,t,n,r,s){if(!oe(s))return!1;const o=function(e){if(!(e instanceof Element))return null;const t=e.closest("a[href]"),n=t?.getAttribute("href");return n||null}(s.target)??function(e,t){const n=e.doc.content.size,r=Math.max(0,Math.min(t,n));let s;try{s=e.doc.resolve(r)}catch{return null}for(const t of[1,-1]){const s=1===t?r:r-1;if(!(s<0||s>=n))try{const t=e.doc.resolve(s).marks().find(e=>"link"===e.type.name);if(t?.attrs?.href)return t.attrs.href}catch{}}try{const e=s.parent.marks.find(e=>"link"===e.type.name);if(e?.attrs?.href)return e.attrs.href}catch{}return null}(e.state,t);return!!o&&(window.open(o,"_blank","noopener,noreferrer"),!0)},handleDOMEvents:{keydown:(e,t)=>{if(oe(t)&&e.dom.classList.add("md-ctrl-down"),ae(e.state.doc)&&"Enter"===t.key&&!t.ctrlKey&&!t.metaKey&&!t.altKey){t.preventDefault();const{from:n,to:r}=e.state.selection;return e.dispatch(e.state.tr.insertText("\n",n,r).scrollIntoView()),!0}return!1},keyup:(e,t)=>(oe(t)||e.dom.classList.remove("md-ctrl-down"),!1),blur:e=>(e.dom.classList.remove("md-ctrl-down"),!1),beforeinput:(e,t)=>{if(!ae(e.state.doc))return!1;const n=t;if("insertText"!==n.inputType)return!1;const r=n.data;if(null==r)return!1;n.preventDefault();const{from:s,to:o}=e.state.selection;return e.dispatch(e.state.tr.insertText(r.replace(/\r\n?/g,"\n"),s,o).scrollIntoView()),!0}},dispatchTransaction(e){const t=i.state.apply(e);i.updateState(t);const n=ae(t.doc);q(n),n?i.dom.classList.add("md-source-mode"):i.dom.classList.remove("md-source-mode"),n!==ae(e.before)&&l.current?.(n),e.docChanged&&o.current?.(n?t.doc.textContent:F(t.doc)),(e.selectionSet||e.docChanged)&&a.current?.()},attributes:{class:"md-wysiwyg-content",spellcheck:"false"}});if(s.current=i,e.initial_source_mode&&!ae(i.state.doc)){const e=F(i.state.doc),t=i.state.schema.nodes.code_block.create({language:"markdown"},e?i.state.schema.text(e):null),n=i.state.tr;n.replaceWith(0,i.state.doc.content.size,t),n.setMeta("addToHistory",!1),i.dispatch(n)}const u={get_markdown:()=>ae(i.state.doc)?i.state.doc.textContent:F(i.state.doc),set_markdown:e=>{const t=A(e);i.dispatch(i.state.tr.replaceWith(0,i.state.doc.content.size,t.content))},focus:()=>i.focus(),get_view:()=>s.current,in_table:()=>function(e){const{$from:t}=e.selection;for(let e=t.depth;e>0;e--){if("table"===t.node(e).type.name)return!0}return!1}(i.state),active_marks:()=>(i.state.storedMarks??i.state.selection.$from.marks()).map(e=>e.type.name),active_block:()=>{const{$from:e}=i.state.selection;for(let t=e.depth;t>0;t--){const n=e.node(t);if("heading"===n.type.name)return{name:"heading",level:n.attrs.level};if("paragraph"===n.type.name)return{name:"paragraph"}}return{name:"paragraph"}},insert_table:(e=3,t=3)=>{const n=function(e,t,n){const r=(0,w.e)(e),s=r.table,o=r.row,c=r.cell,a=r.header_cell??r.cell;if(!s||!o||!c)return null;const l=e=>o.create(null,Array.from({length:t},()=>e.createAndFill())),i=l(a),u=Array.from({length:n},()=>l(c));return s.create(null,[i,...u])}(i.state.schema,e,t);if(!n)return;const{from:r}=i.state.selection,s=i.state.doc.resolve(r);let o=r;for(let e=s.depth;e>0;e--)if("table"===s.node(e).type.name){o=s.after(e);break}const c=i.state.tr;o===r?c.replaceSelectionWith(n):c.insert(o,n),i.dispatch(c.scrollIntoView());const a=i.state.doc.resolve(Math.min(o+3,i.state.doc.content.size));try{i.dispatch(i.state.tr.setSelection(i.state.selection.constructor.near(a)))}catch{}},get_headings:()=>function(e){const t=[];return e.doc.descendants((e,n)=>("heading"!==e.type.name||t.push({level:e.attrs.level,text:e.textContent,pos:n}),!0)),t}(i.state),scroll_to_pos:e=>{const t=i.state.doc.content.size,n=Math.max(0,Math.min(e,t)),r=i.state.doc.nodeAt(n);let s;try{s=r?p.U3.near(i.state.doc.resolve(n+1),1):p.U3.near(i.state.doc.resolve(n),1)}catch{s=p.U3.near(i.state.doc.resolve(0),1)}i.dispatch(i.state.tr.setSelection(s).scrollIntoView()),i.focus()},is_source_mode:()=>ae(i.state.doc),enter_source_mode:()=>{if(ae(i.state.doc))return;const e=F(i.state.doc),t=i.state.schema.nodes.code_block.create({language:"markdown"},e?i.state.schema.text(e):null),n=i.state.tr;n.replaceWith(0,i.state.doc.content.size,t),q(!0),i.dispatch(n),i.dom.classList.add("md-source-mode")},exit_source_mode:()=>{if(!ae(i.state.doc))return;const e=A(i.state.doc.textContent),t=i.state.tr;t.replaceWith(0,i.state.doc.content.size,e.content),q(!1),i.dispatch(t),i.dom.classList.remove("md-source-mode")}};return"function"==typeof t?t(u):t&&(t.current=u),e.on_ready?.(u),()=>{i.destroy(),s.current=null}},[]),(0,G.jsx)("div",{className:"md-wysiwyg",ref:n})});function ie(e){const{t}=(0,f.B)(),n=(0,r.useRef)(null),[s,o]=(0,r.useState)({marks:[],block:{name:"paragraph"}}),[c,a]=(0,r.useState)(null),l=(0,r.useCallback)(()=>{const t=e.get_view();if(!t)return;const n=t.state.selection,r=t.state.storedMarks??n.$from.marks();if(o({marks:r.map(e=>e.type.name),block:ue(n.$from)}),n.empty)return void a(null);const s=t.coordsAtPos(n.from),c=t.coordsAtPos(n.to),l=(Math.min(s.left,c.left)+Math.max(s.right,c.right))/2,i=Math.min(s.top,c.top),u=Math.max(s.bottom,c.bottom);a({top:i,bottom:u,left:l})},[e.get_view]);(0,r.useEffect)(()=>{l();const t=e.get_view();if(!t)return;const n=()=>l();t.dom.addEventListener("keyup",n),t.dom.addEventListener("mouseup",n),document.addEventListener("selectionchange",n);const r=t.dom.closest(".md-editor-context");return r?.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n),()=>{t.dom.removeEventListener("keyup",n),t.dom.removeEventListener("mouseup",n),document.removeEventListener("selectionchange",n),r?.removeEventListener("scroll",n),window.removeEventListener("resize",n)}},[l,e.get_view,e.refresh_key]);const i=t=>{const n=e.get_view();n&&(t(n.state,n.dispatch),n.focus(),l())},u=e=>s.marks.includes(e),d=e=>"heading"===s.block.name&&s.block.level===e,[m,h]=(0,r.useState)({w:0,h:36});if((0,r.useLayoutEffect)(()=>{if(!c||!n.current)return;const e=n.current.offsetWidth,t=n.current.offsetHeight;h(n=>n.w===e&&n.h===t?n:{w:e,h:t})},[c,e.refresh_key]),!c)return null;const p=(e,n,r,s,o=!1)=>(0,G.jsx)("button",{className:"mdtb__btn"+(o?" mdtb__btn--on":""),title:t(r),onMouseDown:e=>e.preventDefault(),onClick:s,children:n},e),g=m.w/2,_=g+4,v=Math.max(_,window.innerWidth-g-4),k=document.querySelector(".header")?.getBoundingClientRect().bottom??0,y=c.top-m.h-8,b=y<k+4,w={top:b?Math.min(c.bottom+8,window.innerHeight-m.h-4):y,left:Math.min(v,Math.max(_,c.left))};return(0,G.jsxs)("div",{className:"mdtb mdtb--floating"+(b?" mdtb--below":""),ref:n,style:w,children:[p("h1","H1","一级标题",()=>i(Q("heading",{level:1})),d(1)),p("h2","H2","二级标题",()=>i(Q("heading",{level:2})),d(2)),p("h3","H3","三级标题",()=>i(Q("heading",{level:3})),d(3)),(0,G.jsx)("span",{className:"mdtb__sep"}),p("b","B","加粗",()=>i(Y("strong")),u("strong")),p("i","I","斜体",()=>i(Y("em")),u("em")),p("s","S","删除线",()=>i(Y("strike")),u("strike")),p("code","</>","行内代码",()=>i(Y("code")),u("code")),(0,G.jsx)("span",{className:"mdtb__sep"}),p("ul","≔","无序列表",()=>i(ee)),p("ol","1.","有序列表",()=>i(te)),p("quote","❝","引用",()=>i(ne))]})}function ue(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.name;if("heading"===n)return{name:"heading",level:e.node(t).attrs.level};if("paragraph"===n)return{name:"paragraph"}}return{name:"paragraph"}}var de=n(75725);const me="cut",he="copy",fe="paste",pe="strong",ge="em",_e="strike",ve="code",ke="h1",ye="h2",be="h3",we="paragraph",xe="bullet",Me="ordered",$e="quote",Se="code_block",je="clean",Ee="row_before",Ce="row_after",Ae="row_delete",De="col_before",Oe="col_after",Ne="col_delete",Le="header_toggle",ze="cell_merge",Re="cell_split",Fe="table_delete",Ge="table_insert",Te="select_all";function Ie(e){const{t}=(0,f.B)(),[n,s]=(0,r.useState)(null),o=(0,r.useRef)(e.get_view);o.current=e.get_view,(0,r.useEffect)(()=>{const e=e=>{const t=o.current();if(!t)return;const n=e.target;if(!n||!n.closest(".md-wysiwyg-content"))return;e.preventDefault();const r=t.posAtCoords({left:e.clientX,top:e.clientY});if(r){const e=t.state.selection;if(r.pos<e.from||r.pos>e.to){const{TextSelection:e}=t.state.selection.constructor;try{t.dispatch(t.state.tr.setSelection(e.near(t.state.doc.resolve(r.pos))))}catch{}}}const c=!!n.closest("td, th");s({x:e.clientX,y:e.clientY,in_table:c||(0,w.aH)(t.state)})};return document.addEventListener("contextmenu",e,!0),()=>document.removeEventListener("contextmenu",e,!0)},[]);const c=()=>s(null),a=(0,r.useCallback)(e=>{const t=o.current();t&&(e(t.state,t.dispatch),t.focus(),c())},[]),l=e=>{const t=o.current();t?.focus(),document.execCommand(e),c()};if(!n)return null;const i=n.in_table?[{r:t("上方插入行"),v:Ee},{r:t("下方插入行"),v:Ce},{r:t("左侧插入列"),v:De},{r:t("右侧插入列"),v:Oe},{r:t("删除行"),v:Ae},{r:t("删除列"),v:Ne},{r:t("切换表头行"),v:Le},{r:t("合并单元格"),v:ze},{r:t("拆分单元格"),v:Re},{r:t("删除表格"),v:Fe}]:[],u=[{r:t("剪切"),v:me},{r:t("复制"),v:he},{r:t("粘贴"),v:fe},{r:t("格式"),v:"format",items:[{r:t("加粗"),v:pe},{r:t("斜体"),v:ge},{r:t("删除线"),v:_e},{r:t("行内代码"),v:ve}]},{r:t("段落"),v:"block",items:[{r:t("一级标题"),v:ke},{r:t("二级标题"),v:ye},{r:t("三级标题"),v:be},{r:t("正文"),v:we}]},{r:t("插入"),v:"insert",items:[{r:t("无序列表"),v:xe},{r:t("有序列表"),v:Me},{r:t("引用"),v:$e},{r:t("代码块"),v:Se},{r:t("插入表格"),v:Ge}]},...i.length?[{r:t("表格"),v:"table",items:i}]:[],{r:t("清除格式"),v:je},{r:t("全选"),v:Te}];return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(de.rY,{click:c}),(0,G.jsx)(de.Pu,{x:n.x,y:n.y,items:u,click:t=>{switch(t){case me:return l("cut");case he:return l("copy");case fe:return l("paste");case pe:return a(Y("strong"));case ge:return a(Y("em"));case _e:return a(Y("strike"));case ve:return a(Y("code"));case ke:return a(Q("heading",{level:1}));case ye:return a(Q("heading",{level:2}));case be:return a(Q("heading",{level:3}));case we:return a(Q("paragraph"));case xe:return a(ee);case Me:return a(te);case $e:return a(ne);case Se:return a(Q("code_block"));case Ge:return c(),void e.on_insert_table?.();case Ee:return a(w.JD);case Ce:return a(w.gC);case De:return a(w.RC);case Oe:return a(w.GU);case Ae:return a(w.aR);case Ne:return a(w.gR);case Le:return a(w.uC);case ze:return a(w.w7);case Re:return a(w.L0);case Fe:return a(w.kG);case je:return a((e,t)=>{const{from:n,to:r}=e.selection;let s=e.tr;return e.doc.nodesBetween(n,r,(e,t)=>{if(e.isText)for(const n of e.marks)s=s.removeMark(t,t+e.nodeSize,n.type)}),t?.(s),!0});case Te:return a((e,t)=>{const{TextSelection:n}=e.selection.constructor;return t?.(e.tr.setSelection(n.create(e.doc,0,e.doc.content.size))),!0})}}})]})}function Pe(e){const t=[];if(!e)return t;const n=e.split(/(\n)/);let r=null,s=0;for(let e=0;e<n.length;e+=2){const o=n[e],c=s;s+=o.length+(n[e+1]?.length??0);const a=o.endsWith("\r")?o.slice(0,-1):o,l=a.trimStart(),i=/^(`{3,}|~{3,})/.exec(l);if(i){const e=i[1][0];null===r?r=e:r===e&&(r=null);continue}if(null!==r)continue;const u=/^ {0,3}(#{1,6})\s+(.*)$/.exec(a);if(!u)continue;const d=u[1].length,m=u[2].replace(/\s+#+\s*$/,"").trim();t.push({level:d,text:m,pos:c})}return t}var We=n(69918),qe=n(2543),Ve=n(86090),Be=n(87361);function He(){const{t:e}=(0,f.B)(),t=(0,Ve.Zp)(),{check_user_auth:n}=(0,c.MH)(),p=n(a.oV.md_editor_setting),[g,_]=(0,s.fp)(o.AG.md_editor),[v,k]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),[w,x]=(0,r.useState)(!1),[M,$]=(0,r.useState)(0),S=(0,r.useRef)(null),[j,E]=(0,r.useState)([]),[C,A]=(0,r.useState)(-1),[D,O]=(0,r.useState)(15),[N,L]=(0,r.useState)(!1),z=(0,r.useRef)(null),R=(0,r.useRef)(null),[F,I]=(0,s.fp)(o.AG.md_editor_show_outline),[P,W]=(0,s.fp)(o.AG.md_editor_mode),q=(0,r.useCallback)(()=>{const e="wysiwyg"===P?"source":"wysiwyg",t=S.current;t&&("source"===e?t.enter_source_mode():t.exit_source_mode(),W(e))},[P]),[V,B]=(0,r.useState)(We.FG),H=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!1;return(0,We.gC)().then(t=>{e||B(t)}),()=>{e=!0}},[]),(0,r.useEffect)(()=>{(0,We.Ce)(H.current,V)},[V]);const K=(0,r.useRef)([]),J=(0,r.useCallback)(()=>{const e=S.current;if(!e)return;const t=e.is_source_mode()?Pe(e.get_markdown()):e.get_headings();K.current=t,E(t)},[]),U=(0,r.useCallback)(()=>{const e=S.current,t=e?.get_view();if(!e||!t)return;const n=e.is_source_mode()?t.state.selection.from-1:t.state.selection.from;let r=-1;for(const e of K.current){if(!(e.pos<=n))break;r=e.pos}A(r)},[]);(0,r.useEffect)(()=>{let t=!1;if(g?.url)return x(!1),b(!0),h.l.get(g.url).then(e=>{if(t)return;k(e??"")}).catch(()=>{t||((0,u.zN)(e("打开失败")),k(""))}).finally(()=>{t||b(!1)}),()=>{t=!0};k(null)},[g?.url]),(0,r.useEffect)(()=>{const e=()=>$(e=>e+1);return document.addEventListener("selectionchange",e),()=>document.removeEventListener("selectionchange",e)},[]);const X=(0,r.useRef)(q);X.current=q,(0,r.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"/"===e.key&&(e.preventDefault(),e.stopPropagation(),X.current())};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[]),(0,r.useEffect)(()=>{J(),U()},[M,P,J,U]);const Z=(0,r.useCallback)(qe.throttle(e=>{if(!z.current||!R.current)return;const t=parseFloat(getComputedStyle(z.current).fontSize),n=e.clientX/t,r=window.innerWidth/t-4,s=2.25+R.current.offsetWidth/t;n<=r&&n>=s&&O(parseFloat(n.toFixed(2)))},32),[]),Y=()=>{L(!1),z.current?.removeEventListener("pointermove",Z)},Q=async()=>{if(!g?.name||!g?.path)return;const t=S.current?.get_markdown();if(void 0===t)return;const n=g.path.slice(0,g.path.length-g.name.length),r=`${encodeURIComponent(n)}${g.name}`;(await m.$M.post(`save/${r}`,{context:t})).code===d.m.Success?(x(!1),(0,u.SK)(e("保存成功"))):(0,u.zN)(e("保存失败"))},ee=(0,r.useRef)(Q);ee.current=Q;const te=()=>{_({}),x(!1),k(null),S.current=null,g?.close?.()},ne=(0,r.useMemo)(()=>g?.url??"md_editor",[g?.url]);return g?.name?(0,G.jsxs)("div",{id:"md-editor-container",ref:H,children:[(0,G.jsx)(i.A,{ignore_tags:!0,left_children:[(0,G.jsx)(l.rA,{title:e("关闭"),icon:"close",onClick:te},1),(0,G.jsx)("div",{className:"md-editor-title",children:g.name},3),...w?[(0,G.jsx)(l.rA,{title:e("保存"),icon:"save",onClick:Q},2)]:[],(0,G.jsx)(l.rA,{title:e("大纲"),icon:"list",onClick:()=>I(e=>!e),selected:F},4),(0,G.jsx)(l.rA,{title:e("wysiwyg"===P?"源码模式":"实时编辑模式"),icon:"wysiwyg"===P?"code":"edit",onClick:q},5),...p?[(0,G.jsx)(l.rA,{title:e("编辑器设置"),icon:"settings",onClick:()=>{te(),t(Be.o.md_editor_setting_page)}},6)]:[]]}),(0,G.jsxs)("div",{className:"md-editor-context",ref:z,children:[y&&(0,G.jsxs)("div",{className:"common-box common-box-center",children:[e("加载中"),"..."]}),!y&&null!==v&&(0,G.jsxs)(r.Fragment,{children:[F&&(0,G.jsx)("div",{className:"md-outline-panel",style:{width:`${D}em`},children:(0,G.jsx)(T,{items:j,active_pos:C,on_click:e=>{const t=S.current;t&&(t.scroll_to_pos(t.is_source_mode()?e.pos+1:e.pos),A(e.pos))}})}),F&&(0,G.jsx)("div",{className:"md-editor-divider",ref:R,onPointerDown:()=>{L(!0),z.current?.addEventListener("pointermove",Z)},onPointerUp:Y}),N&&(0,G.jsx)("div",{className:"md-editor-drag-overlay",onPointerUp:Y}),(0,G.jsx)("div",{className:"md-editor-scroll",children:(0,G.jsxs)("div",{className:"md-editor-sheet",children:["wysiwyg"===P&&(0,G.jsx)(ie,{get_view:()=>S.current?.get_view()??null,refresh_key:M}),(0,G.jsx)(le,{value:v,ref:S,initial_source_mode:"source"===P,on_ready:e=>{const t=e.is_source_mode()?Pe(e.get_markdown()):e.get_headings();K.current=t,E(t),A(-1)},on_change:()=>{w||x(!0)},on_save:()=>ee.current(),on_selection_change:()=>$(e=>e+1),on_source_mode_change:e=>{W(e?"source":"wysiwyg"),$(e=>e+1)}},ne),"wysiwyg"===P&&(0,G.jsx)(Ie,{get_view:()=>S.current?.get_view()??null,on_insert_table:()=>{S.current?.insert_table(3,3),x(!0)}})]})})]})]})]}):null}},69918(e,t,n){n.d(t,{Ce:()=>l,FG:()=>r.FG,fy:()=>a,gC:()=>c});var r=n(18840),s=n(14284),o=n(53459);async function c(){try{const e=await s.XO.get("md_editor_setting/get");return{...r.FG,...e?.data??{}}}catch(e){return{...r.FG}}}async function a(e){const t=await s.XO.post("md_editor_setting/save",e);return t?.code!==o.m.Success?null:{...r.FG,...t.data??e}}function l(e,t){e&&(e.style.setProperty("--md-editor-max-width",t.content_max_width),e.style.setProperty("--md-editor-padding",t.content_padding),e.style.setProperty("--md-editor-font-size",t.font_size),e.style.setProperty("--md-editor-line-height",t.line_height))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[7759],{45601(A,e,s){"use strict";s.r(e),s.d(e,{default:()=>G});var a=s(96540),t=s(86149),c=s(34843),d=s(82893),l=s(14944),r=s(92275),o=s(14284),Y=s(53459),i=s(61443),n=s(85997),p=s(83029),B=s(4412),j=(s(82341),s(7003)),h=s(18257),S=s.n(h),u=s(76559),f=s(62042),m=s(74777),x=s(78247),y=s(23430),z=s(74848);let N;function G(){const{t:A}=(0,t.B)(),[e,s]=(0,a.useState)(void 0),[h,G]=(0,a.useState)(!1),[P,k]=(0,c.fp)(d.AG.user_base_info),{check_user_auth:g}=(0,x.MH)(),H=(0,a.useRef)(null),w=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{N&&(N.pause(),N.unload(),N.detachMediaElement(),N.destroy(),N=null),w.current&&w.current.dispose()},[]);const L=s=>{G(!0),(async e=>{P.sysSoftWare&&P.sysSoftWare[m.jk.ffmpeg]&&P.sysSoftWare[m.jk.ffmpeg].installed?(w.current=(0,j.default)(H.current,{controls:!0,width:640,height:360}),S().isSupported()?(N=S().createPlayer({type:"flv",url:u.I.getOtherWebSocketUrl(r.HK.rtsp_get,{url:e}),isLive:!0}),N.attachMediaElement(H.current),N.load(),N.load()):(0,f.zN)("FLV.js is not supported in this browser.")):(0,f.zN)(A("找不到ffmpeg"))})(s.address?s.address:e)};return(0,z.jsxs)("div",{children:[(0,z.jsxs)(B.aZ,{position:"right",children:[(0,z.jsx)(i.$Z,{max_width:"40rem",placeholder:A(" rtsp://username:password@ip:port/path"),icon:"link",value:e,handleInputChange:A=>s(A)}),!h&&(0,z.jsx)(n.rA,{icon:"play_arrow",title:A("连接"),onClick:L}),h&&(0,z.jsx)(n.rA,{icon:"close",title:A("关闭"),onClick:async()=>{await l.ws.sendData(r.HK.rdp_disconnect,""),G(!1)}})]}),!h&&(0,z.jsx)(p.N,{have_auth_edit:g(y.oV.rtsp_proxy_tag_update),getItems:async()=>{const A=await o.K4.get("tag");return A.code===Y.m.Success?A.data:[]},save:async A=>{(await o.K4.post("tag/save",A)).code!==Y.m.Success&&(0,f.zN)("网络错误")},clickItem:async A=>{s(A.address),L(A)},items:[{key:"name",preName:A("名字")},{key:"address",preName:A("地址")},{key:"color",preName:"color"}]}),(0,z.jsx)("canvas",{id:"rdpwebview",style:{display:"none"}}),(0,z.jsx)("div",{style:{display:h?"block":"none"},children:(0,z.jsx)("video",{ref:H,className:"video-js vjs-default-skin"})})]})}},17422(A){"use strict";A.exports="data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA=="},80542(){}}]);
|