filecat 7.20.3 → 7.20.5
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/1075.a66622a70df1bcd13a89.js +1 -0
- package/build/dist/2502.4a025e24ceade6fe41d2.js +1 -0
- package/build/dist/2547.28a16c28ac9b495eb6fc.js +1 -0
- package/build/dist/259.2f0b515789aa2fb65252.js +1 -0
- package/build/dist/3233.5bac109689ecf4c1ccc8.js +1 -0
- package/build/dist/3355.70ffd73778049aa73d5c.js +1 -0
- package/build/dist/4598.6528d76c619352e7e1f3.js +1 -0
- package/build/dist/47.0ad0f7d1c95e6691b317.js +1 -0
- package/build/dist/5308.51a175063674cef5204b.js +1 -0
- package/build/dist/5516.ec994992f1f4d984a2ef.js +1 -0
- package/build/dist/5614.5bac109689ecf4c1ccc8.js +1 -0
- package/build/dist/5744.8835dfca47ba8fd6a4ee.js +1 -0
- package/build/dist/5877.9357de8c7bfa1e867433.js +1 -0
- package/build/dist/6097.98ee6ec678fafcc2c2ba.js +1 -0
- package/build/dist/{6247.2107de45136743691108.js → 6247.3fcb34a00b0a6e794a64.js} +1 -1
- package/build/dist/6805.a170dcf16711028eeaf6.js +1 -0
- package/build/dist/7678.5769d70f52981f9434d1.js +1 -0
- package/build/dist/7759.29b6c76757c4ffe68d0d.js +1 -0
- package/build/dist/8358.4b4c4b118ffa1a5f91b3.js +1 -0
- package/build/dist/8649.72e48164e0d4db52953e.js +1 -0
- package/build/dist/9260.72cae497ae765cc00d54.js +1 -0
- package/build/dist/9299.f479d5910b8f407d8612.js +1 -0
- package/build/dist/9546.04f3a4ea46ac463127d3.js +1 -0
- package/build/dist/9765.2f0daa101ea2bc02379a.js +1 -0
- package/build/dist/9857.6968374f24ae85a0d527.js +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.c4d3291d3c0417bd51b5.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/shell/config/webpack.web.config.js +3 -0
- package/build/dist/1075.f34567d9a6631935577b.js +0 -1
- package/build/dist/2502.a3a043ad2fd7abc45899.js +0 -1
- package/build/dist/2547.a3ebdfe9fb7f9f108b42.js +0 -1
- package/build/dist/259.72511a467d539553798e.js +0 -1
- package/build/dist/3233.43bdd7c12ca829d56116.js +0 -1
- package/build/dist/5308.7b9f32f5b110b7b30f98.js +0 -1
- package/build/dist/5516.30abe1f0cae2352028c1.js +0 -1
- package/build/dist/5614.43bdd7c12ca829d56116.js +0 -1
- package/build/dist/5744.236bce5b3b9188b4927f.js +0 -1
- package/build/dist/5877.c6dfb55a572d57720f67.js +0 -1
- package/build/dist/6805.0b520886329433755a49.js +0 -1
- package/build/dist/7759.7cd3fe8e5d37df25804c.js +0 -1
- package/build/dist/8358.733904ad1949e2b279d2.js +0 -1
- package/build/dist/8649.f60681e4a95470753360.js +0 -1
- package/build/dist/9299.b7c5cf19d416a6a020b8.js +0 -1
- package/build/dist/9546.daf11613208aa3723c43.js +0 -1
- package/build/dist/9857.f84b299465579d7dd3ce.js +0 -1
- package/build/dist/main.962cd9c07f68fe36c533.js +0 -2
- /package/build/dist/{main.962cd9c07f68fe36c533.js.LICENSE.txt → main.c4d3291d3c0417bd51b5.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -38,6 +38,9 @@ module.exports = {
|
|
|
38
38
|
// path: path.resolve(__dirname, '..','..','dist'),
|
|
39
39
|
// filename: 'bundle.js',
|
|
40
40
|
filename: '[name].[contenthash].js', // 使用 contenthash 进行文件名哈希 下次更新代码 浏览器缓存也会更新
|
|
41
|
+
// 按需加载的 chunk 同样输出到 dist 根目录:后端静态资源是按 basename 找文件的
|
|
42
|
+
chunkFilename: '[name].[contenthash].js',
|
|
43
|
+
publicPath: '/', // 固定为根路径,避免嵌套路由下自动推导出错
|
|
41
44
|
path: path.resolve(__dirname, '..', "..", 'build', 'dist'),
|
|
42
45
|
},
|
|
43
46
|
module: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1075,4877],{69918(t,e,n){n.d(e,{Ce:()=>i,FG:()=>r.FG,fy:()=>c,gC:()=>a});var r=n(18840),o=n(14284),s=n(53459);async function a(){try{const t=await o.XO.get("md_editor_setting/get");return{...r.FG,...t?.data??{}}}catch(t){return{...r.FG}}}async function c(t){const e=await o.XO.post("md_editor_setting/save",t);return e?.code!==s.m.Success?null:{...r.FG,...e.data??t}}function i(t,e){t&&(t.style.setProperty("--md-editor-max-width",e.content_max_width),t.style.setProperty("--md-editor-padding",e.content_padding),t.style.setProperty("--md-editor-font-size",e.font_size),t.style.setProperty("--md-editor-line-height",e.line_height))}},64877(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(96540),o=n(22022),s=n(74848);function a(t){const{t:e}=(0,o.Bd)(),[n,a]=(0,r.useState)(new Set),c=(0,r.useMemo)(()=>function(t){const e=[],n=[];for(const r of t){const t={...r,children:[]};for(;n.length>0&&n[n.length-1].level>=t.level;)n.pop();0===n.length?e.push(t):n[n.length-1].children.push(t),n.push(t)}return e}(t.items),[t.items]),i=(r,o)=>r.map(r=>{const c=r.children.length>0,l=n.has(r.pos),d=r.pos===t.active_pos;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:`md-outline-item md-outline-item--h${r.level}${d?" md-outline-item--active":""}`,style:{paddingLeft:.4+.75*o+"em"},title:r.text,onClick:()=>t.on_click(r),children:[(0,s.jsx)("i",{className:"material-icons md-outline-arrow"+(c?"":" md-outline-arrow--empty"),onClick:c?t=>{return e=r.pos,t.stopPropagation(),void a(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});var e}:void 0,children:c?l?"arrow_right":"arrow_drop_down":""}),(0,s.jsx)("span",{className:"md-outline-text",children:r.text||e("未命名标题")})]}),c&&!l&&i(r.children,o+1)]},r.pos)});return 0===t.items.length?(0,s.jsx)("div",{className:"md-outline md-outline--empty",children:(0,s.jsx)("div",{className:"md-outline-tip",children:e("no_head")})}):(0,s.jsx)("div",{className:"md-outline",children:(0,s.jsx)("div",{className:"md-outline-list",children:i(c,0)})})}},76118(t,e,n){n.d(e,{A:()=>mt});var r=n(96540),o=n(22022),s=n(34843),a=n(82893),c=n(42845),i=n(1575),l=n(58903),d=n(89781),u=n(61396),h=n(46762),m=n(73337),p=n(89552),f=n(86059),g=n(5091),_=n(23802),b=n(41105),k=n(99724);const v=new _.A({html:!0,linkify:!0,breaks:!1,typographer:!1});function y(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}v.renderer.rules.html_block=(t,e)=>`<div data-html-block="${(0,b.pC)(t[e].content)}"></div>`,v.renderer.rules.html_inline=(t,e)=>`<span data-html-inline="${(0,b.pC)(t[e].content)}"></span>`,v.renderer.rules.fence=(t,e)=>{const n=t[e],r=n.info?n.info.trim().split(/\s+/)[0]:"",o=n.content.replace(/\n$/,""),s=v.utils.escapeHtml(o),a=r?` class="language-${y(r)}"`:"";return`<pre${r?` data-language="${y(r)}"`:""}><code${a}>${s}</code></pre>\n`},v.inline.ruler.before("escape","math_inline",function(t,e){const n=t.pos,r=t.src,o=[{open:"\\(",close:"\\)"},{open:"$",close:"$"}];if(r.startsWith("$$",n))return!1;for(const s of o){if(!r.startsWith(s.open,n))continue;const o=n+s.open.length,a=r.indexOf(s.close,o);if(a<0)continue;const c=r.slice(o,a);if(c.trim()){if("$"===s.open){const t=r[a+1];if(void 0!==t&&/\d/.test(t))continue}if(!e){const e=t.push("math_inline","span",0);e.content=c,e.markup=s.open,e.meta={raw:r.slice(n,a+s.close.length)}}return t.pos=a+s.close.length,!0}}return!1}),v.block.ruler.before("fence","math_block",function(t,e,n,r){const o=t.bMarks[e]+t.tShift[e],s=t.eMarks[e],a=t.src.slice(o,s).trim(),c=[{open:"\\[",close:"\\]"},{open:"$$",close:"$$"}];for(const s of c){if(!a.startsWith(s.open))continue;if(a.endsWith(s.close)&&a.length>s.open.length+s.close.length){if(r)return!0;const n=a.slice(s.open.length,a.length-s.close.length),o=t.push("math_block","div",0);return o.content=n,o.markup=s.open,o.meta={raw:a},o.map=[e,e+1],t.line=e+1,!0}const c=a.slice(s.open.length);for(let a=e+1;a<n;a++){const n=t.bMarks[a]+t.tShift[a],i=t.eMarks[a],l=t.src.slice(n,i);if(!l.trimEnd().endsWith(s.close))continue;if(r)return!0;const d=[c,...t.getLines(e+1,a,t.tShift[e],!1).split("\n")].filter((t,e)=>!(0===e&&!t.trim())),u=l.trimEnd().slice(0,-s.close.length);d.push(u);const h=t.push("math_block","div",0);return h.content=d.join("\n").trim(),h.markup=s.open,h.map=[e,a+1],h.meta={raw:t.src.slice(o,t.eMarks[a]).trimEnd()},t.line=a+1,!0}}return!1},{alt:["paragraph","reference","blockquote","list"]}),v.renderer.rules.math_inline=(t,e)=>`<span data-math-inline="${(0,b.pC)(t[e].meta.raw)}"></span>`,v.renderer.rules.math_block=(t,e)=>`<div data-math-block="${(0,b.pC)(t[e].meta.raw)}"></div>`;const w=v.renderer.rules.fence;function $(t){const e=v.render(t??""),n=(new DOMParser).parseFromString(e,"text/html");return l.S4.fromSchema(g.Y).parse(n.body)}function M(t){let e="";return t.forEach(t=>{if(t.isText){let n=t.marks.some(t=>"code"===t.type.name)?t.text??"":function(t){return t.replace(/([\\`*_<>])/g,"\\$1")}(t.text??"");for(const e of t.marks)switch(e.type.name){case"code":n=`\`${t.text??""}\``;break;case"strong":n=`**${n}**`;break;case"em":n=`*${n}*`;break;case"strike":n=`~~${n}~~`;break;case"link":n=`[${n}](${e.attrs.href}${e.attrs.title?` "${e.attrs.title}"`:""})`}e+=n}else if("image"===t.type.name){const{src:n,alt:r,title:o}=t.attrs;e+=``}else"hard_break"===t.type.name?e+=" \n":"html_inline"===t.type.name?e+=t.attrs.value:"math_inline"===t.type.name&&(e+=t.attrs.raw)}),e}function x(t){const e=[];if(t.forEach(t=>{const n=[],r=[];t.forEach(t=>{var e;n.push((e=t.textContent,e.replace(/\|/g,"\\|").replace(/\n/g," ")).trim()),r.push("table_header"===t.type.name)}),e.push({cells:n,header_flags:r})}),0===e.length)return"";const n=Math.max(...e.map(t=>t.cells.length)),r=e[0].header_flags.some(t=>t),o=Array.from({length:n},(t,n)=>Math.max(3,...e.map(t=>A(t.cells[n]??"")))),s=t=>`| ${Array.from({length:n},(e,n)=>{return r=t[n]??"",s=o[n],r+" ".repeat(Math.max(0,s-A(r)));var r,s}).join(" | ")} |`,a=[];if(r){a.push(s(e[0].cells)),a.push(`| ${o.map(t=>"-".repeat(t)).join(" | ")} |`);for(let t=1;t<e.length;t++)a.push(s(e[t].cells))}else{a.push(s(new Array(n).fill(""))),a.push(`| ${o.map(t=>"-".repeat(t)).join(" | ")} |`);for(const t of e)a.push(s(t.cells))}return a.join("\n")}function A(t){let e=0;for(const n of t){const t=n.codePointAt(0)??0;e+=t>=4352&&t<=4447||t>=11904&&t<=42191||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510?2:1}return e}function E(t,e=""){switch(t.type.name){case"paragraph":default:return e+M(t);case"heading":return`${e}${"#".repeat(t.attrs.level)} ${M(t)}`;case"blockquote":return O(t,"").split("\n").map(t=>`${e}> ${t}`).join("\n");case"code_block":{const n=t.attrs.language??"",r=t.textContent;let o=3;for(const t of r.match(/`+/g)??[])o=Math.max(o,t.length+1);const s="`".repeat(o),a=r.split("\n").map(t=>e+t).join("\n");return`${e}${s}${n}\n${a}\n${e}${s}`}case"horizontal_rule":return`${e}---`;case"html_block":return t.attrs.value.replace(/\n+$/,"").split("\n").map(t=>e+t).join("\n");case"math_block":return t.attrs.raw.replace(/\n+$/,"").split("\n").map(t=>e+t).join("\n");case"bullet_list":{const n=[];return t.forEach((t,r,o)=>{n.push(S(t,e,`${e}- `,`${e} `,o))}),n.join("\n")}case"ordered_list":{const n=[],r=t.attrs.order??1;return t.forEach((t,o,s)=>{n.push(S(t,e,`${e}${r+s}. `,`${e} `,s))}),n.join("\n")}case"table":return x(t).split("\n").map(t=>e+t).join("\n")}}function S(t,e,n,r,o){const s=t.attrs.checked,a=null===s?"":s?"[x] ":"[ ] ",c=[];t.forEach((t,e,n)=>{c.push(E(t,0===n?"":r))});const i=c.join("\n").split("\n");return n+a+i[0]+(i.length>1?"\n"+i.slice(1).join("\n"):"")}function O(t,e=""){const n=[];return t.forEach(t=>{n.push(E(t,e))}),n.join("\n\n")}function D(t){return O(t).trim()+"\n"}function C(t){const e=[];if(t.content.forEach(t=>e.push(t)),1===e.length&&"code_block"===e[0].type.name&&"markdown"===e[0].attrs.language)return e[0].textContent;const n=t.openStart??0,r=t.openEnd??0;return 1===e.length&&1===n&&1===r?N(t.content):O(t.content)}function N(t){const e=[];t.forEach(t=>{["ordered_list","bullet_list","list_item","blockquote"].includes(t.type.name)?e.push(N(t)):e.push(E(t,""))});const n=t.type&&("ordered_list"===t.type.name||"bullet_list"===t.type.name);return e.join(n?"\n":"\n\n")}v.renderer.rules.fence=(t,e,n,r,o)=>{const s=t[e],a=s.info.trim().toLowerCase();return(0,k.lG)(a)?`<div data-math-block="${(0,b.pC)(`$$\n${s.content.trim()}\n$$`)}"></div>`:w(t,e,n,r,o)};n(64877);var L=n(19878);const z=new c.hs("md_source_highlight");function j(t,e,n){let r=e;for(const e of t){if("string"==typeof e){r+=e.length;continue}const t=r;Array.isArray(e.children)&&(r=j(e.children,r,n)),e.scope&&n.push({from:t,to:r,cls:`hljs-${e.scope}`})}return r}function T(t,e){const n=t.textContent;if(!n)return[];const r=t.attrs.language??"";if(!r||!L.A.getLanguage(r))return[];let o;try{o=L.A.highlight(n,{language:r,ignoreIllegals:!0})}catch{return[]}const s=[],a=o._emitter?.rootNode;a?.children&&j(a.children,0,s);const c=e+1,l=[];for(const t of s){const e=Math.min(t.from,n.length),r=Math.min(t.to,n.length);e>=r||l.push(i.NZ.inline(c+e,c+r,{class:t.cls}))}return l}function R(){return new c.k_({key:z,props:{decorations(t){const e=function(t){const e=[];return t.descendants((t,n)=>"code_block"!==t.type.name||(e.push(...T(t,n)),!1)),i.zF.create(t,e)}(t.doc);return e.find().length?e:null}}})}var V=n(89117),P=n(86063),G=n(52388);const I=new c.hs("md-graph"),q=new Map,F=new Map,W=new Map,H=new Map;function B(t,e){return`${t}\0${e}`}function K(t,e,n){return(r,o)=>{const s=B(r,o),a=t.get(s);if(a)return Promise.resolve(a);let c=e.get(s);return c||(c=n(r,o).then(n=>(t.set(s,n),e.delete(s),n)),e.set(s,c)),c}}const U=K(q,F,(t,e)=>(0,V.U6)(t,e)),J=K(W,H,(t,e)=>(0,P.Hn)(e));function X(t,e){const n=document.createElement("button");return n.className="md-graph__edit",n.type="button",n.textContent=G.A.t("clk_edt"),n.addEventListener("click",n=>{n.stopPropagation(),function(t,e){if(!t)return;const n=Math.min(e+1,t.state.doc.content.size);t.dispatch(t.state.tr.setSelection(c.U3.near(t.state.doc.resolve(n),1))),t.focus()}(t(),e)}),n}function Y(t,e){if(e.error)return t.className="md-graph__body",void(t.textContent=e.error);t.className="md-graph__body",t.innerHTML=e.svg}function Z(t,e,n,r){const o=document.createElement("div");o.className="md-graph",o.setAttribute("contenteditable","false");const s=document.createElement("div");s.className="md-graph__body",s.addEventListener("click",()=>{const n=q.get(B(e,t));n&&!n.error&&n.svg&&function(t){const e=document.createElement("div");e.className="md-graph-zoom";const n=document.createElement("div");let r;n.className="md-graph-zoom__body";const o=document.createElement("button");o.className="md-graph-zoom__close",o.type="button",o.title=G.A.t("取消"),o.innerHTML='<i class="material-icons">close</i>';const s=t=>{"Escape"===t.key&&a()};function a(){"function"==typeof r&&r(),document.removeEventListener("keydown",s),e.remove()}e.addEventListener("click",t=>{t.target===e&&a()}),o.addEventListener("click",a),document.addEventListener("keydown",s),e.append(n,o),document.body.appendChild(e),r=t(n)}(t=>{t.innerHTML=n.svg})}),o.append(s,X(r,n));const a=q.get(B(e,t));return a?(a.error&&o.classList.add("md-graph--error"),Y(s,a),o):(o.classList.add("md-graph--loading"),s.textContent=G.A.t("rendering"),U(e,t).then(t=>{o.isConnected&&(o.classList.remove("md-graph--loading"),t.error&&o.classList.add("md-graph--error"),Y(s,t))}),o)}function Q(t,e,n){const r=[],{from:o,to:s}=t.selection;return t.doc.descendants((t,a)=>{if("code_block"!==t.type.name)return;const c=t.attrs.language,l=(0,V.Hm)(c),d=(0,P.hj)(c);if(!l&&!d)return;const u=a,h=a+t.nodeSize;if(function(t,e,n,r){return t<=r&&e>=n}(o,s,u,h))return;const m=t.textContent;if(!m.trim())return;r.push(i.NZ.node(u,h,{class:"md-graph-hidden"}));const p=`graph-${c}-${u}-${m}`;d?r.push(i.NZ.widget(h,()=>function(t,e,n,r,o){const s=document.createElement("div");s.className="md-graph md-graph--mind",s.setAttribute("contenteditable","false"),s.textContent=G.A.t("rendering");const a=X(r,n);let c=null;return s.__unmount=()=>{c?.destroy(),c=null},J(e,t).then(t=>{s.isConnected&&(s.textContent="",s.append(a),t.mount(s).then(t=>{s.isConnected?c=t:t.destroy()}).catch(t=>{console.error("[mind] mount failed",t)}))}),s.addEventListener("click",()=>{o?.(t,e=>function(t,e,n,r){if(!t||r===n)return;const o=t.state.doc;let s=null;const a=o.nodeAt(e);if(a&&"code_block"===a.type.name&&a.textContent===n?s={from:e+1,to:e+a.nodeSize-1}:o.descendants((t,e)=>!(s||"code_block"===t.type.name&&"smm-mind"===t.attrs.language&&t.textContent===n&&(s={from:e+1,to:e+t.nodeSize-1},1))),!s)return;const c=t.state.tr.replaceWith(s.from,s.to,t.state.schema.text(r));t.dispatch(c)}(r(),n,t,e))}),s}(m,c,u,e,n),{side:-1,ignoreSelection:!0,key:p,destroy:t=>t.__unmount?.()})):r.push(i.NZ.widget(h,()=>Z(m,c,u,e),{side:-1,ignoreSelection:!0,key:p}))}),i.zF.create(t.doc,r)}function tt(t){let e=null;return new c.k_({key:I,props:{decorations(n){const r=Q(n,()=>e,t);return r.find().length?r:null}},view:t=>(e=t,{destroy(){e=null}})})}const et=new Map;class nt{dom;node;view;get_pos;render_box;source_input;editing=!1;draft=null;painted_raw="";constructor(t,e,n){this.node=t,this.view=e,this.get_pos=n;const r="math_block"===t.type.name;this.dom=document.createElement(r?"div":"span"),this.dom.className=r?"md-math md-math--block":"md-math md-math--inline",this.dom.setAttribute("contenteditable","false"),this.render_box=document.createElement("span"),this.render_box.className="md-math__render",this.source_input=document.createElement("textarea"),this.source_input.className="md-math__source",this.source_input.setAttribute("spellcheck","false"),this.source_input.setAttribute("wrap","off"),this.source_input.setAttribute("rows","1"),this.dom.append(this.render_box,this.source_input),function(t,e){et.set(t,e)}(n(),this),this.source_input.addEventListener("input",()=>{this.draft=this.source_input.value,this.auto_size()}),this.source_input.addEventListener("blur",()=>this.commit()),this.source_input.addEventListener("keydown",t=>{t.stopPropagation(),"Escape"===t.key&&(t.preventDefault(),this.draft=null,this.set_editing(!1))});for(const t of["beforeinput","paste","input","keyup","keypress"])this.source_input.addEventListener(t,t=>t.stopPropagation());this.render_box.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),this.focus_source()}),this.paint(t)}paint(t){const e=t.attrs.raw;if(this.editing)return this.dom.setAttribute("data-mode","source"),null===this.draft&&(this.source_input.value=e),void this.auto_size();if(this.dom.setAttribute("data-mode","preview"),this.painted_raw===e)return;this.painted_raw=e;const n=this.render_box;n.classList.add("md-math--loading"),n.textContent="",n.textContent=e,(0,k.z$)(n,t.attrs.tex,"math_block"===t.type.name?"block":"inline",e)}auto_size(){const t=this.source_input;t.style.height="0px",t.style.height=`${t.scrollHeight}px`}focus_source(){this.editing||(this.set_editing(!0),this.source_input.focus(),this.source_input.setSelectionRange(this.source_input.value.length,this.source_input.value.length))}set_editing(t){this.editing!==t&&(this.editing=t,this.paint(this.node))}set_selected(t){t?this.focus_source():this.editing&&(this.commit(),this.set_editing(!1))}commit(){if(null===this.draft)return;const t=this.draft;if(this.draft=null,t===this.node.attrs.raw)return;const e=this.get_pos(),n=this.view.state.doc.nodeAt(e);if(!n)return;const r=(0,k.V)(t),o=r?.tex??t;this.view.dispatch(this.view.state.tr.setNodeMarkup(e,void 0,{...n.attrs,raw:t,tex:o})),this.painted_raw=""}update(t){if(t.type!==this.node.type)return!1;const e=t.attrs.raw!==this.node.attrs.raw;return this.node=t,e&&(this.draft=null,this.painted_raw=""),this.paint(t),!0}stopEvent(t){return this.dom.contains(t.target)}ignoreMutation(){return!0}destroy(){this.draft=null,function(t){for(const[e,n]of et)if(n===t)return void et.delete(e)}(this)}}function rt(t){const e=t.state.selection,n=e.from,r=e.to;for(const[t,e]of et){const o=r>t&&n<=t+1;e.set_selected(o)}}var ot=n(67951),st=(n(41631),n(50576),n(70432),n(74848));function at(t){return 0===t?(0,ot.uf)("paragraph"):(0,ot.uf)("heading",{level:t})}function ct(t){return!(!t.ctrlKey&&!t.metaKey)}function it(t,e){let n=null;try{const r=t.domAtPos(e).node,o=1===r.nodeType?r:r.parentElement;n=o?o.closest(".md-filecat-content > *")??o:null}catch{}if(!n)return;const r=n.closest(".md-editor-scroll");if(!r)return;const o=parseFloat(getComputedStyle(n).scrollMarginTop)||0,s=r.scrollTop+n.getBoundingClientRect().top-r.getBoundingClientRect().top-o,a=r.scrollHeight-r.clientHeight;!function(t,e){const n=t.scrollTop,r=e-n;if(Math.abs(r)<1)return;const o=performance.now(),s=e=>{const a=Math.min(1,(e-o)/500);t.scrollTop=n+r*(1-Math.pow(1-a,3)),a<1&&requestAnimationFrame(s)};requestAnimationFrame(s)}(r,Math.max(0,Math.min(s,a)))}function lt(t,e){return(0,f.D8)(1)(t,e)}const dt=r.forwardRef(function(t,e){const{t:n}=(0,o.Bd)(),_=(0,r.useRef)(null),k=(0,r.useRef)(null),[,v]=(0,s.fp)(a.AG.mind_editor),y=(0,r.useRef)(t.on_change),w=(0,r.useRef)(t.on_save),M=(0,r.useRef)(t.on_selection_change),x=(0,r.useRef)(t.on_source_mode_change),A=(0,r.useRef)();return A.current=(t,e)=>{v({name:n("思维导图"),code_source:t,on_save_code:t=>e(t)})},(0,r.useEffect)(()=>{y.current=t.on_change,w.current=t.on_save,M.current=t.on_selection_change,x.current=t.on_source_mode_change}),(0,r.useEffect)(()=>{if(!_.current)return;g.Y;(0,b.sL)(t.doc_path?t.doc_path.replace(/[^/]*$/,""):"");const n=c.$t.create({doc:$(t.value??""),plugins:[(0,d.b6)(),R(),tt((t,e)=>A.current?.(t,e)),new c.k_({view:t=>(rt(t),{update:(t,e)=>{t.state.selection===e.selection&&t.state.doc===e.doc||rt(t)}})}),(0,ot.k5)(),(0,u.w)({"Mod-a":ot.Rx,"Mod-z":d.tN,"Mod-y":d.ZS,"Mod-Shift-z":d.ZS,"Mod-b":(0,ot.NH)("strong"),"Mod-i":(0,ot.NH)("em"),"Mod-Shift-x":(0,ot.NH)("strike"),"Mod-`":(0,ot.NH)("code"),"Mod-1":(t,e)=>at(1)(t,e),"Mod-2":(t,e)=>at(2)(t,e),"Mod-3":(t,e)=>at(3)(t,e),"Mod-0":(t,e)=>at(0)(t,e),"Mod-Shift-8":ot.fK,"Mod-Shift-9":ot.oB,"Mod-Shift-.":ot.Vu,Tab:ot.G8.sink,"Shift-Tab":ot.G8.lift,"Mod-Enter":lt,"Mod-s":()=>(w.current?.(),!0)}),(0,f.LF)({allowTableNodeSelection:!0}),(0,f.AL)(),(0,m.A)({color:"var(--primary, #1a73e8)",width:2}),(0,p.z)(),(0,u.w)({Enter:(0,h.st)(ot.x0,h.pC,ot.G8.split,h.Z1,h.iz,h.aw),"Shift-Enter":(t,e)=>{const{hard_break:n}=t.schema.nodes;return e&&e(t.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0},"Mod-Enter":h.I$}),(0,u.w)(h.RV)]}),r=t=>t.setAttribute("data-img-error",""),o=t=>"IMG"===t.tagName&&!t.classList.contains("ProseMirror-separator"),s=t=>{const e=t.target;"IMG"===e?.tagName&&o(e)&&r(e)},a=t=>{const e=t.target;"IMG"===e?.tagName&&o(e)&&(t=>{t.removeAttribute("data-img-error")})(e)},v=_.current;v.addEventListener("error",s,!0),v.addEventListener("load",a,!0);const E=()=>{v.querySelectorAll("img").forEach(t=>{if(!o(t))return;const e=t;e.dataset.imgSeen||(e.dataset.imgSeen="1",e.complete?0===e.naturalWidth&&r(e):r(e))})},S=new MutationObserver(()=>{requestAnimationFrame(E)});S.observe(v,{childList:!0,subtree:!0}),E();let O=null;if(O=new i.Lz(_.current,{state:n,editable:()=>!1!==t.editable,nodeViews:{...(0,b.op)(),math_block:(t,e,n)=>new nt(t,e,n),math_inline:(t,e,n)=>new nt(t,e,n)},handleClickOn(t,e,n,r,o){if(!ct(o))return!1;const s=function(t){if(!(t instanceof Element))return null;const e=t.closest("a[href]"),n=e?.getAttribute("href");return n||null}(o.target)??function(t,e){const n=t.doc.content.size,r=Math.max(0,Math.min(e,n));let o;try{o=t.doc.resolve(r)}catch{return null}for(const e of[1,-1]){const o=1===e?r:r-1;if(!(o<0||o>=n))try{const e=t.doc.resolve(o).marks().find(t=>"link"===t.type.name);if(e?.attrs?.href)return e.attrs.href}catch{}}try{const t=o.parent.marks.find(t=>"link"===t.type.name);if(t?.attrs?.href)return t.attrs.href}catch{}return null}(t.state,e);return!!s&&(window.open(s,"_blank","noopener,noreferrer"),!0)},clipboardTextSerializer:t=>C(t),handlePaste(t,e){const n=e.clipboardData?.getData("text/plain");if(!n)return!1;const{from:r,to:o}=t.state.selection;if(ht(t.state.doc,r)&&ht(t.state.doc,o))return t.dispatch(t.state.tr.insertText(n.replace(/\r\n?/g,"\n"),r,o).scrollIntoView()),!0;const s=e.clipboardData?.getData("text/html");if(s&&function(t){if(!t)return!1;try{const e=(new DOMParser).parseFromString(t,"text/html"),n=Array.from(e.body.children);return 1===n.length&&"PRE"===n[0].tagName}catch{return!1}}(s)){const e=$(n);return t.dispatch(t.state.tr.replaceSelection(new l.Ji(e.content,0,0)).scrollIntoView()),!0}return!1},handleDOMEvents:{keydown:(t,e)=>{if(ct(e)&&t.dom.classList.add("md-ctrl-down"),ut(t.state.doc)&&"Enter"===e.key&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault();const{from:n,to:r}=t.state.selection;return t.dispatch(t.state.tr.insertText("\n",n,r).scrollIntoView()),!0}return!1},keyup:(t,e)=>(ct(e)||t.dom.classList.remove("md-ctrl-down"),!1),blur:t=>(t.dom.classList.remove("md-ctrl-down"),!1),beforeinput:(t,e)=>{if(!ut(t.state.doc))return!1;const n=e;if("insertText"!==n.inputType)return!1;const r=n.data;if(null==r)return!1;n.preventDefault();const{from:o,to:s}=t.state.selection;return t.dispatch(t.state.tr.insertText(r.replace(/\r\n?/g,"\n"),o,s).scrollIntoView()),!0}},dispatchTransaction(t){const e=O.state.apply(t);O.updateState(e);const n=ut(e.doc);n?O.dom.classList.add("md-source-mode"):O.dom.classList.remove("md-source-mode"),n!==ut(t.before)&&x.current?.(n),t.docChanged&&y.current?.(n?e.doc.textContent:D(e.doc)),(t.selectionSet||t.docChanged)&&M.current?.()},attributes:{class:"md-filecat-content",spellcheck:"false"}}),k.current=O,t.initial_source_mode&&!ut(O.state.doc)){const t=D(O.state.doc),e=O.state.schema.nodes.code_block.create({language:"markdown"},t?O.state.schema.text(t):null),n=O.state.tr;n.replaceWith(0,O.state.doc.content.size,e),n.setMeta("addToHistory",!1),O.dispatch(n)}const N={get_markdown:()=>ut(O.state.doc)?O.state.doc.textContent:D(O.state.doc),set_markdown:t=>{const e=$(t);O.dispatch(O.state.tr.replaceWith(0,O.state.doc.content.size,e.content))},focus:()=>O.focus(),get_view:()=>k.current,in_table:()=>function(t){const{$from:e}=t.selection;for(let t=e.depth;t>0;t--){if("table"===e.node(t).type.name)return!0}return!1}(O.state),active_marks:()=>(O.state.storedMarks??O.state.selection.$from.marks()).map(t=>t.type.name),active_block:()=>{const{$from:t}=O.state.selection;for(let e=t.depth;e>0;e--){const n=t.node(e);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:(t=3,e=3)=>{const n=function(t,e,n){const r=(0,f.e)(t),o=r.table,s=r.row,a=r.cell,c=r.header_cell??r.cell;if(!o||!s||!a)return null;const i=t=>s.create(null,Array.from({length:e},()=>t.createAndFill())),l=i(c),d=Array.from({length:n},()=>i(a));return o.create(null,[l,...d])}(O.state.schema,t,e);if(!n)return;const{from:r}=O.state.selection,o=O.state.doc.resolve(r);let s=r;for(let t=o.depth;t>0;t--)if("table"===o.node(t).type.name){s=o.after(t);break}const a=O.state.tr;s===r?a.replaceSelectionWith(n):a.insert(s,n),O.dispatch(a.scrollIntoView());const c=O.state.doc.resolve(Math.min(s+3,O.state.doc.content.size));try{O.dispatch(O.state.tr.setSelection(O.state.selection.constructor.near(c)))}catch{}},get_headings:()=>function(t){const e=[];return t.doc.descendants((t,n)=>("heading"!==t.type.name||e.push({level:t.attrs.level,text:t.textContent,pos:n}),!0)),e}(O.state),scroll_to_pos:t=>{const e=O.state.doc.content.size,n=Math.max(0,Math.min(t,e)),r=O.state.doc.nodeAt(n);let o;try{o=r?c.U3.near(O.state.doc.resolve(n+1),1):c.U3.near(O.state.doc.resolve(n),1)}catch{o=c.U3.near(O.state.doc.resolve(0),1)}O.dispatch(O.state.tr.setSelection(o)),it(O,o.from),O.focus()},is_source_mode:()=>ut(O.state.doc),enter_source_mode:()=>{if(ut(O.state.doc))return;const t=D(O.state.doc),e=O.state.schema.nodes.code_block.create({language:"markdown"},t?O.state.schema.text(t):null),n=O.state.tr;n.replaceWith(0,O.state.doc.content.size,e),O.dispatch(n),O.dom.classList.add("md-source-mode")},exit_source_mode:()=>{if(!ut(O.state.doc))return;const t=$(O.state.doc.textContent),e=O.state.tr;e.replaceWith(0,O.state.doc.content.size,t.content),O.dispatch(e),O.dom.classList.remove("md-source-mode")}};return"function"==typeof e?e(N):e&&(e.current=N),t.on_ready?.(N),()=>{S.disconnect(),v.removeEventListener("error",s,!0),v.removeEventListener("load",a,!0),O.destroy(),k.current=null}},[]),(0,st.jsx)("div",{className:"md-filecat",ref:_})});function ut(t){if(1!==t.childCount)return!1;const e=t.firstChild;return!!e&&"code_block"===e.type.name&&"markdown"===e.attrs.language}function ht(t,e){const n=t.resolve(e);for(let t=n.depth;t>0;t--)if("code_block"===n.node(t).type.name)return!0;return!1}const mt=dt},67951(t,e,n){n.d(e,{NH:()=>d,k5:()=>l,uf:()=>u});var r=n(38341),o=n(5091),s=n(42845),a=n(46762),c=n(3772);function i(t,e){return new r.fV(t,(t,n,r,o)=>{const s=t.schema.marks[e],a=n[1];if(!s||!a)return null;const c=n[0].indexOf(a);if(c<0)return null;const i=r+c,l=i+a.length,d=t.tr;return d.delete(l,o),d.delete(r,i),d.addMark(r,r+a.length,s.create()),d.removeStoredMark(s),d})}function l(){const t=o.Y;return(0,r.sM)({rules:[(0,r.JJ)(/^(#{1,6})\s$/,t.nodes.heading,t=>({level:t[1].length})),(0,r.JJ)(/^#([1-6])\s$/,t.nodes.heading,t=>({level:Number(t[1])})),(0,r.JJ)(/^```([\w-]*)\s$/,t.nodes.code_block,t=>({language:t[1]??""})),(0,r.tG)(/^\s*>\s$/,t.nodes.blockquote),(0,r.tG)(/^\s*([-+*])\s$/,t.nodes.bullet_list),(0,r.tG)(/^(\d+)\.\s$/,t.nodes.ordered_list,t=>({order:Number(t[1])})),i(/(?:\*\*)([^*]+)(?:\*\*)$/,"strong"),i(/(?:__)([^_]+)(?:__)$/,"strong"),i(/(?<![*])\*([^*]+)\*$/,"em"),i(/(?<![_])_([^_]+)_$/,"em"),i(/(?:~~)([^~]+)(?:~~)$/,"strike"),i(/(?:`)([^`]+)(?:`)$/,"code"),new r.fV(/!\[([^\]]*)\]\(([^)\s]+)\)$/,(t,e,n,r)=>{const o=e[1]??"",s=e[2];return s?t.tr.replaceWith(n,r,t.schema.nodes.image.create({src:s,alt:o})):null}),...r.Fr,r.gO]})}function d(t){return(e,n)=>{const r=e.schema.marks[t];return!!r&&(0,a.wh)(r)(e,n)}}function u(t,e={}){return(n,r)=>{const o=n.schema.nodes[t];if(!o)return!1;const{$from:s,$to:a}=n.selection,c=s.blockRange(a);if(!c)return!1;const i=s.parent,l=i.type===o&&Object.entries(e).every(([t,e])=>i.attrs[t]===e),d=l?n.schema.nodes.paragraph:o,u=l?{}:e;return r&&r(n.tr.setBlockType(c.start,c.end,d,u)),!0}}const h=(t,e)=>(0,c.Sd)(t.schema.nodes.bullet_list)(t,e),m=(t,e)=>(0,c.Sd)(t.schema.nodes.ordered_list)(t,e),p={sink:(0,c.$B)(o.Y.nodes.list_item),lift:(0,c.T2)(o.Y.nodes.list_item),split:(0,c.wn)(o.Y.nodes.list_item),wrap_bullet:h,wrap_ordered:m};n.d(e,["G8",0,p,"Rx",0,(t,e)=>{const{$from:n}=t.selection;return"code_block"===n.parent.type.name&&(e&&e(t.tr.setSelection(s.U3.create(t.doc,n.start(),n.end())).scrollIntoView()),!0)},"Vu",0,(t,e)=>{const{blockquote:n}=t.schema.nodes,{$from:r,$to:o}=t.selection,s=r.blockRange(o);if(!s)return!1;if(s.parent.type===n&&s.depth>0){const n=r.before(s.depth),o=t.tr.doc.nodeAt(n);if(o&&1===o.childCount)return e&&e(t.tr.replaceWith(n,n+o.nodeSize,o.child(0)).scrollIntoView()),!0;if(e){const n=t.tr,o=r.parent,a=r.after(s.depth);n.delete(s.start,s.end),n.insert(a,o),e(n.scrollIntoView())}return!0}return e&&e(t.tr.wrap(s,[{type:n}]).scrollIntoView()),!0},"fK",0,h,"oB",0,m,"x0",0,(t,e)=>{const{$from:n,empty:r}=t.selection;if(!r||"paragraph"!==n.parent.type.name)return!1;const o=n.parent.textContent;if(!o.trim())return!1;const a=function(t){const e=t.trim(),n=/^#([1-6])$/.exec(e);if(n)return{type:"heading",attrs:{level:Number(n[1])}};const r=/^(#{1,6})$/.exec(e);if(r)return{type:"heading",attrs:{level:r[1].length}};const o=/^```([\w-]*)$/.exec(e);return o?{type:"code_block",attrs:{language:o[1]??""}}:/^(?:-{3,}|\*{3,}|_{3,})$/.test(e.replace(/\s+/g,""))?{type:"horizontal_rule"}:/^>\s*$/.test(e)?{type:"blockquote"}:/^[-+*]\s*$/.test(e)?{type:"bullet_list"}:/^\d+[.)]$/.test(e)?{type:"ordered_list"}:null}(o);if(!a)return!1;if("blockquote"===a.type&&n.depth>1)return!1;const c=t.schema.nodes[a.type];if(!c)return!1;const i=n.before(n.depth),l=n.after(n.depth);if(e){const n=t.tr,r=c.createAndFill(a.attrs)??c.create(a.attrs);n.replaceWith(i,l,r);const o=Math.min(i+1,n.doc.content.size);try{n.setSelection(s.U3.near(n.doc.resolve(o),1))}catch{}n.scrollIntoView(),e(n)}return!0}])},96763(t,e,n){n.d(e,{Kz:()=>a,P7:()=>l,_8:()=>h,_D:()=>u,bN:()=>s,sO:()=>d});var r=n(14284),o=n(53459);function s(t,e){const n="md-theme-style-"+t,r=document.getElementById(n);if(!e)return void r?.remove();let o=r;o||(o=document.createElement("style"),o.id=n,document.head.appendChild(o)),o.textContent=e}async function a(){try{const t=await r.XO.get("md_theme/list");return t?.code===o.m.Success?t.data??[]:[]}catch(t){return[]}}const c="md-theme-change";function i(){window.dispatchEvent(new Event(c))}async function l(t){try{const e=await r.XO.get(`md_theme/get?id=${encodeURIComponent(t)}`);return e?.code===o.m.Success?e.data??"":""}catch(t){return""}}async function d(){try{const t=await r.XO.get("md_theme/active");return t?.code===o.m.Success?t.data??"":""}catch(t){return""}}async function u(t){const e=await r.XO.post("md_theme/save",t);return e?.code!==o.m.Success?null:(i(),e.data)}async function h(t){const e=await r.XO.post("md_theme/del",{id:t});return e?.code===o.m.Success&&(i(),!0)}n.d(e,["o3",0,c])},5091(t,e,n){var r=n(58903),o=n(86059),s=n(41105),a=n(99724);const c=(0,o.of)({tableGroup:"block",cellContent:"block+",cellAttributes:{}}),i={align:{default:null}},l={doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:i,parseDOM:[{tag:"p"}],toDOM:t=>["p",t.attrs.align?{style:`text-align:${t.attrs.align}`}:{},0]},heading:{content:"inline*",group:"block",attrs:{level:{default:1},...i},defining:!0,parseDOM:[1,2,3,4,5,6].map(t=>({tag:`h${t}`,attrs:{level:t}})),toDOM(t){const e=t.attrs.align?{style:`text-align:${t.attrs.align}`}:{};return[`h${t.attrs.level}`,e,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:t=>({order:Number(t.getAttribute("start")??1)})}],toDOM:t=>1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]},list_item:{content:"paragraph block*",defining:!0,attrs:{checked:{default:null}},parseDOM:[{tag:"li",getAttrs:t=>{const e=t,n=e.querySelector("input[type=checkbox]");if(n)return{checked:n.checked};const r=e.getAttribute("data-checked");return{checked:null===r?null:"true"===r}}}],toDOM:t=>null!==t.attrs.checked?["li",{"data-checked":String(t.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,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{const e=t.querySelector("code"),n=/language-([\w-]+)/.exec(e?.className??"");return{language:n?n[1]:""}}}],toDOM:t=>["pre",{"data-language":t.attrs.language},["code",0]]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]},html_block:{group:"block",atom:!0,code:!0,attrs:{value:{default:""}},parseDOM:[{tag:"div[data-html-block]",getAttrs:t=>({value:(0,s.Ne)(t.getAttribute("data-html-block")??"")})}],toDOM:t=>["div",{"data-html-block":t.attrs.value}]},html_inline:{inline:!0,group:"inline",atom:!0,code:!0,attrs:{value:{default:""}},parseDOM:[{tag:"span[data-html-inline]",getAttrs:t=>({value:(0,s.Ne)(t.getAttribute("data-html-inline")??"")})}],toDOM:t=>["span",{"data-html-inline":t.attrs.value}]},math_inline:{inline:!0,group:"inline",atom:!0,attrs:{raw:{default:""},tex:{default:""}},parseDOM:[{tag:"span[data-math-inline]",getAttrs:t=>{const e=t,n=(0,s.Ne)(e.getAttribute("data-math-inline")??"");return{raw:n,tex:(0,a.V)(n)?.tex??""}}}],toDOM:t=>["span",{"data-math-inline":t.attrs.raw}]},math_block:{group:"block",atom:!0,code:!0,attrs:{raw:{default:""},tex:{default:""}},parseDOM:[{tag:"div[data-math-block]",getAttrs:t=>{const e=t,n=(0,s.Ne)(e.getAttribute("data-math-block")??"");return{raw:n,tex:(0,a.V)(n)?.tex??""}}}],toDOM:t=>["div",{"data-math-block":t.attrs.raw}]},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:t=>{const e=t;return{src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title")}}}],toDOM(t){const{src:e,alt:n,title:r}=t.attrs,o={src:(0,s.KR)(e)};return n&&(o.alt=n),r&&(o.title=r),["img",o]}},text:{group:"inline"},...c},d={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:t=>"PRE"!==t.parentElement?.tagName&&null}],toDOM:()=>["code",0]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>{const e=t;return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(t){const{href:e,title:n}=t.attrs;return["a",{href:e,title:n,rel:"noopener noreferrer",target:"_blank"},0]}}},u=new r.Sj({nodes:l,marks:d});n.d(e,["Y",0,u])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2502],{2502(t,e,n){n.r(e),n.d(e,{default:()=>A});var i=n(96540),o=n(92275),s=n(14944),r=n(34843),l=n(82893),c=n(57952),a=n(85997),_=n(47022),h=n(34289),p=n(62042),x=n(61443),d=n(22022),f=n(64694),g=n(70447),u=n(74848);const w=300;let v=!1,m=0,y=!0;var k,b=[],j=-1,C=[];function A(t){const[e,n]=(0,r.fp)(l.AG.log_viewer),A=(0,i.useRef)(null),[H,T]=(0,i.useState)(0),[S,z]=(0,i.useState)(100),[I,K]=(0,i.useState)(!1),[M,$]=(0,i.useState)(""),[E,L]=(0,i.useState)(0),[N,D]=(0,i.useState)(0),[q,G]=(0,i.useState)(0),{t:R}=(0,d.Bd)(),B=(t,n,i,o=!1,s)=>{const r=document.createElement("div");return-1===j?r.textContent=t:r.innerHTML=t,"wrap"===e.wrap?(r.style.whiteSpace="pre-wrap",r.style.overflowWrap="break-word"):r.style.whiteSpace="nowrap",r.setAttribute("position",`${n}`),r.setAttribute("start_position",`${i}`),o?(A.current.insertBefore(r,s),b.unshift(r)):(A.current.appendChild(r),b.push(r)),r},F=t=>{const e=(0,f.I)(b,e=>e===t);e&&A.current.removeChild(e)},W=(t,e,n,i=!1)=>{if(!t)return;const o=Array.isArray(t)?t:t.split("\n");if(i){let t;for(let i=0;i<o.length;i++)t=B(o[i],e[i],n[i],!0,0===i?A.current.firstChild:t);if(b.length>w){let t=b.length-1;for(;t>=w;)F(b[b.length-1]),t--}}else{for(let t=0;t<o.length;t++)B(o[t],e[t],n[t]);if(b.length>w){let t=b.length-w;for(;t>0;)F(b[0]),t--}}},X=async()=>{k.encoding=e.encoding,k.context="";const t=await s.ws.sendData(o.HK.log_viewer,k);if(t){const e=t.context;if(k=e,e.find_back_enter_index&&e.context_list.length>0)for(let t=0;t<e.context_list.length;t++){const n=new RegExp(e.query_text,"g");e.context_list[t]=e.context_list[t].replace(n,`<span style="color: blue;">${e.query_text}</span>`)}k.find_back_enter_index=!1,W(e.context_list,e.context_position_list,e.context_start_position_list,k.back),k.context_list.length>0&&(k.back&&b.length>0?(k.context_list.length>b.length?T(Math.floor(100*parseInt(b[k.context_list.length-b.length].getAttribute("position"))/k.max_size)):T(Math.floor(100*parseInt(b[b.length-k.context_list.length].getAttribute("position"))/k.max_size)),y=!1):T(Math.floor(100*(k.context_position_list[k.context_position_list.length-1]??0)/k.max_size)))}},Y=t=>{v||(v=!0,T(100),s.ws.addMsg(o.HK.log_viewer_watch,t=>{const e=t.context;e&&(k=e,W(e.context_list,e.context_position_list,e.context_start_position_list,!1),A.current.scrollTop=A.current.scrollHeight)}),k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[],k.position=t,s.ws.sendData(o.HK.log_viewer_watch,k),K(!0))},Z=async()=>{A.current&&A.current.remove(),b=[]};if((0,i.useEffect)(()=>{e.show?(async()=>{A.current.addEventListener("scroll",async()=>{const t=A.current;if(t){if(v)return void(m=t.scrollTop);if(m<t.scrollTop&&b.length>0&&t.scrollTop+t.clientHeight+500>=t.scrollHeight){const t=parseInt(b[b.length-1].getAttribute("position"));if(t>=k.max_size)return void Y(t);k.line=20,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[],k.back=!1,k.position=t,await X()}else if(m>t.scrollTop&&b.length>0&&t.scrollTop-300<=0){const e=parseInt(b[0].getAttribute("start_position"));if(e<=0)return y||(y=!0,(0,p.N9)("到达顶部")),void(m=t.scrollTop);k.line=10,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[],k.back=!0,k.position=e,await X()}m=t.scrollTop}}),A.current.addEventListener("wheel",t=>{const e=A.current;if(e){t.preventDefault();const n=20;t.deltaY>0?e.scrollTop+=n:e.scrollTop-=n}},{passive:!1}),K(!1),L(0),D(0),$(""),v=!1,G(0),m=0,C=[],j=-1,b=[],(k=new _.d2).line=w,k.path=`${(0,h.GG)("file",(0,h.vX)())}${e.fileName}`,k.token=localStorage.getItem("token"),await X(),s.ws.addMsg(o.HK.search_file_progress,t=>{try{L(parseInt(t.context))}catch(t){(0,p.zN)(t.message)}}),s.ws.addMsg(o.HK.search_file_index,t=>{try{C.push(...t.context),G(t.context.length)}catch(t){(0,p.zN)(t.message)}})})():Z()},[e]),(0,i.useEffect)(()=>()=>{Z()},[]),!e.show)return;return(0,u.jsxs)("div",{id:"editor-container",children:[(0,u.jsxs)(c.A,{ignore_tags:!0,left_children:[(0,u.jsx)(a.rA,{title:R("取消"),icon:"close",onClick:()=>{const t=e.close;n({show:!1}),t?.()}},1),(0,u.jsx)("div",{style:{width:"4rem"},children:(0,u.jsx)(g.WA,{context:e.fileName})},2),(0,u.jsxs)(i.Fragment,{children:[" ",(0,u.jsx)(x.$Z,{handleEnterPress:async()=>{M&&(L(.1),D(0),G(0),j=-1,C=[],k.query_text=M,k.encoding=e.encoding,s.ws.sendData(o.HK.search_file,k))},placeholder:R("回车搜索整个文件"),icon:"search",value:M,handleInputChange:t=>{$(t)},max_width:"25em"})]},3),M&&(0,u.jsx)("div",{style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:async()=>{if(0===C.length)return;k.line=w,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[];for(const t of b)A.current.removeChild(t);b=[];const t=j+1>=C.length?0:j+1;D(t+1),j=t,k.find_back_enter_index=!0,k.back=!1,k.position=C[j],await X()},children:"↓"},5),M&&(0,u.jsx)("div",{style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:async()=>{if(0===C.length)return;k.line=w,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[];for(const t of b)A.current.removeChild(t);b=[];const t=j-1<0?C.length-1:j-1;D(t+1),j=t,k.back=!1,k.find_back_enter_index=!0,k.position=C[j],await X()},children:"↑"},6),M&&(0,u.jsxs)("div",{style:{paddingLeft:"1.5rem"},children:[N,"/",C.length]},7),M&&(0,u.jsxs)("div",{style:{paddingLeft:"1.5rem"},children:["搜索进度$",E,"%"]},8),0!==E&&100!==E&&(0,u.jsx)(a.rA,{title:R("取消"),icon:"cancel",onClick:()=>{s.ws.sendData(o.HK.search_file_cancel,{}),$(""),L(0)}},4)],children:[(0,u.jsx)("span",{style:{paddingRight:".5rem"},children:e.encoding}),I&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"},children:"正在实时监听 "}),(0,u.jsx)(a.rA,{icon:"close",title:R("关闭实时"),onClick:()=>{v&&(v=!1,K(!1),s.ws.sendData(o.HK.log_viewer_watch_cancel,k))}})]}),(0,u.jsxs)("span",{children:["当前加载进度",H]}),(0,u.jsx)(x.$Z,{max_width:"10rem",placeholder:R("跳转进度"),icon:"percent",value:S,handleInputChange:t=>{z(t)}}),(0,u.jsx)(a.rA,{icon:"play_arrow",title:R("跳转进度"),onClick:async()=>{k.line=w,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[];let t=0;try{if(t=parseInt(S),t>100||t<0)throw(0,p.zN)("范围在0-100"),"超过最大范围";for(const t of b)A.current.removeChild(t);b=[]}catch(t){return void(0,p.N9)(t)}k.back=t>=100,k.position=Math.floor(k.max_size*(t/100)),await X()}}),(0,u.jsx)(a.rA,{icon:"text_rotate_vertical",title:R("滑动到文件最底部,实时输出"),onClick:async()=>{if(!v){k.line=w,k.context="",k.context_list=[],k.context_position_list=[],k.context_start_position_list=[];for(const t of b)A.current.removeChild(t);b=[],k.back=!0,k.position=k.max_size,await X(),A.current.scrollTop=A.current.scrollHeight,Y(k.max_size)}}})]}),(0,u.jsx)("div",{style:{height:"100%"},children:(0,u.jsx)("div",{ref:A,style:{overflowY:"auto",overflowX:"auto",height:"100%"}})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2547],{83277(e,t,n){n.d(t,{$j:()=>a,Lv:()=>s});class s{token;open=!1;note;index;url;model;request_type;json_params;sys_prompt;dotenv="";yaml_env="";tool_mode=!1;show_options;static get_label_by_v(e,t){if(!e||!t?.length)return e;for(const n of t)if(n.value===e)return n.label;return e}static have_label_by_v(e,t){if(!e||!t?.length)return!1;for(const n of t)if(n.value===e)return!0;return!1}}const o=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function a(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}n.d(t,["CP",0,"\n# 聊天循环最大次数\ntool_call_max: 500\n\n# 是否允许AI直接执行命令而不需要用户确认。\n# 默认为 false,需要用户手动确认;使用 workflow 时等价于 true。\nallow_exec_cmd_directly: false\n\n# 可选的大模型请求代理地址\n# proxy_url: http://127.0.0.1:7890\n\n# 可选的多个 url\n# options_agent_url_list:\n# - value: http://...\n# label: openai\n\n# 可选的多个 key\n# options_agent_key_list:\n# - value: sk-aaa\n# label: option1\n\n# 可选的多个 model\n# options_agent_model_list:\n# - value: gpt-5.5\n# label: gpt\n\n# 本地 prompt 文件列表,每次聊天时自动读取并加载\n# options_local_file_path_prompt_list:\n# - /prompt/a.txt\n\n# 开启切换模型,AI 可以根据 prompt 自己决定下一步调用哪个模型\n# open_pick_model: false\n\n# 历史消息裁剪相关\nmax_recent_messages: 12\ncompress_message_count: 16\nmax_tool_content_chars: 200\n\n# ===== 模型类型(request_type)=====\n# 默认 completions,可选值:\n# completions 标准对话/聊天补全 (chat/completions)\n# images 图片生成 (images/generations)\n# audio_speech 文本转语音 (audio/speech)\n# audio_transcription 语音转文字 (audio/transcriptions)\n# audio_translation 语音翻译 (audio/translations)\n# embeddings 向量嵌入 (embeddings)\n# request_type: completions\n\n# ===== 成为 tool(tool_mode)=====\n# 开启后该模型会作为一个工具被加载,供 AI agent 动态调用。\n# 注意:不能与「是否开启」(open) 同时为 true。\n# tool_mode: false\n\n# ===== 图片理解(image_understanding)=====\n# 开启后注册 read_image 工具,工具读到的图片会以 image_url 多模态格式随消息发给模型。\nimage_understanding: true\n\n# ===== 命令环境变量(command_env)=====\n# AI 调用内置命令工具(exec_cmd / exec_cmd_background)执行命令时,\n# 这里配置的变量会覆盖到子进程的环境变量上。\n# command_env:\n# NODE_ENV: production\n# HTTP_PROXY: http://127.0.0.1:7890\n\n# 是否允许 AI 通过 set_command_env 工具修改上面的 command_env\ncommand_env_tool: false\n","cL",0,o])},77481(e,t,n){n.d(t,{S:()=>r,X:()=>i});var s=n(96540),o=n(61443),a=n(74848);function i(e){const[t,n]=s.useState([]),i=(0,s.useRef)(-1),[r,l]=(0,s.useState)(-1),[c,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 m=()=>{i.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,n)=>{const s=!!e.filter&&(e.filter.column??0)===n;let i=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(i=`${t} (${s.label})`)}return(0,a.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,a.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:i}):t},n)})})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,a.jsx)("tr",{className:s?(r===n?"row-dragging":"")+(c===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(i.current=n,l(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||i.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=i.current,n=c;m(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:m,children:t.map((n,s)=>{const o=s===t.length-1?"small":"";return(0,a.jsx)("td",{className:o,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}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))})}},52547(e,t,n){n.r(t),n.d(t,{default:()=>N});var s=n(22022),o=n(96540),a=n(85997),i=n(4412),r=n(34843),l=n(82893),c=n(75725),d=n(77481),m=n(61443),p=n(70447),_=n(64484),u=n(14284),h=n(53459),x=n(62042),g=n(7523),v=n(78247),j=n(23430),f=n(61973),y=n(14944),w=n(92275),b=n(88815),C=n(64694),k=n(45907),A=n(12721),S=n(24659),I=n(83277),K=n(74848);function N(){const{t:e}=(0,s.Bd)(),{initUserInfo:t}=(0,o.useContext)(g.F),n=[e("编号"),e("url"),e("是否开启"),e("key"),e("默认model"),e("更多属性"),e("备注")],N=[e("编号"),e("本地目录"),e("自动加载"),e("备注")],[O,P]=(0,o.useState)([]),[L,$]=(0,o.useState)({}),[M,X]=(0,o.useState)([]),[T,D]=(0,o.useState)([]),[R,q]=(0,o.useState)(null),F=(0,o.useRef)(),V=(0,o.useRef)(!1),Y=(0,o.useRef)(!1),[E,W]=(0,o.useState)([]),[H,J]=(0,o.useState)(!1),[B,G]=(0,o.useState)({}),[Z,U]=(0,r.fp)(l.AG.prompt_card),[z,Q]=(0,r.fp)(l.AG.user_base_info),[ee,te]=(0,o.useState)(!1),ne=T.filter(e=>"http"!==(e.transport??"stdio")),se=T.filter(e=>"http"===e.transport),oe=[e("编号"),e("名称"),e("是否开启"),e("状态"),"command","args","cwd",e("tools|env"),e("备注")],ae=[e("编号"),e("名称"),e("是否开启"),e("状态"),e("endpoint"),e("tools|headers"),e("备注")],ie=[e("编号"),e("提示词"),e("LLM编辑开关"),e("llm_pmt"),e("编辑规则"),e("备注")],[re,le]=(0,o.useState)([]),[ce,de]=(0,o.useState)(!1),me=(0,_.T)(),{check_user_auth:pe}=(0,v.MH)(),[_e,ue]=(0,r.fp)(l.AG.editorSetting),he=(0,f.Zp)(),xe=(0,k.y)(),ge=(0,S.K)(),ve=async()=>{const e=await u.jV.get("docs_on_get");e.code===h.m.Success&&te(e.data)};(0,o.useEffect)(()=>{(async()=>{const e=await u.XO.get("ai_agent_setting");e.code===h.m.Success&&P(e.data.models);const t=await u.XO.get("ai_agent_global_setting");t.code===h.m.Success&&$(t.data??{}),await y.ws.addMsg(w.HK.ai_load_info,e=>{q(e.context)});const n=await y.ws.sendData(w.HK.ai_load_info,{});n?.context&&q(n.context);const s=await u.XO.get("ai_docs_setting");s.code===h.m.Success&&(F.current=s.data.param,s.data.list?.length&&X(s.data.list));const o=await u.XO.get("ai_mcp_setting");o.code===h.m.Success&&D(o.data.list??[]),await ke(),ve();const a=await u.XO.get("ai_system_prompts");a.code===h.m.Success&&le(a.data??[]);const i=await u.XO.get("ai_long_term_memory_setting");i.code===h.m.Success&&de(i.data?.open??!1)})()},[]),(0,o.useEffect)(()=>{y.ws.addMsg(w.HK.mcp_status,e=>{const t=e.context??{},n={};for(const e of t.status??[])n[e.index]={state:e.state,error:e.error,tool_count:e.tool_count};G(n),t.done&&ke()})},[]);const je=(e="stdio")=>{const t="http"===e?{name:"",open:!1,note:"",transport:"http",endpoint:"",headers:"",stream:!1,timeout_ms:1e4}:{name:"",open:!1,command:"",args:"",cwd:"",env:"",note:"",transport:"stdio",timeout_ms:1e4};D([...T,t]),V.current=!0},fe=e=>{const t=T.indexOf(e);t<0||(T.splice(t,1),D([...T]),V.current=!0)},ye=e=>{D([...T,{...e,open:!1}]),V.current=!0},we=async e=>{for(let e=0;e<O.length;e++)O[e].index=e;(await u.XO.post("ai_agent_setting/save",{models:e??O})).code===h.m.Success&&(0,x.SK)("保存成功")},be=async e=>{(await u.XO.post("ai_agent_global_setting/save",e??L)).code===h.m.Success&&(0,x.SK)("保存成功")},Ce=async e=>{for(let e=0;e<T.length;e++)T[e].index=e;(await u.XO.post("ai_mcp_setting/save",{list:e??T})).code===h.m.Success&&((0,x.SK)("保存成功"),V.current=!1,y.ws.sendData(w.HK.mcp_reload,{}))},ke=async()=>{const e=await u.XO.get("ai_mcp_tools");return e.code===h.m.Success?(W(e.data??[]),e.data??[]):[]},Ae=async e=>{J(!0);try{const t=await u.XO.post("ai_mcp_tools/reload",{index:e});if(t.code===h.m.Success)return await ke(),(0,x.SK)("MCP工具加载成功"),t.data??null}finally{J(!1)}return null},Se=async(t,n,s,o)=>{const a=o??E.find(e=>e.index===n)??{index:n,key:`${n}`,name:t.name??"",note:t.note,transport:t.transport??"stdio",open:!!t.open,loaded:!1,tool_count:0,tools:[]},i=(a.tools??[]).map(t=>({id:t.runtime_name,title:t.tool_name,subtitle:t.description||e("无描述"),detail:t.display_name,meta:t.runtime_name}));U({open:!0,title:`${t.name||t.note||n} MCP工具`,context_div:(0,K.jsx)(A.O,{title:`${t.name||t.note||n} MCP工具`,subtitle:`${a.transport??"stdio"} | ${a.open?e("是"):e("否")} | ${a.loaded?"loaded":"idle"} | ${a.tool_count} tools`,pages:i,initialPageId:s,onRefresh:async()=>{const e=await Ae(n);e&&await Se(t,n,s,e)},renderPage:t=>{if(!t)return(0,K.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")});const n=a.tools?.find(e=>e.runtime_name===t.id);return n?(0,K.jsxs)("div",{className:"prompt-switch-page__detail",children:[(0,K.jsx)("div",{className:"prompt-switch-page__detail-title",children:n.display_name}),(0,K.jsx)("div",{className:"prompt-switch-page__detail-desc",children:n.description||e("无描述")}),(0,K.jsxs)("div",{className:"prompt-switch-page__detail-row",children:[(0,K.jsx)("strong",{children:"runtime:"})," ",n.runtime_name]}),(0,K.jsxs)("div",{children:[(0,K.jsx)("strong",{children:"schema:"}),(0,K.jsx)("pre",{className:"prompt-switch-page__schema",children:JSON.stringify(n.input_schema??{},null,2)})]})]}):(0,K.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")})}}),cancel:()=>U({open:!1})})},Ie=t=>{const n=B[t];let s=n?.state,o=n?.error,a=n?.tool_count;if(!s){const e=E.find(e=>e.index===t);s=e?.state,o=e?.error,a=e?.tool_count}switch(s){case"loading":return(0,K.jsx)(p.fq,{loading:!0,text:e("加载中")});case"success":return(0,K.jsx)(p.fq,{success:!0,text:`${a??0} ${e("个工具")}`});case"failed":return(0,K.jsx)("span",{title:o??e("加载失败"),children:(0,K.jsx)(p.fq,{success:!1,text:e("加载失败")})});default:return(0,K.jsx)(p.fq,{text:e("未加载")})}},Ke=async e=>{for(let e=0;e<O.length;e++)O[e].index=e;let t={list:M,docs_update_tag:Y.current};null!=e&&(t={param:e}),Y.current=!1;(await u.XO.post("ai_docs_setting_save",t)).code===h.m.Success&&(0,x.SK)("保存成功")},Ne=async()=>{for(let e=0;e<re.length;e++)re[e].index=e;(await u.XO.post("ai_system_prompts/save",{list:re})).code===h.m.Success&&(0,x.SK)("保存成功")};return(0,K.jsxs)("div",{children:[(0,K.jsx)(i.aZ,{position:"right",children:pe(j.oV.ai_agent_setting)&&(0,K.jsx)(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>{he(-1)}})}),(0,K.jsx)(c.jW,{isFull:!0,more:!0,children:(0,K.jsx)(c.NN,{children:(0,K.jsxs)(c.xh,{children:[(0,K.jsx)(c.fI,{children:(0,K.jsx)(c.VP,{widthPer:100,maxWidth:"130rem",children:(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsx)("h2",{children:e("供应商设置")})," ",(0,K.jsx)(a.rA,{icon:"info",onClick:()=>{me('\n1. Only OpenAI-style AI APIs are supported. Fill in the FULL endpoint path (not just the domain), e.g. https://ark.cn-beijing.volces.com/api/v3/chat/completions\n2. The longer the conversation history, the more expensive the LLM token cost. Currently, there is no long-term memory simplification capability. You can set the system prompt to make the AI answer more concisely to save tokens\n3. When writing the model request parameter JSON, you can only write JSON in it, to configure the attributes supported by OpenAI-style AI, such as temperature, thinking (Doubao\'s deep thinking toggle), etc.\n4. You can enable "stream": true in the model request parameters to improve response speed.\n5. Deep thinking currently affects output speed. It is recommended to set { "thinking" : { "type":"disabled" } } to disable it (Doubao example).\n6. To use the AI feature to query server information, the AI needs to be able to know some commands. You need to first set command permissions for the user in user settings. It is recommended to set * to allow all commands, and then set the dangerous commands that are not allowed to be executed in the settings\n7. The model type and Become Tool are now both configured in "More Attributes → Extra Parameter Settings" using request_type / tool_mode (comments are already provided in the editor).\n8. After becoming a tool, the model will be loaded as a tool, enabling different models to serve as different roles; please do not set both it and "Enabled" to true at the same time.\n')},title:"信息"})]}),rightTopCom:(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"short_text",title:e("全局prompt"),onClick:()=>{ue({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{L.sys_prompt=e,$({...L}),v.xK.set_value_temp(""),await be({...L,sys_prompt:e})}}),v.xK.set_value_temp(L.sys_prompt??"")}}),(0,K.jsx)(a.rA,{icon:"edit_attributes",title:e("全局")+" "+e("model请求参数json编写"),onClick:()=>{ue({model:"ace/mode/json",open:!0,fileName:"",save:async e=>{L.json_params=e,$({...L}),v.xK.set_value_temp(""),await be({...L,json_params:e})},can_format:!0}),v.xK.set_value_temp(L.json_params??"")}}),(0,K.jsx)(a.rA,{icon:"settings",title:e("全局")+" "+e("额外参数设置"),onClick:()=>{ue({model:"ace/mode/yaml",open:!0,fileName:"",save:async e=>{L.yaml_env=e,$({...L}),v.xK.set_value_temp(""),await be({...L,yaml_env:e})}}),v.xK.set_value_temp(L.yaml_env??"")}}),(0,K.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{P([...O,{note:"",open:!1,path:"",yaml_env:I.CP,json_params:I.cL}])}}),(0,K.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:async()=>{await we()}})]}),children:(0,K.jsx)(d.X,{headers:n,onRowDrag:(e,t)=>{P((0,C.TI)(O,e,t))},rows:O.map((t,n)=>{const s=[(0,K.jsx)("div",{children:n}),(0,K.jsx)(m.Sm,{value:I.Lv.get_label_by_v(t.url,t.show_options?.options_agent_url_list),options:t.show_options?.options_agent_url_list,handleInputChange:e=>{t.url=e},no_border:!0}),(0,K.jsx)(m.l6,{value:t.open,onChange:e=>{((e,t,n)=>{const s=[];for(let e=0;e<O.length;e++)O[e].open=e===n&&t,s.push(O[e]);P(s)})(0,e,n)},options:ge,no_border:!0}),(0,K.jsx)(m.Sm,{type:I.Lv.have_label_by_v(t.token,t.show_options?.options_agent_key_list)?null:"password",value:I.Lv.get_label_by_v(t.token,t.show_options?.options_agent_key_list),options:t.show_options?.options_agent_key_list,handleInputChange:e=>{t.token=e},no_border:!0}),(0,K.jsx)(m.Sm,{value:I.Lv.get_label_by_v(t.model,t.show_options?.options_agent_model_list),options:t.show_options?.options_agent_model_list,handleInputChange:e=>{t.model=e},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"short_text",title:"prompt",onClick:()=>{v.xK.set_value_temp(O[n].sys_prompt??""),ue({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{O[n].sys_prompt=e,P(O),v.xK.set_value_temp(""),we(O)}})}}),(0,K.jsx)(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:()=>{v.xK.set_value_temp(O[n].json_params),ue({model:"ace/mode/json",open:!0,fileName:"",save:async e=>{O[n].json_params=e,P(O),v.xK.set_value_temp(""),we(O)},can_format:!0})}}),(0,K.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{v.xK.set_value_temp(O[n].yaml_env),ue({model:"ace/mode/yaml",open:!0,fileName:"",save:async e=>{O[n].yaml_env=e,P(O),v.xK.set_value_temp(""),we(O)}})}})]}),(0,K.jsx)(m.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{O.splice(e,1),P([...O])})(n)}),(0,K.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>(e=>{P([...O,{...O[e],open:!1}])})(n)})]})];return s}),width:"10rem"})})})}),(0,K.jsx)(c.fI,{children:(0,K.jsx)(c.VP,{widthPer:70,maxWidth:"100rem",children:(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - stdio"]})," ",(0,K.jsx)(a.rA,{icon:"info",onClick:()=>{me("\n1. 这里配置的是 MCP Client 启动参数,当前实现的是 stdio 模式,也就是通过 command + args 启动本地 MCP Server\n2. 例如可以填 npx / uvx / python 等命令,再配合对应的 MCP server 包参数\n3. 保存后会自动重新加载 MCP 工具,agent 聊天时会把这些工具一起带给模型\n4. 建议把 cwd 配到具体项目目录,避免 server 在错误目录里运行\n")},title:"信息"})]}),rightTopCom:(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>je("stdio")}),(0,K.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Ce()}})]}),children:(0,K.jsx)(d.X,{headers:oe,onRowDrag:(e,t)=>{D((0,C.TI)(T,T.indexOf(ne[e]),T.indexOf(ne[t]))),V.current=!0},rows:ne.map((t,n)=>{const s=T.indexOf(t);return[(0,K.jsx)("div",{children:n}),(0,K.jsx)(m.Sm,{value:t.name,handleInputChange:e=>{t.name=e,V.current=!0},no_border:!0}),(0,K.jsx)(m.l6,{value:t.open,onChange:e=>{t.open=e,D([...T]),V.current=!0},options:ge,no_border:!0}),Ie(T.indexOf(t)),(0,K.jsx)(m.Sm,{value:t.command,handleInputChange:e=>{t.command=e,V.current=!0},no_border:!0}),(0,K.jsx)(m.Sm,{value:t.args,handleInputChange:e=>{t.args=e,V.current=!0},no_border:!0}),(0,K.jsx)(m.Sm,{value:t.cwd,handleInputChange:e=>{t.cwd=e,V.current=!0},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{Se(t,s)}}),(0,K.jsx)(a.rA,{icon:"settings",title:"env",onClick:()=>{v.xK.set_value_temp(t.env??""),ue({model:"ace/mode/yaml",open:!0,fileName:"",save:async e=>{t.env=e,D([...T]),v.xK.set_value_temp(""),V.current=!0,Ce()}})}})]}),(0,K.jsx)(m.Sm,{value:t.note,handleInputChange:e=>{t.note=e,V.current=!0},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>fe(t)}),(0,K.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>ye(t)})]})]}),width:"10rem"})})})}),(0,K.jsx)(c.fI,{children:(0,K.jsxs)(c.VP,{widthPer:70,maxWidth:"100rem",children:[(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - HTTP"]})," "]}),rightTopCom:(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>je("http")}),(0,K.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Ce()}})]}),children:(0,K.jsx)(d.X,{headers:ae,onRowDrag:(e,t)=>{D((0,C.TI)(T,T.indexOf(se[e]),T.indexOf(se[t]))),V.current=!0},rows:se.map((t,n)=>{const s=T.indexOf(t);return[(0,K.jsx)("div",{children:n}),(0,K.jsx)(m.Sm,{value:t.name,handleInputChange:e=>{t.name=e,V.current=!0},no_border:!0}),(0,K.jsx)(m.l6,{value:t.open,onChange:e=>{t.open=e,D([...T]),V.current=!0},options:ge,no_border:!0}),Ie(T.indexOf(t)),(0,K.jsx)(m.Sm,{value:t.endpoint,handleInputChange:e=>{t.endpoint=e,V.current=!0},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{Se(t,s)}}),(0,K.jsx)(a.rA,{icon:"settings",title:"headers",onClick:()=>{v.xK.set_value_temp(t.headers??""),ue({model:"ace/mode/yaml",open:!0,fileName:"",save:async e=>{t.headers=e,D([...T]),v.xK.set_value_temp(""),V.current=!0,Ce()}})}})]}),(0,K.jsx)(m.Sm,{value:t.note,handleInputChange:e=>{t.note=e,V.current=!0},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>fe(t)}),(0,K.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>ye(t)})]})]}),width:"10rem"})}),(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsx)("h2",{children:e("系统会话提示词")})," ",(0,K.jsx)(a.rA,{icon:"info",onClick:()=>{me('\n1. 系统会话提示词,在 AI 聊天页创建会话时可以选择,选中的提示词会自动填入聊天框作为第一条系统消息\n2. 适用于预先设定常用的会话场景模板,如"代码审查"、"翻译助手"、"运维诊断"等\n3. "LLM编辑开关":开启后,当用户选择了该系统提示词发起对话时,AI 将会获得一个"更新会话提示词"工具,允许 AI 在对话中对当前会话进行总结,并写入到本提示词的"LLM编辑提示词"字段(全局保存,供之后的新会话沿用),使 AI 能自我维护长期上下文。\n4. "LLM编辑提示词":可选。AI 编辑后写回的内容(可预填初始方向)。仅在"LLM编辑开关"开启时生效。\n5. "编辑规则":可选。给 LLM 的编辑要求,例如"总结时不要超过 300 token"、"用简洁的项目要点记录"等。仅在"LLM编辑开关"开启时生效。\n')},title:"信息"})]}),rightTopCom:(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{le([...re,{prompt:"",note:"",llm_prompt_enable:!1}])}}),(0,K.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Ne()}})]}),children:(0,K.jsx)(d.X,{headers:ie,onRowDrag:(e,t)=>{le((0,C.TI)(re,e,t))},rows:re.map((t,n)=>{const s=[(0,K.jsx)("div",{children:n}),(0,K.jsx)("div",{children:(0,K.jsx)(a.rA,{icon:"short_text",title:e("提示词"),onClick:()=>{v.xK.set_value_temp(t.prompt??""),ue({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.prompt=e,le([...re]),v.xK.set_value_temp(""),Ne()}})}})}),(0,K.jsx)(a.Ay,{checked:!!t.llm_prompt_enable,onChange:e=>{t.llm_prompt_enable=e,le([...re])},title:e("LLM编辑开关")}),(0,K.jsx)("div",{children:(0,K.jsx)(a.rA,{icon:"edit_note",title:e("llm_pmt"),onClick:()=>{v.xK.set_value_temp(t.llm_prompt??""),ue({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt=e,le([...re]),v.xK.set_value_temp(""),Ne()}})}})}),(0,K.jsx)("div",{children:(0,K.jsx)(a.rA,{icon:"rule",title:e("编辑规则"),onClick:()=>{v.xK.set_value_temp(t.llm_prompt_tip??""),ue({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt_tip=e,le([...re]),v.xK.set_value_temp(""),Ne()}})}})}),(0,K.jsx)(m.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,K.jsx)("div",{children:(0,K.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{re.splice(e,1),le([...re])})(n)})})];return s}),width:"10rem"})}),(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsx)("h2",{children:e("长期记忆")})," ",(0,K.jsx)(a.rA,{icon:"info",onClick:()=>{me(e("开启后跨会话保存记忆。四个固定文件:周/月/年/永久。每周结束自动压缩周→月,每月结束自动压缩月→年,每年结束自动压缩年→永久。编辑按钮可手动查看和修改。"))},title:"信息"})]}),rightTopCom:(0,K.jsx)("div",{children:(0,K.jsx)(a.Ay,{checked:ce,onChange:async t=>{de(t),await u.XO.post("ai_long_term_memory_setting/save",{open:t}),(0,x.SK)(e("长期记忆设置已保存"))},title:e("开关")})}),children:(0,K.jsx)("div",{style:{display:"flex",gap:"0.5rem",padding:"0.5rem 0",flexWrap:"wrap"},children:[{type:"week",label:e("周记忆"),tip:e("上限3000字")},{type:"month",label:e("月记忆"),tip:e("上限6000字")},{type:"year",label:e("年记忆"),tip:e("上限9000字")},{type:"forever",label:e("永久记忆"),tip:e("上限12000字")}].map(({type:t,label:n,tip:s})=>(0,K.jsx)(a.rA,{icon:"edit",title:`${e("编辑")} ${n} (${s})`,onClick:async()=>{const e=await u.XO.get(`ai_long_term_memory_bucket/${t}`),n=e.code===h.m.Success?e.data??"":"";v.xK.set_value_temp(n),ue({model:"ace/mode/text",open:!0,fileName:`long_term_memory_${t}.txt`,save:async e=>{await u.XO.post(`ai_long_term_memory_bucket/${t}/save`,{data:e}),v.xK.set_value_temp("")}})}},t))})})]})}),(0,K.jsxs)(c.fI,{children:[(0,K.jsx)(c.VP,{widthPer:50,maxWidth:"80rem",children:(0,K.jsx)(p.uF,{self_title:(0,K.jsxs)("span",{className:" div-row ",children:[(0,K.jsx)("h2",{children:e("本地知识库")})," ",(0,K.jsx)(a.rA,{icon:"info",onClick:()=>{me("\n1. 本地知识库用于为AI增强理解能力,或者分析本地文件,原理读取本地的文件,对文件在内存中建立全文索引,为AI提供额外数据(需要有模型开启才能使用)\n2. 该功能只能用于小型知识库,作为本地小型或者公司内部资料使用还是没有问题的\n3. 每次保存都会重新加载知识库中的文件,不会全部重新加载,而是检测哪些文件有变更\n")},title:"信息"})]}),rightTopCom:(0,K.jsxs)("div",{children:[(0,K.jsx)(a.Ay,{checked:ee,onChange:async e=>{await u.jV.post("docs_on_set",{status:e}),ve(),t()},title:e("知识库开关")}),(0,K.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{v.xK.set_value_temp(F.current),ue({model:"ace/mode/yaml",open:!0,fileName:"",save:async e=>{F.current=e,v.xK.set_value_temp(""),Ke(F.current)}})}}),(0,K.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{X([...M,{note:"",auto_load:!1,dir:""}]),Y.current=!0}}),(0,K.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Ke()}})]}),children:(0,K.jsx)(d.X,{headers:N,onRowDrag:(e,t)=>{X((0,C.TI)(M,e,t)),Y.current=!0},rows:M.map((t,n)=>{const s=[(0,K.jsx)("div",{children:n}),(0,K.jsx)(m.Sm,{value:t.dir,handleInputChange:e=>{t.dir=e,Y.current=!0},no_border:!0}),(0,K.jsx)(m.l6,{value:t.auto_load,onChange:e=>{t.auto_load=e,X([...M]),Y.current=!0},options:ge,no_border:!0}),(0,K.jsx)(m.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,K.jsxs)("div",{children:[(0,K.jsx)(a.rA,{icon:"delete",title:e("删除记录"),onClick:()=>(e=>{M.splice(e,1),X([...M]),Y.current=!0})(n)}),(0,K.jsx)(a.rA,{icon:"restore",title:e("手动加载"),onClick:()=>{xe({sub_title:"手动加载",confirm_fun:()=>{u.jV.post("docs_load_file",{param_path:t.dir}),(0,x.SK)("ok")}})}}),(0,K.jsx)(a.rA,{icon:"delete_forever",title:e("从索引删除"),onClick:()=>{xe({sub_title:"从索引删除",confirm_fun:()=>{u.jV.post("docs_del",{param_path:t.dir}),(0,x.SK)("ok")}})}})]})];return s}),width:"10rem"})})}),R&&(0,K.jsx)(c.VP,{widthPer:50,maxWidth:"80rem",children:(0,K.jsxs)(p.Zp,{title:e("知识库加载信息"),children:[(0,K.jsx)(c.Yh,{left:e("最近一次加载")+","+e("加载进度"),right:R?.progress}),(0,K.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件数量")}`,right:R?.num}),(0,K.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件字符数量")}`,right:R?.char_num}),(0,K.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件大小")}`,right:(0,b.v7)(R?.size)}),(0,K.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总耗时")}`,right:(0,b.a3)(R?.consume_time_ms_len)}),(0,K.jsx)(c.Yh,{left:`${e("总文件数量")}`,right:R?.total_num})]})})]})]})})})]})}},24659(e,t,n){var s=n(22022);n.d(t,["K",0,()=>{const{t:e}=(0,s.Bd)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[259],{8694(e,t,a){a.d(t,{$K:()=>o,RB:()=>i,l5:()=>l,vo:()=>s,vr:()=>r});let n=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({});class o{open=!1;port;key="";async_ips=[]}class s{client_num_id;client_name;open=!1;ip;mask;serverIp;serverPort;key="";model=n.udp}let i=function(e){return e[e.row=1]="row",e[e.json=2]="json",e[e.form=3]="form",e}({});class r{body_type;header_type;url;method;headers;data;form_data_list;local_download_path}class l{enabled;ip;port;bypass;useForLocal;type}},75007(e,t,a){a.d(t,{h:()=>s});a(96540);var n=a(85997),o=a(74848);function s(e){return(0,o.jsxs)("h2",{className:"message",children:[(0,o.jsx)(n.In,{icon:"sentiment_dissatisfied"}),(0,o.jsx)("span",{children:e.context})]})}},47374(e,t,a){a.d(t,{e:()=>u});var n=a(96540),o=a(61973),s=a(64694),i=a(34289),r=a(61443),l=a(75725),d=a(22022),c=a(85997),p=a(74848);function u(e){let t=(0,o.zy)();const[a,u]=(0,n.useState)([]),[h,m]=(0,n.useState)("/"),[f,y]=(0,n.useState)(void 0),{t:_,i18n:x}=(0,d.Bd)();n.useEffect(()=>{let t="",a=(0,i.vX)().split("/");a=a.filter(e=>e);const n=a.indexOf(e.baseRoute),o=[];if(-1!=n){t=(0,s.IO)(a.slice(0,n),e.baseRoute);const i=a.slice(n+1);for(let e=0;e<i.length;e++){const a=i[e];o.push({value:a,href:0===e?`${t}${a}/`:(0,s.IO)(o[e-1].href,a)})}m(t),u(o)}},[t]);const v=t=>{t.stopPropagation(),e.clickFun(t)};return(0,p.jsx)("div",{className:"breadcrumbs",onClick:e=>{y(void 0!==f?void 0:"")},children:(0,p.jsx)(n.Fragment,{children:void 0===f?(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)("span",{className:"chevron",children:(0,p.jsx)(o.N_,{to:h,onClick:v,children:(0,p.jsx)(c.In,{icon:"home"})})}),a.map((e,t)=>(0,p.jsxs)("span",{className:"chevron",children:[(0,p.jsx)(c.In,{icon:"keyboard_arrow_right"}),(0,p.jsx)(o.N_,{to:e.href,onClick:v,children:decodeURIComponent(e.value)})]},t))]}):(0,p.jsx)(l.QM,{click:()=>{y(void 0)},children:(0,p.jsx)(r.Sm,{width:"100%",placeholder:_("输入跳转的目录"),handlerEnter:t=>{e.input_path_enter&&e.input_path_enter(t),y(void 0)}})})})})}},77481(e,t,a){a.d(t,{S:()=>r,X:()=>i});var n=a(96540),o=a(61443),s=a(74848);function i(e){const[t,a]=n.useState([]),i=(0,n.useRef)(-1),[r,l]=(0,n.useState)(-1),[d,c]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?a(Array.isArray(e.children)?e.children:[e.children]):a(e.rows)},[e.rows,e.children]);const p=()=>{i.current=-1,l(-1),c(-1)};return(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:e.headers?.map((t,a)=>{const n=!!e.filter&&(e.filter.column??0)===a;let i=t;if(n){const a=e.filter,n=a.options.find(e=>e.value===a.value);null!=a.value&&n&&(i=`${t} (${n.label})`)}return(0,s.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,s.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:i}):t},a)})})}),(0,s.jsx)("tbody",{children:t.map((t,a)=>{const n=!!e.onRowDrag;return(0,s.jsx)("tr",{className:n?(r===a?"row-dragging":"")+(d===a?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(i.current=a,l(a),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||i.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",c(a))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=i.current,a=d;p(),t<0||a<0||t===a||e.onRowDrag?.(t,a)})())},onDragEnd:p,children:t.map((a,n)=>{const o=n===t.length-1?"small":"";return(0,s.jsx)("td",{className:o,style:{width:e.width??"auto"},children:a},n)})},a)})})]})}function r(e){return(0,s.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,s.jsx)("div",{children:e},t))})}},83029(e,t,a){a.d(t,{N:()=>x});var n=a(96540),o=a(34843),s=a(82893),i=a(74848);function r(e){const[t,a]=(0,o.fp)(s.AG.user_base_info);return(0,i.jsx)("div",{children:e.div?(0,i.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,i.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,i.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var l=a(64694),d=a(61443),c=a(85997),p=a(61973),u=a(22022);const h=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let m,f,y=[];const _=[];function x(e){const[t,a]=(0,n.useState)([]),[x,v]=(0,n.useState)(-1),w=(0,p.zy)(),[g,j]=(0,n.useState)(!1),[k,b]=(0,n.useState)(!1),{t:N}=(0,u.Bd)(),[K,S]=(0,n.useState)([]),[C,A]=(0,o.fp)(s.AG.nav_index_add_item_by_now_list),F=e=>{-1!==x?_[x]._children=e:y=e};(0,n.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();y=t,a(y)})()},[w]);(0,n.useEffect)(()=>{if(C){const e=[...t,{name:"",color:(0,l.Lr)(h),...C}];F(e),a(e),j(!0),A(void 0)}},[C]);const D=e=>{v(x+1),a(e._children),_.push(e)};return(0,i.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==x&&(0,i.jsx)(c.rA,{title:"返回",icon:"arrow_back",onClick:()=>{a(0===x?y:_[x-1]._children),v(x-1),_.pop()}}),t.map((o,s)=>(0,i.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{m=t})(0,s),onDrop:e=>((e,n)=>{e.preventDefault();const o=t[m],s=t[n];if(s&&"dir"===s._type){const e=[...t];return e.splice(m,1),s._children||(s._children=[]),s._children.push(o),F(e),void a(e)}const i=[...t],r=i[m];i.splice(m,1),i.splice(n,0,r),F(i),a(i)})(e,s),style:{cursor:g?"move":"pointer"},children:[(0,i.jsx)(r,{name:o.name,item:o,...o,div:g,target:"_blank",click_dir:D,clickItem:e.clickItem}),g&&(void 0!==K.find(e=>e===s)||k)&&(0,i.jsxs)("div",{className:k?"":" site_edit ",children:["dir"===o._type?(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(d.Sm,{value:o.name,handleInputChange:e=>{o.name=e},placeholder:N("输入类目名"),no_border:!0}),(0,i.jsx)(d.Sm,{value:o.color,type:"color",handleInputChange:e=>{o.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,i.jsx)("div",{children:(0,i.jsx)(d.Sm,{value:o[e.key],type:"color"===e.key?"color":void 0,handleInputChange:t=>{o[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!k&&(0,i.jsx)(c.C3,{text:N("折叠"),clickFun:()=>{S((0,l.P1)(K,s))}})]}),g&&(0,i.jsx)("div",{style:{display:"block"},children:(0,i.jsxs)("span",{className:"div-row ",children:[(0,i.jsx)(c.C3,{text:N("删除"),clickFun:()=>{(e=>{const n=[...t];n.splice(e,1),F(n),a(n)})(s)}}),(0,i.jsx)(c.C3,{text:N("编辑"),clickFun:()=>{void 0===K.find(e=>e===s)&&S([...K,s])}})]})})]},s)),g&&(0,i.jsxs)("div",{style:{display:"block"},children:[(0,i.jsx)(c.rA,{title:N("取消"),icon:"cancel",onClick:()=>{S([]),j(!1),f&&(a(f),F(f)),b(!1)}}),(0,i.jsx)(c.rA,{title:N("添加"),icon:"add",onClick:async()=>{const n=[...t,{name:"",color:(0,l.Lr)(h),...e.get_pre_add_item&&await e.get_pre_add_item()}];F(n),a(n)}}),(0,i.jsx)(c.rA,{title:N("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];F(e),a(e)}}),(0,i.jsx)(c.rA,{title:N("全部编辑"),icon:k?"unfold_less":"unfold_more",onClick:()=>{b(!k)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,i.jsx)(c.rA,{icon:g?"save":"edit",title:N(g?"保存":"编辑"),onClick:async()=>{g?e.save&&await e.save(y):f=t,j(!g)}})]})}},259(e,t,a){a.r(t),a.d(t,{default:()=>_e});var n=a(96540),o=a(70447),s=a(75725),i=a(61443),r=a(22022),l=a(34843),d=a(82893),c=a(85997),p=a(77481),u=a(14284),h=a(62042),m=a(40505),f=a(45907),y=a(23496),_=a(53459),x=a(78247),v=a(23430),w=a(74848);function g(){const{t:e}=(0,r.Bd)(),t=(0,f.y)(),{check_user_auth:a}=(0,x.MH)(),g=a(v.oV.browser_proxy_edit),[,j]=(0,l.fp)(d.AG.prompt_card),[k,b]=(0,n.useState)([]),[N,K]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[A,F]=(0,n.useState)(""),[D,L]=(0,n.useState)(""),[M,I]=(0,n.useState)(""),B=[e("状态"),e("备注"),e("目标"),e("端口"),e("访问地址"),e("操作")],P=async()=>{try{const e=await u.s2.get(y.s.browser_proxy_port_list);e.code===_.m.Success&&b(Array.isArray(e.data)?e.data:[])}catch(e){}};(0,n.useEffect)(()=>{P()},[]);const R=e=>{F(e?.id??""),L(e?`${e.proto}://${e.host}${e.root_path&&"/"!==e.root_path?e.root_path:""}`:""),I(e?.note??"")},E=()=>{K(!1),C(!1),R(void 0)},$=e=>`http://${window.location.hostname||"127.0.0.1"}:${e.port}/`,G=e=>{const t=localStorage.getItem("token")||"";return`${$(e)}${t?`?_t=${encodeURIComponent(t)}`:""}`};return(0,w.jsxs)(s.fI,{children:[(0,w.jsx)(s.VP,{widthPer:g?55:100,maxWidth:g?"90rem":void 0,children:(0,w.jsx)(s.xh,{children:(0,w.jsx)(o.uF,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:e("网页代理目标")}),(0,w.jsx)(c.rA,{icon:"info",title:e("信息"),onClick:()=>{j({open:!0,title:e("信息"),context_div:(0,w.jsx)("div",{children:(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:e("wbvpn_port_tip")}),(0,w.jsx)("li",{children:e("wbvpn_port_tip2")}),(0,w.jsx)("li",{children:e("wbvpn_port_tip3")})]})})})}})]}),rightTopCom:(0,w.jsx)("div",{children:g&&!S&&(0,w.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{K(!0),C(!0),R(void 0)}})}),children:(0,w.jsx)(p.X,{headers:B,rows:k.map(a=>{const n=[(0,w.jsx)(c.Ay,{checked:!1!==a.enabled,disabled:!g,title:e("启用"),onChange:t=>(async(t,a)=>{try{await u.s2.post(y.s.browser_proxy_port_set_enabled,{id:t.id,enabled:a}),(0,h.SK)(e(a?"已启用":"已禁用")),await P()}catch(e){}})(a,t)}),(0,w.jsx)(o.xP,{children:a.note||"-"}),(0,w.jsx)(o.xP,{children:`${a.proto}://${a.host}`}),(0,w.jsx)(o.xP,{children:String(a.port)}),(0,w.jsx)(o.xP,{children:$(a)}),(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"open_in_new",title:e("新窗口打开"),onClick:()=>(e=>{window.open(G(e),"_blank","noopener,noreferrer")})(a)}),(0,w.jsx)(c.rA,{icon:"tab",title:e("当前窗口打开"),onClick:()=>(e=>{window.location.href=G(e)})(a)}),(0,w.jsx)(c.rA,{icon:"content_copy",title:e("复制"),onClick:()=>(async t=>{const a=$(t);(0,m.lW)(a)?(0,h.SK)(e("已复制")):(0,h.zN)(e("复制失败"))})(a)}),g&&(0,w.jsx)(c.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{K(!1),C(!0),R(e)})(a)}),g&&(0,w.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>(a=>{t({title:e("确认删除"),sub_title:a.host,confirm_fun:async()=>{try{await u.s2.post(y.s.browser_proxy_port_remove,{id:a.id}),(0,h.SK)(e("已删除")),await P()}catch(e){}}})})(a)})]})];return n}),width:"10rem"})})})}),g&&S&&(0,w.jsx)(s.VP,{widthPer:45,maxWidth:"40rem",children:(0,w.jsx)(s.xh,{children:(0,w.jsxs)(o.Zp,{self_title:(0,w.jsx)("span",{className:" div-row ",children:(0,w.jsx)("h2",{children:e(""+(N?"添加":"编辑"))})}),rightBottomCom:(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"cancel",title:e("取消"),onClick:E}),(0,w.jsx)(c.rA,{icon:N?"add_circle":"save",title:e(N?"添加":"保存"),onClick:async()=>{if(D.trim())try{N?(await u.s2.post(y.s.browser_proxy_port_add,{address:D.trim(),note:M}),(0,h.SK)(e("添加成功"))):(await u.s2.post(y.s.browser_proxy_port_update,{id:A,address:D.trim(),note:M}),(0,h.SK)(e("修改成功"))),E(),await P()}catch(e){}else(0,h.zN)(e("目标地址不能为空"))}})]}),children:[(0,w.jsx)("label",{children:e("目标地址")}),(0,w.jsx)(i.Sm,{value:D,placeholder:e("目标地址例如"),handleInputChange:e=>L(e)}),(0,w.jsx)("label",{children:e("备注")}),(0,w.jsx)(i.Sm,{value:M,handleInputChange:e=>I(e)})]})})})]})}function j(e){return(0,w.jsx)(g,{})}var k=a(34289),b=a(4412),N=(a(75007),a(83029)),K=a(97856),S=a(92275),C=a(14944),A=a(64405);const F=n.lazy(()=>Promise.all([a.e(4924),a.e(5614)]).then(a.bind(a,85614)));function D(e){const[t,a]=(0,n.useState)(null),[o,s]=(0,l.fp)(d.AG.remoteShellShow),[i,r]=(0,n.useState)(!1),[c,p]=(0,l.fp)(d.AG.sshInfo),[u,h]=(0,l.fp)(d.AG.shellNowDir),[m,f]=(0,l.fp)(d.AG.user_base_info),y=m.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",_=()=>{(async()=>{t&&(t.dispose(),a(null))})()};(0,n.useEffect)(()=>()=>{_()},[]),(0,n.useEffect)(()=>{o.show?t||((async()=>{const e=new K.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:y,cursor:y,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4});let t;const n=t=>{e.write(t)};t=a=>{e.clear(),e.write(a),t=n},C.ws.addMsg(S.HK.remote_shell_getting,e=>{t(e.context)}),e.onData(async e=>{const t=new A.x;t.key=c.key,t.cmd=e;const a=new S.hf(S.HK.remote_shell_send);a.context=t,await C.ws.send(a)}),a(e)})(),r(!0)):_()},[o]);return(0,w.jsx)(F,{show:o.show,terminal:t,init:(e,a)=>{t.writeln("[38;2;29;153;243mopen shell...[0m ");const n=new S.hf(S.HK.remote_shell_open),s=new A.x;s.key=c.key,s.init_path=o.path,s.rows=e,s.cols=a,n.context=s,C.ws.send(n)}})}var L=a(47374),M=a(61973),I=a(99214),B=a(47022),P=a(88815),R=a(6960),E=a(79240),$=a(89824),G=a(12730);function O(e){const{t}=(0,r.Bd)();(0,M.zy)();(0,M.Zp)();const{check_user_auth:a}=(0,x.MH)(),[o,s]=(0,l.fp)(d.AG.nowFileList),[i,p]=(0,l.fp)(d.AG.uploadFiles),[u,m]=(0,l.fp)(d.AG.showPrompt),[f,y]=(0,l.fp)(d.AG.selectedFileList),[_,v]=(0,l.fp)(d.AG.enterKey),[g,j]=(0,l.fp)(d.AG.copyedFileList),[b,N]=(0,l.fp)(d.AG.cutedFileList),[K,S]=(0,l.fp)(d.AG.selectedFileList),[C,A]=(0,l.fp)(d.AG.clickFileList),[F,D]=(0,l.fp)(d.AG.remoteShellShow),[L,P]=(0,l.fp)(d.AG.sshInfo),R=(0,I.Vs)();function E(e){(0,h.SK)(e)}return(0,w.jsxs)(n.Fragment,{children:[f.length>0&&(0,w.jsx)(c.rA,{icon:"delete",title:t("删除"),onClick:()=>{m({show:!0,type:$.PromptEnum.SshDelete,overlay:!0,data:{}})}}),f.length>0&&(0,w.jsx)(c.rA,{icon:"content_copy",title:t("复制"),onClick:function(){const e=(0,I.ib)(o,f);j(e.map(e=>`/${(0,k.GG)("remoteShell",(0,k.vX)())}${e.name}`)),N([]),E("已复制")}}),f.length>0&&(0,w.jsx)(c.rA,{icon:"content_cut",title:t("剪切"),onClick:function(){const e=(0,I.ib)(o,f);N(e.map(e=>`/${(0,k.GG)("remoteShell",(0,k.vX)())}${e.name}`)),j([]),E("已剪切")}}),(g.length>0||b.length>0)&&(0,w.jsx)(c.rA,{onClick:function(){m({show:!0,type:$.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:t("粘贴到此处"),tip:g.length+b.length}),1===f.length&&o.files.length>=1&&(0,I.ib)(o,f)[0].type!==B.Iw.folder&&(0,w.jsx)(c.rA,{icon:"download",title:t("下载"),onClick:function(){const e=(0,I.ib)(o,f),t=`/api/ssh/download?file=${`/${(0,k.GG)("remoteShell",(0,k.vX)())}${decodeURIComponent(e[0].name)}`}&key=${L.key}&token=${localStorage.getItem("token")}`;window.open(t)}}),1===f.length&&(0,w.jsx)(c.rA,{icon:"edit_attributes",title:t("重命名"),onClick:function(){m({show:!0,type:$.PromptEnum.SshReName,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"terminal",title:"shell",onClick:function(){F.show?D({show:!1,path:""}):D({show:!0,path:`/${(0,k.GG)("remoteShell",(0,k.vX)())}`})}}),(0,w.jsx)(c.rA,{icon:"grid_view",title:t("切换样式"),onClick:R}),(0,w.jsx)(c.rA,{icon:"create_new_folder",title:t("创建文件夹"),onClick:function(){m({show:!0,type:$.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"note_add",title:t("创建文本文件"),onClick:function(){m({show:!0,type:$.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"upload_file",title:"上传",onClick:()=>{m({show:!0,type:$.PromptEnum.UploadFile,overlay:!0,data:{call:e=>{let t=e.currentTarget?.files;if(!t)return;let a=!!t[0].webkitRelativePath;const n=[],o=new Set;for(let e=0;e<t.length;e++){const s=t[e],i=a?s.webkitRelativePath:`${s.webkitRelativePath}${s.name}`;s.fullPath=i,a&&o.add((0,G.S)(i)),n.push(s)}const s=[];if(a)for(const e of Array.from(o))s.push({isDir:!0,fullPath:e,name:e});s.push(...n),p(s),m({show:!0,type:$.PromptEnum.SshUpload,overlay:!1,data:{}})}}})}}),(0,w.jsx)(c.rA,{icon:"close",title:t("关闭"),onClick:()=>{e.close()}})]})}var H=a(60096),T=a(21499);let z;function U(e){const{t}=(0,r.Bd)(),a=(0,M.zy)(),[o,s]=(0,l.fp)(d.AG.nowFileList),[c,p]=(0,l.fp)(d.AG.selectedFileList),[m,f]=(0,l.fp)(d.AG.clickFileList),[y,x]=(0,l.fp)(d.AG.sshInfo),[g,j]=(0,n.useState)(""),N=(0,M.Zp)(),[K,S]=(0,l.fp)(d.AG.user_base_info),C=async e=>{const t=new A.x;t.key=y.key,t.dir=e||`/${(0,k.GG)("remoteShell",(0,k.vX)())}`;const a=await u.Fg.post("get/dir",t);if(a.code!==_.m.Success)return void(0,h.zN)("连接失败");const{folders:n,files:o}=a.data||{};for(const e of o??[])e.origin_size=e.size,e.size=(0,P.v7)(e.size),K.user_data.file_time_show_type===v.KD.time?e.show_mtime=e.mtime?(0,T.Yq)(e.mtime):"":e.show_mtime=e.mtime?(0,R.s)(e.mtime):"";for(const e of n??[])K.user_data.file_time_show_type===v.KD.time?e.show_mtime=e.mtime?(0,T.Yq)(e.mtime):"":e.show_mtime=e.mtime?(0,R.s)(e.mtime):"";const i={folders:n||[],files:o||[]};(0,I.yC)(i,K.user_data.dir_show_type),s(i),z=i};function F(){p([]),f([])}(0,n.useEffect)(()=>{F(),(async()=>{await C()})()},[a]);return(0,w.jsxs)(n.Fragment,{children:[(0,w.jsx)(b.aZ,{children:(0,w.jsx)(i.$Z,{handleEnterPress:()=>{if(!z)return;p([]),f([]);const e=[],t=[];for(const t of z.files??[])t.name.includes(g)&&e.push(t);for(const e of z.folders??[])e.name.includes(g)&&t.push(e);s({files:e,folders:t})},placeholder:t("搜索当前目录"),icon:"search",value:"",handleInputChange:e=>{j(e)},max_width:"25em"})}),(0,w.jsx)(b.aZ,{position:"right",children:(0,w.jsx)(O,{close:e.close})}),(0,w.jsx)(L.e,{baseRoute:"remoteShell",clickFun:F,input_path_enter:e=>{(0,E.Z1)(e)?C(e):N((0,E.Jn)((0,k.vX)(),e)),p([]),f([]),s({files:[],folders:[]})}}),(0,w.jsx)(H.Ic,{handleContextMenu:()=>{},clickBlank:e=>{e.target===e.currentTarget&&p([])},file_list:o.files,folder_list:o.folders,fileHandler:C}),(0,w.jsx)(D,{})]})}function V(e){const{t}=(0,r.Bd)(),a=(0,M.Zp)(),[o,s]=(0,n.useState)(""),[p,m]=(0,n.useState)(""),[f,y]=(0,n.useState)(""),[g,j]=(0,n.useState)(""),[k,K]=(0,n.useState)(void 0),[S,C]=(0,n.useState)(""),[F,D]=(0,l.fp)(d.AG.shellNowDir),[L,I]=(0,l.fp)(d.AG.sshInfo),{check_user_auth:B}=(0,x.MH)(),P=async e=>{const t=new A.x;if(t.password=e?e.password:p,t.domain=e?e.domain:g,t.port=e?e.port:k,t.username=e?e.username:o,t.private_path=e?e.private_path:f,t.dir=e?e.dir:S,!t.dir)return void(0,h.zN)("dir not found");if(!t.username)return void(0,h.zN)("username not found");if(!t.domain)return void(0,h.zN)("domain not found");if(!t.port)return void(0,h.zN)("port not found");if(!t.private_path&&!t.password)return void(0,h.zN)("private_path password not found");const n=await u.Fg.post("start",t);n&&n.code===_.m.Success&&(a((0,E.Jn)("/proxy/remoteShell",t.dir)),D([t.dir]),I(n.data))};return(0,w.jsxs)(n.Fragment,{children:[!L.key&&(0,w.jsxs)(b.aZ,{position:"right",children:[(0,w.jsx)(i.$Z,{placeholder:t("目录"),icon:"home",value:S,handleInputChange:e=>C(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("账号"),icon:"verified_user",value:o,handleInputChange:e=>s(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{type:"password",placeholder:t("密码"),icon:"password",value:p,handleInputChange:e=>m(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("私钥路径"),icon:"private_connectivity",value:f,handleInputChange:e=>y(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("连接地址"),icon:"location_on",value:g,handleInputChange:e=>{j(e)},max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("端口"),icon:"outlet",value:k,handleInputChange:e=>{if(!e)return;/^\d+$/.test(e)||(0,h.zN)("不是数字"),K(parseInt(e))},max_width:"7rem"}),(0,w.jsx)(c.rA,{icon:"play_arrow",title:t("连接"),onClick:()=>{P()}})]}),L.key?(0,w.jsx)(U,{close:async()=>{const e=new A.x;e.key=L.key;await u.Fg.post("close",e);I({})},data:{port:k,password:p,username:o,domain:g,dir:S}}):(0,w.jsx)(N.N,{have_auth_edit:B(v.oV.ssh_proxy_tag_update),getItems:async()=>{const e=await u.Fg.get("tag");return e.code===_.m.Success?e.data:[]},save:async e=>{await u.Fg.post("tag/save",e)},clickItem:async e=>{j(e.domain),C(e.dir),K(e.port),s(e.username),m(e.password),y(e.private_path),await P(e)},items:[{key:"name",preName:t("名字")},{key:"domain",preName:t("地址")},{key:"port",preName:t("端口")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")},{key:"private_path",preName:t("私钥路径")},{key:"dir",preName:t("访问目录")},{key:"color",preName:"color"}]})]})}function Z(e){switch(e){case 0:return 1;case 2:return 2;default:return 0}}class J{constructor(e){this.canvas=e,this.render=new ee.Canvas.create(this.canvas),this.activeSession=!1,this.install()}close(){this.activeSession=!1}install(){var e=this;return this.canvas.addEventListener("mousemove",function(t){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:0,isPressed:!1}),t.preventDefault||e.activeSession(),!1}),this.canvas.addEventListener("mousedown",function(t){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!0}),t.preventDefault(),!1}),this.canvas.addEventListener("mouseup",function(t){if(e.activeSession){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("contextmenu",function(t){if(e.activeSession){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("DOMMouseScroll",function(t){if(e.activeSession){var a=t.detail,n=Math.round(15*Math.abs(a)/8),o=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.wheel,{x:t.clientX-o.left,y:t.clientY-o.top,step:n,isNegative:a>0,isHorizontal:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("mousewheel",function(t){if(e.activeSession){var a=Math.abs(t.deltaX)>Math.abs(t.deltaY),n=a?t.deltaX:t.deltaY,o=Math.round(15*Math.abs(n)/8),s=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.wheel,{x:t.clientX-s.left,y:t.clientY-s.top,step:o,isNegative:n>0,isHorizontal:a}),t.preventDefault(),!1}}),window.addEventListener("keydown",function(t){if(e.activeSession)return C.ws.sendData(S.HK.scancode,{code:ee.scancode(t),isPressed:!0}),t.preventDefault(),!1}),window.addEventListener("keyup",function(t){if(e.activeSession)return C.ws.sendData(S.HK.scancode,{code:ee.scancode(t),isPressed:!1}),t.preventDefault(),!1}),this}connect(e,t,a,n,o,s){var i=this;C.ws.addMsg(S.HK.rdp_connect,e=>{console.log("[mstsc.js] connected"),i.activeSession=!0}),C.ws.addMsg(S.HK.rdp_bitmap,e=>{const t=e.context;t.data=e.bin_context,i.render.update(t)}),C.ws.addMsg(S.HK.rdp_close,e=>{s(null),console.log("[mstsc.js] close"),i.activeSession=!1}),C.ws.addMsg(S.HK.rdp_error,e=>{i.activeSession=!1});const r=new S.hf;r.cmdType=S.HK.infos,r.context={ip:e.indexOf(":")>-1?e.split(":")[0]:e,port:a,screen:{width:this.canvas.width,height:this.canvas.height},domain:t,username:n,password:o,locale:ee.locale()},C.ws.send(r)}}class X{constructor(e){this.canvas=e,this.ctx=e.getContext("2d")}update(e){var t=null;t=e.isCompress?function(e){var t=null;switch(e.bitsPerPixel){case 15:t="bitmap_decompress_15";break;case 16:t="bitmap_decompress_16";break;case 24:t="bitmap_decompress_24";break;case 32:t="bitmap_decompress_32";break;default:throw"invalid bitmap data format"}var a=new Uint8Array(e.data),n=Module._malloc(a.length),o=new Uint8Array(Module.HEAPU8.buffer,n,a.length);o.set(a);var s=e.destRight-e.destLeft+1,i=e.destBottom-e.destTop+1,r=s*i*4,l=Module._malloc(r),d=new Uint8Array(Module.HEAPU8.buffer,l,r),c=(Module.ccall(t,"number",["number","number","number","number","number","number","number","number"],[d.byteOffset,s,i,e.width,e.height,o.byteOffset,a.length]),new Uint8ClampedArray(d.buffer,d.byteOffset,r));return Module._free(n),Module._free(l),{width:s,height:i,data:c}}(e):function(e){return{width:e.width,height:e.height,data:new Uint8ClampedArray(e.data)}}(e);var a=this.ctx.createImageData(t.width,t.height);a.data.set(t.data),this.ctx.putImageData(a,e.destLeft,e.destTop)}}var Y={"":0,Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,Pause:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,PrintScreen:84,IntlBackslash:86,F11:87,F12:88,NumpadEqual:89,F13:100,F14:101,F15:102,F16:103,F17:104,F18:105,F19:106,F20:107,F21:108,F22:109,F23:110,KanaMode:112,Lang2:113,Lang1:114,IntlRo:115,F24:118,Convert:121,NonConvert:123,IntlYen:125,NumpadComma:126,MediaTrackPrevious:57360,MediaTrackNext:57369,NumpadEnter:57372,ControlRight:57373,VolumeMute:57376,LaunchApp2:57377,MediaPlayPause:57378,MediaStop:57380,VolumeDown:57390,VolumeUp:57392,BrowserHome:57394,NumpadDivide:57397,PrintScreen:57399,AltRight:57400,NumLock:57413,Pause:57414,Home:57415,ArrowUp:57416,PageUp:57417,ArrowLeft:57419,ArrowRight:57421,End:57423,ArrowDown:57424,PageDown:57425,Insert:57426,Delete:57427,OSLeft:57435,OSRight:57436,ContextMenu:57437,Power:57438,BrowserSearch:57445,BrowserFavorites:57446,BrowserRefresh:57447,BrowserStop:57448,BrowserForward:57449,BrowserBack:57450,LaunchApp1:57451,LaunchMail:57452,MediaSelect:57453},W={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft",220:"IntlBackslash",90:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",77:"KeyM",188:"Comma",190:"Period",191:"Slash",16:"ShiftRight",17:"ControlLeft",18:"AltLeft",91:"OSLeft",32:"Space",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",13:"NumpadEnter",96:"Numpad0",110:"NumpadDecimal",17:"ControlLeft"},q={firefox:{fr:{27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",169:"Minus",61:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",160:"BracketLeft",164:"BracketRight",13:"Enter",20:"CapsLock",20:"CapsLock",81:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",77:"Semicolon",165:"Quote",170:"Backslash",16:"ShiftLeft",60:"IntlBackslash",87:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",188:"KeyM",59:"Comma",58:"Period",161:"Slash",16:"ShiftRight",17:"ControlLeft",91:"OSLeft",18:"AltLeft",32:"Space",17:"ControlLeft",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",96:"Numpad0",110:"NumpadDecimal",13:"NumpadEnter",17:"ControlLeft",67:"KeyC",17:"ControlLeft"},en:W},chrome:{fr:{27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock",20:"CapsLock",81:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",77:"Semicolon",192:"Quote",220:"Backslash",16:"ShiftLeft",60:"IntlBackslash",87:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",188:"KeyM",190:"Comma",191:"Period",223:"Slash",16:"ShiftRight",17:"ControlLeft",91:"OSLeft",18:"AltLeft",32:"Space",17:"ControlLeft",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",96:"Numpad0",110:"NumpadDecimal",13:"NumpadEnter",17:"ControlLeft",67:"KeyC",17:"ControlLeft"},en:W}};function Q(){}Q.prototype={$:function(e){return document.getElementById(e)},elementOffset:function(e){for(var t=0,a=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft,a+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:a,left:t}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(e){return new J(e)}},Canvas:{create:function(e){return new X(e)}},scancode(e){var t=Q.prototype.locale();return t=["fr","en"].indexOf(t)>0&&t||"en",Y[e.code||q[Q.prototype.browser()||"firefox"][t][e.keyCode]]}};let ee=new Q;var te=a(38240);let ae;function ne(){const{t:e}=(0,r.Bd)(),[t,a]=(0,l.fp)(d.AG.header_min),{check_user_auth:o}=(0,x.MH)(),[p,m]=(0,n.useState)(void 0),[f,y]=(0,n.useState)(3389),[g,j]=(0,n.useState)(void 0),[k,K]=(0,n.useState)(void 0),[A,F]=(0,n.useState)(!1),[D,L]=(0,n.useState)(!1);var M=null;(0,n.useEffect)(()=>(ae||(async()=>{try{await(0,te.J)("rle.js"),ae=!0}catch(e){return void(0,h.zN)("加载资源失败")}})(),()=>{M&&(M.close(),M=null)}),[]);const I=t=>{L(!0),function(n,o,s,i){if(n=n||t.address,s=s||t.username,i=i||t.password,!n||!s)return(0,h.zN)(e("ip或者账号不允许为空")),void L(!1);!function(e){M||(M=ee.client.create(ee.$(e)))}("rdpwebview");var r=ee.$("rdpwebview");r.style.display="inline",r.width=window.innerWidth,r.height=window.innerHeight,F(!0),a(!0),M.connect(n,"",o,s,i,function(e){ee.$("rdpwebview").style.display="none",a(!1),L(!1),F(!1)})}(p,f,g,k)};return(0,w.jsxs)("div",{children:[(0,w.jsxs)(b.aZ,{position:"right",children:[(0,w.jsx)(i.$Z,{placeholder:e("地址"),icon:"network_ping",value:p,max_width:"15rem",handleInputChange:e=>m(e)}),(0,w.jsx)(i.$Z,{placeholder:e("端口"),icon:"outlet",value:f,max_width:"10rem",handleInputChange:e=>{e&&y(parseInt(e))}}),(0,w.jsx)(i.$Z,{placeholder:e("账号"),icon:"manage_accounts",value:g,max_width:"15rem",handleInputChange:e=>j(e)}),(0,w.jsx)(i.$Z,{placeholder:e("密码"),icon:"password",value:k,max_width:"15rem",handleInputChange:e=>K(e)}),!D&&(0,w.jsx)(c.rA,{icon:"play_arrow",title:e("连接"),onClick:I}),D&&(0,w.jsx)(c.rA,{icon:"close",title:e("关闭"),onClick:async()=>{F(!1),await C.ws.sendData(S.HK.rdp_disconnect,"");var e=ee.$("rdpwebview");e.getContext("2d").clearRect(0,0,e.width,e.height),ee.$("rdpwebview").style.display="none",L(!1),a(!1)}})]}),(0,w.jsxs)(s.jW,{isFull:A,children:[!D&&(0,w.jsx)(N.N,{have_auth_edit:o(v.oV.rdp_proxy_tag_update),getItems:async()=>{const e=await u.J0.get("tag");return e.code===_.m.Success?e.data:[]},save:async e=>{(await u.J0.post("tag/save",e)).code!==_.m.Success&&(0,h.zN)("网络错误")},clickItem:async e=>{K(e.password),j(e.username),m(e.address),y(e.port),I(e)},items:[{key:"name",preName:e("名字")},{key:"address",preName:e("地址")},{key:"port",preName:e("端口")},{key:"username",preName:e("账号")},{key:"password",preName:e("密码")},{key:"color",preName:"color"}]}),(0,w.jsx)("canvas",{id:"rdpwebview",style:{display:"none"}})]})]})}var oe=a(8694),se=a(19324);const ie=(0,n.createContext)({activeKey:"",setActiveKey:()=>{}});function re(e){const{children:t,activeKey:a,defaultActiveKey:o,onChange:s,width:i}=e,[r,l]=(0,n.useState)(()=>a??o??"");(0,n.useEffect)(()=>{void 0!==a&&l(a)},[a]);const d=e=>{void 0===a&&l(e),s&&s(e)},c=[];return n.Children.forEach(t,e=>{n.isValidElement(e)&&e.type===le&&c.push({key:e.props.itemKey,tab:e.props.tab,disabled:e.props.disabled})}),(0,n.useEffect)(()=>{!r&&c.length>0&&l(c[0].key)},[c,r]),(0,w.jsx)(ie.Provider,{value:{activeKey:r,setActiveKey:d},children:(0,w.jsxs)("div",{className:"modern-tabs-container",style:{width:i||"100%"},children:[(0,w.jsx)("div",{className:"modern-tabs-nav",children:c.map(e=>{const t=["modern-tabs-tab",r===e.key?"active":"",e.disabled?"disabled":""].filter(Boolean).join(" ");return(0,w.jsx)("div",{className:t,onClick:()=>!e.disabled&&d(e.key),children:e.tab},e.key)})}),(0,w.jsx)("div",{className:"modern-tabs-content",children:t})]})})}function le(e){const{itemKey:t,children:a}=e,{activeKey:o}=(0,n.useContext)(ie),s=o===t;return(0,w.jsx)("div",{className:"modern-tab-panel "+(s?"active":""),children:a})}const de=n.lazy(()=>Promise.all([a.e(2543),a.e(4091)]).then(a.bind(a,84091)));let ce,pe,ue,he;function me(){const{t:e}=(0,r.Bd)(),[t,a]=(0,l.fp)(d.AG.confirm),[f,y]=(0,l.fp)(d.AG.showPrompt),{check_user_auth:g}=(0,x.MH)(),[j,k]=(0,n.useState)(""),[b,K]=(0,l.fp)(d.AG.router_jump),[A,F]=(0,n.useState)("get"),[D,L]=(0,n.useState)(""),[M,I]=(0,n.useState)(void 0),[B,R]=(0,n.useState)([]),[E,G]=(0,n.useState)([]),[O,H]=(0,n.useState)("headers"),[z,U]=(0,n.useState)(String(oe.RB.row)),[V,Z]=(0,n.useState)("body"),[J,X]=(0,n.useState)(),[Y,W]=(0,l.fp)(d.AG.nav_index_add_item_by_now_list),[q,Q]=(0,l.fp)(d.AG.prompt_card);x.xK.set_value_temp("{}",0),x.xK.set_value_temp("",1),(0,n.useEffect)(()=>(ce={},pe="",ue="",he="",x.xK.get_editor(0).session.setMode("ace/mode/json"),b.http_download_map_path&&(I(b.http_download_map_path),K({})),C.ws.sendData(S.HK.http_download_water,void 0).then(()=>{C.ws.addMsg(S.HK.http_download_water,e=>{const t=e.context;G(t)})}),()=>{C.ws&&"function"==typeof C.ws.removeMsg&&C.ws.removeMsg(S.HK.http_download_water)}),[]);const ee=e=>{const t=new oe.vr;t.url=D,t.method=A,t.header_type="headers"===O?1:2,"headers"===O&&(ce=JSON.parse(x.xK.get_editor_value(0))),t.headers=ce;const a=Number(z);if(t.body_type=a,a===oe.RB.row)pe=x.xK.get_editor_value(1),t.data=pe;else if(a===oe.RB.json)ce["Content-Type"]="application/json",pe=x.xK.get_editor_value(1),t.data=pe;else if(a===oe.RB.form){ce["Content-Type"]="multipart/form-data",t.form_data_list=B;for(const t of B)t.key&&t.is_file&&e&&e.append(t.fullPath,t.file_object)}return t};return(0,w.jsx)("div",{children:(0,w.jsxs)(s.xh,{children:[(0,w.jsxs)(s.fI,{children:[(0,w.jsxs)(s.VP,{children:[0!==E.length&&(0,w.jsx)(o.Zp,{title:"正在下载",children:(0,w.jsx)("div",{children:E.map((t,a)=>(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:"div-row",children:[(0,w.jsx)(c.rA,{icon:"cancel",title:e("取消"),onClick:()=>{C.ws.sendData(S.HK.http_download_cancel,t.local_download_path)}}),(0,w.jsx)(o.xP,{context:t.filename,tip_context:t.local_download_path}),(0,w.jsx)("span",{style:{paddingLeft:".3rem",color:"green"},children:`${t.progresses??0}% ${t.loaded?(0,P.v7)(t.loaded):""}MB / ${t.seep??""}MB/s `})]}),(0,w.jsx)("div",{style:{width:t.progresses?`${t.progresses}%`:"0",backgroundColor:"#40c4ff",height:"5px",transition:"0.2s ease width",borderRadius:"10px"}})]},a))})}),(0,w.jsxs)(o.Zp,{title:"",rightBottomCom:Number(z)===oe.RB.form&&"body"===O&&(0,w.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{R([{},...B])}}),children:[(0,w.jsxs)("div",{className:"http_url",children:[(0,w.jsx)(i.l6,{width:"10rem",value:A,onChange:e=>{F(e)},options:[{value:"get",color:"#28a745"},{value:"post",color:"#007bff"},{value:"put",color:"#fd7e14"},{value:"delete",color:"#dc3545"},{value:"head",color:"#6f42c1"},{value:"options",color:"#17a2b8"},{value:"connect",color:"#666666"},{value:"trace",color:"#666666"},{value:"custom",color:"#e83e8c"}]}),(0,w.jsx)(i.Sm,{width:"50rem",placeholder:e("http url"),value:D,handleInputChange:e=>{L(e)}}),(0,w.jsx)(c.rA,{icon:"send",title:e("发送"),onClick:async()=>{if(!u._U.have_http_method(A))return void(0,h.zN)("不存在的http method");if(!D)return void(0,h.zN)("url is empty");X(void 0),k("");const e=new FormData;e.append("data",JSON.stringify(ee(e)));let t="http/send";M&&(t+=`?local_download_path=${M}`),se.A.post(u._U.getUrl(t),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch(e=>{(0,h.zN)(e.message)}).then(e=>{if(!e)return;let t={};try{if(e.headers.filecat_remote_raw_headers&&(t=JSON.parse(e.headers.filecat_remote_raw_headers),he=JSON.stringify(t,null,2)),e.headers.filecat_remote_code)try{const t=JSON.parse(e.headers.filecat_remote_code);X(200===t||201===t?(0,w.jsx)("span",{style:{color:"green"},children:"200"}):t)}catch(e){console.log(e)}}catch(t){he=String(e.headers.filecat_remote_raw_headers)}const a=(t["content-type"]||t["Content-Type"]||"").toLowerCase();ue="object"==typeof e.data?JSON.stringify(e.data,null,2):e.data;const n=x.xK.get_editor(2),o="body"===V?ue:he;if(n){if(a.includes("application/json")||a.includes("+json")){n.session.setMode("ace/mode/json");try{const e=JSON.parse(ue);ue=JSON.stringify(e,null,2)}catch(e){}}else a.includes("html")?n.session.setMode("ace/mode/html"):a.includes("xml")?n.session.setMode("ace/mode/xml"):a.includes("javascript")?n.session.setMode("ace/mode/javascript"):n.session.setMode("ace/mode/text");n.setValue("body"===V?ue:he,-1)}k(o)})}}),g(v.oV.http_proxy_tag_update)&&(0,w.jsx)(c.rA,{title:e("添加"),icon:"save_as",onClick:()=>{if(!g(v.oV.http_proxy_tag_update))return void(0,h.zN)("no permission");for(const t of B)if(t.is_file)return void(0,h.zN)(e("frm_lm"));let t;Q({open:!0,title:e("信息"),context_div:(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"card-content",children:(0,w.jsx)(i.Sm,{placeholderOut:e("输入标签名"),handleInputChange:e=>t=e})}),(0,w.jsx)("div",{className:"card-action",children:(0,w.jsx)("button",{className:"button button--flat",onClick:async()=>{const e=await ee();e.local_download_path=M,e.form_data_list=JSON.stringify(B),e.headers=JSON.stringify(e.headers),"object"==typeof e.data&&(e.data=JSON.stringify(e.data)),e.name=t,W(e),Q({open:!1})},children:e("确定")})})]})})}})]}),(0,w.jsxs)(re,{activeKey:O,onChange:e=>H(e),children:[(0,w.jsx)(le,{itemKey:"headers",tab:e("请求头")+"(json)",children:(0,w.jsxs)("div",{style:{marginTop:"10px"},children:[(0,w.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"4px"},children:(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:function(){x.xK.get_editor(0)?.formatCode?.()}})}),(0,w.jsx)("div",{className:"http_ace",children:(0,w.jsx)(de,{name:"",editor_id:0})})]})}),(0,w.jsx)(le,{itemKey:"body",tab:e("请求体"),children:(0,w.jsxs)("div",{style:{marginTop:"10px"},children:[(0,w.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,w.jsxs)(re,{activeKey:z,onChange:e=>{U(e);const t=Number(e);t===oe.RB.row?x.xK.get_editor(1).session.setMode("ace/mode/text"):t===oe.RB.json&&x.xK.get_editor(1).session.setMode("ace/mode/json")},children:[(0,w.jsx)(le,{itemKey:String(oe.RB.row),tab:e("row")}),(0,w.jsx)(le,{itemKey:String(oe.RB.json),tab:e("json")}),(0,w.jsx)(le,{itemKey:String(oe.RB.form),tab:e("form")})]}),Number(z)!==oe.RB.form&&(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:function(){x.xK.get_editor(1)?.formatCode?.()}})]}),Number(z)===oe.RB.form&&(0,w.jsx)("div",{style:{marginTop:"10px"},children:(0,w.jsx)(p.X,{headers:["key",e("值")],rows:B.map((t,a)=>[(0,w.jsx)(i.Sm,{value:t.key,handleInputChange:e=>{t.key=e,R([...B])},no_border:!0}),(0,w.jsx)(i.Sm,{value:t.value,handleInputChange:e=>{t.value=e,t.is_file=!1,R([...B])},no_border:!0}),(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:()=>(e=>{y({show:!0,type:$.PromptEnum.UploadFile,overlay:!0,data:{extra_data:{only_file:!0},call:t=>{let a=t.currentTarget?.files;if(!a)return;const n=a[0];n.fullPath=(0,T.hU)()+Date.now().toString(),B[e].value=`${n}(${n.name})`,B[e].is_file=!0,B[e].fileName=n.name,B[e].fullPath=n.fullPath,R([...B]),B[e].file_object=n,y({overlay:!1,type:"",show:!1,data:{}})}}})})(a)}),(0,w.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{B.splice(e,1),R([...B])})(a)})]})]),width:"10rem"})}),(0,w.jsx)("div",{className:"http_ace",style:{marginTop:"10px",display:Number(z)!==oe.RB.form?"block":"none"},children:(0,w.jsx)(de,{name:"",editor_id:1})})]})})]}),(0,w.jsx)("div",{style:{paddingTop:"1rem"},children:void 0===M?(0,w.jsx)("span",{style:{cursor:"pointer",color:"#3b82f6"},onClick:()=>{I("")},children:e("下载到本地目录")}):(0,w.jsx)(i.Sm,{placeholder:e("本地地址"),value:M,handleInputChange:e=>{I(e)},handlerEnter:()=>{M||I(void 0)}})})]})]}),(0,w.jsx)(s.VP,{children:(0,w.jsxs)(o.Zp,{title:J,rightTopCom:(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:()=>{x.xK.get_editor(2)?.formatCode?.()}}),(0,w.jsx)(c.rA,{title:e("复制"),icon:"copy_all",onClick:()=>{const e=x.xK.get_editor_value(2);e&&((0,m.lW)(e),(0,h.SK)("完成"))}})]}),children:[(0,w.jsxs)(re,{activeKey:V,onChange:e=>{Z(e);const t="body"===e?ue:he;k(t);const a=x.xK.get_editor(2);if(a){try{JSON.parse(t),a.session.setMode("ace/mode/json")}catch{a.session.setMode("ace/mode/text")}a.setValue(t,-1)}},children:[(0,w.jsx)(le,{itemKey:"body",tab:e("响应体")}),(0,w.jsx)(le,{itemKey:"headers",tab:e("响应头")})]}),(0,w.jsx)("div",{className:"http_ace",style:{marginTop:"10px",height:"21rem"},children:(0,w.jsx)(de,{name:"",editor_id:2})})]})})]}),(0,w.jsx)(s.fI,{children:(0,w.jsx)(s.VP,{children:(0,w.jsx)(N.N,{getItems:async()=>{const e=await u._U.get("http/tag");return e.code===_.m.Success?e.data:[]},save:async e=>{(await u._U.post("http/tag/save",e)).code!==_.m.Success&&(0,h.zN)("网络错误")},have_auth_edit:g(v.oV.http_proxy_tag_update),clickItem:async e=>{L(e.url),F(e.method),I(e.local_download_path),e.header_type&&H(1===e.header_type?"headers":"body"),e.headers&&(ce=JSON.parse(e.headers),1===e.header_type&&(x.xK.get_editor(0).setValue(e.headers,-1),x.xK.get_editor(0).session.setMode("ace/mode/json"))),e.form_data_list&&R(JSON.parse(e.form_data_list)),e.data&&(pe=e.data),e.body_type&&(U(String(e.body_type)),e.body_type===oe.RB.row?x.xK.get_editor(1).session.setMode("ace/mode/text"):e.body_type===oe.RB.json&&x.xK.get_editor(1).session.setMode("ace/mode/json"),x.xK.get_editor(1).setValue(e.data,-1))},items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"method",preName:"method"},{key:"headers",preName:"headers"},{key:"data",preName:"data"},{key:"form_data_list",preName:"form_data_list"},{key:"local_download_path",preName:"local_download_path"},{key:"color",preName:"color"}]})})})]})})}var fe=a(87361);const ye=n.lazy(()=>Promise.all([a.e(8772),a.e(8257),a.e(7759)]).then(a.bind(a,45601)));function _e({}){const{check_user_auth:e}=(0,x.MH)(),{t}=(0,r.Bd)(),a=[];return e(v.oV.http_proxy)&&a.push({index:1,name:t("http代理"),rto:"http/",component:(0,w.jsx)(me,{})}),e(v.oV.ssh_proxy)&&a.push({index:1,name:`ssh${t("代理")}`,rto:"remoteShell/",component:(0,w.jsx)(V,{})}),e(v.oV.browser_proxy)&&a.push({index:1,name:`${t("浏览器")}${t("代理")}`,rto:"browserproxy/",component:(0,w.jsx)(j,{})}),e(v.oV.rdp_proxy)&&a.push({index:1,name:`rdp${t("代理")}`,rto:"rdp/",component:(0,w.jsx)(ne,{})}),e(v.oV.rtsp_proxy)&&a.push({index:1,name:t("rtsp播放器"),rto:"rtsp/",component:(0,w.jsx)(ye,{})}),(0,w.jsx)(s.W1,{optionList:a,father_route:fe.o.proxy})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3233,5614],{33616(e){var n;self,n=()=>(()=>{"use strict";var e,n={};return e=n,Object.defineProperty(e,"__esModule",{value:!0}),e.FitAddon=void 0,e.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const n=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(n._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,n=e._renderService.dimensions;if(0===n.css.cell.width||0===n.css.cell.height)return;const t=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),s=window.getComputedStyle(this._terminal.element),l=o-(parseInt(s.getPropertyValue("padding-top"))+parseInt(s.getPropertyValue("padding-bottom"))),a=i-(parseInt(s.getPropertyValue("padding-right"))+parseInt(s.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(a/n.css.cell.width)),rows:Math.max(1,Math.floor(l/n.css.cell.height))}}},n})(),e.exports=n()},40654(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>E});var r=t(96540),o=t(33616),i=(t(97856),t(85072)),s=t.n(i),l=t(97825),a=t.n(l),c=t(77659),d=t.n(c),u=t(55056),m=t.n(u),p=t(10540),h=t.n(p),x=t(41113),f=t.n(x),g=t(86739),v={};v.styleTagTransform=f(),v.setAttributes=m(),v.insert=d().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();s()(g.A,v);g.A&&g.A.locals&&g.A.locals;var y=t(40505),_=t(62042),b=t(84369),w=t(74848);function E(e){const[n,t]=(0,r.useState)(25),i=(0,r.useRef)(null),s=(0,r.useCallback)(new o.FitAddon,[]),l=(0,r.useRef)(null),a=(0,r.useRef)(null),{dragging:c,on_pointer_down:d,on_pointer_up:u}=(0,b.y)({direction:"vertical",target_ref:l,get_start_size:()=>n,px_to_unit:e=>e/parseFloat(getComputedStyle(l.current).fontSize),min:()=>{const e=parseFloat(getComputedStyle(l.current).fontSize);return 2.25+i.current.offsetHeight/e},max:()=>{const e=parseFloat(getComputedStyle(l.current).fontSize);return window.innerHeight/e-4},throttle:32,on_change:e=>{s.fit(),t(parseFloat(e.toFixed(2)))}});if((0,r.useEffect)(()=>{e.terminal&&(e.terminal.options.convertEol=!0,e.terminal.open(a.current),e.terminal.loadAddon(s),s.fit(),e.init&&e.init(e.terminal.rows,e.terminal.cols),e.terminal.attachCustomKeyEventHandler(n=>{if(n.ctrlKey&&"c"===n.key){const t=e.terminal.getSelection();if(t)return(0,y.lW)(t),(0,_.SK)("已复制"),n.preventDefault(),e.terminal.focus(),!1}else if("keydown"===n.type&&"v"===n.key&&n.ctrlKey)return!1;return!0}))},[e.terminal]),(0,r.useEffect)(()=>()=>{e.terminal&&e.terminal.dispose()},[]),e.show)return e.get_simple?(0,w.jsx)("div",{className:"pty",style:{height:"100%"},ref:a}):(0,w.jsxs)("div",{className:"shell",style:{height:`${n}em`,display:""+(e.file_shell_hidden?"none":"block")},ref:l,children:[(0,w.jsx)("div",{className:"shell__divider",ref:i,onPointerDown:d,onPointerUp:u}),(0,w.jsx)("div",{className:"pty",style:{height:n-1+"em"},ref:a}),c&&(0,w.jsx)("div",{className:"shell__overlay",onPointerUp:u})]})}},85614(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>s});var r=t(96540),o=(t(40654),t(74848));const i=r.lazy(()=>Promise.resolve().then(t.bind(t,40654)));function s(e){return(0,o.jsx)(r.Fragment,{children:(0,o.jsx)(i,{...e})})}},84369(e,n,t){"use strict";t.d(n,{y:()=>s});var r=t(96540),o=t(2543);function i(e){if(void 0!==e)return"function"==typeof e?e():e}function s(e){const{direction:n="vertical",target_ref:t,get_start_size:s,px_to_unit:l,min:a,max:c,throttle:d,on_change:u,on_drag_end:m}=e,[p,h]=(0,r.useState)(!1),x=(0,r.useRef)(null),f=(0,r.useRef)(u);f.current=u;const g=e=>"vertical"===n?e.clientY:e.clientX,v=(0,r.useRef)({direction:n,get_start_size:s,px_to_unit:l,min:a,max:c,get_pos:g});v.current={direction:n,get_start_size:s,px_to_unit:l,min:a,max:c,get_pos:g};const y=(0,r.useCallback)(e=>{const n=x.current;if(!n)return;const{px_to_unit:t,min:r,max:o,get_pos:s}=v.current,l=n.pos-s(e);let a=n.size+t(l);const c=i(r),d=i(o);void 0!==c&&(a=Math.max(c,a)),void 0!==d&&(a=Math.min(d,a)),f.current(a)},[]),_=r.useMemo(()=>void 0===d?y:o.throttle(e=>y(e),d),[d,y]),b=(0,r.useCallback)(()=>{x.current=null,h(!1);const e=_;"function"==typeof e.cancel&&e.cancel(),m?.()},[_,m]),w=(0,r.useCallback)(e=>{const{get_start_size:n,get_pos:t}=v.current;x.current={pos:t(e),size:n()},h(!0)},[]);return(0,r.useEffect)(()=>{if(!p)return;const e=t?.current??window;return e.addEventListener("pointermove",_),e.addEventListener("pointerup",b),()=>{e.removeEventListener("pointermove",_),e.removeEventListener("pointerup",b)}},[p,_,b,t]),(0,r.useEffect)(()=>{const e=_;return()=>{"function"==typeof e.cancel&&e.cancel()}},[_]),{dragging:p,on_pointer_down:w,on_pointer_up:b}}},86739(e,n,t){"use strict";var r=t(31601),o=t.n(r),i=t(76314),s=t.n(i)()(o());s.push([e.id,'/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author\'s permission):\n * Fabrice Bellard\'s javascript vt100 for jslinux:\n * http://bellard.org/jslinux/\n * Copyright (c) 2011 Fabrice Bellard\n * The original design remains. The terminal itself\n * has been extended to include xterm CSI codes, among\n * other features.\n */\n\n/**\n * Default styles for xterm.js\n */\n\n.xterm {\n cursor: text;\n position: relative;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n outline: none;\n}\n\n.xterm .xterm-helpers {\n position: absolute;\n top: 0;\n /**\n * The z-index of the helpers must be higher than the canvases in order for\n * IMEs to appear on top.\n */\n z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n padding: 0;\n border: 0;\n margin: 0;\n /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n position: absolute;\n opacity: 0;\n left: -9999em;\n top: 0;\n width: 0;\n height: 0;\n z-index: -5;\n /** Prevent wrapping so the IME appears against the textarea at the correct position */\n white-space: nowrap;\n overflow: hidden;\n resize: none;\n}\n\n.xterm .composition-view {\n /* TODO: Composition position got messed up somewhere */\n background: #000;\n color: #FFF;\n display: none;\n position: absolute;\n white-space: nowrap;\n z-index: 1;\n}\n\n.xterm .composition-view.active {\n display: block;\n}\n\n.xterm .xterm-viewport {\n /* On OS X this is required in order for the scroll bar to appear fully opaque */\n background-color: #000;\n overflow-y: scroll;\n cursor: default;\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.xterm .xterm-screen {\n position: relative;\n}\n\n.xterm .xterm-screen canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.xterm .xterm-scroll-area {\n visibility: hidden;\n}\n\n.xterm-char-measure-element {\n display: inline-block;\n visibility: hidden;\n position: absolute;\n top: 0;\n left: -9999em;\n line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n cursor: pointer;\n}\n\n.xterm.column-select.focus {\n /* Column selection mode */\n cursor: crosshair;\n}\n\n.xterm .xterm-accessibility:not(.debug),\n.xterm .xterm-message {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 10;\n color: transparent;\n pointer-events: none;\n}\n\n.xterm .xterm-accessibility-tree:not(.debug) *::selection {\n color: transparent;\n}\n\n.xterm .xterm-accessibility-tree {\n user-select: text;\n white-space: pre;\n}\n\n.xterm .live-region {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.xterm-dim {\n /* Dim should not apply to background, so the opacity of the foreground color is applied\n * explicitly in the generated class and reset to 1 here */\n opacity: 1 !important;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-overline {\n text-decoration: overline;\n}\n\n.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }\n.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }\n.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }\n.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }\n.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }\n\n.xterm-strikethrough {\n text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {\n\tz-index: 7;\n}\n\n.xterm-decoration-overview-ruler {\n z-index: 8;\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: none;\n}\n\n.xterm-decoration-top {\n z-index: 2;\n position: relative;\n}\n',""]);const l=s;t.d(n,["A",0,l])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5308],{65308(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(96540),a=n(34843),o=n(82893),i=n(34289),c=n(14284),l=n(38240),d=n(62042),s=n(61973),u=n(93245),m=n(23430),f=n(74848);let b,v=!1;function p(){const[e,t]=(0,a.fp)(o.AG.image_editor),n=(0,s.Zp)(),p=((0,s.zy)(),r.useRef(!1)),w=r.useRef(!1);return(0,r.useEffect)(()=>((async()=>{if(!v)try{await(0,l.J)("filerobot-image-editor.min.js"),v=!0}catch(e){return void(0,d.zN)("加载资源失败")}const r=(0,i.GG)("file",e.path),a=window.FilerobotImageEditor,{TABS:o,TOOLS:s}=a,u={defaultSavedImageName:e.name,source:c.$M.getDownloadUrl(r),onSave:async(t,n)=>{const a=t.extension,o=t.name??e.name,l=await new Promise(e=>t.imageCanvas.toBlob(e,t.mimeType));await c.$M.put(`${encodeURIComponent(`${(0,i.Yp)(r)}${o}.${a}`)}`,l,void 0),p.current=!1,w.current||(0,d.SK)("保存成功"),w.current=!1},onModify:()=>{p.current=!0},annotationsCommon:{fill:"#151717",stroke:"#ec0f42",shadowColor:"#151717"},Text:{text:""},Rotate:{angle:90,componentType:"slider"},tabsIds:[Object.values(o)],defaultTabId:o.ANNOTATE,defaultToolId:s.ANNOTATE};b=new a(document.querySelector("#editor_container"),u),b.render({onClose:r=>{b.terminate();const a=e.close;t({}),a?.(),n((0,i.vX)())}})})(),()=>{b&&b.terminate()}),[]),(0,u.a)(m.nE.image,()=>p.current,e=>{const t=Array.from(document.querySelectorAll("#editor_container button")).find(e=>(e.textContent||"").includes("Save")||(e.textContent||"").includes("保存"));t&&(w.current=!!e,t.click())}),(0,f.jsx)("div",{id:"image-editor-container",children:(0,f.jsx)("div",{className:"image-editor-context",children:(0,f.jsx)("div",{id:"editor_container",className:"image-editor-context"})})})}},93245(e,t,n){n.d(t,{a:()=>l});var r=n(96540),a=n(34843),o=n(82893),i=n(23430);const c=[{id:i.nE.ace,label:"文本编辑器(ace)"},{id:i.nE.md,label:"md编辑器"},{id:i.nE.mind,label:"思维导图编辑器"},{id:i.nE.draw,label:"draw编辑器"},{id:i.nE.timeline,label:"时间线编辑器"},{id:i.nE.image,label:"图片编辑器"},{id:i.nE.excel,label:"excel编辑器"}];function l(e,t,n,i=!1){const[c]=(0,a.fp)(o.AG.user_base_info),l=c?.user_data?.editor_auto_save,d=(0,r.useRef)(l);d.current=l;const s=(0,r.useRef)(t);s.current=t;const u=(0,r.useRef)(n);u.current=n,(0,r.useEffect)(()=>{if(i)return;const t=d.current;if(!t?.enable||t.interval<=0||!t.editors?.includes(e))return;const n=setInterval(()=>{s.current()&&u.current(!0)},1e3*t.interval);return()=>clearInterval(n)},[l,e,i])}n.d(t,["d",0,c])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5516],{52811(e,t,n){n.r(t),n.d(t,{default:()=>v,parseScene:()=>A});var a=n(96540),r=n(60882),s=n(34843),l=n(82893),c=n(14284),i=n(34289),o=n(62042),d=n(61973),u=n(57889),f=n(22022),g=n(53459),m=n(93245),w=(n(3561),n(23430)),x=n(74848);function A(e){if(!e)return null;const t="string"==typeof e?e:e.context??e.data??e;if(!t)return null;try{return"string"==typeof t?JSON.parse(t):t}catch{return null}}function v(){const[e,t]=(0,s.fp)(l.AG.excalidraw_editor),[n,v]=(0,a.useState)(null),[p,h]=(0,a.useState)(null),[y,E]=(0,a.useState)(!1),S=(0,d.Zp)(),{t:k}=(0,f.Bd)(),z=(0,a.useRef)(()=>{});(0,a.useEffect)(()=>{z.current=I});const C=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let t=!1;return(async()=>{if(e?.url){E(!0);try{const n=await u.l.get(e.url);if(t)return;const a=A(n);if(!a)throw new Error("invalid excalidraw scene");h(a)}catch{t||(h(null),(0,o.zN)("Load Excalidraw file failed"))}finally{t||E(!1)}}else h(null)})(),()=>{t=!0}},[e?.url]);const I=async(t=!1)=>{if(!n)return void(t||(0,o.zN)("Editor is not ready"));const a=n.getSceneElements(),s=n.getAppState(),l=n.getFiles(),d=(0,r.nu)(a,s,l,"local"),u=JSON.parse(d);u.appState={...u.appState??{},zoom:s.zoom,scrollX:s.scrollX,scrollY:s.scrollY,viewBackgroundColor:s.viewBackgroundColor,gridSize:s.gridSize};(await c.$M.post(`save/${encodeURIComponent((0,i.GG)("file",(0,i.vX)()))}${e.name}`,{context:JSON.stringify(u)})).code===g.m.Success&&(t||(0,o.SK)("保存成功"),C.current=!1)};return(0,m.a)(w.nE.draw,()=>C.current,e=>I(e)),(0,a.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&("s"===e.key||"S"===e.key||83===e.keyCode)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),z.current())};return window.addEventListener("keydown",e,!0),document.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0),document.removeEventListener("keydown",e,!0)}},[]),(0,x.jsx)("div",{id:"excalidraw-container",children:(0,x.jsxs)("div",{className:"excalidraw-context",children:[y&&(0,x.jsx)("div",{className:"common-box common-box-center",children:"Loading..."}),!y&&p&&(0,x.jsx)(r.Td,{langCode:"zh-CN",initialData:p,excalidrawAPI:e=>v(e),onChange:()=>{C.current=!0},onKeyDown:e=>!(!e.ctrlKey&&!e.metaKey||"s"!==e.key&&"S"!==e.key&&83!==e.keyCode)&&(e.preventDefault(),z.current(),!0),UIOptions:{dockedSidebarBreakpoint:0},children:(0,x.jsxs)(r.zU,{children:[(0,x.jsx)(r.zU.Item,{onSelect:()=>{t({}),S((0,i.vX)()),e?.close?.()},children:k("关闭")}),(0,x.jsx)(r.zU.Item,{onSelect:I,children:k("保存到服务器")}),(0,x.jsxs)(r.zU.Group,{title:"Excalidraw items",children:[(0,x.jsx)(r.zU.DefaultItems.LoadScene,{}),(0,x.jsx)(r.zU.DefaultItems.Export,{}),(0,x.jsx)(r.zU.DefaultItems.SaveToActiveFile,{}),(0,x.jsx)(r.zU.DefaultItems.SaveAsImage,{}),(0,x.jsx)(r.zU.DefaultItems.ClearCanvas,{}),(0,x.jsx)(r.zU.DefaultItems.ToggleTheme,{}),(0,x.jsx)(r.zU.DefaultItems.ChangeCanvasBackground,{})]})]})},e.url??"excalidraw")]})})}},93245(e,t,n){n.d(t,{a:()=>i});var a=n(96540),r=n(34843),s=n(82893),l=n(23430);const c=[{id:l.nE.ace,label:"文本编辑器(ace)"},{id:l.nE.md,label:"md编辑器"},{id:l.nE.mind,label:"思维导图编辑器"},{id:l.nE.draw,label:"draw编辑器"},{id:l.nE.timeline,label:"时间线编辑器"},{id:l.nE.image,label:"图片编辑器"},{id:l.nE.excel,label:"excel编辑器"}];function i(e,t,n,l=!1){const[c]=(0,r.fp)(s.AG.user_base_info),i=c?.user_data?.editor_auto_save,o=(0,a.useRef)(i);o.current=i;const d=(0,a.useRef)(t);d.current=t;const u=(0,a.useRef)(n);u.current=n,(0,a.useEffect)(()=>{if(l)return;const t=o.current;if(!t?.enable||t.interval<=0||!t.editors?.includes(e))return;const n=setInterval(()=>{d.current()&&u.current(!0)},1e3*t.interval);return()=>clearInterval(n)},[i,e,l])}n.d(t,["d",0,c])},51953(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},17834(e){e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},56933(e){e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3233,5614],{33616(e){var n;self,n=()=>(()=>{"use strict";var e,n={};return e=n,Object.defineProperty(e,"__esModule",{value:!0}),e.FitAddon=void 0,e.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const n=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(n._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,n=e._renderService.dimensions;if(0===n.css.cell.width||0===n.css.cell.height)return;const t=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),s=window.getComputedStyle(this._terminal.element),l=o-(parseInt(s.getPropertyValue("padding-top"))+parseInt(s.getPropertyValue("padding-bottom"))),a=i-(parseInt(s.getPropertyValue("padding-right"))+parseInt(s.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(a/n.css.cell.width)),rows:Math.max(1,Math.floor(l/n.css.cell.height))}}},n})(),e.exports=n()},40654(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>E});var r=t(96540),o=t(33616),i=(t(97856),t(85072)),s=t.n(i),l=t(97825),a=t.n(l),c=t(77659),d=t.n(c),u=t(55056),m=t.n(u),p=t(10540),h=t.n(p),x=t(41113),f=t.n(x),g=t(86739),v={};v.styleTagTransform=f(),v.setAttributes=m(),v.insert=d().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();s()(g.A,v);g.A&&g.A.locals&&g.A.locals;var y=t(40505),_=t(62042),b=t(84369),w=t(74848);function E(e){const[n,t]=(0,r.useState)(25),i=(0,r.useRef)(null),s=(0,r.useCallback)(new o.FitAddon,[]),l=(0,r.useRef)(null),a=(0,r.useRef)(null),{dragging:c,on_pointer_down:d,on_pointer_up:u}=(0,b.y)({direction:"vertical",target_ref:l,get_start_size:()=>n,px_to_unit:e=>e/parseFloat(getComputedStyle(l.current).fontSize),min:()=>{const e=parseFloat(getComputedStyle(l.current).fontSize);return 2.25+i.current.offsetHeight/e},max:()=>{const e=parseFloat(getComputedStyle(l.current).fontSize);return window.innerHeight/e-4},throttle:32,on_change:e=>{s.fit(),t(parseFloat(e.toFixed(2)))}});if((0,r.useEffect)(()=>{e.terminal&&(e.terminal.options.convertEol=!0,e.terminal.open(a.current),e.terminal.loadAddon(s),s.fit(),e.init&&e.init(e.terminal.rows,e.terminal.cols),e.terminal.attachCustomKeyEventHandler(n=>{if(n.ctrlKey&&"c"===n.key){const t=e.terminal.getSelection();if(t)return(0,y.lW)(t),(0,_.SK)("已复制"),n.preventDefault(),e.terminal.focus(),!1}else if("keydown"===n.type&&"v"===n.key&&n.ctrlKey)return!1;return!0}))},[e.terminal]),(0,r.useEffect)(()=>()=>{e.terminal&&e.terminal.dispose()},[]),e.show)return e.get_simple?(0,w.jsx)("div",{className:"pty",style:{height:"100%"},ref:a}):(0,w.jsxs)("div",{className:"shell",style:{height:`${n}em`,display:""+(e.file_shell_hidden?"none":"block")},ref:l,children:[(0,w.jsx)("div",{className:"shell__divider",ref:i,onPointerDown:d,onPointerUp:u}),(0,w.jsx)("div",{className:"pty",style:{height:n-1+"em"},ref:a}),c&&(0,w.jsx)("div",{className:"shell__overlay",onPointerUp:u})]})}},85614(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>s});var r=t(96540),o=(t(40654),t(74848));const i=r.lazy(()=>Promise.resolve().then(t.bind(t,40654)));function s(e){return(0,o.jsx)(r.Fragment,{children:(0,o.jsx)(i,{...e})})}},84369(e,n,t){"use strict";t.d(n,{y:()=>s});var r=t(96540),o=t(2543);function i(e){if(void 0!==e)return"function"==typeof e?e():e}function s(e){const{direction:n="vertical",target_ref:t,get_start_size:s,px_to_unit:l,min:a,max:c,throttle:d,on_change:u,on_drag_end:m}=e,[p,h]=(0,r.useState)(!1),x=(0,r.useRef)(null),f=(0,r.useRef)(u);f.current=u;const g=e=>"vertical"===n?e.clientY:e.clientX,v=(0,r.useRef)({direction:n,get_start_size:s,px_to_unit:l,min:a,max:c,get_pos:g});v.current={direction:n,get_start_size:s,px_to_unit:l,min:a,max:c,get_pos:g};const y=(0,r.useCallback)(e=>{const n=x.current;if(!n)return;const{px_to_unit:t,min:r,max:o,get_pos:s}=v.current,l=n.pos-s(e);let a=n.size+t(l);const c=i(r),d=i(o);void 0!==c&&(a=Math.max(c,a)),void 0!==d&&(a=Math.min(d,a)),f.current(a)},[]),_=r.useMemo(()=>void 0===d?y:o.throttle(e=>y(e),d),[d,y]),b=(0,r.useCallback)(()=>{x.current=null,h(!1);const e=_;"function"==typeof e.cancel&&e.cancel(),m?.()},[_,m]),w=(0,r.useCallback)(e=>{const{get_start_size:n,get_pos:t}=v.current;x.current={pos:t(e),size:n()},h(!0)},[]);return(0,r.useEffect)(()=>{if(!p)return;const e=t?.current??window;return e.addEventListener("pointermove",_),e.addEventListener("pointerup",b),()=>{e.removeEventListener("pointermove",_),e.removeEventListener("pointerup",b)}},[p,_,b,t]),(0,r.useEffect)(()=>{const e=_;return()=>{"function"==typeof e.cancel&&e.cancel()}},[_]),{dragging:p,on_pointer_down:w,on_pointer_up:b}}},86739(e,n,t){"use strict";var r=t(31601),o=t.n(r),i=t(76314),s=t.n(i)()(o());s.push([e.id,'/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author\'s permission):\n * Fabrice Bellard\'s javascript vt100 for jslinux:\n * http://bellard.org/jslinux/\n * Copyright (c) 2011 Fabrice Bellard\n * The original design remains. The terminal itself\n * has been extended to include xterm CSI codes, among\n * other features.\n */\n\n/**\n * Default styles for xterm.js\n */\n\n.xterm {\n cursor: text;\n position: relative;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n outline: none;\n}\n\n.xterm .xterm-helpers {\n position: absolute;\n top: 0;\n /**\n * The z-index of the helpers must be higher than the canvases in order for\n * IMEs to appear on top.\n */\n z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n padding: 0;\n border: 0;\n margin: 0;\n /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n position: absolute;\n opacity: 0;\n left: -9999em;\n top: 0;\n width: 0;\n height: 0;\n z-index: -5;\n /** Prevent wrapping so the IME appears against the textarea at the correct position */\n white-space: nowrap;\n overflow: hidden;\n resize: none;\n}\n\n.xterm .composition-view {\n /* TODO: Composition position got messed up somewhere */\n background: #000;\n color: #FFF;\n display: none;\n position: absolute;\n white-space: nowrap;\n z-index: 1;\n}\n\n.xterm .composition-view.active {\n display: block;\n}\n\n.xterm .xterm-viewport {\n /* On OS X this is required in order for the scroll bar to appear fully opaque */\n background-color: #000;\n overflow-y: scroll;\n cursor: default;\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.xterm .xterm-screen {\n position: relative;\n}\n\n.xterm .xterm-screen canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.xterm .xterm-scroll-area {\n visibility: hidden;\n}\n\n.xterm-char-measure-element {\n display: inline-block;\n visibility: hidden;\n position: absolute;\n top: 0;\n left: -9999em;\n line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n cursor: pointer;\n}\n\n.xterm.column-select.focus {\n /* Column selection mode */\n cursor: crosshair;\n}\n\n.xterm .xterm-accessibility:not(.debug),\n.xterm .xterm-message {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 10;\n color: transparent;\n pointer-events: none;\n}\n\n.xterm .xterm-accessibility-tree:not(.debug) *::selection {\n color: transparent;\n}\n\n.xterm .xterm-accessibility-tree {\n user-select: text;\n white-space: pre;\n}\n\n.xterm .live-region {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.xterm-dim {\n /* Dim should not apply to background, so the opacity of the foreground color is applied\n * explicitly in the generated class and reset to 1 here */\n opacity: 1 !important;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-overline {\n text-decoration: overline;\n}\n\n.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }\n.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }\n.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }\n.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }\n.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }\n\n.xterm-strikethrough {\n text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {\n\tz-index: 7;\n}\n\n.xterm-decoration-overview-ruler {\n z-index: 8;\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: none;\n}\n\n.xterm-decoration-top {\n z-index: 2;\n position: relative;\n}\n',""]);const l=s;t.d(n,["A",0,l])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5516,5744],{52811(e,t,n){n.r(t),n.d(t,{default:()=>x,parseScene:()=>v});var r=n(96540),a=n(60882),s=n(34843),l=n(82893),o=n(14284),c=n(34289),i=n(62042),d=n(61973),u=n(57889),f=n(22022),p=n(53459),m=n(93245),g=(n(3561),n(23430)),w=n(74848);function v(e){if(!e)return null;const t="string"==typeof e?e:e.context??e.data??e;if(!t)return null;try{return"string"==typeof t?JSON.parse(t):t}catch{return null}}function x(){const[e,t]=(0,s.fp)(l.AG.excalidraw_editor),[n,x]=(0,r.useState)(null),[y,h]=(0,r.useState)(null),[A,S]=(0,r.useState)(!1),k=(0,d.Zp)(),{t:z}=(0,f.Bd)(),E=(0,r.useRef)(()=>{});(0,r.useEffect)(()=>{E.current=I});const C=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let t=!1;return(async()=>{if(e?.url){S(!0);try{const n=await u.l.get(e.url);if(t)return;const r=v(n);if(!r)throw new Error("invalid excalidraw scene");h(r)}catch{t||(h(null),(0,i.zN)("Load Excalidraw file failed"))}finally{t||S(!1)}}else h(null)})(),()=>{t=!0}},[e?.url]);const I=async(t=!1)=>{if(!n)return void(t||(0,i.zN)("Editor is not ready"));const r=n.getSceneElements(),s=n.getAppState(),l=n.getFiles(),d=(0,a.nu)(r,s,l,"local"),u=JSON.parse(d);u.appState={...u.appState??{},zoom:s.zoom,scrollX:s.scrollX,scrollY:s.scrollY,viewBackgroundColor:s.viewBackgroundColor,gridSize:s.gridSize};(await o.$M.post(`save/${encodeURIComponent((0,c.GG)("file",(0,c.vX)()))}${e.name}`,{context:JSON.stringify(u)})).code===p.m.Success&&(t||(0,i.SK)("保存成功"),C.current=!1)};return(0,m.a)(g.nE.draw,()=>C.current,e=>I(e)),(0,r.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&("s"===e.key||"S"===e.key||83===e.keyCode)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),E.current())};return window.addEventListener("keydown",e,!0),document.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0),document.removeEventListener("keydown",e,!0)}},[]),(0,w.jsx)("div",{id:"excalidraw-container",children:(0,w.jsxs)("div",{className:"excalidraw-context",children:[A&&(0,w.jsx)("div",{className:"common-box common-box-center",children:"Loading..."}),!A&&y&&(0,w.jsx)(a.Td,{langCode:"zh-CN",initialData:y,excalidrawAPI:e=>x(e),onChange:()=>{C.current=!0},onKeyDown:e=>!(!e.ctrlKey&&!e.metaKey||"s"!==e.key&&"S"!==e.key&&83!==e.keyCode)&&(e.preventDefault(),E.current(),!0),UIOptions:{dockedSidebarBreakpoint:0},children:(0,w.jsxs)(a.zU,{children:[(0,w.jsx)(a.zU.Item,{onSelect:()=>{t({}),k((0,c.vX)()),e?.close?.()},children:z("关闭")}),(0,w.jsx)(a.zU.Item,{onSelect:I,children:z("保存到服务器")}),(0,w.jsxs)(a.zU.Group,{title:"Excalidraw items",children:[(0,w.jsx)(a.zU.DefaultItems.LoadScene,{}),(0,w.jsx)(a.zU.DefaultItems.Export,{}),(0,w.jsx)(a.zU.DefaultItems.SaveToActiveFile,{}),(0,w.jsx)(a.zU.DefaultItems.SaveAsImage,{}),(0,w.jsx)(a.zU.DefaultItems.ClearCanvas,{}),(0,w.jsx)(a.zU.DefaultItems.ToggleTheme,{}),(0,w.jsx)(a.zU.DefaultItems.ChangeCanvasBackground,{})]})]})},e.url??"excalidraw")]})})}},16575(e,t,n){n.r(t),n.d(t,{default:()=>f});var r=n(96540),a=n(60882),s=n(57889),l=n(14284),o=n(62042),c=n(53459),i=n(22022),d=n(52811),u=(n(3561),n(74848));function f(e){const{t}=(0,i.Bd)(),[n,f]=(0,r.useState)(null),[p,m]=(0,r.useState)(null),[g,w]=(0,r.useState)(!1),v=(0,r.useRef)(!1),x=(0,r.useRef)(!1),y=(0,r.useRef)({api:n,props:e});y.current={api:n,props:e};const h=async()=>{const e=(()=>{const e=y.current.api;if(!e)return null;const t=e.getSceneElements(),n=e.getAppState(),r=e.getFiles(),s=(0,a.nu)(t,n,r,"local"),l=JSON.parse(s);return l.appState={...l.appState??{},zoom:n.zoom,scrollX:n.scrollX,scrollY:n.scrollY,viewBackgroundColor:n.viewBackgroundColor,gridSize:n.gridSize},JSON.stringify(l)})();if(null===e)return(0,o.zN)(t("编辑器尚未就绪")),!1;return(await l.$M.post(`save/${encodeURIComponent(y.current.props.save_path)}`,{context:e})).code===c.m.Success&&(v.current=!1,y.current.props.on_dirty?.(!1),y.current.props.on_saved?.(),(0,o.SK)(t("保存成功")),!0)};return(0,r.useEffect)(()=>{e.register?.({save:h,is_dirty:()=>v.current})},[e.register]),(0,r.useEffect)(()=>{let n=!1;return(async()=>{if(e.url){w(!0);try{const t=await s.l.get(e.url);if(n)return;const r=(0,d.parseScene)(t);if(!r)throw new Error("invalid excalidraw scene");m(r)}catch{n||(m(null),(0,o.zN)(t("加载画板失败")))}finally{n||w(!1)}}else m(null)})(),()=>{n=!0}},[e.url]),(0,r.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&("s"===e.key||"S"===e.key||83===e.keyCode)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),h())};return window.addEventListener("keydown",e,!0),document.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0),document.removeEventListener("keydown",e,!0)}},[]),(0,u.jsxs)("div",{className:"excalidraw-inline",children:[g&&(0,u.jsx)("div",{className:"common-box common-box-center",children:"Loading..."}),!g&&p&&(0,u.jsx)(a.Td,{langCode:"zh-CN",initialData:p,excalidrawAPI:e=>f(e),onChange:()=>{x.current?v.current||(v.current=!0,y.current.props.on_dirty?.(!0)):x.current=!0},onKeyDown:e=>!(!e.ctrlKey&&!e.metaKey||"s"!==e.key&&"S"!==e.key&&83!==e.keyCode)&&(e.preventDefault(),h(),!0),UIOptions:{dockedSidebarBreakpoint:0},children:(0,u.jsxs)(a.zU,{children:[(0,u.jsx)(a.zU.Item,{onSelect:()=>h(),children:t("保存到服务器")}),(0,u.jsxs)(a.zU.Group,{title:"Excalidraw items",children:[(0,u.jsx)(a.zU.DefaultItems.Export,{}),(0,u.jsx)(a.zU.DefaultItems.SaveAsImage,{}),(0,u.jsx)(a.zU.DefaultItems.ClearCanvas,{}),(0,u.jsx)(a.zU.DefaultItems.ToggleTheme,{}),(0,u.jsx)(a.zU.DefaultItems.ChangeCanvasBackground,{})]})]})},e.reset_key??e.url??"excalidraw")]})}},93245(e,t,n){n.d(t,{a:()=>c});var r=n(96540),a=n(34843),s=n(82893),l=n(23430);const o=[{id:l.nE.ace,label:"文本编辑器(ace)"},{id:l.nE.md,label:"md编辑器"},{id:l.nE.mind,label:"思维导图编辑器"},{id:l.nE.draw,label:"draw编辑器"},{id:l.nE.timeline,label:"时间线编辑器"},{id:l.nE.image,label:"图片编辑器"},{id:l.nE.excel,label:"excel编辑器"}];function c(e,t,n,l=!1){const[o]=(0,a.fp)(s.AG.user_base_info),c=o?.user_data?.editor_auto_save,i=(0,r.useRef)(c);i.current=c;const d=(0,r.useRef)(t);d.current=t;const u=(0,r.useRef)(n);u.current=n,(0,r.useEffect)(()=>{if(l)return;const t=i.current;if(!t?.enable||t.interval<=0||!t.editors?.includes(e))return;const n=setInterval(()=>{d.current()&&u.current(!0)},1e3*t.interval);return()=>clearInterval(n)},[c,e,l])}n.d(t,["d",0,o])},51953(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},17834(e){e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},56933(e){e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'}}]);
|
|
@@ -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:()=>v});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(61973),h=n(22022);const p=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let m,x,_=[];const f=[];function v(e){const[t,n]=(0,s.useState)([]),[v,j]=(0,s.useState)(-1),g=(0,u.zy)(),[S,y]=(0,s.useState)(!1),[C,w]=(0,s.useState)(!1),{t:k}=(0,h.Bd)(),[b,I]=(0,s.useState)([]),[N,D]=(0,a.fp)(r.AG.nav_index_add_item_by_now_list),A=e=>{-1!==v?f[v]._children=e:_=e};(0,s.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();_=t,n(_)})()},[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=>{j(v+1),n(e._children),f.push(e)};return(0,l.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==v&&(0,l.jsx)(d.rA,{title:"返回",icon:"arrow_back",onClick:()=>{n(0===v?_:f[v-1]._children),j(v-1),f.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,type:"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],type:"color"===e.key?"color":void 0,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(_):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(22022),d=n(62042),u=n(14284),h=n(53459),p=n(74848);function m(e){const{t}=(0,i.Bd)(),[n,m]=(0,s.useState)(t("毫秒")),[x,_]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[j,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&&!f)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:f),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(v(a),!x){const e=s.getTime();_("毫秒"===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=>{_(e)}}),(0,p.jsx)(r.Sm,{placeholder:t("格式化时间"),value:f,handleInputChange:e=>{v(e)}})]})}),(0,p.jsx)(a.VP,{children:null!==j&&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),_=n(83029),f=n(78247),v=n(23430);function j(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,f.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_dst"),icon:"laptop_mac",value:a,handleInputChange:e=>l(e)})]}),(0,p.jsx)(_.N,{have_auth_edit:n(v.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:_}=(0,i.Bd)(),[f,v]=(0,S.fp)(y.AG.confirm),[j,k]=(0,s.useState)(""),[b,I]=(0,s.useState)(""),N=async t=>{if(!b||!j)return void(0,d.zN)("密钥不能为空");let n="id_"+e;"pub"===t&&(n+=".pub"),v({open:!0,title:m("将覆盖密钥文件"),sub_title:`之前的密钥将作废。 将会作为 ${n} 文件保存到系统上的"${w}"目录下,此目录会作为openssh(git)所使用的默认目录。`,handle:async()=>{(await u.cD.post("save_openssh",{name:n,context:"pub"===t?j:b})).code===h.m.Success&&((0,d.SK)("完成"),v({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("公钥"),rightTopCom:(0,p.jsx)(c.rA,{title:m("复制"),icon:"copy_all",onClick:()=>{j&&((0,C.lW)(j),(0,d.SK)("完成"))}}),rightBottomCom:"openssh_pem"===n&&(0,p.jsx)(c.C3,{text:m("ssh_dir"),clickFun:()=>{N("pub")}}),children:(0,p.jsx)(r.Z2,{style:{width:"100%",height:"270px"},onChange:e=>{k(e.target.value)},value:j})})}),(0,p.jsx)(a.VP,{children:(0,p.jsx)(l.Zp,{title:m("私钥"),rightTopCom:(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_dir"),clickFun:()=>{N("pri")}}),children:(0,p.jsx)(r.Z2,{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.Bd)(),[t,n]=(0,s.useState)(""),[o,u]=(0,s.useState)("1"),[h,m]=(0,s.useState)("65535"),[x,_]=(0,s.useState)("100"),[f,v]=(0,s.useState)("2000"),[j,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("端口扫描"),rightTopCom:(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:j?(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("hostreq"));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("portrng")):(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(f)||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=>_(e)}),(0,p.jsx)(r.Sm,{placeholder:e("超时(ms)"),value:f,handleInputChange:e=>v(e)}),j&&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("开放")})])}),j&&0===w.length&&(0,p.jsx)("p",{children:e("正在扫描...")}),!j&&N&&0===w.length&&(0,p.jsx)("p",{children:e("未发现开放端口")}),!j&&!N&&0===w.length&&(0,p.jsx)("p",{children:e("scan_in")})]})})})})}var D=n(87361);function A(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,f.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(v.oV.port_scan)&&s.push({index:1,name:t("端口扫描"),rto:"portscan/",component:(0,p.jsx)(N,{})}),n(v.oV.wol_proxy)&&s.push({index:1,name:t("网络唤醒"),rto:"netwol/",component:(0,p.jsx)(j,{})}),(0,p.jsx)(a.W1,{optionList:s,father_route:D.o.toolbox})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6805],{47996(e,n,t){t.d(n,{d:()=>i});t(96540);var s=t(74848);function i(e){return(0,s.jsxs)("div",{className:"instance-item",children:[(0,s.jsxs)("div",{className:"instance-item__toolbar",children:[(0,s.jsx)("span",{className:"instance-item__label",children:e.title}),e.toolbar]}),e.children]})}},77481(e,n,t){t.d(n,{S:()=>c,X:()=>r});var s=t(96540),i=t(61443),l=t(74848);function r(e){const[n,t]=s.useState([]),r=(0,s.useRef)(-1),[c,a]=(0,s.useState)(-1),[o,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 _=()=>{r.current=-1,a(-1),d(-1)};return(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:e.headers?.map((n,t)=>{const s=!!e.filter&&(e.filter.column??0)===t;let r=n;if(s){const t=e.filter,s=t.options.find(e=>e.value===t.value);null!=t.value&&s&&(r=`${n} (${s.label})`)}return(0,l.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,l.jsx)(i.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:r}):n},t)})})}),(0,l.jsx)("tbody",{children:n.map((n,t)=>{const s=!!e.onRowDrag;return(0,l.jsx)("tr",{className:s?(c===t?"row-dragging":"")+(o===t?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(n)},onDragStart:e=>{s&&(r.current=t,a(t),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||r.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(t))},onDrop:n=>{s&&(n.preventDefault(),(()=>{const n=r.current,t=o;_(),n<0||t<0||n===t||e.onRowDrag?.(n,t)})())},onDragEnd:_,children:n.map((t,s)=>{const i=s===n.length-1?"small":"";return(0,l.jsx)("td",{className:i,style:{width:e.width??"auto"},children:t},s)})},t)})})]})}function c(e){return(0,l.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,n)=>(0,l.jsx)("div",{children:e},n))})}},36805(e,n,t){t.r(n),t.d(n,{default:()=>B});var s=t(96540),i=t(75725),l=t(22022),r=t(70447),c=t(85997),a=t(77481),o=t(61443),d=t(14284),_=t(53459),x=t(7523),h=t(34843),u=t(82893),p=t(62042),m=(t(23430),t(64694)),j=(t(21499),t(14944)),v=t(92275),f=t(6960),g=t(40505),w=t(4412),y=t(24659),S=t(74848);let C={};function b(){const{t:e,i18n:n}=(0,l.Bd)(),{initUserInfo:t,reloadUserInfo:b}=(0,s.useContext)(x.F),[k,I]=(0,h.fp)(u.AG.user_base_info),[A,P]=(0,s.useState)([]),$=(0,s.useRef)([]),[N,F]=(0,h.fp)(u.AG.prompt_card),K=(0,y.K)(),[B,U]=(0,s.useState)(),[D,E]=(0,s.useState)(void 0),[G,V]=(0,s.useState)(null),[q,M]=(0,s.useState)([]),[X,Z]=(0,s.useState)([]),z=[e("序号"),e("名称"),e("在线状态"),e("时间"),e("备注")],T=[e("序号"),e("服务端口"),e("转发ip"),e("转发端口"),e("开启"),e("备注")],W=[e("序号"),e("服务端口"),e("fwd_nm"),e("转发ip"),e("转发端口"),e("开启"),e("备注")],O=e=>null==e?"":(0,f.s)(e),H=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=C?.[n.client_num_id]?.client_name??"";Z(e)}},R=async e=>{const n=void 0===e?G:e,t=await d.s9.get("server_client_get");if(t.code===_.m.Success){const e=t.data,s=[],i=[];C={},$.current=e.map(e=>e.client_num_id);for(const t of e)null!==n&&!!t.status!==n||(D?`${t.index}${t.client_name}${t.note}`.includes(D)&&s.push(t):s.push(t),i.push({label:t.client_name,value:t.client_num_id}),C[t.client_num_id]=t);P(s),M(i)}};(0,s.useEffect)(()=>{j.ws.addMsg(v.HK.tcp_forward_server_load,e=>{R()}),R()},[]);return(0,S.jsxs)(s.Fragment,{children:[(0,S.jsx)(w.aZ,{position:"right",children:B&&(0,S.jsx)("span",{children:`${B.client_name}${B.note?`(${B.note})`:""}`})}),(0,S.jsxs)(i.fI,{children:[(0,S.jsx)(i.VP,{widthPer:50,children:(0,S.jsx)(i.xh,{children:(0,S.jsx)(r.uF,{self_title:(0,S.jsx)("span",{className:" div-row ",children:(0,S.jsx)("h2",{children:e("客户端列表")})}),rightTopCom:(0,S.jsx)(o.Sm,{placeholder:e("过滤"),value:D,handleInputChange:e=>{E(e)},handlerEnter:()=>{R()}}),children:(0,S.jsx)(a.X,{headers:z,filter:{title:e("在线状态"),column:2,value:G,options:[{label:e("全部"),value:null},{label:e("在线"),value:!0},{label:e("离线"),value:!1}],onChange:e=>{V(e),R(e)}},rows:A.map((n,t)=>[(0,S.jsx)("p",{children:t}),(0,S.jsx)(r.xP,{children:n.client_name}),(0,S.jsx)(r.fq,{ok:n.status}),(0,S.jsx)(r.xP,{children:O(n.status?n.online_start_time:n.offline_time)}),(0,S.jsx)(r.xP,{children:n.note}),(0,S.jsxs)("div",{children:[(0,S.jsx)(c.rA,{icon:"edit",title:e("编辑"),onClick:()=>{U({...n}),H(n.client_num_id)}}),(0,S.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>{F({open:!0,title:"share file",confirm:async()=>{F({open:!1}),await(async e=>{(await d.s9.post("server_client_del",{client_num_id:e})).code===_.m.Success&&((0,p.SK)("成功"),R())})(n.client_num_id)},context_div:(0,S.jsx)("div",{className:"card-content",children:e("确定删除这个吗客户端吗?")})})}})]})]),width:"10rem",onRowDrag:(e,n)=>{const t=(0,m.TI)(A,e,n);P(t);const s=A[e],i=A[n];if(!s||!i)return;const l=$.current,r=l.indexOf(s.client_num_id),c=l.indexOf(i.client_num_id);if(r<0||c<0)return;const a=[...l];a.splice(r,1),a.splice(c,0,s.client_num_id),$.current=a,d.s9.post("server_client_sort",{ids:a})}})})})}),(0,S.jsx)(i.VP,{widthPer:50,children:B?(0,S.jsxs)(i.xh,{children:[(0,S.jsxs)(r.Zp,{self_title:(0,S.jsxs)("span",{className:" div-row ",children:[(0,S.jsx)("h2",{children:`服务器 ${e("代理配置")}`})," "]}),rightBottomCom:(0,S.jsx)("div",{children:(0,S.jsx)(c.rA,{icon:"save",title:e("保存"),onClick:async()=>{(await d.s9.post("server_client_save",B)).code===_.m.Success&&(0,p.SK)("成功")}})}),children:[(0,S.jsx)(i.Yh,{left:e("远程地址"),center:B?.client_remote_address??""}),(0,S.jsx)(i.Yh,{left:e(B?.status?"在线时间":"离线时间"),center:O(B?.status?B?.online_start_time:B?.offline_time)}),(0,S.jsx)(o.Sm,{placeholder:"名称",value:B.client_name,handleInputChange:e=>{B.client_name=e,U({...B})}}),(0,S.jsxs)("form",{children:[e("fc_pxy"),":",(0,S.jsx)(a.S,{isFlex:!0,columns:[(0,S.jsx)(o.U6,{value:1,context:e("开启"),selected:B.open_filecat,onchange:()=>{B.open_filecat=!B.open_filecat,U({...B})}}),(0,S.jsx)(o.U6,{value:1,context:e("关闭"),selected:!B.open_filecat,onchange:()=>{B.open_filecat=!B.open_filecat,U({...B})}})]})]}),B.open_filecat&&(0,S.jsxs)(s.Fragment,{children:[(0,S.jsxs)("form",{children:[e("fc_pxyw"),":",(0,S.jsx)(a.S,{isFlex:!0,columns:[(0,S.jsx)(o.U6,{value:1,context:e("开启"),selected:B.filecat_use_local_page,onchange:()=>{B.filecat_use_local_page=!B.filecat_use_local_page,U({...B})}}),(0,S.jsx)(o.U6,{value:1,context:e("关闭"),selected:!B.filecat_use_local_page,onchange:()=>{B.filecat_use_local_page=!B.filecat_use_local_page,U({...B})}})]})]}),(0,S.jsx)(o.Sm,{placeholderOut:e("fc_pxyr"),placeholder:"127.0.0.1:5567",value:B.filecat_proxy_host_port,handleInputChange:e=>{B.filecat_proxy_host_port=e,U({...B})}}),(0,S.jsx)(c.rA,{icon:"content_copy",title:e("fc_pxyc"),onClick:()=>{const e=`${window.location.origin}?tcp_client_num_id=${B.client_num_id}`;(0,g.lW)(e),(0,p.SK)(e)}}),(0,S.jsx)(c.rA,{icon:"open_in_new",title:e("fc_pxyo"),onClick:()=>{const e=`${window.location.origin}?tcp_client_num_id=${B.client_num_id}`;window.open(e,"_blank")}})]}),(0,S.jsx)(o.Sm,{placeholder:"备注",value:B.note,handleInputChange:e=>{B.note=e,U({...B})}}),(0,S.jsx)(c.rA,{icon:"add",onClick:()=>{B.proxy_fig_list.push({open:!1}),U({...B})},title:e("添加")}),e("代理"),(0,S.jsx)(a.X,{headers:T,rows:B.proxy_fig_list.map((n,t)=>[(0,S.jsx)("p",{children:t}),(0,S.jsx)(o.Sm,{value:n.server_port,handleInputChange:e=>{n.server_port=parseInt(e)},no_border:!0}),(0,S.jsx)(o.Sm,{value:n.proxy_host,handleInputChange:e=>{n.proxy_host=e},no_border:!0}),(0,S.jsx)(o.Sm,{value:n.proxy_port,handleInputChange:e=>{n.proxy_port=parseInt(e)},no_border:!0}),(0,S.jsx)(o.l6,{value:!!n.open,onChange:e=>{n.open=e,U({...B})},options:K,no_border:!0}),(0,S.jsx)(o.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,S.jsx)("div",{children:(0,S.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>{const e=[];for(let n=0;n<(B.proxy_fig_list.length??0);n++)n!==t&&e.push(B.proxy_fig_list[n]);B.proxy_fig_list=e,U({...B})}})})]),width:"10rem"})]}),(0,S.jsxs)(r.Zp,{self_title:(0,S.jsxs)("span",{className:" div-row ",children:[(0,S.jsx)("h2",{children:`${e("客户端")} ${e("桥接配置")}`}),(0,S.jsx)(c.rA,{title:"info",icon:"info",onClick:()=>{F({open:!0,title:"Info",confirm:async()=>{F({open:!1})},context_div:(0,S.jsx)("div",{className:"card-content",children:e("在客户端设置一个端口,访问这个端口把流量转发到另一个客户端所在网络环境内的第一个地址")})})}})]}),children:[(0,S.jsx)(c.rA,{icon:"add",onClick:()=>{X.push({open:!1,server_client_num_id:B.client_num_id}),Z([...X])},title:e("添加")}),e("代理"),(0,S.jsx)(a.X,{headers:W,rows:X.map((n,t)=>[(0,S.jsx)("p",{children:t}),(0,S.jsx)(o.Sm,{value:n.server_port,handleInputChange:e=>{n.server_port=parseInt(e)},no_border:!0}),(0,S.jsx)(o.Sm,{value:n.client_name,options:q,handleInputChange:e=>{const t=(e=>q.find(n=>String(n.value)===String(e)))(e);n.client_num_id=parseInt(String(t.value)),n.client_name=t.label,Z([...X])},no_border:!0}),(0,S.jsx)(o.Sm,{value:n.client_proxy_host,handleInputChange:e=>{n.client_proxy_host=e},no_border:!0}),(0,S.jsx)(o.Sm,{value:n.client_proxy_port,handleInputChange:e=>{n.client_proxy_port=parseInt(e)},no_border:!0}),(0,S.jsx)(o.l6,{value:!!n.open,onChange:e=>{n.open=e,Z([...X])},options:K,no_border:!0}),(0,S.jsx)(o.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,S.jsxs)("div",{children:[(0,S.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:async()=>{if(null==n.id){const e=[];for(let n=0;n<(X.length??0);n++)n!==t&&e.push(X[n]);Z([...e])}else await(async(e,n)=>{(await d.s9.post("server_bridge_del_fig",{id:e})).code===_.m.Success&&((0,p.SK)("成功"),H(n))})(n.id,n.server_client_num_id)}}),null==n.id?(0,S.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:async()=>{await(async e=>{if(null==e.client_num_id)return void(0,p.zN)("未选择转发送 client");(await d.s9.post("server_bridge_add_fig",e)).code===_.m.Success&&((0,p.SK)("成功"),H(e.server_client_num_id))})(n)}}):(0,S.jsx)(c.rA,{icon:"save",title:e("保存"),onClick:async()=>{await(async e=>{if(null==e.client_num_id)return void(0,p.zN)("未选择转发送 client");(await d.s9.post("server_bridge_edit_fig",e)).code===_.m.Success&&((0,p.SK)("成功"),H(e.server_client_num_id))})(n)}})]})]),width:"10rem"})]})]}):(0,S.jsx)(i.xh,{})})]})]})}var k=t(18840),I=t(7463);function A(e){const{t:n}=(0,l.Bd)(),[t,x]=(0,s.useState)([]),[h,u]=(0,s.useState)([]),[m,f]=(0,s.useState)([]),[g,w]=(0,s.useState)([]),C=[n("序号"),n("服务端口"),n("转发客户端名称")],b=[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;x(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&&w(t.data)};(0,s.useEffect)(()=>($(),j.ws.sendData(v.HK.tcp_proxy_client_status,{}).then(()=>{const e=(0,I.s)(()=>$(),500);j.ws.addMsg(v.HK.tcp_proxy_client_status,e)}),()=>{j.ws.removeMsg(v.HK.tcp_proxy_client_status)}),[]);const N=async e=>{const n=new k.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,p.SK)("保存成功"):(0,p.zN)("网络错误")};return(0,S.jsxs)("div",{children:[(0,S.jsxs)(i.fI,{children:[(0,S.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,S.jsxs)(r.Zp,{title:"",rightBottomCom:(0,S.jsx)(c.C3,{text:n("保存"),clickFun:()=>{t[0].index=0,N(t[0])}}),rightTopCom:(0,S.jsxs)("div",{children:[n("连接状态"),(0,S.jsx)(r.fq,{ok:!!t[0]?.status})]}),children:[(0,S.jsx)(o.Sm,{placeholder:`${n("服务器")} ip`,value:t[0]?.serverIp,handleInputChange:e=>{t[0].serverIp=e}}),(0,S.jsx)(o.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,S.jsx)(o.Sm,{placeholder:n("名称"),value:t[0]?.client_name,handleInputChange:e=>{t[0].client_name=e}}),(0,S.jsx)(o.Sm,{type:"password",placeholder:"key ",value:t[0]?.key,handleInputChange:e=>{t[0].key=e}}),(0,S.jsxs)("form",{children:[n("状态"),(0,S.jsx)(a.S,{isFlex:!0,columns:[(0,S.jsx)(o.U6,{value:1,context:n("开启"),selected:t[0]?.open,onchange:()=>{t[0].open=!t[0].open,x([...t])}}),(0,S.jsx)(o.U6,{value:1,context:n("关闭"),selected:!t[0]?.open,onchange:()=>{t[0].open=!t[0].open,x([...t])}})]})]})]})}),(0,S.jsx)(i.VP,{widthPer:60,maxWidth:"90rem",children:(0,S.jsxs)(r.Zp,{self_title:(0,S.jsxs)("span",{className:" div-row ",children:[(0,S.jsx)("h2",{children:n("更多服务器")})," "]}),children:[(0,S.jsx)(c.rA,{icon:"add",onClick:()=>{t.push({open:!1,is_new:!0}),x([...t])},title:n("添加")}),n("代理"),(0,S.jsx)(a.X,{headers:A,rows:t.slice(1).map((e,s)=>[(0,S.jsx)("p",{children:s}),(0,S.jsx)(o.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,S.jsx)(o.Sm,{value:e.serverIp,handleInputChange:n=>{e.serverIp=n},no_border:!0}),(0,S.jsx)(o.Sm,{value:e.client_name,handleInputChange:n=>{e.client_name=n},no_border:!0}),(0,S.jsx)(o.Sm,{value:e.key,handleInputChange:n=>{e.key=n},no_border:!0}),(0,S.jsx)(r.fq,{ok:!!e.status}),(0,S.jsx)(o.l6,{value:!!e.open,onChange:n=>{e.open=n,x([...t])},options:P,no_border:!0}),(0,S.jsx)(o.Sm,{value:e.note,handleInputChange:n=>{e.note=n},no_border:!0}),(0,S.jsxs)("div",{children:[(0,S.jsx)(c.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]);x([...e])}else await(async e=>{(await d.s9.post("client_del",{index:e})).code===_.m.Success?((0,p.SK)("保存成功"),$()):(0,p.zN)("网络错误")})(s+1)}}),e.is_new?(0,S.jsx)(c.rA,{icon:"add",title:n("添加"),onClick:async()=>{e.index=s+1,await N(e)}}):(0,S.jsx)(c.rA,{icon:"save",title:n("保存"),onClick:async()=>{e.index=s+1,await N(e)}})]})]),width:"10rem"})]})})]}),(0,S.jsxs)(i.fI,{children:[!!m?.length&&(0,S.jsx)(i.VP,{widthPer:40,maxWidth:"40rem",children:(0,S.jsx)(r.Zp,{title:n("br_port"),children:(0,S.jsx)(a.X,{headers:C,rows:m.map((e,n)=>[(0,S.jsx)("p",{children:n}),(0,S.jsx)(r.xP,{children:e.server_port}),(0,S.jsx)(r.xP,{children:e.client_name})]),width:"10rem"})})}),!!g?.length&&(0,S.jsx)(i.VP,{widthPer:40,maxWidth:"40rem",children:(0,S.jsx)(r.Zp,{title:n("文件同步列表"),children:(0,S.jsx)(a.X,{headers:b,rows:g.map((e,n)=>[(0,S.jsx)("p",{children:n}),(0,S.jsx)(r.xP,{children:e.source_client_name}),(0,S.jsx)(r.xP,{children:e.target_client_name}),(0,S.jsx)(r.xP,{children:e.running_num})]),width:"10rem"})})})]})]})}function P(){const{t:e,i18n:n}=(0,l.Bd)(),{initUserInfo:t,reloadUserInfo:m}=(0,s.useContext)(x.F),[f,g]=(0,h.fp)(u.AG.user_base_info),[w,y]=(0,h.fp)(u.AG.prompt_card),[C,b]=(0,s.useState)(!1),[I,A]=(0,s.useState)([]),[P,$]=(0,s.useState)(null),[N,F]=(0,s.useState)([]),[K,B]=(0,s.useState)(void 0),[U,D]=(0,s.useState)(void 0),E=(0,s.useMemo)(()=>{const e=[...I];return null!=P?(e.sort((e,n)=>P?e.server_port-n.server_port:n.server_port-e.server_port),e):e},[I,P]),G=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)U?`${t.server_port}${t.client_name}${t.proxy_host}${t.server_port}${t.server_port_note}`.includes(U)&&n.push(t):n.push(t);A(n)}},V=async()=>{const e=await d.s9.get("server_get");e.code===_.m.Success&&(B(e.data.port),b(!!e.data.open),F(e.data.option_keys??[])),G()};(0,s.useEffect)(()=>{j.ws.addMsg(v.HK.tcp_forward_server_load,e=>{V()}),V()},[]);const q=async e=>{const n=new k.I;n.port=K,n.open=C,n.option_keys=N;(await d.s9.post("server_save",{fig:n,notice_client:e})).code===_.m.Success&&(0,p.SK)("成功")};return(0,S.jsxs)(i.fI,{children:[(0,S.jsx)(i.VP,{widthPer:33,children:(0,S.jsx)(i.xh,{children:(0,S.jsxs)(r.Zp,{title:e("服务器配置"),rightBottomCom:(0,S.jsxs)("div",{children:[(0,S.jsx)(c.C3,{text:e("sv_ntf"),clickFun:()=>{q(!0)}}),(0,S.jsx)(c.C3,{text:e("保存"),clickFun:()=>{q(!1)}})]}),children:[(0,S.jsx)(o.Sm,{placeholder:"port",value:K,handleInputChange:e=>{B(e)}}),(0,S.jsxs)("label",{children:[(0,S.jsx)(c.rA,{icon:"add",onClick:()=>{F([...N,""])},title:e("添加")}),e("key")]}),(N??[]).map((n,t)=>(0,S.jsxs)("div",{style:{display:"flex"},children:[(0,S.jsx)("div",{style:{width:"90%"},children:(0,S.jsx)(o.Sm,{type:"password",value:n,handleInputChange:e=>{N[t]=e,F([...N])}})}),(0,S.jsx)(c.rA,{icon:"delete",onClick:()=>{N.splice(t,1),F([...N])},title:e("删除")})]},t)),(0,S.jsxs)("form",{children:[e("状态"),":",(0,S.jsx)(a.S,{isFlex:!0,columns:[(0,S.jsx)(o.U6,{value:1,context:e("开启"),selected:C,onchange:()=>{b(!C)}}),(0,S.jsx)(o.U6,{value:1,context:e("关闭"),selected:!C,onchange:()=>{b(!C)}})]})]})]})})}),(0,S.jsx)(i.VP,{widthPer:50,children:(0,S.jsx)(i.xh,{children:(0,S.jsx)(r.uF,{self_title:(0,S.jsx)("span",{className:" div-row ",children:(0,S.jsx)("h2",{children:e("服务器")+e("端口映射")})}),rightTopCom:(0,S.jsx)(o.Sm,{placeholder:e("过滤"),value:U,handleInputChange:e=>{D(e)},handlerEnter:()=>{G()}}),children:(0,S.jsx)(a.X,{headers:[e("序号"),(0,S.jsx)(c.rA,{title:e("服务端口"),onClick:()=>{$(e=>!e)}}),e("转发ip"),e("转发端口"),"client "+e("名称"),e("开启"),e("备注")],rows:E.map((e,n)=>[(0,S.jsx)("p",{children:n}),(0,S.jsx)(r.xP,{children:e.server_port}),(0,S.jsx)(r.xP,{children:e.proxy_host}),(0,S.jsx)(r.xP,{children:e.proxy_port}),(0,S.jsx)(r.xP,{children:e.client_name}),(0,S.jsx)(r.fq,{ok:!!e.open_success}),(0,S.jsx)(r.xP,{children:e.server_port_note})]),width:"10rem"})})})})]})}var $=t(47996),N=t(78247);function F(){const{t:e,i18n:n}=(0,l.Bd)(),{initUserInfo:t,reloadUserInfo:m}=(0,s.useContext)(x.F),[j,v]=(0,h.fp)(u.AG.user_base_info),[f,g]=(0,h.fp)(u.AG.prompt_card),[,w]=(0,h.fp)(u.AG.confirm),[y,C]=(0,h.fp)(u.AG.editorSetting),[b,I]=(0,s.useState)([]),[A,P]=(0,s.useState)([]),F=[e("编号"),e("原客户端"),e("开启"),e("备注"),e("操作")],[K,B]=(0,s.useState)(null);(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});P(t),await U()}})()},[]);const U=async()=>{const e=await d.s9.get("sync_task_get");e.code===_.m.Success&&I(e.data)},D=e=>A.find(n=>String(n.value)===String(e))?.label??"",E=e=>A.find(n=>String(n.value)===String(e)),G=(e,n,t)=>{K?.targets&&(K.targets[e]={...K.targets[e],[n]:t},B({...K,targets:[...K.targets]}))},V=async e=>{(await d.s9.post("sync_task_save",e)).code===_.m.Success&&await U()};return(0,S.jsxs)(i.fI,{children:[(0,S.jsx)(i.VP,{widthPer:50,maxWidth:"40rem",children:(0,S.jsx)(i.xh,{children:(0,S.jsx)(r.uF,{self_title:(0,S.jsxs)("span",{className:" div-row ",children:[(0,S.jsx)("h2",{children:e("客户端文件同步")}),(0,S.jsx)(c.rA,{icon:"info",onClick:()=>{g({open:!0,title:"信息",context_div:(0,S.jsx)("div",{children:(0,S.jsxs)("ul",{children:[(0,S.jsx)("li",{children:e("sy_tp1")}),(0,S.jsx)("li",{children:e("sy_tp2")}),(0,S.jsx)("li",{children:e("sy_tp3")})]})})})},title:e("信息")})]}),rightTopCom:(0,S.jsx)("div",{children:(0,S.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{B({open:!1,source_client_num_id:void 0,source_dir:"",targets:[],delete_missing:!0,is_new:!0})}})}),children:(0,S.jsx)(a.X,{headers:F,rows:b.map((n,t)=>[(0,S.jsx)("p",{children:t}),(0,S.jsx)(r.xP,{children:n.source_client_name}),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(r.fq,{ok:!!n.open}),n.open?e("开启"):e("关闭")]}),(0,S.jsx)(r.xP,{children:n.note}),(0,S.jsxs)("div",{children:[(0,S.jsx)(c.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{B(JSON.parse(JSON.stringify(e)))})(n)}),(0,S.jsx)(c.rA,{icon:"sync",title:e("立即同步"),onClick:()=>(async n=>{if(!n.id||!n.open)return void(0,p.zN)(e("tsk_off"));const t=await d.s9.post("sync_task_rescan",{id:n.id});t.code===_.m.Success?(0,p.SK)(e("已触发同步")):(0,p.zN)(t.message??e("操作失败"))})(n)}),(0,S.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>{w({open:!0,title:e("确定删除吗"),handle:async()=>{await(async n=>{(await d.s9.post("sync_task_del",{id:n})).code===_.m.Success&&((0,p.SK)(e("成功")),K?.id===n&&B(null),await U())})(n.id),w({open:!1,handle:null})}})}})]})]),width:"10rem"})})})}),(0,S.jsx)(i.VP,{widthPer:50,children:K&&(0,S.jsx)(i.xh,{children:(0,S.jsxs)(r.Zp,{self_title:(0,S.jsx)("span",{className:" div-row ",children:(0,S.jsx)("h2",{children:e(""+(K.is_new?"添加":"编辑"))})}),rightBottomCom:(0,S.jsxs)("div",{children:[(0,S.jsx)(c.rA,{icon:"cancel",title:e("取消"),onClick:()=>B(null)}),(0,S.jsx)(c.rA,{icon:"save",title:e("保存"),onClick:async()=>{if(!K)return;const n=K,t=await d.s9.post("sync_task_save",n);t.code===_.m.Success?((0,p.SK)(e("成功")),B(null),await U()):(0,p.zN)(t.message??e("操作失败"))}})]}),children:[(0,S.jsx)(o.BC,{label:e("开启"),label_width:"6rem",children:(0,S.jsx)(o.GL,{selected:!!K.open,onchange:()=>{B({...K,open:!K.open})}})}),(0,S.jsx)(o.BC,{label:e("备注"),label_width:"6rem",children:(0,S.jsx)(o.Sm,{value:K.note,handleInputChange:e=>{B({...K,note:e})}})}),(0,S.jsx)(o.BC,{label:e("原客户端"),label_width:"6rem",required:!0,children:(0,S.jsx)(o.Sm,{value:D(K.source_client_num_id),options:A,handleInputChange:e=>{const n=E(e);n&&B({...K,source_client_num_id:parseInt(String(n.value))})}})}),(0,S.jsx)(o.BC,{label:e("原目录"),label_width:"6rem",required:!0,children:(0,S.jsx)(o.Sm,{value:K.source_dir,placeholder:e("被同步的源目录"),handleInputChange:e=>{B({...K,source_dir:e})}})}),(0,S.jsx)("label",{children:e("目标列表")}),(K.targets??[]).map((n,t)=>(0,S.jsxs)($.d,{title:`${e("目标")}${t+1}`,toolbar:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o.BC,{label:e("全量同步"),label_width:"6rem",children:(0,S.jsx)(o.GL,{selected:!!n.full_sync,onchange:()=>G(t,"full_sync",!n.full_sync)})}),(0,S.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{if(!K?.targets)return;const n=[...K.targets];n.splice(e,1),B({...K,targets:n})})(t)})]}),children:[(0,S.jsx)(o.BC,{label:e("客户端"),label_width:"6rem",required:!0,children:(0,S.jsx)(o.Sm,{value:D(n.client_num_id),options:A,handleInputChange:e=>{const n=E(e);n&&G(t,"client_num_id",parseInt(String(n.value)))}})}),(0,S.jsx)(o.BC,{label:e("目标目录"),label_width:"6rem",required:!0,children:(0,S.jsx)(o.Sm,{value:n.dir,handleInputChange:e=>G(t,"dir",e)})})]},t)),(0,S.jsxs)("div",{className:"div-row",children:[(0,S.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{if(!K)return;const e=[...K.targets??[],{client_num_id:void 0,dir:"",full_sync:!1}];B({...K,targets:e})}}),(0,S.jsx)(c.rA,{icon:"edit",title:e("忽略目录"),onClick:()=>{var e;e=K,N.xK.set_value_temp(e.ignore_text??k.mo),C({model:"ace/mode/gitignore",open:!0,fileName:"",save:async n=>{e.ignore_text=n,B({...e}),N.xK.set_value_temp(""),await V(e)}})}})]})]})})})]})}var K=t(87361);function B(){const{t:e}=(0,l.Bd)(),n=[{index:1,name:e("客户端"),rto:"tcp_proxy_client/",component:(0,S.jsx)(A,{})},{index:2,name:e("服务端"),rto:"tcp_proxy_server_info/",component:(0,S.jsx)(P,{})},{index:3,name:`${e("客户端列表")}(${e("服务端")})`,rto:"tcp_proxy_server_client/",component:(0,S.jsx)(b,{})},{index:4,name:`${e("客户端功能")}(${e("服务端")})`,rto:"tcp_proxy_server_client_setting/",component:(0,S.jsx)(F,{})}];return(0,S.jsx)(i.W1,{optionList:n,father_route:K.o.net_proxy})}},6960(e,n,t){t.d(n,{s:()=>r});var s=t(72635);const i=1440,l=525600;function r(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<i?`${(t/60).toFixed(0)} ${s.Ay.t("小时前")}`:t<43200?`${(t/i).toFixed(0)} ${s.Ay.t("天前")}`:t<l?`${(t/43200).toFixed(0)} ${s.Ay.t("月前")}`:`${(t/l).toFixed(0)} ${s.Ay.t("年前")}`}},24659(e,n,t){var s=t(22022);t.d(n,["K",0,()=>{const{t:e}=(0,s.Bd)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -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(22022),c=s(34843),d=s(82893),l=s(14944),o=s(92275),r=s(14284),Y=s(53459),i=s(61443),n=s(85997),p=s(83029),B=s(4412),j=(s(82341),s(91568)),h=s(18257),S=s.n(h),u=s(76559),f=s(62042),x=s(74777),y=s(78247),m=s(23430),z=s(74848);let N;function G(){const{t:A}=(0,t.Bd)(),[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:H}=(0,y.MH)(),g=(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[x.jk.ffmpeg]&&P.sysSoftWare[x.jk.ffmpeg].installed?(w.current=(0,j.default)(g.current,{controls:!0,width:640,height:360}),S().isSupported()?(N=S().createPlayer({type:"flv",url:u.I.getOtherWebSocketUrl(o.HK.rtsp_get,{url:e}),isLive:!0}),N.attachMediaElement(g.current),N.load(),N.load()):(0,f.zN)("FLV.js is not supported in this browser.")):(0,f.zN)(A("ff_none"))})(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(o.HK.rdp_disconnect,""),G(!1)}})]}),!h&&(0,z.jsx)(p.N,{have_auth_edit:H(m.oV.rtsp_proxy_tag_update),getItems:async()=>{const A=await r.K4.get("tag");return A.code===Y.m.Success?A.data:[]},save:async A=>{(await r.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:g,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(){}}]);
|