filecat 7.2.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4903],{64903(e,t,n){n.r(t),n.d(t,{default:()=>f});var c=n(96540),i=n(34843),l=n(82893),s=n(85997),o=n(57952),a=(n(62042),n(21499),n(40505),n(86149)),r=(n(99214),n(74848));const d=c.lazy(()=>Promise.all([n.e(3426),n.e(2626),n.e(6010)]).then(()=>n(34299)));function f(e){const{t}=(0,a.B)(),[n,c]=(0,i.fp)(l.AG.markdown);if(n.context)return(0,r.jsxs)("div",{id:"md-container",children:[(0,r.jsx)(o.A,{ignore_tags:!0,left_children:[(0,r.jsx)(s.rA,{title:t("取消"),icon:"close",onClick:function(){c({context:"",filename:""}),n?.close?.()}},1),(0,r.jsx)("title",{children:n.filename},2)]}),(0,r.jsx)("div",{className:"md-context ",children:(0,r.jsx)(d,{context:n.context})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5272,9381],{19381(e,n,t){t.r(n),t.d(n,{default:()=>c});var i=t(96540),o=t(80952),d=(t(82327),t(1766),t(24854),t(90008),t(90846),t(40975),t(44286),t(30766),t(14973),t(69687),t(1234),t(47507),t(87268),t(24522));const r=`https://gcore.jsdelivr.net/npm/ace-builds@${o.version}/src-min-noconflict/`;o.config.set("basePath",r),o.config.set("modePath",r),o.config.set("themePath",r),o.config.set("workerPath",r);var a=t(34843),s=t(82893),m=t(78247),l=t(74848);function c(e){const n=(0,i.useRef)(null),[t,r]=(0,a.fp)(s.AG.user_base_info),c=t.user_data.theme?.includes("dark")?"cloud_editor_dark":"cloud9_day";return(0,i.useEffect)(()=>{const t=o.edit(n.current,{value:m.xK.get_value_temp(e.editor_id),showPrintMargin:!1,theme:`ace/theme/${c}`,mode:e.model??d.getModeForPath(e.name??"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14,...e.options});return t.setOptions({}),t.container.addEventListener("wheel",function(e){e.preventDefault()}),t.focus(),t.on("change",function(n){e.on_change&&e.on_change()}),n.current=t,t.formatCode=()=>{const e=o.require("ace/ext/beautify"),t=n.current;t&&e.beautify(t.session)},m.xK.set_editor_temp(t,e.editor_id),()=>{m.xK.delete_editor_temp(e.editor_id),t.destroy()}},[]),(0,l.jsx)("div",{ref:n,style:{height:"100%",width:"100%"}})}},26559(e,n,t){var i=t(96540),o=t(34843),d=t(82893),r=t(86504),a=t(69918),s=t(8332),m=t(74848);const l=i.memo(function(e){const[n]=(0,o.fp)(d.AG.md_editor_last_context),[t]=(0,i.useState)(n?.trim()?n:s.$);return(0,m.jsx)("div",{className:e.className,ref:n=>e.setting&&(0,a.Ce)(n,e.setting),children:(0,m.jsx)("div",{className:"md-editor-scroll",children:(0,m.jsx)("div",{className:"md-editor-sheet",children:(0,m.jsx)(r.A,{value:t})})})})});t.d(n,["A",0,l])},8332(e,n,t){t.d(n,["$",0,'# 一级标题 Heading 1\n\n## 二级标题 Heading 2\n\n### 三级标题 Heading 3\n\n#### 四级标题 Heading 4\n\n##### 五级标题 Heading 5\n\n###### 六级标题 Heading 6\n\n这是一段普通正文,用来观察字体、字号、行高和文字颜色。中间可以包含 **加粗文字**、*斜体文字*、~~删除线~~、`行内代码` 以及 [一个链接](https://github.com/xiaobaidadada/filecat)。\n\n> 这是一段引用文字。\n> 引用通常用来强调摘录的内容,左侧一般会有一条竖线。\n\n- 无序列表第一项\n- 无序列表第二项\n - 嵌套的子项\n- 无序列表第三项\n\n1. 有序列表第一项\n2. 有序列表第二项\n3. 有序列表第三项\n\n```javascript\n// 代码块\nfunction greet(name) {\n console.log(`Hello, ${name}!`);\n}\ngreet("filecat");\n```\n\n| 列一 | 列二 | 列三 |\n| --- | --- | --- |\n| 内容 A | 内容 B | 内容 C |\n| 内容 D | 内容 E | 内容 F |\n\n---\n\n最后一段正文,用于观察段落之间的间距。\n',"V",0,'/* ===== md 主题 =====\n 选择器请从 .md-editor-sheet 开始写 —— 它是正文容器的类名,\n 编辑器与右侧预览用的是同一个类名,一处书写、两处生效。\n\n 注意:css 原样注入页面,不做任何改写。\n 写成 body、h1 这种全局选择器会真的作用到整个后台界面,不要这么写。\n\n 下面每一组都可以直接改,不需要的整段删掉即可。\n ============================================ */\n\n/* ---------- 正文 ---------- */\n.md-editor-sheet {\n font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; /* 字体 */\n font-size: 16px; /* 字号 */\n line-height: 1.7; /* 行高:1.7 约为字号的 1.7 倍 */\n color: #333333; /* 文字颜色 */\n}\n\n/* ---------- 整页底色 ----------\n 底色必须写在 .md-editor-scroll(滚动容器)上,不要写在 .md-editor-sheet。\n 纸张高度只有一屏,写在纸张上的底色长文档一滚就露底(上半截有色、下半截变回灰)。\n 深色主题尤其要注意:这一条不写,滚动时就会白一半黑一半。 */\n.md-editor-scroll {\n background: #ffffff;\n}\n\n/* ---------- 标题 h1 ~ h6 ---------- */\n.md-editor-sheet h1 {\n font-size: 2em; /* 相对正文字号的倍数 */\n font-weight: 600; /* 字重:400 常规 / 600 半粗 / 700 粗 */\n color: #1a1a1a;\n margin-top: 1.4em;\n margin-bottom: 0.6em;\n padding-bottom: 0.3em;\n border-bottom: 1px solid #eaecef; /* 标题下划线,不需要就删掉这行 */\n}\n.md-editor-sheet h2 { font-size: 1.5em; font-weight: 600; margin-top: 1.3em; margin-bottom: 0.6em; }\n.md-editor-sheet h3 { font-size: 1.25em; font-weight: 600; margin-top: 1.2em; margin-bottom: 0.5em; }\n.md-editor-sheet h4 { font-size: 1em; font-weight: 600; margin-top: 1.1em; margin-bottom: 0.5em; }\n.md-editor-sheet h5 { font-size: 0.9em; font-weight: 600; margin-top: 1em; margin-bottom: 0.5em; }\n.md-editor-sheet h6 { font-size: 0.85em; font-weight: 600; color: #6a737d; margin-top: 1em; margin-bottom: 0.5em; }\n\n/* ---------- 段落与行内元素 ---------- */\n.md-editor-sheet p {\n margin: 0 0 1em; /* 段落间距:上 右 下 左,下边距控制段与段的距离 */\n}\n.md-editor-sheet strong { font-weight: 600; } /* 加粗文字 */\n.md-editor-sheet em { font-style: italic; } /* 斜体文字 */\n.md-editor-sheet a { color: #0366d6; text-decoration: none; } /* 链接颜色;加下划线写 underline */\n.md-editor-sheet a:hover { text-decoration: underline; } /* 鼠标悬停时的链接样式 */\n.md-editor-sheet del { color: #999999; } /* 删除线文字 */\n\n/* ---------- 引用 ---------- */\n.md-editor-sheet blockquote {\n margin: 0 0 1em;\n padding: 0.4em 1em;\n color: #6a737d; /* 引用文字颜色 */\n border-left: 4px solid #dfe2e5; /* 左侧竖线,这是引用最明显的特征 */\n background: #f6f8fa; /* 引用底色,不需要就删掉 */\n}\n\n/* ---------- 代码 ---------- */\n.md-editor-sheet code {\n font-family: Consolas, Monaco, "Courier New", monospace; /* 等宽字体 */\n font-size: 0.88em;\n color: #476582; /* 行内代码文字色 */\n background: rgba(27, 31, 35, 0.05); /* 行内代码底色 */\n padding: 0.2em 0.4em;\n border-radius: 3px; /* 圆角 */\n}\n.md-editor-sheet pre {\n padding: 1em;\n overflow: auto; /* 内容太宽时出现横向滚动条 */\n background: #f6f8fa; /* 代码块底色 */\n border-radius: 6px;\n margin: 0 0 1em;\n}\n.md-editor-sheet pre code {\n background: transparent; /* 代码块里的 code 不要再叠一层底色 */\n padding: 0;\n}\n\n/* ---------- 列表 ---------- */\n.md-editor-sheet ul, .md-editor-sheet ol {\n padding-left: 2em; /* 缩进 */\n margin: 0 0 1em;\n}\n.md-editor-sheet li { margin: 0.25em 0; } /* 列表项之间的间距 */\n\n/* ---------- 表格 ---------- */\n.md-editor-sheet table {\n width: 100%;\n border-collapse: collapse; /* 相邻边框合并成一条线 */\n margin: 0 0 1em;\n}\n.md-editor-sheet table th, .md-editor-sheet table td {\n padding: 6px 13px;\n border: 1px solid #dfe2e5; /* 单元格边框 */\n}\n.md-editor-sheet table th {\n font-weight: 600;\n background: #f6f8fa; /* 表头底色 */\n}\n\n/* ---------- 分割线 ---------- */\n.md-editor-sheet hr {\n height: 1px; /* 线的粗细 */\n border: 0;\n background: #e1e4e8; /* 线的颜色 */\n margin: 1.6em 0;\n}\n\n/* ---------- 图片 ---------- */\n.md-editor-sheet img {\n max-width: 100%; /* 防止大图撑破版面 */\n border-radius: 4px;\n}\n'])},35272(e,n,t){t.r(n),t.d(n,{default:()=>b});var i=t(96540),o=t(86149),d=t(86090),r=t(85997),a=t(4412),s=t(70447),m=t(75725),l=t(61443),c=t(62042),h=t(23430),f=t(78247),g=t(19381),u=t(26559),p=t(96763),x=t(8332),_=t(74848);function b(){const{t:e}=(0,o.B)(),n=(0,d.Zp)(),[t]=(0,d.ok)(),{check_user_auth:b}=(0,f.MH)(),v=b(h.oV.md_theme),j=t.get("id")??"",w=!j,[k,N]=(0,i.useState)(""),[y,C]=(0,i.useState)(x.V),[z,K]=(0,i.useState)(!0),[P,S]=(0,i.useState)(!1),A=88;(0,i.useEffect)(()=>{if(!j){const e=x.V;return f.xK.set_value_temp(e,A),N(""),C(e),void K(!1)}Promise.all([(0,p.Kz)(),(0,p.P7)(j)]).then(([e,n])=>{const t=e.find(e=>e.id===j),i=n||x.V;f.xK.set_value_temp(i,A),N(t?.id??""),C(i)}).finally(()=>K(!1))},[j]),(0,i.useEffect)(()=>{if(z)return;const e=f.xK.get_editor(A);e&&(e.setValue(f.xK.get_value_temp(A)??"",-1),e.clearSelection())},[z]),(0,i.useEffect)(()=>{z||(0,p.bN)("theme_preview",y)},[y,z]);return(0,_.jsxs)("div",{children:[(0,_.jsx)(a.aZ,{position:"right",children:(0,_.jsx)(r.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>n(-1)})}),(0,_.jsx)(m.jW,{isFull:!0,more:!0,children:(0,_.jsx)(m.NN,{children:(0,_.jsxs)("div",{className:"md-theme-editor",children:[(0,_.jsx)("div",{className:"md-theme-editor__left",children:(0,_.jsxs)(s.Zp,{title:e(w?"新建主题":"编辑主题"),titleCom:(0,_.jsx)(_.Fragment,{children:v&&(0,_.jsx)(r.C3,{text:e(P?"保存中":"保存"),clickFun:()=>{P||(async()=>{const t=k.trim();if(t){S(!0);try{await(0,p._D)({id:w?void 0:j,name:t,css:f.xK.get_editor_value(A)??y})?((0,c.SK)(e("保存成功")),n(-1)):(0,c.zN)(e("保存失败"))}finally{S(!1)}}else(0,c.zN)(e("请输入主题名称"))})()}})}),children:[(0,_.jsx)(l.BC,{label:e("主题名称"),label_width:"6rem",children:(0,_.jsx)(l.Sm,{value:k,disabled:!v,placeholder:e("请输入主题名称"),handleInputChange:e=>N(e)})}),(0,_.jsx)("div",{className:"md-theme-editor__ace",children:(0,_.jsx)(g.default,{name:"theme.css",editor_id:A,model:"ace/mode/css",on_change:()=>{const e=f.xK.get_editor_value(A);void 0!==e&&C(e)},options:{showPrintMargin:!1,highlightActiveLine:!0,wrap:!0}})})]})}),(0,_.jsx)("div",{className:"md-theme-editor__right",children:(0,_.jsx)(s.Zp,{title:e("预览"),titleCom:(0,_.jsx)("span",{className:"md-theme-editor__tip",children:e("主题实时预览")}),children:(0,_.jsx)(u.A,{className:"md-theme-preview"})})})]})})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5308],{65308(e,t,o){o.r(t),o.d(t,{default:()=>p});var a=o(96540),n=o(34843),i=o(82893),r=o(34289),d=o(14284),s=o(38240),c=o(62042),l=o(86090),m=o(74848);let f,u=!1;function p(){const[e,t]=(0,n.fp)(i.AG.image_editor),o=(0,l.Zp)();(0,l.zy)();return(0,a.useEffect)(()=>((async()=>{if(!u)try{await(0,s.J)("filerobot-image-editor.min.js"),u=!0}catch(e){return void(0,c.zN)("加载资源失败")}const a=(0,r.GG)("file",e.path),n=window.FilerobotImageEditor,{TABS:i,TOOLS:l}=n,m={defaultSavedImageName:e.name,source:d.$M.getDownloadUrl(a),onSave:async(t,o)=>{const n=t.extension,i=t.name??e.name,s=await new Promise(e=>t.imageCanvas.toBlob(e,t.mimeType));await d.$M.put(`${encodeURIComponent(`${(0,r.Yp)(a)}${i}.${n}`)}`,s,void 0),(0,c.SK)("保存成功")},annotationsCommon:{fill:"#151717",stroke:"#ec0f42",shadowColor:"#151717"},Text:{text:""},Rotate:{angle:90,componentType:"slider"},tabsIds:[Object.values(i)],defaultTabId:i.ANNOTATE,defaultToolId:l.ANNOTATE};f=new n(document.querySelector("#editor_container"),m),f.render({onClose:a=>{f.terminate();const n=e.close;t({}),n?.(),o((0,r.vX)())}})})(),()=>{f&&f.terminate()}),[]),(0,m.jsx)("div",{id:"image-editor-container",children:(0,m.jsx)("div",{className:"image-editor-context",children:(0,m.jsx)("div",{id:"editor_container",className:"image-editor-context"})})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[7873],{26559(e,n,t){var i=t(96540),o=t(34843),d=t(82893),r=t(86504),s=t(69918),a=t(8332),l=t(74848);const m=i.memo(function(e){const[n]=(0,o.fp)(d.AG.md_editor_last_context),[t]=(0,i.useState)(n?.trim()?n:a.$);return(0,l.jsx)("div",{className:e.className,ref:n=>e.setting&&(0,s.Ce)(n,e.setting),children:(0,l.jsx)("div",{className:"md-editor-scroll",children:(0,l.jsx)("div",{className:"md-editor-sheet",children:(0,l.jsx)(r.A,{value:t})})})})});t.d(n,["A",0,m])},8332(e,n,t){t.d(n,["$",0,'# 一级标题 Heading 1\n\n## 二级标题 Heading 2\n\n### 三级标题 Heading 3\n\n#### 四级标题 Heading 4\n\n##### 五级标题 Heading 5\n\n###### 六级标题 Heading 6\n\n这是一段普通正文,用来观察字体、字号、行高和文字颜色。中间可以包含 **加粗文字**、*斜体文字*、~~删除线~~、`行内代码` 以及 [一个链接](https://github.com/xiaobaidadada/filecat)。\n\n> 这是一段引用文字。\n> 引用通常用来强调摘录的内容,左侧一般会有一条竖线。\n\n- 无序列表第一项\n- 无序列表第二项\n - 嵌套的子项\n- 无序列表第三项\n\n1. 有序列表第一项\n2. 有序列表第二项\n3. 有序列表第三项\n\n```javascript\n// 代码块\nfunction greet(name) {\n console.log(`Hello, ${name}!`);\n}\ngreet("filecat");\n```\n\n| 列一 | 列二 | 列三 |\n| --- | --- | --- |\n| 内容 A | 内容 B | 内容 C |\n| 内容 D | 内容 E | 内容 F |\n\n---\n\n最后一段正文,用于观察段落之间的间距。\n',"V",0,'/* ===== md 主题 =====\n 选择器请从 .md-editor-sheet 开始写 —— 它是正文容器的类名,\n 编辑器与右侧预览用的是同一个类名,一处书写、两处生效。\n\n 注意:css 原样注入页面,不做任何改写。\n 写成 body、h1 这种全局选择器会真的作用到整个后台界面,不要这么写。\n\n 下面每一组都可以直接改,不需要的整段删掉即可。\n ============================================ */\n\n/* ---------- 正文 ---------- */\n.md-editor-sheet {\n font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; /* 字体 */\n font-size: 16px; /* 字号 */\n line-height: 1.7; /* 行高:1.7 约为字号的 1.7 倍 */\n color: #333333; /* 文字颜色 */\n}\n\n/* ---------- 整页底色 ----------\n 底色必须写在 .md-editor-scroll(滚动容器)上,不要写在 .md-editor-sheet。\n 纸张高度只有一屏,写在纸张上的底色长文档一滚就露底(上半截有色、下半截变回灰)。\n 深色主题尤其要注意:这一条不写,滚动时就会白一半黑一半。 */\n.md-editor-scroll {\n background: #ffffff;\n}\n\n/* ---------- 标题 h1 ~ h6 ---------- */\n.md-editor-sheet h1 {\n font-size: 2em; /* 相对正文字号的倍数 */\n font-weight: 600; /* 字重:400 常规 / 600 半粗 / 700 粗 */\n color: #1a1a1a;\n margin-top: 1.4em;\n margin-bottom: 0.6em;\n padding-bottom: 0.3em;\n border-bottom: 1px solid #eaecef; /* 标题下划线,不需要就删掉这行 */\n}\n.md-editor-sheet h2 { font-size: 1.5em; font-weight: 600; margin-top: 1.3em; margin-bottom: 0.6em; }\n.md-editor-sheet h3 { font-size: 1.25em; font-weight: 600; margin-top: 1.2em; margin-bottom: 0.5em; }\n.md-editor-sheet h4 { font-size: 1em; font-weight: 600; margin-top: 1.1em; margin-bottom: 0.5em; }\n.md-editor-sheet h5 { font-size: 0.9em; font-weight: 600; margin-top: 1em; margin-bottom: 0.5em; }\n.md-editor-sheet h6 { font-size: 0.85em; font-weight: 600; color: #6a737d; margin-top: 1em; margin-bottom: 0.5em; }\n\n/* ---------- 段落与行内元素 ---------- */\n.md-editor-sheet p {\n margin: 0 0 1em; /* 段落间距:上 右 下 左,下边距控制段与段的距离 */\n}\n.md-editor-sheet strong { font-weight: 600; } /* 加粗文字 */\n.md-editor-sheet em { font-style: italic; } /* 斜体文字 */\n.md-editor-sheet a { color: #0366d6; text-decoration: none; } /* 链接颜色;加下划线写 underline */\n.md-editor-sheet a:hover { text-decoration: underline; } /* 鼠标悬停时的链接样式 */\n.md-editor-sheet del { color: #999999; } /* 删除线文字 */\n\n/* ---------- 引用 ---------- */\n.md-editor-sheet blockquote {\n margin: 0 0 1em;\n padding: 0.4em 1em;\n color: #6a737d; /* 引用文字颜色 */\n border-left: 4px solid #dfe2e5; /* 左侧竖线,这是引用最明显的特征 */\n background: #f6f8fa; /* 引用底色,不需要就删掉 */\n}\n\n/* ---------- 代码 ---------- */\n.md-editor-sheet code {\n font-family: Consolas, Monaco, "Courier New", monospace; /* 等宽字体 */\n font-size: 0.88em;\n color: #476582; /* 行内代码文字色 */\n background: rgba(27, 31, 35, 0.05); /* 行内代码底色 */\n padding: 0.2em 0.4em;\n border-radius: 3px; /* 圆角 */\n}\n.md-editor-sheet pre {\n padding: 1em;\n overflow: auto; /* 内容太宽时出现横向滚动条 */\n background: #f6f8fa; /* 代码块底色 */\n border-radius: 6px;\n margin: 0 0 1em;\n}\n.md-editor-sheet pre code {\n background: transparent; /* 代码块里的 code 不要再叠一层底色 */\n padding: 0;\n}\n\n/* ---------- 列表 ---------- */\n.md-editor-sheet ul, .md-editor-sheet ol {\n padding-left: 2em; /* 缩进 */\n margin: 0 0 1em;\n}\n.md-editor-sheet li { margin: 0.25em 0; } /* 列表项之间的间距 */\n\n/* ---------- 表格 ---------- */\n.md-editor-sheet table {\n width: 100%;\n border-collapse: collapse; /* 相邻边框合并成一条线 */\n margin: 0 0 1em;\n}\n.md-editor-sheet table th, .md-editor-sheet table td {\n padding: 6px 13px;\n border: 1px solid #dfe2e5; /* 单元格边框 */\n}\n.md-editor-sheet table th {\n font-weight: 600;\n background: #f6f8fa; /* 表头底色 */\n}\n\n/* ---------- 分割线 ---------- */\n.md-editor-sheet hr {\n height: 1px; /* 线的粗细 */\n border: 0;\n background: #e1e4e8; /* 线的颜色 */\n margin: 1.6em 0;\n}\n\n/* ---------- 图片 ---------- */\n.md-editor-sheet img {\n max-width: 100%; /* 防止大图撑破版面 */\n border-radius: 4px;\n}\n'])},45907(e,n,t){t.d(n,{y:()=>d});var i=t(34843),o=t(82893);function d(){const[e,n]=(0,i.fp)(o.AG.confirm);return({sub_title:e,confirm_fun:t,title:i,context_div:o})=>{n({open:!0,sub_title:e,handle:()=>{t(),n({open:!1,handle:null})},title:i,context_div:o})}}},57873(e,n,t){t.r(n),t.d(n,{default:()=>F});var i=t(96540),o=t(86149),d=t(86090),r=t(85997),s=t(4412),a=t(75725),l=t(70447),m=t(61443),c=t(62042),h=t(78247),g=t(23430);const f=/^(\d+(?:\.\d+)?)(px|%|rem|em|vw|vh|ch)$/,u=/^\d+(\.\d+)?$/,p=/^\d+$/,x=/[\\/:*?"<>|\u0000-\u001f]/,_={size(e,n=!1){const t=String(e??"").trim();if(!t)return null;let i;if(n&&u.test(t))i=t;else{const e=f.exec(t);if(!e)return null;i=e[1]}const o=Number(i);return Number.isFinite(o)&&o>0&&o<=1e4?t:null},uint(e){const n=String(e??"").trim();return p.test(n)?Number(n):null},filename(e,n=!0){const t=String(e??"").trim();return""===t?n?"":null:"."===t||".."===t||x.test(t)||t.length>64?null:t}},b={content_max_width:_.size,content_padding:_.size,font_size:_.size,line_height:e=>_.size(e,!0),theme:_.filename,auto_save_interval:_.uint};var k=t(87361),v=t(69918),y=t(26559),j=t(96763),w=t(45907),z=t(34843),C=t(82893),S=t(74848);const N=[{key:"content_max_width",label:"正文最大宽度"},{key:"content_padding",label:"正文左右边距"},{key:"font_size",label:"正文字号"},{key:"line_height",label:"行高"},{key:"auto_save_interval",label:"as_iv"}];function F(){const{t:e}=(0,o.B)(),n=(0,d.Zp)(),{check_user_auth:t}=(0,h.MH)(),f=(0,w.y)(),u=t(g.oV.md_editor_setting),[,p]=(0,z.fp)(C.AG.md_editor_setting),[,x]=(0,z.fp)(C.AG.md_theme_css),[_,F]=(0,i.useState)({}),[A,G]=(0,i.useState)(!0),[$,H]=(0,i.useState)(!1),[P,E]=(0,i.useState)([]),[B,I]=(0,i.useState)(v.FG.theme);(0,i.useEffect)(()=>{Promise.all([(0,v.gC)(),(0,j.Kz)()]).then(([e,n])=>{const t={};N.forEach(n=>t[n.key]=String(e[n.key]??"")),F(t),I(e.theme??v.FG.theme),E(n)}).finally(()=>G(!1))},[]);const K=P.find(e=>e.id===B),V=e=>{const n=b[e]((_[e]??"").trim());return null===n?v.FG[e]:n};return(0,S.jsxs)("div",{children:[(0,S.jsx)(s.aZ,{position:"right",children:(0,S.jsx)(r.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>n(-1)})}),(0,S.jsx)(a.jW,{isFull:!0,more:!0,children:(0,S.jsx)(a.NN,{children:(0,S.jsx)(a.xh,{children:(0,S.jsxs)(a.fI,{children:[(0,S.jsx)(a.VP,{widthPer:33,maxWidth:"30rem",children:(0,S.jsx)(l.Zp,{title:e("编辑器设置"),titleCom:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(r.C3,{text:e("恢复默认"),clickFun:()=>{const e={};N.forEach(n=>e[n.key]=String(v.FG[n.key])),F(e)}}),u&&(0,S.jsx)(r.$n,{text:e($?"保存中":"保存"),clickFun:()=>{$||(async()=>{const n={theme:B};for(const t of N){const i=(_[t.key]??"").trim(),o=b[t.key](i);if(null===o)return void(0,c.zN)(`${e(t.label)}: ${e("auto_save_interval"===t.key?"as_num":"请输入合法的 CSS 值,例如 10px、3rem、80%")}`);n[t.key]=o}H(!0);try{const t=await(0,v.fy)(n);if(t){(0,c.SK)(e("保存成功"));const n={};N.forEach(e=>n[e.key]=String(t[e.key]??"")),F(n),I(t.theme??v.FG.theme),p({...t}),(0,j.sO)().then(x)}else(0,c.zN)(e("保存失败"))}finally{H(!1)}})()}})]}),children:A?(0,S.jsxs)("div",{className:"common-box common-box-center",children:[e("加载中"),"..."]}):(0,S.jsxs)("div",{className:"md-setting-form",children:[(0,S.jsx)(m.BC,{vertical:!0,label:e("主题"),children:(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem"},children:[(0,S.jsx)(m.l6,{value:B,onChange:e=>I(e),disabled:!u,options:[{title:e("不使用主题"),value:""},...P.map(e=>({title:e.id,value:e.id}))]}),(0,S.jsx)(r.rA,{icon:"add",title:e("新建主题"),onClick:()=>n(k.o.md_theme_editor_page)}),(0,S.jsx)(r.rA,{icon:"edit",title:e("编辑主题"),onClick:()=>n(`${k.o.md_theme_editor_page}?id=${encodeURIComponent(B)}`)}),K&&(0,S.jsx)(r.rA,{icon:"delete",title:e("删除主题"),onClick:()=>{return n=K,void f({sub_title:e("确认删除这个主题吗?"),confirm_fun:async()=>{await(0,j._8)(n.id)?((0,c.SK)(e("删除成功")),E(await(0,j.Kz)()),B===n.id&&I(v.FG.theme)):(0,c.zN)(e("删除失败"))}});var n}})]})}),N.map(n=>(0,S.jsx)(m.BC,{vertical:!0,label:e(n.label),children:(0,S.jsx)(m.Sm,{disabled:!u,placeholder:String(v.FG[n.key]),value:_[n.key]??"",handleInputChange:e=>F(t=>({...t,[n.key]:e}))})},n.key)),!u&&(0,S.jsx)("p",{className:"md-editor-setting-page__desc",children:e("nprmtp")})]})})}),(0,S.jsx)(a.VP,{widthPer:50,maxWidth:"60rem",children:(0,S.jsx)(l.Zp,{title:e("预览"),children:(0,S.jsx)(y.A,{className:"md-editor-setting-page__preview",setting:{content_max_width:V("content_max_width"),content_padding:V("content_padding"),font_size:V("font_size"),line_height:V("line_height")}})})})]})})})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8765],{60096(e,i,t){t.d(i,{QW:()=>z,Ic:()=>b,t$:()=>F,$J:()=>$});var n=t(96540),s=t(47022),l=t(34843),o=t(82893),a=t(86090),r=t(64694),d=t(14284),c=t(34289),m=t(23430),f=t(62042),h=t(99214),p=t(85997),u=t(86149),_=t(74848);function x(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.nowFileList),[c,x]=(0,l.fp)(o.AG.confirm),[g,y]=(0,l.fp)(o.AG.user_base_info),{t:w}=(0,u.B)();return(0,_.jsxs)("div",{...e.extraAttr,onClick:()=>{!async function(i){e.click&&e.click(i,e.name)}(e.index)},className:e.mount?"item mount-item":"item",role:"button","data-type":e.isLink?"invalid_link":e.type,"data-dir":!e.type||e.type===s.Iw.folder,"data-mount":e.mount?"true":void 0,"aria-selected":null!==(0,r.kW)(i,e.index),"aria-label":e.name,style:{"--filewidth":e.itemWidth??"33%"},onDragStart:n=>{return s=e.index,void(i.find(e=>e===s)||t([...i,s]));var s},onDrop:t=>((t,l)=>{const o=t.dataTransfer;let a,r=!1;for(let e=0;e<o.items.length;e++)if("file"===o.items[e].kind){r=!0;break}if(r)return;if(g?.user_data?.file_list_pagination_mode===m.yM.pagination){if(a=n.files[l],n.files[l]?.type!==s.Iw.folder)return}else if(a=n.folders[l],n.folders.length<=l)return;(0,h.ib)(n,i).some(e=>e?.name===a?.name)?(0,f.zN)(w("mv_self")):x({open:!0,title:`确定将文件移动并覆盖到${a?.name}吗?`,handle:async()=>{await e.draggable_handle(a?.name)}})})(t,e.index),draggable:void 0!==e.draggable_handle,children:[void 0===e.icon&&(0,_.jsx)("div",{children:e.type!==s.Iw.image||null==e.path||g?.user_data?.not_pre_show_image?(0,_.jsx)(p.In,{icon:""}):(0,_.jsx)("img",{loading:"lazy",src:d.$M.getDownloadUrl(e.path,{mtime:e.mtime,cache:1}),alt:e.name})}),void 0!==e.icon&&(0,_.jsx)("div",{className:"rotating-div",children:(0,_.jsx)("span",{className:"material-icons",children:e.icon})}),(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{className:"name",children:[(0,_.jsx)("span",{children:e.name}),e.mount_readonly&&(0,_.jsx)("span",{className:"mount-readonly-tag",children:w("只读")})]}),e.size?(0,_.jsx)("p",{children:e.size}):(0,_.jsx)("p",{children:"—"}),(0,_.jsx)("p",{children:e.show_mtime})]}),e.children]})}var g=t(83529),y=t(34251);function w(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.nowFileList),[f,p]=(0,l.fp)(o.AG.confirm),[w,k]=(0,l.fp)(o.AG.file_page),[v,j]=(0,l.fp)(o.AG.enterKey),{click_file:A}=(0,h.kZ)(),G=(0,h._A)(),{t:z}=(0,u.B)(),b=(0,a.Zp)();(0,a.zy)();const F=(0,h.A9)(),{clickDouble:$}=(0,h.xI)(),[C,I]=(0,l.fp)(o.AG.showPrompt);return(0,_.jsx)(x,{extraAttr:{onContextMenu:t=>{((t,n,l,o)=>{t.preventDefault(),t.stopPropagation();const a=new y.ik;a.path=(0,r.IO)((0,c.vX)(),n),a.filename=n,a.x=t.clientX,a.y=t.clientY,a.type=l?s.Iw.folder:(0,y.uL)(n),a.size=o,a.useSelectedList=i.includes(e.index),I({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:a})})(t,e.name,e.type===s.Iw.folder,e.origin_size)}},draggable_handle:async e=>{const s=(0,h.ib)(n,i).map(e=>(0,h.Ok)(e.name));await d.$M.post("cut",{files:s,to:`${(0,c.GG)("file",(0,c.vX)())}/${e}`});t([]),p({open:!1,handle:null}),b((0,c.vX)())},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,isLink:e.isLink,path:e.path,icon:e.icon,show_mtime:e.show_mtime,mount:e.mount,mount_driver:e.mount_driver,mount_color:e.mount_color,mount_readonly:e.mount_readonly,click:(n,l)=>{if($(n,()=>{e.type===s.Iw.folder?F(l):(G({name:l,mode:(0,h.Pc)(e.type)}),A({name:l,size:e.origin_size,opt_shell:!0,mtime:e.mtime,close:()=>G(null)}))}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===v)t([...i,n]);else if("shift"===v){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])},itemWidth:e.itemWidth})}var k=t(78247),v=(t(38240),t(64405)),j=t(88815);function A(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.editorSetting),[p,g]=(0,l.fp)(o.AG.shellNowDir),[y,w]=(0,l.fp)(o.AG.sshInfo),[A,G]=(0,l.fp)(o.AG.nowFileList),[z,b]=(0,l.fp)(o.AG.enterKey),[F,$]=(0,l.fp)(o.AG.confirm),C=(0,a.Zp)(),{t:I}=(0,u.B)(),{clickDouble:W}=(0,h.xI)();return(0,_.jsx)(x,{draggable_handle:async n=>{const s=new v.x;Object.assign(s,y),s.target=(0,r.HS)(...p,n);const l=(0,h.ib)(A,i).map(e=>(0,r.HS)(...p,e.name));for(const e of l)if(s.source=e,!await d.Fg.post("move",s))return!1;t([]),$({open:!1,handle:null}),await e.fileHandler()},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(n,l)=>{if(W(n,()=>{if(e.type===s.Iw.folder){const e=new v.x;return e.key=y.key,e.dir=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`,C((0,r.IO)((0,c.vX)(),l)),t([]),void G({files:[],folders:[]})}const i=async()=>{const i=new v.x;i.key=y.key,i.file=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`;const t=await d.Fg.post("get/file/text",i);let n;l.endsWith(s.Iw.workflow_act)?n="ace/mode/yaml":(l.endsWith(s.Iw.draw)||l.endsWith(s.Iw.excalidraw))&&(n="ace/mode/json"),m({model:n,open:!0,fileName:e.name,save:async e=>{i.context=e;0===(await d.Fg.post("update/file/text",i)).code&&(k.xK.set_value_temp(""),(0,f.SK)("success"))}}),k.xK.set_value_temp(t.data)};"number"==typeof e.origin_size&&e.origin_size>j.o5?$({open:!0,title:I("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:async()=>{$({open:!1,handle:null}),await i()}}):i()}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===z)t([...i,n]);else if("shift"===z){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])}})}function G(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.enterKey),{click_file:c}=(0,h.kZ)(),[m,f]=(0,l.fp)(o.AG.nowFileList),{t:p}=(0,u.B)(),[w,k]=(0,l.fp)(o.AG.showPrompt),v=((0,h.oT)(),(0,h.xp)()),{clickDouble:j}=(0,h.xI)();return(0,_.jsx)(x,{extraAttr:{onContextMenu:i=>{((i,t,n,l)=>{i.preventDefault(),i.stopPropagation();const o=new y.ik,a=e.item_list;for(const e of a)if(e.name===t){o.path=e.path;break}o.is_share=!0,o.filename=t,o.x=i.clientX,o.y=i.clientY,o.type=n?s.Iw.folder:(0,y.uL)(t),o.size=l,o.share_token=e.share.share_token,o.share_id=e.share.share_id,k({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:o})})(i,e.name,e.type===s.Iw.folder,e.origin_size)}},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(l,o)=>{if(j(l,()=>{e.type!==s.Iw.folder&&(v(o)||c({file_path:e.item_list[l].path,file_url:d.$M.getDownloadUrlV2(e.item_list[l].path,"share_download",{share_id:e.share.share_id,share_token:e.share.share_token}),name:o,size:e.origin_size,opt_shell:!0,mtime:e.mtime,not_type_tip:p("未知类型,请下载查看")}))}))return;if(null!==(0,r.kW)(i,l))t((0,r.P1)(i,l));else if("ctrl"===n)t([...i,l]);else if("shift"===n){const{max:e,min:n}=(0,r.a7)(i),s=[];if(l>=e)for(let i=e;i<=l;i++)s.push(i);else for(let e=n;e>=l;e--)s.push(e);t(s)}else t([l])}})}function z({handleContextMenu:e,file_list:i,clickBlank:t,share:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.B)(),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)();return(0,h.UK)(i,[],d),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:(0,_.jsx)("div",{onClick:t,children:i.map((e,t)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(G,{share:s,item_list:i,icon:f(e.name)?"refresh":void 0,itemWidth:m,index:t+0,...e})},t+0))})})}function b({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s,fileHandler:a}){const[r,d]=(0,l.fp)(o.AG.user_base_info),c=(0,n.useRef)(null),{t:m}=(0,u.B)(),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),w=(0,n.useMemo)(()=>t?.length??0,[t]);return(0,h.ei)(c,g.PromptEnum.SshUpload),(0,h.UK)(i,t,c),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${r?.user_data?.file_list_show_type??""}`,ref:c,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:m("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:m("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+w,...e})},i+w))})]})}function F({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.B)(),[m]=(0,l.fp)(o.AG.zoom_style_by_percent),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),v=(0,n.useMemo)(()=>t?.length??0,[t]),j=(0,h.pi)(m);return(0,h.ei)(d,g.PromptEnum.FilesUpload),(0,h.UK)(i,t,d),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:j.fontSize},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:c("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:c("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+v,...e})},i+v))})]})}function $({handleContextMenu:e,list:i,clickBlank:t}){const[s,a]=(0,l.fp)(o.AG.user_base_info),r=(0,n.useRef)(null),{t:d}=(0,u.B)(),[c]=(0,l.fp)(o.AG.zoom_style_by_percent),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)(),[p,x]=(0,l.fp)(o.AG.fileShellShow),[y,v]=(0,l.fp)(o.AG.enterKey),[j,A]=(0,l.fp)(o.AG.selectedFileList),[G,z]=(0,l.fp)(o.AG.file_page),b=(0,h.pi)(c);return(0,h.UK)(i,[],r),(0,h.ei)(r,g.PromptEnum.FilesUpload),(0,h.SQ)(r,()=>{z(e=>e.page_num<0?e:{page_size:e.page_size,page_num:e.page_num+1})},()=>{}),(0,n.useEffect)(()=>()=>{p.show&&x({show:!1,path:""})},[]),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:b.fontSize},className:`mosaic file-icons ${s?.user_data?.file_list_show_type??""}`,ref:r,children:i&&(0,_.jsx)("div",{onClick:t,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:f(e.name)?"refresh":void 0,itemWidth:m,index:i,...e})},i))})})}},6960(e,i,t){t.d(i,{s:()=>o});var n=t(72635);const s=1440,l=525600;function o(e){e=e>1e12?e:1e3*e;const i=Date.now(),t=Math.abs(i-e)/6e4;return t<1?n.Ay.t("小于一分钟"):t<60?`${t.toFixed(0)} ${n.Ay.t("分钟前")}`:t<s?`${(t/60).toFixed(0)} ${n.Ay.t("小时前")}`:t<43200?`${(t/s).toFixed(0)} ${n.Ay.t("天前")}`:t<l?`${(t/43200).toFixed(0)} ${n.Ay.t("月前")}`:`${(t/l).toFixed(0)} ${n.Ay.t("年前")}`}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9299],{47374(e,t,i){i.d(t,{e:()=>f});var n=i(96540),s=i(86090),o=i(64694),a=i(34289),l=i(61443),r=i(75725),c=i(86149),d=i(85997),_=i(74848);function f(e){let t=(0,s.zy)();const[i,f]=(0,n.useState)([]),[p,h]=(0,n.useState)("/"),[u,m]=(0,n.useState)(void 0),{t:w,i18n:g}=(0,c.B)();n.useEffect(()=>{let t="",i=(0,a.vX)().split("/");i=i.filter(e=>e);const n=i.indexOf(e.baseRoute),s=[];if(-1!=n){t=(0,o.IO)(i.slice(0,n),e.baseRoute);const a=i.slice(n+1);for(let e=0;e<a.length;e++){const i=a[e];s.push({value:i,href:0===e?`${t}${i}/`:(0,o.IO)(s[e-1].href,i)})}h(t),f(s)}},[t]);const v=t=>{t.stopPropagation(),e.clickFun(t)};return(0,_.jsx)("div",{className:"breadcrumbs",onClick:e=>{m(void 0!==u?void 0:"")},children:(0,_.jsx)(n.Fragment,{children:void 0===u?(0,_.jsxs)(n.Fragment,{children:[(0,_.jsx)("span",{className:"chevron",children:(0,_.jsx)(s.N_,{to:p,onClick:v,children:(0,_.jsx)(d.In,{icon:"home"})})}),i.map((e,t)=>(0,_.jsxs)("span",{className:"chevron",children:[(0,_.jsx)(d.In,{icon:"keyboard_arrow_right"}),(0,_.jsx)(s.N_,{to:e.href,onClick:v,children:decodeURIComponent(e.value)})]},t))]}):(0,_.jsx)(r.QM,{click:()=>{m(void 0)},children:(0,_.jsx)(l.Sm,{width:"100%",placeholder:w("输入跳转的目录"),handlerEnter:t=>{e.input_path_enter&&e.input_path_enter(t),m(void 0)}})})})})}},77481(e,t,i){i.d(t,{S:()=>l,X:()=>a});var n=i(96540),s=i(61443),o=i(74848);function a(e){const[t,i]=n.useState([]),a=(0,n.useRef)(-1),[l,r]=(0,n.useState)(-1),[c,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?i(Array.isArray(e.children)?e.children:[e.children]):i(e.rows)},[e.rows,e.children]);const _=()=>{a.current=-1,r(-1),d(-1)};return(0,o.jsxs)("table",{children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:e.headers?.map((t,i)=>{const n=!!e.filter&&(e.filter.column??0)===i;let a=t;if(n){const i=e.filter,n=i.options.find(e=>e.value===i.value);null!=i.value&&n&&(a=`${t} (${n.label})`)}return(0,o.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,o.jsx)(s.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:a}):t},i)})})}),(0,o.jsx)("tbody",{children:t.map((t,i)=>{const n=!!e.onRowDrag;return(0,o.jsx)("tr",{className:n?(l===i?"row-dragging":"")+(c===i?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(a.current=i,r(i),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||a.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(i))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=a.current,i=c;_(),t<0||i<0||t===i||e.onRowDrag?.(t,i)})())},onDragEnd:_,children:t.map((i,n)=>{const s=n===t.length-1?"small":"";return(0,o.jsx)("td",{className:s,style:{width:e.width??"auto"},children:i},n)})},i)})})]})}function l(e){return(0,o.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,o.jsx)("div",{children:e},t))})}},19299(e,t,i){i.r(t),i.d(t,{default:()=>q});var n=i(96540),s=i(47374),o=i(34843),a=i(82893),l=i(14284),r=i(86090),c=i(4412),d=i(83529),_=i(34289),f=i(53459),p=i(99214),h=i(61443),u=i(47022),m=i(62042),w=i(86149),g=i(7523),v=i(78247),x=i(88815),y=i(6960),j=i(47071),k=i(14944),G=i(92275),A=i(23430);var b=i(34251),C=i(60096),$=i(87361),M=i(76559),z=i(85997),S=i(77481),D=i(70447),P=i(74848);const I=500;function N(e){const{t}=(0,w.B)(),i=(0,r.Zp)(),[,s]=(0,o.fp)(a.AG.prompt_card),[l,c]=(0,n.useState)(""),[d,_]=(0,n.useState)(!1),[f,p]=(0,n.useState)([]),[u,m]=(0,n.useState)(0),[g,v]=(0,n.useState)(!1),x=(0,n.useMemo)(()=>new M.I(window.location.host,"file_deep_search"),[]),y=(0,n.useRef)(!1),j=decodeURIComponent(e.base_path);(0,n.useEffect)(()=>{let e=[],t=null;const i=()=>{if(t=null,y.current||!e.length)return;const i=e;e=[],m(e=>e+i.length),p(e=>e.length>=I?e:[...e,...i].slice(0,I))},n=()=>{y.current||_(!1)};return x.addMsg(G.HK.file_deep_search_data,n=>{y.current||(e.push(...n.context??[]),null===t&&(t=setTimeout(i,100)))}),x.addMsg(G.HK.file_deep_search_end,()=>{y.current||(i(),_(!1))}),x.on_message("close",n),()=>{y.current=!0,clearTimeout(t),x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),x.off_message("close",n),x.close()}},[]);const k=()=>{const t=l.trim();if(!t||d)return;p([]),m(0),v(!0),_(!0);const i={param_path:e.base_path,keyword:t};x.sendData(G.HK.file_deep_search,i).catch(()=>{})},A=e=>{let t=e.is_dir?e.path:e.path.slice(0,e.path.lastIndexOf("/")+1);t.endsWith("/")||(t+="/"),s({open:!1}),i($.o.file+t.split("/").map(encodeURIComponent).join("/"))};return(0,P.jsxs)("div",{className:"file-deep-search",children:[(0,P.jsxs)("div",{className:"file-deep-search__bar",children:[(0,P.jsx)(h.$Z,{icon:"search",value:l,placeholder:t("搜文件名"),handleInputChange:e=>c(e),handleEnterPress:k}),(0,P.jsx)("button",{className:"button button--flat",onClick:d?()=>{x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),_(!1)}:k,children:t(d?"取消":"搜索")})]}),(0,P.jsxs)("div",{className:"file-deep-search__hint",children:[(0,P.jsxs)("span",{children:[t("范围"),":",j]}),u>0&&(0,P.jsx)("span",{className:"file-deep-search__count",children:u>I?`${t("已显示")} 500 / ${u}`:`${u}`})]}),(0,P.jsxs)("div",{className:"file-deep-search__body",children:[f.length>0&&(0,P.jsx)(S.X,{headers:[t("名称"),t("路径"),""],rows:f.map(e=>{const i=e.path.slice(0,e.path.lastIndexOf("/")+1);return[e.is_dir?(0,P.jsx)("span",{className:"file-deep-search__dir",children:e.name}):e.name,(0,P.jsx)(D.xP,{context:i}),(0,P.jsx)(z.rA,{icon:"folder_open",title:t("打开所在目录"),onClick:()=>A(e)})]})}),d&&(0,P.jsxs)("div",{className:"file-deep-search__empty",children:[(0,P.jsx)("span",{className:"chat-session-running",title:t("搜索中")}),t("搜索中")]}),!d&&u>I&&(0,P.jsx)("div",{className:"file-deep-search__more",children:t("结果过多")}),!d&&0===f.length&&(0,P.jsx)("div",{className:"file-deep-search__empty",children:t(g?"无匹配":"输入后搜")})]})]})}var F=i(23496),X=i(12730),E=i(75725),K=i(40505);let R={};function H(){const{t:e}=(0,w.B)();let t=(0,r.zy)();const i=(0,r.Zp)(),{check_user_auth:s}=(0,v.MH)(),[c,f]=(0,o.fp)(a.AG.nowFileList),[h,x]=(0,o.fp)(a.AG.uploadFiles),[y,j]=(0,o.fp)(a.AG.showPrompt),[C,M]=(0,o.fp)(a.AG.selectedFileList),[S,I]=(0,o.fp)(a.AG.copyedFileList),[N,F]=(0,o.fp)(a.AG.cutedFileList),[K,H]=(0,o.fp)(a.AG.selectedFileList),[L,U]=(0,o.fp)(a.AG.clickFileList),[Y,O]=(0,o.fp)(a.AG.fileShellShow),[Z]=(0,o.fp)(a.AG.current_mount),[B,W]=(0,o.fp)(a.AG.file_root_list),[T,q]=(0,o.fp)(a.AG.file_root_index),[V,J]=(0,n.useState)(void 0),[Q,ee]=(0,n.useState)(""),[te,ie]=(0,o.fp)(a.AG.workflow_show),[ne,se]=(0,o.fp)(a.AG.workflow_realtime_show),[oe,ae]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:le}=(0,n.useContext)(g.F),[re,ce]=(0,o.fp)(a.AG.user_base_info),{click_file:de}=(0,p.kZ)(),[_e,fe]=(0,o.fp)(a.AG.prompt_card),pe=(0,n.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type!==u.Iw.folder?1:0),0),[c]),he=(0,n.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type===u.Iw.folder?1:0),0)+(c.folders?.length??0),[c]);function ue(e){(0,m.SK)(e)}(0,n.useEffect)(()=>{R={}},[t]),(0,n.useEffect)(()=>()=>{O({show:!1,path:""})},[]);const me=(0,p.Vs)(),we=t=>{fe({open:!0,title:e("信息"),context_div:(0,P.jsxs)("div",{style:{maxWidth:"25rem"},children:[(0,P.jsx)(E.Yh,{left:e("挂载位置磁盘"),right:t?.total_size}),(0,P.jsx)(E.Yh,{left:`${e("磁盘剩余")}`,right:t?.left_size}),(0,P.jsx)(E.Yh,{left:`${e("文件系统")}`,right:t?.fs_type}),(0,P.jsx)(E.Yh,{left:`${e("文件夹数")}`,right:he}),(0,P.jsx)(E.Yh,{left:`${e("文件数")}`,right:pe}),(0,P.jsx)(E.Yh,{left:`${e("当前位置")}`,right:(0,P.jsx)(D.xP,{context:t?.now_absolute_path})})]}),cancel:()=>{k.ws.removeMsg(G.HK.file_info)}})};return(0,P.jsxs)(n.Fragment,{children:[C.length>0&&(0,P.jsx)(z.rA,{icon:"delete",title:e("删除"),onClick:()=>{j({show:!0,type:d.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),C.length>0&&(0,P.jsx)(z.rA,{icon:"content_copy",title:e("复制"),onClick:function(){const e=(0,p.ib)(c,C);I(e.map(e=>(0,p.Ok)(e.name))),F([]),ue("已复制")}}),C.length>0&&(0,P.jsx)(z.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){const e=(0,p.ib)(c,C);F(e.map(e=>(0,p.Ok)(e.name))),I([]),ue("已剪切")}}),(S.length>0||N.length>0)&&(0,P.jsx)(z.rA,{onClick:function(){j({show:!0,type:d.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:S.length+N.length}),C.length>0&&(0,P.jsx)(z.rA,{icon:"download",title:e("下载"),onClick:function(){const e=(0,p.ib)(c,C);for(let t=0;t<e.length;t++){const i=e[t];e[t]=encodeURIComponent((0,p.Ok)(i.name))}const t=l.$M.getDownloadUrl(e);window.open(t)}}),C.length>0&&(0,P.jsx)(z.rA,{icon:"compress",title:e("压缩"),onClick:function(){const e=(0,p.ib)(c,C);for(let t=0;t<e.length;t++){const i=e[t];e[t]=(0,p.Ok)(i.name)}e&&0!==e.length?j({show:!0,type:d.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,m.zN)("没有选中")}}),1===C.length&&(0,P.jsx)(z.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){j({show:!0,type:d.PromptEnum.FileRename,overlay:!0,data:{}})}}),oe&&(0,P.jsx)(z.rA,{icon:"api",title:"workflow",onClick:()=>{ie(!te)}}),!Z&&(0,P.jsx)(z.rA,{icon:"terminal",title:"shell",onClick:function(){Y.show?O({show:!1,path:""}):O({show:!0,path:(0,_.GG)("file",(0,_.vX)())})}}),s(A.oV.share_file)&&(0,P.jsx)(z.rA,{icon:"share",title:e("文件分享"),onClick:()=>{i(`${$.o.share_list_setting_page}`)}}),(0,P.jsx)(z.rA,{icon:"grid_view",title:e("切换样式"),onClick:me}),(0,P.jsx)(z.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){j({show:!0,type:d.PromptEnum.DirNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,P.jsx)(z.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){j({show:!0,type:d.PromptEnum.FileNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,P.jsx)(z.rA,{icon:"upload_file",title:e("上传"),onClick:()=>{j({show:!0,type:d.PromptEnum.UploadFile,overlay:!0,data:{call:e=>{let t=e.currentTarget?.files;if(!t)return;let i=!!t[0].webkitRelativePath;const n=[],s=new Set;for(let e=0;e<t.length;e++){const o=t[e],a=i?o.webkitRelativePath:`${o.webkitRelativePath}${o.name}`;o.fullPath=a,i&&s.add((0,X.S)(a)),n.push(o)}const o=[];if(i)for(const e of s)o.push({isDir:!0,fullPath:e,name:e});o.push(...n),x(o),j({show:!0,type:d.PromptEnum.FilesUpload,overlay:!1,data:{}})}}})}}),(0,P.jsx)(z.rA,{icon:"info",title:e("信息"),onClick:async()=>{let e;if(!R.now_absolute_path){k.ws.addMsg(G.HK.file_info,t=>{const i=t.context;e&&(R={...R,...i},k.ws.removeMsg(G.HK.file_info),we(R))});const t=await k.ws.sendData(G.HK.file_info,{type:u.Iw.folder,path:(0,_.GG)("file",(0,_.vX)())});e=t.context,R=e,we(R)}we(R)}}),(0,P.jsx)(z.rA,{icon:"more_vert",title:e("切换目录"),onClick:t=>{const n=new b.ik;n.x=t.clientX,n.y=t.clientY,n.type=u.Iw.directory,n.items=B,n.item_pre_value=T,n.textClick=async t=>{if(-1===t)return i(`${$.o.setting_private_env_setting}`),j({data:void 0,overlay:!1,type:"",show:!1}),void(0,m.N9)(e("请配置 文件夹路径"));(async e=>{q(e),await l.$M.post("base_switch",{root_index:e}),await le(),i("/file/"),H([]),U([])})(t),j({data:void 0,overlay:!1,type:"",show:!1})},j({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:n})}})]})}var L=i(2543),U=i(21499),Y=i(64694),O=i(17903);const Z=n.lazy(()=>Promise.all([i.e(7856),i.e(6349),i.e(3659)]).then(()=>i(63659))),B=n.lazy(()=>Promise.all([i.e(7856),i.e(1636)]).then(()=>i(81636)));let W,T="";function q(){const[e,t]=(0,o.fp)(a.AG.editorSetting),[,i]=(0,o.fp)(a.AG.md_editor),[,m]=(0,o.fp)(a.AG.log_viewer),[,M]=(0,o.fp)(a.AG.image_editor),[S,D]=(0,o.fp)(a.AG.file_preview),{t:I}=(0,w.B)();let X=(0,r.zy)();const E=(0,r.Zp)(),[R,q]=(0,o.fp)(a.AG.nowFileList),[V]=(0,o.fp)(a.AG.file_list_refresh),[J]=(0,o.fp)(a.AG.mount_enabled),[Q,ee]=(0,o.fp)(a.AG.current_mount),[te,ie]=(0,o.fp)(a.AG.showPrompt),[ne,se]=(0,o.fp)(a.AG.selectedFileList),[oe,ae]=(0,o.fp)(a.AG.clickFileList),[le,re]=(0,o.fp)(a.AG.fileShellShow),[ce,de]=(0,n.useState)(""),[_e,fe]=(0,o.fp)(a.AG.workflow_show),[pe,he]=(0,o.fp)(a.AG.workflow_realtime_show),[ue,me]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:we}=(0,n.useContext)(g.F),[ge,ve]=(0,o.fp)(a.AG.user_base_info),{click_file:xe}=(0,p.kZ)(),[ye]=(0,r.ok)(),je=(0,p._A)(),ke=n.useRef(null),[Ge,Ae]=(0,o.fp)(a.AG.to_running_files),[be,Ce]=(0,o.fp)(a.AG.file_page),[$e]=(0,o.fp)(a.AG.blank_search_mode),[,Me]=(0,o.fp)(a.AG.prompt_card),[ze,Se]=(0,o.fp)(a.AG.blank_search_mode_for_temp),De=function(){const[e,t]=(0,o.fp)(a.AG.user_base_info),{t:i}=(0,w.B)(),{check_user_auth:s}=(0,v.MH)(),[c,f]=(0,o.fp)(a.AG.router_jump),h=(0,r.Zp)(),{initUserInfo:m}=(0,n.useContext)(g.F),[x,y]=(0,o.fp)(a.AG.nowFileList),[j,C]=(0,o.fp)(a.AG.showPrompt),[M,z]=(0,o.fp)(a.AG.fileShellShow),[S,D]=(0,o.fp)(a.AG.blank_search_mode);return t=>{t.preventDefault(),t.stopPropagation();const n=new b.ik;n.x=t.clientX,n.y=t.clientY,n.type=u.Iw.directory;const o=[{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.time_minx_max),children:i("时间逆序")}),v:A.t8.time_minx_max},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.time_max_min),children:i("时间顺序")}),v:A.t8.time_max_min}],a=[{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.size_min_max),children:i("大小顺序")}),v:A.t8.size_min_max},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.size_max_min),children:i("大小逆序")}),v:A.t8.size_max_min}],r=[{r:(0,P.jsx)("span",{style:(0,K.ok)(!e.user_data.file_list_pagination_mode||e.user_data.file_list_pagination_mode===A.yM.all),children:i("全部加载文件")}),v:A.yM.all},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.file_list_pagination_mode===A.yM.pagination),children:i("scrll_l")}),v:A.yM.pagination}],c=[{r:(0,P.jsx)("span",{style:(0,K.ok)(!e.user_data.file_time_show_type||e.user_data.file_time_show_type===A.KD.current),children:i("最近时间")}),v:A.KD.current},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.file_time_show_type===A.KD.time),children:i("准确时间")}),v:A.KD.time}],w=[{r:i("文件列表展示"),items:[{r:i("文件排序"),v:"",items:[{r:(0,P.jsx)("span",{style:(0,K.ok)(!e.user_data.dir_show_type),children:i("系统默认")}),v:A.t8.defualt},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.name),children:i("名字")}),v:A.t8.name},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.time_minx_max||e.user_data.dir_show_type===A.t8.time_max_min),children:i("修改时间")}),v:!1,items:o},{r:(0,P.jsx)("span",{style:(0,K.ok)(e.user_data.dir_show_type===A.t8.size_min_max||e.user_data.dir_show_type===A.t8.size_max_min),children:i("文件大小")}),v:!1,items:a}]},{r:i("文件加载方式"),v:"",items:r},{r:i("时间展示"),v:"",items:c},{r:i("缩放调整"),v:"zoom_adjust"},{r:(0,P.jsx)("span",{style:(0,K.ok)(S),children:i("srchbln")}),v:"blank_search_mode"}]},{r:i("以配置表方式打开目录"),v:"gcfg_dir_config"}];x?.folders?.find(e=>".git"===e.name)&&w.push({r:i("查看Git提交"),v:"git_page"}),s(A.oV.code_resource)&&w.push({r:i("add_rot"),v:"code_resource"}),s(A.oV.http_proxy)&&w.push({r:i("dl_here"),v:"http_resource"}),e?.user_data?.quick_cmd&&(0,p.LL)([...e.user_data.quick_cmd],w),n.items=w,n.textClick=async e=>{if(console.log(e),!1===e)return;const t={};if("gcfg_dir_config"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${$.o.gcfg_page}/${encodeURIComponent(e)}`)}if("git_page"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${$.o.git_page}/${encodeURIComponent(e)}`)}if("code_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return f({page_self_router_api_data:[`/api/${Date.now()}`,e.context.now_absolute_path]}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/setting/customer_router/")}if("http_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return f({http_download_map_path:e.context.now_absolute_path}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/proxy/http/")}if("zoom_adjust"===e)return C({data:void 0,overlay:!1,type:"",show:!1}),void setTimeout(()=>{C({show:!0,type:d.PromptEnum.ZoomAdjust,overlay:!1,data:{}})},0);if("object"==typeof e&&"quick_cmd"===e.tag){let t=e.cmd;t&&(t.endsWith("\r")||(t+="\r",z({show:!0,path:(0,_.GG)("file",(0,_.vX)()),cmd:t})))}else{if("blank_search_mode"===e)return D(!S),void C({data:void 0,overlay:!1,type:"",show:!1});if(e===A.yM.all||e===A.yM.pagination)t.is_pagination_mode=!0;else if(e===A.KD.current||e===A.KD.time)t.is_file_show_type=!0;else{if(e!==A.t8.defualt&&e!==A.t8.name&&e!==A.t8.size_max_min&&e!==A.t8.size_min_max&&e!==A.t8.time_max_min&&e!==A.t8.time_minx_max)return;t.is_dir_list_type=!0}}await l.wm.post(F.s.user_save_private_attr,{type:e,...t}),await m(),C({data:void 0,overlay:!1,type:"",show:!1}),h((0,_.vX)())},C({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:n})}}(),Pe=async()=>{const e=new j.Nd;e.dir_path=`${(0,_.GG)("file",(0,_.vX)())}`,k.ws.addMsg(G.HK.workflow_realtime,e=>{const t=e.context;if(e.context){for(const e of t.sucess_file_list)(0,p.Ys)(e);for(const e of t.failed_file_list)(0,p.V$)(e);Ae(new Set(t.running_file_list))}}),await k.ws.sendData(G.HK.workflow_realtime,e)},Ie=async e=>{let t=!1;for(const i of e.files??[])i.origin_size=i.size,i.size=(0,x.v7)(i.size),ge.user_data.file_time_show_type===A.KD.time?i.show_mtime=i.mtime?(0,U.Yq)(i.mtime):"":i.show_mtime=i.mtime?(0,y.s)(i.mtime):"",t||!i.name.endsWith(".workflow.yml")&&!i.name.endsWith(".act")||(t=!0,Promise.resolve().then(()=>{Pe()})),i.name===j.SB&&(t=!0);for(const i of e.folders??[])ge.user_data.file_time_show_type===A.KD.time?i.show_mtime=i.mtime?(0,U.Yq)(i.mtime):"":i.show_mtime=i.mtime?(0,y.s)(i.mtime):"",i.name===j.SB&&(t=!0);me(t)},Ne=n.useRef(null),Fe=async e=>{if(!0===J){if(Ne.current!==e){Ne.current=e;try{const t=await l.$M.post("file/mount_info",{param_path:e});ee(t?.data??null)}catch(e){ee(null)}}}else ee(null)},Xe=async()=>{const e=(0,_.GG)("file",(0,_.vX)());if($e||ze)return;let t;if(Fe(e),ge.user_data.file_list_pagination_mode===A.yM.pagination){if(T!==e){if(T=e,1!==be.page_num)return void Ce({page_size:be.page_size,page_num:1})}else if(be.page_num<0)return;if(t=await l.$M.post("file_get_page",{param_path:e,page_num:be.page_num,page_size:be.page_size}),t.code!==f.m.Success)return;const i=t.data;return Ie(i),i.files?.length?(q(e=>{const t=(0,L.cloneDeep)(1===be.page_num?i.files:[...e?.files??[],...i.files]),n={...e,files:t};return(0,p.yC)(n,ge.user_data.dir_show_type),n}),void(W=t.data)):void Ce({page_size:be.page_size,page_num:-1})}if(t=await l.$M.get(e),t.code!==f.m.Success)return;const i=t.data;(0,p.yC)(i,ge.user_data.dir_show_type),Ie(t.data),q(t.data),W=t.data};(0,n.useEffect)(()=>async()=>{Ae(new Set)},[]);const Ee=()=>{t({open:!1}),D({open:!1}),me(!1),(()=>{const e=ye.get("preview_file_name"),t=ye.get("preview_mode");if(!e||!t)return!1;const n=(0,_.GG)("file",(0,_.vX)());if(ke.current===n+e)return!0;ke.current=n+e;const s=()=>je(null);return"md"===t?(i({url:l.$M.getDownloadUrl(`${encodeURIComponent(n)}${e}`),path:`${n}${e}`,name:e,close:s}),!0):"log"===t?(m({show:!0,fileName:e,encoding:ye.get("preview_log_enc")??"utf8",wrap:ye.get("preview_log_wrap")??"wrap",close:s}),!0):"image_edit"===t?(M({path:(0,Y.IO)((0,_.vX)(),e),name:e,close:s}),!0):(xe({name:e,opt_shell:!0,..."text"===t?{model:"text"}:{},close:s}),!0)})()||Xe()};(0,n.useEffect)(()=>{Ee()},[X,be]),(0,n.useEffect)(()=>{V>0&&Xe()},[V]);const Ke=n.useRef(!1);(0,n.useEffect)(()=>{if(null!==J)return Ke.current?void(!0===J?Fe((0,_.GG)("file",(0,_.vX)())):ee(null)):(Ke.current=!0,void(!0===J&&null===Q&&Fe((0,_.GG)("file",(0,_.vX)()))))},[J]);const Re=e=>{e.target===e.currentTarget&&(se([]),ae([]))};return(0,P.jsxs)(n.Fragment,{children:[(0,P.jsx)(c.aZ,{children:(0,P.jsx)(h.$Z,{handleEnterPress:async()=>{if($e||ze){if(se([]),ae([]),!ce||!ce.trim())return void q({files:[],folders:[]});const e=(0,_.GG)("file",(0,_.vX)()),t=await l.$M.post("file_get_page",{param_path:e,page_num:1,page_size:1e4,search:ce.trim()});if(t.code!==f.m.Success)return;const i=t.data;return(0,p.yC)(i,ge.user_data.dir_show_type),Ie(i),q(i),void(W=i)}if(!W)return;se([]),ae([]);const e=[],t=[];for(const t of W.files??[])t.name.includes(ce)&&e.push(t);for(const e of W.folders??[])e.name.includes(ce)&&t.push(e);q({files:e,folders:t})},placeholder:I("搜索当前目录"),icon:"search",value:"",mobile_hidden:!0,handleIconClick:()=>{const e=(0,_.GG)("file",(0,_.vX)());Me({open:!0,title:I("深搜"),context_div:(0,P.jsx)(N,{base_path:e})})},handleInputChange:e=>{de(e)},max_width:"25em"})}),(0,P.jsxs)(c.aZ,{position:"right",children:[(0,P.jsx)("div",{className:"mobile-context-btn",children:(0,P.jsx)(z.rA,{icon:"more_horiz",title:I("右键"),onClick:()=>{const e=ne[ne.length-1];if(void 0!==e){const t=[...R.folders??[],...R.files??[]][e];if(t){const i=document.querySelectorAll(".item")[e],n=i?i.getBoundingClientRect():{left:window.innerWidth/2,bottom:100},s={preventDefault:()=>{},stopPropagation:()=>{},clientX:n.left+10,clientY:n.bottom??100},o=new b.ik;o.path=(0,Y.IO)((0,_.vX)(),t.name),o.filename=t.name,o.x=s.clientX,o.y=s.clientY,o.type=t.type===u.Iw.folder?u.Iw.folder:(0,b.uL)(t.name),o.size=t.origin_size,ie({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:o})}}else{const e={preventDefault:()=>{},stopPropagation:()=>{},clientX:window.innerWidth/2,clientY:window.innerHeight/2};De(e)}}})}),(0,P.jsx)(H,{})]}),(0,P.jsx)(s.e,{baseRoute:"file",clickFun:function(){if(se([]),ae([]),ge.user_data.file_list_pagination_mode===A.yM.pagination){const e=document.getElementById("listing");e&&(e.scrollTop=0),Ce({page_size:be.page_size,page_num:1})}},input_path_enter:e=>{var t;se([]),ae([]),q({files:[],folders:[]}),!function(e){return"string"==typeof e&&0!==e.length&&(/^[a-zA-Z]:[\\\/]/.test(e)||/^\\\\[^\\/]+[\\/]/.test(e)||/^\//.test(e))}(e)?E(function(e,t){let i=function(e){let t="\\";for(const i of e)if("/"===i||"\\"===i){t=i;break}return t}(e);if("."===t)return e;if(".."===t){if(e.length>1){let t=e[e.length-1]===i?1:0;for(let n=e.length-1-t;n>=0;n--)if(e[n]===i)return e.substring(0,n+1)}return e}return e.endsWith(i)&&t.startsWith(i)?e.slice(0,-1)+t:e.endsWith(i)||t.startsWith(i)?e+t:e+i+t}((0,_.vX)(),e)):(e=e.replace(0===(t=ge.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),E(e))}}),Q&&(0,P.jsxs)("div",{className:"mount-tip-bar",style:{borderLeftColor:Q.color},children:[(0,P.jsx)("span",{className:"material-icons",style:{color:Q.color},children:"cloud"}),(0,P.jsxs)("span",{children:[I("当前为挂载目录"),":",Q.name]}),(0,P.jsx)("span",{className:"mount-driver-tag",children:O.C1.find(e=>e.value===Q.driver)?.title??Q.driver}),Q.readonly&&(0,P.jsx)("span",{className:"mount-readonly-tag",children:I("只读")})]}),ge.user_data.file_list_pagination_mode===A.yM.pagination?(0,P.jsx)(C.$J,{handleContextMenu:De,clickBlank:Re,list:R.files}):(0,P.jsx)(C.t$,{handleContextMenu:De,file_list:R.files,folder_list:R.folders,clickBlank:Re}),_e&&(0,P.jsx)(Z,{}),pe.open&&(0,P.jsx)(B,{})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9877],{69918(t,e,n){n.d(e,{Ce:()=>l,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 l(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.d(e,{A:()=>a});var r=n(96540),o=n(86149),s=n(74848);function a(t){const{t:e}=(0,o.B)(),[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]),l=(r,o)=>r.map(r=>{const c=r.children.length>0,i=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?i?"arrow_right":"arrow_drop_down":""}),(0,s.jsx)("span",{className:"md-outline-text",children:r.text||e("未命名标题")})]}),c&&!i&&l(r.children,o+1)]},r.pos)});return 0===t.items.length?(0,s.jsxs)("div",{className:"md-outline md-outline--empty",children:[(0,s.jsx)("div",{className:"md-outline-header",children:e("大纲")}),(0,s.jsx)("div",{className:"md-outline-tip",children:e("no_head")})]}):(0,s.jsxs)("div",{className:"md-outline",children:[(0,s.jsx)("div",{className:"md-outline-header",children:e("大纲")}),(0,s.jsx)("div",{className:"md-outline-list",children:l(c,0)})]})}},86504(t,e,n){n.d(e,{A:()=>T});var r=n(96540),o=n(42845),s=n(1575),a=n(89781),c=n(61396),l=n(46762),i=n(73337),d=n(89552),u=n(86059),h=n(5091),m=n(22091),p=n(58903);const f=new m.A({html:!0,linkify:!0,breaks:!1,typographer:!1});function g(t){const e=f.render(t??""),n=document.createElement("div");return n.innerHTML=e,p.S4.fromSchema(h.Y).parse(n)}function _(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+=`![${r??""}](${n}${o?` "${o}"`:""})`}else"hard_break"===t.type.name&&(e+=" \n")}),e}function y(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=>k(t.cells[n]??"")))),s=t=>`| ${Array.from({length:n},(e,n)=>{return r=t[n]??"",s=o[n],r+" ".repeat(Math.max(0,s-k(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 k(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 b(t,e=""){switch(t.type.name){case"paragraph":default:return e+_(t);case"heading":return`${e}${"#".repeat(t.attrs.level)} ${_(t)}`;case"blockquote":return w(t,"").split("\n").map(t=>`${e}> ${t}`).join("\n");case"code_block":{const n=t.attrs.language??"";return`${e}\`\`\`${n}\n${t.textContent}\n${e}\`\`\``}case"horizontal_rule":return`${e}---`;case"bullet_list":{const n=[];return t.forEach((t,r,o)=>{n.push(v(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(v(t,e,`${e}${r+s}. `,`${e} `,s))}),n.join("\n")}case"table":return y(t).split("\n").map(t=>e+t).join("\n")}}function v(t,e,n,r,o){const s=t.attrs.checked,a=null===s?"":s?"[x] ":"[ ] ",c=[];t.forEach((t,e,n)=>{c.push(b(t,0===n?"":r))});const l=c.join("\n").split("\n");return n+a+l[0]+(l.length>1?"\n"+l.slice(1).join("\n"):"")}function w(t,e=""){const n=[];return t.forEach(t=>{n.push(b(t,e))}),n.join("\n\n")}function $(t){return w(t).trim()+"\n"}n(64877);var M=n(19878);const x=new o.hs("md_source_highlight");let O=!1;function S(t){O=t}function D(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=D(e.children,r,n)),e.scope&&n.push({from:t,to:r,cls:`hljs-${e.scope}`})}return r}function A(t,e){const n=t.textContent;if(!n)return[];let r;try{r=M.A.highlight(n,{language:"markdown",ignoreIllegals:!0})}catch{return[]}const o=[],a=r._emitter?.rootNode;a?.children&&D(a.children,0,o);const c=e+1,l=[];for(const t of o){const e=Math.min(t.from,n.length),r=Math.min(t.to,n.length);e>=r||l.push(s.NZ.inline(c+e,c+r,{class:t.cls}))}return l}function C(t){const e=[];return t.descendants((t,n)=>"code_block"!==t.type.name||(e.push(...A(t,n)),!1)),s.zF.create(t,e)}var N=n(67951),j=(n(41631),n(50576),n(70432),n(74848));function z(t){return 0===t?(0,N.uf)("paragraph"):(0,N.uf)("heading",{level:t})}function E(t){return!(!t.ctrlKey&&!t.metaKey)}function F(t,e){return(0,u.D8)(1)(t,e)}const G=r.forwardRef(function(t,e){const n=(0,r.useRef)(null),m=(0,r.useRef)(null),p=(0,r.useRef)(t.on_change),f=(0,r.useRef)(t.on_save),_=(0,r.useRef)(t.on_selection_change),y=(0,r.useRef)(t.on_source_mode_change);return(0,r.useEffect)(()=>{p.current=t.on_change,f.current=t.on_save,_.current=t.on_selection_change,y.current=t.on_source_mode_change}),(0,r.useEffect)(()=>{if(!n.current)return;h.Y;const r=o.$t.create({doc:g(t.value??""),plugins:[(0,a.b6)(),new o.k_({key:x,state:{init:(t,e)=>s.zF.empty,apply:(t,e,n,r)=>O?t.docChanged?C(r.doc):x.getState(r)??s.zF.empty:s.zF.empty},props:{decorations(t){if(!O)return null;const e=x.getState(t);return e&&e.find().length?e:C(t.doc)}}}),(0,N.k5)(),(0,c.w)({"Mod-z":a.tN,"Mod-y":a.ZS,"Mod-Shift-z":a.ZS,"Mod-b":(0,N.NH)("strong"),"Mod-i":(0,N.NH)("em"),"Mod-Shift-x":(0,N.NH)("strike"),"Mod-`":(0,N.NH)("code"),"Mod-1":(t,e)=>z(1)(t,e),"Mod-2":(t,e)=>z(2)(t,e),"Mod-3":(t,e)=>z(3)(t,e),"Mod-0":(t,e)=>z(0)(t,e),"Mod-Shift-8":N.fK,"Mod-Shift-9":N.oB,"Mod-Shift-.":N.Vu,Tab:N.G8.sink,"Shift-Tab":N.G8.lift,"Mod-Enter":F,"Mod-s":()=>(f.current?.(),!0)}),(0,u.LF)({allowTableNodeSelection:!0}),(0,u.AL)(),(0,i.A)({color:"var(--primary, #1a73e8)",width:2}),(0,d.z)(),(0,c.w)({Enter:(0,l.st)(N.x0,l.pC,N.G8.split,l.Z1,l.iz,l.aw),"Shift-Enter":(t,e)=>{const{hard_break:n}=t.schema.nodes;return e&&e(t.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0},"Mod-Enter":l.I$}),(0,c.w)(l.RV)]}),k=new s.Lz(n.current,{state:r,editable:()=>!1!==t.editable,handleClickOn(t,e,n,r,o){if(!E(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)},handleDOMEvents:{keydown:(t,e)=>{if(E(e)&&t.dom.classList.add("md-ctrl-down"),I(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)=>(E(e)||t.dom.classList.remove("md-ctrl-down"),!1),blur:t=>(t.dom.classList.remove("md-ctrl-down"),!1),beforeinput:(t,e)=>{if(!I(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=k.state.apply(t);k.updateState(e);const n=I(e.doc);S(n),n?k.dom.classList.add("md-source-mode"):k.dom.classList.remove("md-source-mode"),n!==I(t.before)&&y.current?.(n),t.docChanged&&p.current?.(n?e.doc.textContent:$(e.doc)),(t.selectionSet||t.docChanged)&&_.current?.()},attributes:{class:"md-filecat-content",spellcheck:"false"}});if(m.current=k,t.initial_source_mode&&!I(k.state.doc)){const t=$(k.state.doc),e=k.state.schema.nodes.code_block.create({language:"markdown"},t?k.state.schema.text(t):null),n=k.state.tr;n.replaceWith(0,k.state.doc.content.size,e),n.setMeta("addToHistory",!1),k.dispatch(n)}const b={get_markdown:()=>I(k.state.doc)?k.state.doc.textContent:$(k.state.doc),set_markdown:t=>{const e=g(t);k.dispatch(k.state.tr.replaceWith(0,k.state.doc.content.size,e.content))},focus:()=>k.focus(),get_view:()=>m.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}(k.state),active_marks:()=>(k.state.storedMarks??k.state.selection.$from.marks()).map(t=>t.type.name),active_block:()=>{const{$from:t}=k.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,u.e)(t),o=r.table,s=r.row,a=r.cell,c=r.header_cell??r.cell;if(!o||!s||!a)return null;const l=t=>s.create(null,Array.from({length:e},()=>t.createAndFill())),i=l(c),d=Array.from({length:n},()=>l(a));return o.create(null,[i,...d])}(k.state.schema,t,e);if(!n)return;const{from:r}=k.state.selection,o=k.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=k.state.tr;s===r?a.replaceSelectionWith(n):a.insert(s,n),k.dispatch(a.scrollIntoView());const c=k.state.doc.resolve(Math.min(s+3,k.state.doc.content.size));try{k.dispatch(k.state.tr.setSelection(k.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}(k.state),scroll_to_pos:t=>{const e=k.state.doc.content.size,n=Math.max(0,Math.min(t,e)),r=k.state.doc.nodeAt(n);let s;try{s=r?o.U3.near(k.state.doc.resolve(n+1),1):o.U3.near(k.state.doc.resolve(n),1)}catch{s=o.U3.near(k.state.doc.resolve(0),1)}k.dispatch(k.state.tr.setSelection(s).scrollIntoView()),k.focus()},is_source_mode:()=>I(k.state.doc),enter_source_mode:()=>{if(I(k.state.doc))return;const t=$(k.state.doc),e=k.state.schema.nodes.code_block.create({language:"markdown"},t?k.state.schema.text(t):null),n=k.state.tr;n.replaceWith(0,k.state.doc.content.size,e),S(!0),k.dispatch(n),k.dom.classList.add("md-source-mode")},exit_source_mode:()=>{if(!I(k.state.doc))return;const t=g(k.state.doc.textContent),e=k.state.tr;e.replaceWith(0,k.state.doc.content.size,t.content),S(!1),k.dispatch(e),k.dom.classList.remove("md-source-mode")}};return"function"==typeof e?e(b):e&&(e.current=b),t.on_ready?.(b),()=>{k.destroy(),m.current=null}},[]),(0,j.jsx)("div",{className:"md-filecat",ref:n})});function I(t){if(1!==t.childCount)return!1;const e=t.firstChild;return!!e&&"code_block"===e.type.name&&"markdown"===e.attrs.language}const T=G},67951(t,e,n){n.d(e,{NH:()=>i,k5:()=>l,uf:()=>d});var r=n(38341),o=n(5091),s=n(46762),a=n(3772);function c(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 l=r+c,i=l+a.length,d=t.tr;return d.delete(i,o),d.delete(r,l),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])})),c(/(?:\*\*)([^*]+)(?:\*\*)$/,"strong"),c(/(?:__)([^_]+)(?:__)$/,"strong"),c(/(?<![*])\*([^*]+)\*$/,"em"),c(/(?<![_])_([^_]+)_$/,"em"),c(/(?:~~)([^~]+)(?:~~)$/,"strike"),c(/(?:`)([^`]+)(?:`)$/,"code"),...r.Fr,r.gO]})}function i(t){return(e,n)=>{const r=e.schema.marks[t];return!!r&&(0,s.wh)(r)(e,n)}}function d(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 l=s.parent,i=l.type===o&&Object.entries(e).every(([t,e])=>l.attrs[t]===e),d=i?n.schema.nodes.paragraph:o,u=i?{}:e;return r&&r(n.tr.setBlockType(c.start,c.end,d,u)),!0}}const u=(t,e)=>(0,a.Sd)(t.schema.nodes.bullet_list)(t,e),h=(t,e)=>(0,a.Sd)(t.schema.nodes.ordered_list)(t,e),m={sink:(0,a.$B)(o.Y.nodes.list_item),lift:(0,a.T2)(o.Y.nodes.list_item),split:(0,a.wn)(o.Y.nodes.list_item),wrap_bullet:u,wrap_ordered:h};n.d(e,["G8",0,m,"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,u,"oB",0,h,"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 s=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(!s)return!1;if("blockquote"===s.type&&n.depth>1)return!1;const a=t.schema.nodes[s.type];if(!a)return!1;const c=n.before(n.depth),l=n.after(n.depth);if(e){const n=t.tr,r=a.createAndFill(s.attrs)??a.create(s.attrs);n.replaceWith(c,l,r),n.scrollIntoView(),e(n)}return!0}])},96763(t,e,n){n.d(e,{Kz:()=>a,P7:()=>i,_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 l(){window.dispatchEvent(new Event(c))}async function i(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:(l(),e.data)}async function h(t){const e=await r.XO.post("md_theme/del",{id:t});return e?.code===o.m.Success&&(l(),!0)}n.d(e,["o3",0,c])},5091(t,e,n){var r=n(58903);const o=(0,n(86059).of)({tableGroup:"block",cellContent:"block+",cellAttributes:{}}),s={align:{default:null}},a={doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:s,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},...s},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,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"]},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:e};return n&&(o.alt=n),r&&(o.title=r),["img",o]}},text:{group:"inline"},...o},c={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]}}},l=new r.Sj({nodes:a,marks:c});n.d(e,["Y",0,l])}}]);
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{{web_site_title}}}</title><link rel="icon" href="{{{logo_favicon}}}"/><script defer="defer" src="main.b8e4dd383adfa223d84e.js"></script></head><body><div id="root"></div></body><script id="pre_code" type="text/template">return {{{Windows_FileCat}}};</script><script>window.EXCALIDRAW_ASSET_PATH = "/";window.FileCat;</script></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{{web_site_title}}}</title><link rel="icon" href="{{{logo_favicon}}}"/><script defer="defer" src="main.d9a1e3c9792ebea88038.js"></script></head><body><div id="root"></div></body><script id="pre_code" type="text/template">return {{{Windows_FileCat}}};</script><script>window.EXCALIDRAW_ASSET_PATH = "/";window.FileCat;</script></html>