filecat 6.3.0 → 6.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- /*! For license information please see 8714.1c1478ae7a709150a9e9.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8714],{7374(e,t,n){n.d(t,{e:()=>p});var r=n(6540),o=n(4976),i=n(7767),a=n(4694),l=n(4289),c=n(3033),u=n(5725),f=n(2389),s=n(5997);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){var t=(0,i.zy)(),n=m((0,r.useState)([]),2),d=n[0],p=n[1],v=m((0,r.useState)("/"),2),y=v[0],h=v[1],_=m((0,r.useState)(void 0),2),w=_[0],b=_[1],g=(0,f.Bd)(),E=g.t;g.i18n;r.useEffect(function(){var t="",n=(0,l.vX)().split("/");n=n.filter(function(e){return e});var r=n.indexOf(e.baseRoute),o=[];if(-1!=r){t=(0,a.IO)(n.slice(0,r),e.baseRoute);for(var i=n.slice(r+1),c=0;c<i.length;c++){var u=i[c];o.push({value:u,href:0===c?"".concat(t).concat(u,"/"):(0,a.IO)(o[c-1].href,u)})}h(t),p(o)}},[t]);var k=function(t){t.stopPropagation(),e.clickFun(t)};return r.createElement("div",{className:"breadcrumbs",onClick:function(e){b(void 0!==w?void 0:"")}},r.createElement(r.Fragment,null,void 0===w?r.createElement(r.Fragment,null,r.createElement("span",{className:"chevron"},r.createElement(o.N_,{to:y,onClick:k},r.createElement(s.In,{icon:"home"}))),d.map(function(e,t){return r.createElement("span",{className:"chevron",key:t},r.createElement(s.In,{icon:"keyboard_arrow_right"}),r.createElement(o.N_,{to:e.href,onClick:k},decodeURIComponent(e.value)))})):r.createElement(u.QM,{click:function(){b(void 0)},children:r.createElement(c.Sm,{width:"100%",placeholder:E("输入跳转的目录"),handlerEnter:function(t){e.input_path_enter&&e.input_path_enter(t),b(void 0)}})})))}},8714(e,t,n){n.r(t),n.d(t,{default:()=>me});var r=n(6540),o=n(7374),i=n(7444),a=n(6417),l=n(4284),c=n(7767),u=n(7952),f=n(7690),s=n(4289),m=n(3459),d=n(9214),p=n(3033),v=n(7022),y=n(2389),h=n(7523),_=n(8247),w=n(8815),b=n(6960),g=n(7071),E=n(4944),k=n(4188),A=n(3430);function S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return G(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){var n=function(e){var t,n="\\",r=S(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if("/"===o||"\\"===o){n=o;break}}}catch(e){r.e(e)}finally{r.f()}return n}(e);if("."===t)return e;if(".."===t){if(e.length>1)for(var r=e[e.length-1]===n?1:0,o=e.length-1-r;o>=0;o--)if(e[o]===n)return e.substring(0,o+1);return e}return e.endsWith(n)&&t.startsWith(n)?e.slice(0,-1)+t:e.endsWith(n)||t.startsWith(n)?e+t:e+n+t}var O=n(4251),j=n(96),P=n(5997),L=n(2042),C=n(3496),I=n(2730),F=n(5725),z=n(447),M=n(7361);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function T(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){Y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return U(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function d(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],d=m.p,p=i[2];n>3?(o=p===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(l=0,m.v=r,m.n=i[1]):d<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,m.n=p,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,p){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),l=f,c=p;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),d(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(U(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,U(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,U(s,"constructor",u),U(u,"constructor",c),c.displayName="GeneratorFunction",U(u,o,"GeneratorFunction"),U(s),U(s,o,"Generator"),U(s,r,function(){return this}),U(s,"toString",function(){return"[object Generator]"}),(N=function(){return{w:i,m}})()}function U(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}U=function(e,t,n,r){function i(t,n){U(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},U(e,t,n,r)}function $(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){$(i,r,o,a,l,"next",e)}function l(e){$(i,r,o,a,l,"throw",e)}a(void 0)})}}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return B(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Z={};function q(){var e=(0,y.Bd)().t,t=(0,c.zy)(),n=(0,c.Zp)(),o=(0,_.MH)().check_user_auth,u=W((0,i.L4)(a.AG.nowFileList),2),m=u[0],p=(u[1],W((0,i.L4)(a.AG.uploadFiles),2)),w=(p[0],p[1]),b=W((0,i.L4)(a.AG.showPrompt),2),g=(b[0],b[1]),S=W((0,i.L4)(a.AG.selectedFileList),2),G=S[0],x=(S[1],W((0,i.L4)(a.AG.copyedFileList),2)),j=x[0],C=x[1],D=W((0,i.L4)(a.AG.cutedFileList),2),T=D[0],X=D[1],Y=W((0,i.L4)(a.AG.selectedFileList),2),U=(Y[0],Y[1]),$=W((0,i.L4)(a.AG.clickFileList),2),B=($[0],$[1]),q=W((0,i.L4)(a.AG.fileShellShow),2),V=q[0],J=q[1],Q=W((0,i.L4)(a.AG.file_root_list),2),ee=Q[0],te=(Q[1],W((0,i.L4)(a.AG.file_root_index),2)),ne=te[0],re=te[1],oe=W((0,r.useState)(void 0),2),ie=(oe[0],oe[1],W((0,r.useState)(""),2)),ae=(ie[0],ie[1],W((0,i.L4)(a.AG.workflow_show),2)),le=ae[0],ce=ae[1],ue=W((0,i.L4)(a.AG.workflow_realtime_show),2),fe=(ue[0],ue[1],W((0,i.L4)(a.AG.work_flow_show),2)),se=fe[0],me=(fe[1],(0,r.useContext)(h.F).initUserInfo),de=W((0,i.L4)(a.AG.user_base_info),2),pe=(de[0],de[1],(0,_.kZ)().click_file,W((0,i.L4)(a.AG.prompt_card),2)),ve=(pe[0],pe[1]),ye=(0,r.useMemo)(function(){return m.files.reduce(function(e,t){return e+(t.type!==v.Iw.folder?1:0)},0)},[m]),he=(0,r.useMemo)(function(){var e,t;return m.files.reduce(function(e,t){return e+(t.type===v.Iw.folder?1:0)},0)+(null!==(e=null===(t=m.folders)||void 0===t?void 0:t.length)&&void 0!==e?e:0)},[m]);function _e(e){(0,L.LW)(e)}(0,r.useEffect)(function(){Z={}},[t]),(0,r.useEffect)(function(){return function(){J({show:!1,path:""})}},[]);var we=function(){var e=H(N().m(function e(t){return N().w(function(e){for(;;)switch(e.n){case 0:return re(t),e.n=1,l.$M.post("base_switch",{root_index:t});case 1:return e.n=2,me();case 2:n("/file/"),U([]),B([]);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),be=(0,d.Vs)(),ge=function(t){ve({open:!0,title:e("信息"),context_div:r.createElement("div",{style:{maxWidth:"25rem"}},r.createElement(F.Yh,{left:e("挂载位置磁盘"),right:null==t?void 0:t.total_size}),r.createElement(F.Yh,{left:"".concat(e("磁盘剩余")),right:null==t?void 0:t.left_size}),r.createElement(F.Yh,{left:"".concat(e("文件系统")),right:null==t?void 0:t.fs_type}),r.createElement(F.Yh,{left:"".concat(e("文件夹数")),right:he}),r.createElement(F.Yh,{left:"".concat(e("文件数")),right:ye}),r.createElement(F.Yh,{left:"".concat(e("当前位置")),right:r.createElement(z.xP,{context:null==t?void 0:t.now_absolute_path})})),cancel:function(){E.ws.removeMsg(k.HK.file_info)}})},Ee=function(){var e=H(N().m(function e(){var t,n;return N().w(function(e){for(;;)switch(e.n){case 0:if(Z.now_absolute_path){e.n=2;break}return E.ws.addMsg(k.HK.file_info,function(e){var n=e.context;t&&(Z=K(K({},Z),n),E.ws.removeMsg(k.HK.file_info),ge(Z))}),e.n=1,E.ws.sendData(k.HK.file_info,{type:v.Iw.folder,path:(0,s.GG)("file",(0,s.vX)())});case 1:n=e.v,t=n.context,ge(Z=t);case 2:ge(Z);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,G.length>0&&r.createElement(P.rA,{icon:"delete",title:e("删除"),onClick:function(){g({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),G.length>0&&r.createElement(P.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var e=(0,d.ib)(m,G);C(e.map(function(e){return(0,d.Ok)(e.name)})),X([]),_e("已复制")}}),G.length>0&&r.createElement(P.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var e=(0,d.ib)(m,G);X(e.map(function(e){return(0,d.Ok)(e.name)})),C([]),_e("已剪切")}}),(j.length>0||T.length>0)&&r.createElement(P.rA,{onClick:function(){g({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:j.length+T.length}),G.length>0&&r.createElement(P.rA,{icon:"download",title:e("下载"),onClick:function(){for(var e=(0,d.ib)(m,G),t=0;t<e.length;t++){var n=e[t];e[t]=encodeURIComponent((0,d.Ok)(n.name))}var r=l.$M.getDownloadUrl(e);window.open(r)}}),G.length>0&&r.createElement(P.rA,{icon:"compress",title:e("压缩"),onClick:function(){for(var e=(0,d.ib)(m,G),t=0;t<e.length;t++){var n=e[t];e[t]=(0,d.Ok)(n.name)}e&&0!==e.length?g({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,L.zN)("没有选中")}}),1===G.length&&r.createElement(P.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){g({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),se&&r.createElement(P.rA,{icon:"api",title:"workflow",onClick:function(){ce(!le)}}),r.createElement(P.rA,{icon:"terminal",title:"shell",onClick:function(){V.show?J({show:!1,path:""}):J({show:!0,path:(0,s.GG)("file",(0,s.vX)())})}}),o(A.oV.share_file)&&r.createElement(P.rA,{icon:"share",title:e("文件分享"),onClick:function(){n("/".concat(M.o.share_list_setting_page))}}),r.createElement(P.rA,{icon:"grid_view",title:e("切换样式"),onClick:be}),r.createElement(P.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){g({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(P.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){g({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(P.rA,{icon:"upload_file",title:e("上传"),onClick:function(){g({show:!0,type:f.PromptEnum.UploadFile,overlay:!0,data:{call:function(e){var t,n=null===(t=e.currentTarget)||void 0===t?void 0:t.files;if(n){for(var r=!!n[0].webkitRelativePath,o=[],i=new Set,a=0;a<n.length;a++){var l=n[a],c=r?l.webkitRelativePath:"".concat(l.webkitRelativePath).concat(l.name);l.fullPath=c,r&&i.add((0,I.S)(c)),o.push(l)}var u=[];if(r){var s,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(i);try{for(m.s();!(s=m.n()).done;){var d=s.value;u.push({isDir:!0,fullPath:d,name:d})}}catch(e){m.e(e)}finally{m.f()}}u.push.apply(u,o),w(u),g({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),r.createElement(P.rA,{icon:"info",title:e("信息"),onClick:Ee}),r.createElement(P.rA,{icon:"more_vert",title:e("切换目录"),onClick:function(e){var t=new O.ik;t.x=e.clientX,t.y=e.clientY,t.type=v.Iw.directory,t.items=ee,t.item_pre_value=ne,t.textClick=function(){var e=H(N().m(function e(t){return N().w(function(e){for(;;)switch(e.n){case 0:we(t),g({data:void 0,overlay:!1,type:"",show:!1});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),g({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:t})}}))}var V=n(2543),J=n(1499),Q=n(4694);function ee(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||le(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return ne(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function d(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],d=m.p,p=i[2];n>3?(o=p===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(l=0,m.v=r,m.n=i[1]):d<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,m.n=p,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,p){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),l=f,c=p;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),d(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ne(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ne(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,ne(s,"constructor",u),ne(u,"constructor",c),c.displayName="GeneratorFunction",ne(u,o,"GeneratorFunction"),ne(s),ne(s,o,"Generator"),ne(s,r,function(){return this}),ne(s,"toString",function(){return"[object Generator]"}),(te=function(){return{w:i,m}})()}function ne(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ne=function(e,t,n,r){function i(t,n){ne(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ne(e,t,n,r)}function re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=le(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function oe(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function ie(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){oe(i,r,o,a,l,"next",e)}function l(e){oe(i,r,o,a,l,"throw",e)}a(void 0)})}}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||le(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ue,fe=r.lazy(function(){return Promise.all([n.e(7856),n.e(3659)]).then(n.bind(n,3659))}),se=r.lazy(function(){return Promise.all([n.e(7856),n.e(1636)]).then(n.bind(n,1636))});function me(){var e=ae((0,i.L4)(a.AG.editorSetting),2),t=(e[0],e[1]),n=ae((0,i.L4)(a.AG.file_preview),2),S=(n[0],n[1]),G=(0,y.Bd)().t,L=(0,c.zy)(),I=(0,c.Zp)(),F=ae((0,i.L4)(a.AG.nowFileList),2),z=F[0],M=F[1],X=ae((0,i.L4)(a.AG.showPrompt),2),Y=(X[0],X[1]),U=ae((0,i.L4)(a.AG.selectedFileList),2),$=U[0],R=U[1],B=ae((0,i.L4)(a.AG.clickFileList),2),Z=(B[0],B[1]),ne=ae((0,i.L4)(a.AG.fileShellShow),2),oe=(ne[0],ne[1],ae((0,r.useState)(""),2)),le=oe[0],ce=oe[1],me=ae((0,i.L4)(a.AG.workflow_show),2),de=me[0],pe=(me[1],ae((0,i.L4)(a.AG.workflow_realtime_show),2)),ve=pe[0],ye=(pe[1],ae((0,i.L4)(a.AG.work_flow_show),2)),he=(ye[0],ye[1]),_e=((0,r.useContext)(h.F).initUserInfo,ae((0,i.L4)(a.AG.user_base_info),2)),we=_e[0],be=(_e[1],(0,_.kZ)().click_file,ae((0,i.L4)(a.AG.to_running_files),2)),ge=(be[0],be[1]),Ee=ae((0,i.L4)(a.AG.file_page),2),ke=Ee[0],Ae=Ee[1],Se=function(){var e=W((0,i.L4)(a.AG.user_base_info),2),t=e[0],n=(e[1],(0,y.Bd)().t),o=(0,_.MH)().check_user_auth,u=W((0,i.L4)(a.AG.router_jump),2),m=(u[0],u[1]),p=(0,c.Zp)(),w=(0,r.useContext)(h.F).initUserInfo,b=W((0,i.L4)(a.AG.nowFileList),2),g=(b[0],b[1],W((0,i.L4)(a.AG.showPrompt),2)),S=(g[0],g[1]),G=W((0,i.L4)(a.AG.fileShellShow),2),x=(G[0],G[1]);return function(e){var i;e.preventDefault(),e.stopPropagation();var a=new O.ik;a.x=e.clientX,a.y=e.clientY,a.type=v.Iw.directory;var c=[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_minx_max?"green":void 0}},n("时间逆序")),v:A.t8.time_minx_max},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},n("时间顺序")),v:A.t8.time_max_min}],u=[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_min_max?"green":void 0}},n("大小顺序")),v:A.t8.size_min_max},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},n("大小逆序")),v:A.t8.size_max_min}],y=[{r:r.createElement("span",{style:{color:t.user_data.file_list_pagination_mode&&t.user_data.file_list_pagination_mode!==A.yM.all?void 0:"green"}},n("全部加载文件")),v:A.yM.all},{r:r.createElement("span",{style:{color:t.user_data.file_list_pagination_mode===A.yM.pagination?"green":void 0}},n("分页滚动加载文件")),v:A.yM.pagination}],h=[{r:r.createElement("span",{style:{color:t.user_data.file_time_show_type&&t.user_data.file_time_show_type!==A.KD.current?void 0:"green"}},n("最近时间")),v:A.KD.current},{r:r.createElement("span",{style:{color:t.user_data.file_time_show_type===A.KD.time?"green":void 0}},n("准确时间")),v:A.KD.time}],_=[{r:n("文件列表展示"),items:[{r:n("文件排序"),v:"",items:[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type?void 0:"green"}},n("系统默认")),v:A.t8.defualt},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.name?"green":void 0}},n("名字")),v:A.t8.name},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_minx_max||t.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},n("修改时间")),v:!1,items:c},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_min_max||t.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},n("文件大小")),v:!1,items:u}]},{r:n("文件加载方式"),v:"",items:y},{r:n("时间展示"),v:"",items:h},{r:n("缩放调整"),v:"zoom_adjust"}]}];o(A.oV.code_resource)&&_.push({r:n("添加http资源根目录"),v:"code_resource"}),o(A.oV.http_proxy)&&_.push({r:n("在此目录下载http资源"),v:"http_resource"}),null!=t&&null!==(i=t.user_data)&&void 0!==i&&i.quick_cmd&&(0,d.LL)(T(t.user_data.quick_cmd),_),a.items=_,a.textClick=function(){var e=H(N().m(function e(t){var n,r,o,i;return N().w(function(e){for(;;)switch(e.n){case 0:if(console.log(t),!1!==t){e.n=1;break}return e.a(2);case 1:if(n={},"code_resource"!==t){e.n=3;break}return e.n=2,E.ws.sendData(k.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 2:return r=e.v,m({page_self_router_api_data:["",r.context.now_absolute_path]}),S({data:void 0,overlay:!1,type:"",show:!1}),p("/setting/customer_router/"),e.a(2);case 3:if("http_resource"!==t){e.n=5;break}return e.n=4,E.ws.sendData(k.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 4:return o=e.v,m({http_download_map_path:o.context.now_absolute_path}),S({data:void 0,overlay:!1,type:"",show:!1}),p("/proxy/http/"),e.a(2);case 5:if("zoom_adjust"!==t){e.n=6;break}return S({data:void 0,overlay:!1,type:"",show:!1}),setTimeout(function(){S({show:!0,type:f.PromptEnum.ZoomAdjust,overlay:!1,data:{}})},0),e.a(2);case 6:if("object"!==D(t)||"quick_cmd"!==t.tag){e.n=7;break}(i=t.cmd)&&(i.endsWith("\r")||(i+="\r",x({show:!0,path:(0,s.GG)("file",(0,s.vX)()),cmd:i}))),e.n=11;break;case 7:if(t!==A.yM.all&&t!==A.yM.pagination){e.n=8;break}n.is_pagination_mode=!0,e.n=11;break;case 8:if(t!==A.KD.current&&t!==A.KD.time){e.n=9;break}n.is_file_show_type=!0,e.n=11;break;case 9:if(t!==A.t8.defualt&&t!==A.t8.name&&t!==A.t8.size_max_min&&t!==A.t8.size_min_max&&t!==A.t8.time_max_min&&t!==A.t8.time_minx_max){e.n=10;break}n.is_dir_list_type=!0,e.n=11;break;case 10:return e.a(2);case 11:return e.n=12,l.wm.post(C.s.user_save_private_attr,K({type:t},n));case 12:return e.n=13,w();case 13:S({data:void 0,overlay:!1,type:"",show:!1}),p((0,s.vX)());case 14:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),S({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:a})}}(),Ge=function(){var e=ie(te().m(function e(){var t;return te().w(function(e){for(;;)switch(e.n){case 0:return(t=new g.Nd).dir_path="".concat((0,s.GG)("file",(0,s.vX)())),E.ws.addMsg(k.HK.workflow_realtime,function(e){var t=e.context;if(e.context){var n,r=re(t.sucess_file_list);try{for(r.s();!(n=r.n()).done;){var o=n.value;(0,d.Ys)(o)}}catch(e){r.e(e)}finally{r.f()}var i,a=re(t.failed_file_list);try{for(a.s();!(i=a.n()).done;){var l=i.value;(0,d.V$)(l)}}catch(e){a.e(e)}finally{a.f()}ge(new Set(t.running_file_list))}}),e.n=1,E.ws.sendData(k.HK.workflow_realtime,t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=ie(te().m(function e(t){var n,r,o,i,a,l,c,u,f;return te().w(function(e){for(;;)switch(e.n){case 0:o=!1,i=re(null!==(n=t.files)&&void 0!==n?n:[]);try{for(i.s();!(a=i.n()).done;)(l=a.value).origin_size=l.size,l.size=(0,w.v7)(l.size),we.user_data.file_time_show_type===A.KD.time?l.show_mtime=l.mtime?(0,J.Yq)(l.mtime):"":l.show_mtime=l.mtime?(0,b.s)(l.mtime):"",o||!l.name.endsWith(".workflow.yml")&&!l.name.endsWith(".act")||(o=!0,Promise.resolve().then(function(){Ge()})),l.name===g.SB&&(o=!0)}catch(e){i.e(e)}finally{i.f()}c=re(null!==(r=t.folders)&&void 0!==r?r:[]);try{for(c.s();!(u=c.n()).done;)f=u.value,we.user_data.file_time_show_type===A.KD.time?f.show_mtime=f.mtime?(0,J.Yq)(f.mtime):"":f.show_mtime=f.mtime?(0,b.s)(f.mtime):"",f.name===g.SB&&(o=!0)}catch(e){c.e(e)}finally{c.f()}he(o);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Oe=function(){var e=ie(te().m(function e(){var t,n,r,o,i;return te().w(function(e){for(;;)switch(e.n){case 0:if(t=(0,s.GG)("file",(0,s.vX)()),we.user_data.file_list_pagination_mode!==A.yM.pagination){e.n=3;break}if(!(ke.page_num<0)){e.n=1;break}return e.a(2);case 1:return e.n=2,l.$M.post("file_get_page",{param_path:t,page_num:ke.page_num,page_size:ke.page_size});case 2:n=e.v,o=n.data,null!==(r=o.files)&&void 0!==r&&r.length||Ae({page_size:ke.page_size,page_num:-1}),o.files=(0,V.cloneDeep)([].concat(ee(z.files),ee(o.files))),e.n=5;break;case 3:return e.n=4,l.$M.get(t);case 4:n=e.v;case 5:if(n.code===m.m.Success){e.n=6;break}return e.a(2);case 6:i=n.data,(0,d.yC)(i,we.user_data.dir_show_type),xe(n.data),M(n.data),ue=n.data;case 7:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),je=function(){Ae({page_num:1,page_size:200})};(0,r.useEffect)(function(){return je(),ie(te().m(function e(){return te().w(function(e){for(;;)switch(e.n){case 0:ge(new Set);case 1:return e.a(2)}},e)}))},[]);var Pe=function(){Oe(),t({open:!1}),S({open:!1}),he(!1)};(0,r.useEffect)(function(){M({files:[],folders:[]}),je(),Pe()},[L]),(0,r.useEffect)(function(){Pe()},[ke]);var Le=function(e){e.target===e.currentTarget&&(R([]),Z([]))};return r.createElement(r.Fragment,null,r.createElement(u.A,{left_children:r.createElement(p.$Z,{handleEnterPress:function(){var e,t;if(ue){R([]),Z([]);var n,r=[],o=[],i=re(null!==(e=ue.files)&&void 0!==e?e:[]);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.name.includes(le)&&r.push(a)}}catch(e){i.e(e)}finally{i.f()}var l,c=re(null!==(t=ue.folders)&&void 0!==t?t:[]);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.name.includes(le)&&o.push(u)}}catch(e){c.e(e)}finally{c.f()}M({files:r,folders:o})}},placeholder:G("搜索当前目录"),icon:"search",value:"",handleInputChange:function(e){ce(e)},max_width:"25em"})},r.createElement("div",{className:"mobile-context-btn"},r.createElement(P.rA,{icon:"more_horiz",title:G("右键"),onClick:function(){var e=$[$.length-1];if(void 0!==e){var t,n,r=[].concat(ee(null!==(t=z.folders)&&void 0!==t?t:[]),ee(null!==(n=z.files)&&void 0!==n?n:[]))[e];if(r){var o,i=document.querySelectorAll(".item")[e],a=i?i.getBoundingClientRect():{left:window.innerWidth/2,bottom:100},l={preventDefault:function(){},stopPropagation:function(){},clientX:a.left+10,clientY:null!==(o=a.bottom)&&void 0!==o?o:100},c=new O.ik;c.path=(0,Q.IO)((0,s.vX)(),r.name),c.filename=r.name,c.x=l.clientX,c.y=l.clientY,c.type=r.type===v.Iw.folder?v.Iw.folder:(0,O.uL)(r.name),c.size=r.origin_size,Y({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:c})}}else{var u={preventDefault:function(){},stopPropagation:function(){},clientX:window.innerWidth/2,clientY:window.innerHeight/2};Se(u)}}})),r.createElement(q,null)),r.createElement(o.e,{baseRoute:"file",clickFun:function(){R([]),Z([])},input_path_enter:function(e){var t;!function(e){return"string"==typeof e&&(/^[a-zA-Z]:[\\\/]/.test(e)||/^\//.test(e))}(e)?I(x((0,s.vX)(),e)):(e=e.replace(0===(t=we.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),I(e)),R([]),Z([]),M({files:[],folders:[]})}}),we.user_data.file_list_pagination_mode===A.yM.pagination?r.createElement(j.$J,{handleContextMenu:Se,clickBlank:Le,list:z.files}):r.createElement(j.t$,{handleContextMenu:Se,file_list:z.files,folder_list:z.folders,clickBlank:Le}),de&&r.createElement(fe,null),ve.open&&r.createElement(se,null))}}}]);
1
+ /*! For license information please see 8714.3b4b50b388e5c41fb3e0.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8714],{7374(e,t,n){n.d(t,{e:()=>p});var r=n(6540),o=n(4976),i=n(7767),a=n(4694),l=n(4289),c=n(3033),u=n(5725),f=n(2389),s=n(5997);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){var t=(0,i.zy)(),n=m((0,r.useState)([]),2),d=n[0],p=n[1],v=m((0,r.useState)("/"),2),y=v[0],h=v[1],_=m((0,r.useState)(void 0),2),w=_[0],b=_[1],g=(0,f.Bd)(),k=g.t;g.i18n;r.useEffect(function(){var t="",n=(0,l.vX)().split("/");n=n.filter(function(e){return e});var r=n.indexOf(e.baseRoute),o=[];if(-1!=r){t=(0,a.IO)(n.slice(0,r),e.baseRoute);for(var i=n.slice(r+1),c=0;c<i.length;c++){var u=i[c];o.push({value:u,href:0===c?"".concat(t).concat(u,"/"):(0,a.IO)(o[c-1].href,u)})}h(t),p(o)}},[t]);var E=function(t){t.stopPropagation(),e.clickFun(t)};return r.createElement("div",{className:"breadcrumbs",onClick:function(e){b(void 0!==w?void 0:"")}},r.createElement(r.Fragment,null,void 0===w?r.createElement(r.Fragment,null,r.createElement("span",{className:"chevron"},r.createElement(o.N_,{to:y,onClick:E},r.createElement(s.In,{icon:"home"}))),d.map(function(e,t){return r.createElement("span",{className:"chevron",key:t},r.createElement(s.In,{icon:"keyboard_arrow_right"}),r.createElement(o.N_,{to:e.href,onClick:E},decodeURIComponent(e.value)))})):r.createElement(u.QM,{click:function(){b(void 0)},children:r.createElement(c.Sm,{width:"100%",placeholder:k("输入跳转的目录"),handlerEnter:function(t){e.input_path_enter&&e.input_path_enter(t),b(void 0)}})})))}},8714(e,t,n){n.r(t),n.d(t,{default:()=>me});var r=n(6540),o=n(7374),i=n(7444),a=n(6417),l=n(4284),c=n(7767),u=n(7952),f=n(7690),s=n(4289),m=n(3459),d=n(9214),p=n(3033),v=n(7022),y=n(2389),h=n(7523),_=n(8247),w=n(8815),b=n(6960),g=n(7071),k=n(4944),E=n(4188),A=n(3430);function S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return G(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){var n=function(e){var t,n="\\",r=S(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if("/"===o||"\\"===o){n=o;break}}}catch(e){r.e(e)}finally{r.f()}return n}(e);if("."===t)return e;if(".."===t){if(e.length>1)for(var r=e[e.length-1]===n?1:0,o=e.length-1-r;o>=0;o--)if(e[o]===n)return e.substring(0,o+1);return e}return e.endsWith(n)&&t.startsWith(n)?e.slice(0,-1)+t:e.endsWith(n)||t.startsWith(n)?e+t:e+n+t}var O=n(4251),j=n(96),P=n(5997),L=n(2042),C=n(3496),I=n(2730),F=n(5725),z=n(447),M=n(7361);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function T(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){Y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return $(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function d(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],d=m.p,p=i[2];n>3?(o=p===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(l=0,m.v=r,m.n=i[1]):d<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,m.n=p,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,p){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),l=f,c=p;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),d(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):($(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,$(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,$(s,"constructor",u),$(u,"constructor",c),c.displayName="GeneratorFunction",$(u,o,"GeneratorFunction"),$(s),$(s,o,"Generator"),$(s,r,function(){return this}),$(s,"toString",function(){return"[object Generator]"}),(N=function(){return{w:i,m}})()}function $(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}$=function(e,t,n,r){function i(t,n){$(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},$(e,t,n,r)}function U(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,l,"next",e)}function l(e){U(i,r,o,a,l,"throw",e)}a(void 0)})}}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return B(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Z={};function q(){var e=(0,y.Bd)().t,t=(0,c.zy)(),n=(0,c.Zp)(),o=(0,_.MH)().check_user_auth,u=W((0,i.L4)(a.AG.nowFileList),2),m=u[0],p=(u[1],W((0,i.L4)(a.AG.uploadFiles),2)),w=(p[0],p[1]),b=W((0,i.L4)(a.AG.showPrompt),2),g=(b[0],b[1]),S=W((0,i.L4)(a.AG.selectedFileList),2),G=S[0],x=(S[1],W((0,i.L4)(a.AG.copyedFileList),2)),j=x[0],C=x[1],D=W((0,i.L4)(a.AG.cutedFileList),2),T=D[0],X=D[1],Y=W((0,i.L4)(a.AG.selectedFileList),2),$=(Y[0],Y[1]),U=W((0,i.L4)(a.AG.clickFileList),2),B=(U[0],U[1]),q=W((0,i.L4)(a.AG.fileShellShow),2),V=q[0],J=q[1],Q=W((0,i.L4)(a.AG.file_root_list),2),ee=Q[0],te=(Q[1],W((0,i.L4)(a.AG.file_root_index),2)),ne=te[0],re=te[1],oe=W((0,r.useState)(void 0),2),ie=(oe[0],oe[1],W((0,r.useState)(""),2)),ae=(ie[0],ie[1],W((0,i.L4)(a.AG.workflow_show),2)),le=ae[0],ce=ae[1],ue=W((0,i.L4)(a.AG.workflow_realtime_show),2),fe=(ue[0],ue[1],W((0,i.L4)(a.AG.work_flow_show),2)),se=fe[0],me=(fe[1],(0,r.useContext)(h.F).initUserInfo),de=W((0,i.L4)(a.AG.user_base_info),2),pe=(de[0],de[1],(0,_.kZ)().click_file,W((0,i.L4)(a.AG.prompt_card),2)),ve=(pe[0],pe[1]),ye=(0,r.useMemo)(function(){return m.files.reduce(function(e,t){return e+(t.type!==v.Iw.folder?1:0)},0)},[m]),he=(0,r.useMemo)(function(){var e,t;return m.files.reduce(function(e,t){return e+(t.type===v.Iw.folder?1:0)},0)+(null!==(e=null===(t=m.folders)||void 0===t?void 0:t.length)&&void 0!==e?e:0)},[m]);function _e(e){(0,L.LW)(e)}(0,r.useEffect)(function(){Z={}},[t]),(0,r.useEffect)(function(){return function(){J({show:!1,path:""})}},[]);var we=function(){var e=H(N().m(function e(t){return N().w(function(e){for(;;)switch(e.n){case 0:return re(t),e.n=1,l.$M.post("base_switch",{root_index:t});case 1:return e.n=2,me();case 2:n("/file/"),$([]),B([]);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),be=(0,d.Vs)(),ge=function(t){ve({open:!0,title:e("信息"),context_div:r.createElement("div",{style:{maxWidth:"25rem"}},r.createElement(F.Yh,{left:e("挂载位置磁盘"),right:null==t?void 0:t.total_size}),r.createElement(F.Yh,{left:"".concat(e("磁盘剩余")),right:null==t?void 0:t.left_size}),r.createElement(F.Yh,{left:"".concat(e("文件系统")),right:null==t?void 0:t.fs_type}),r.createElement(F.Yh,{left:"".concat(e("文件夹数")),right:he}),r.createElement(F.Yh,{left:"".concat(e("文件数")),right:ye}),r.createElement(F.Yh,{left:"".concat(e("当前位置")),right:r.createElement(z.xP,{context:null==t?void 0:t.now_absolute_path})})),cancel:function(){k.ws.removeMsg(E.HK.file_info)}})},ke=function(){var e=H(N().m(function e(){var t,n;return N().w(function(e){for(;;)switch(e.n){case 0:if(Z.now_absolute_path){e.n=2;break}return k.ws.addMsg(E.HK.file_info,function(e){var n=e.context;t&&(Z=K(K({},Z),n),k.ws.removeMsg(E.HK.file_info),ge(Z))}),e.n=1,k.ws.sendData(E.HK.file_info,{type:v.Iw.folder,path:(0,s.GG)("file",(0,s.vX)())});case 1:n=e.v,t=n.context,ge(Z=t);case 2:ge(Z);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,G.length>0&&r.createElement(P.rA,{icon:"delete",title:e("删除"),onClick:function(){g({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),G.length>0&&r.createElement(P.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var e=(0,d.ib)(m,G);C(e.map(function(e){return(0,d.Ok)(e.name)})),X([]),_e("已复制")}}),G.length>0&&r.createElement(P.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var e=(0,d.ib)(m,G);X(e.map(function(e){return(0,d.Ok)(e.name)})),C([]),_e("已剪切")}}),(j.length>0||T.length>0)&&r.createElement(P.rA,{onClick:function(){g({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:j.length+T.length}),G.length>0&&r.createElement(P.rA,{icon:"download",title:e("下载"),onClick:function(){for(var e=(0,d.ib)(m,G),t=0;t<e.length;t++){var n=e[t];e[t]=encodeURIComponent((0,d.Ok)(n.name))}var r=l.$M.getDownloadUrl(e);window.open(r)}}),G.length>0&&r.createElement(P.rA,{icon:"compress",title:e("压缩"),onClick:function(){for(var e=(0,d.ib)(m,G),t=0;t<e.length;t++){var n=e[t];e[t]=(0,d.Ok)(n.name)}e&&0!==e.length?g({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,L.zN)("没有选中")}}),1===G.length&&r.createElement(P.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){g({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),se&&r.createElement(P.rA,{icon:"api",title:"workflow",onClick:function(){ce(!le)}}),r.createElement(P.rA,{icon:"terminal",title:"shell",onClick:function(){V.show?J({show:!1,path:""}):J({show:!0,path:(0,s.GG)("file",(0,s.vX)())})}}),o(A.oV.share_file)&&r.createElement(P.rA,{icon:"share",title:e("文件分享"),onClick:function(){n("/".concat(M.o.share_list_setting_page))}}),r.createElement(P.rA,{icon:"grid_view",title:e("切换样式"),onClick:be}),r.createElement(P.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){g({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(P.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){g({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),r.createElement(P.rA,{icon:"upload_file",title:e("上传"),onClick:function(){g({show:!0,type:f.PromptEnum.UploadFile,overlay:!0,data:{call:function(e){var t,n=null===(t=e.currentTarget)||void 0===t?void 0:t.files;if(n){for(var r=!!n[0].webkitRelativePath,o=[],i=new Set,a=0;a<n.length;a++){var l=n[a],c=r?l.webkitRelativePath:"".concat(l.webkitRelativePath).concat(l.name);l.fullPath=c,r&&i.add((0,I.S)(c)),o.push(l)}var u=[];if(r){var s,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(i);try{for(m.s();!(s=m.n()).done;){var d=s.value;u.push({isDir:!0,fullPath:d,name:d})}}catch(e){m.e(e)}finally{m.f()}}u.push.apply(u,o),w(u),g({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),r.createElement(P.rA,{icon:"info",title:e("信息"),onClick:ke}),r.createElement(P.rA,{icon:"more_vert",title:e("切换目录"),onClick:function(e){var t=new O.ik;t.x=e.clientX,t.y=e.clientY,t.type=v.Iw.directory,t.items=ee,t.item_pre_value=ne,t.textClick=function(){var e=H(N().m(function e(t){return N().w(function(e){for(;;)switch(e.n){case 0:we(t),g({data:void 0,overlay:!1,type:"",show:!1});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),g({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:t})}}))}var V=n(2543),J=n(1499),Q=n(4694);function ee(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||le(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof l?r:l,u=Object.create(c.prototype);return ne(u,"_invoke",function(n,r,o){var i,l,c,u=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,l=0,c=e,m.n=n,a}};function d(n,r){for(l=n,c=r,t=0;!s&&u&&!o&&t<f.length;t++){var o,i=f[t],d=m.p,p=i[2];n>3?(o=p===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(l=0,m.v=r,m.n=i[1]):d<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,m.n=p,l=0))}if(o||n>1)return a;throw s=!0,r}return function(o,f,p){if(u>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),l=f,c=p;(t=l<2?e:c)||!s;){i||(l?l<3?(l>1&&(m.n=-1),d(l,c)):m.n=c:m.v=c);try{if(u=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==a)break}catch(t){i=e,l=1,c=t}finally{u=1}}return{value:t,done:s}}}(n,o,i),!0),u}var a={};function l(){}function c(){}function u(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ne(t={},r,function(){return this}),t),s=u.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ne(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=u,ne(s,"constructor",u),ne(u,"constructor",c),c.displayName="GeneratorFunction",ne(u,o,"GeneratorFunction"),ne(s),ne(s,o,"Generator"),ne(s,r,function(){return this}),ne(s,"toString",function(){return"[object Generator]"}),(te=function(){return{w:i,m}})()}function ne(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ne=function(e,t,n,r){function i(t,n){ne(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ne(e,t,n,r)}function re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=le(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function oe(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function ie(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){oe(i,r,o,a,l,"next",e)}function l(e){oe(i,r,o,a,l,"throw",e)}a(void 0)})}}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||le(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ue,fe=r.lazy(function(){return Promise.all([n.e(7856),n.e(3659)]).then(n.bind(n,3659))}),se=r.lazy(function(){return Promise.all([n.e(7856),n.e(1636)]).then(n.bind(n,1636))});function me(){var e=ae((0,i.L4)(a.AG.editorSetting),2),t=(e[0],e[1]),n=ae((0,i.L4)(a.AG.file_preview),2),S=(n[0],n[1]),G=(0,y.Bd)().t,L=(0,c.zy)(),I=(0,c.Zp)(),F=ae((0,i.L4)(a.AG.nowFileList),2),z=F[0],M=F[1],X=ae((0,i.L4)(a.AG.showPrompt),2),Y=(X[0],X[1]),$=ae((0,i.L4)(a.AG.selectedFileList),2),U=$[0],R=$[1],B=ae((0,i.L4)(a.AG.clickFileList),2),Z=(B[0],B[1]),ne=ae((0,i.L4)(a.AG.fileShellShow),2),oe=(ne[0],ne[1],ae((0,r.useState)(""),2)),le=oe[0],ce=oe[1],me=ae((0,i.L4)(a.AG.workflow_show),2),de=me[0],pe=(me[1],ae((0,i.L4)(a.AG.workflow_realtime_show),2)),ve=pe[0],ye=(pe[1],ae((0,i.L4)(a.AG.work_flow_show),2)),he=(ye[0],ye[1]),_e=((0,r.useContext)(h.F).initUserInfo,ae((0,i.L4)(a.AG.user_base_info),2)),we=_e[0],be=(_e[1],(0,_.kZ)().click_file,ae((0,i.L4)(a.AG.to_running_files),2)),ge=(be[0],be[1]),ke=ae((0,i.L4)(a.AG.file_page),2),Ee=ke[0],Ae=ke[1],Se=ae((0,i.L4)(a.AG.blank_search_mode),1)[0],Ge=function(){var e=W((0,i.L4)(a.AG.user_base_info),2),t=e[0],n=(e[1],(0,y.Bd)().t),o=(0,_.MH)().check_user_auth,u=W((0,i.L4)(a.AG.router_jump),2),m=(u[0],u[1]),p=(0,c.Zp)(),w=(0,r.useContext)(h.F).initUserInfo,b=W((0,i.L4)(a.AG.nowFileList),2),g=(b[0],b[1],W((0,i.L4)(a.AG.showPrompt),2)),S=(g[0],g[1]),G=W((0,i.L4)(a.AG.fileShellShow),2),x=(G[0],G[1]),j=W((0,i.L4)(a.AG.blank_search_mode),2),P=j[0],L=j[1];return function(e){var i;e.preventDefault(),e.stopPropagation();var a=new O.ik;a.x=e.clientX,a.y=e.clientY,a.type=v.Iw.directory;var c=[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_minx_max?"green":void 0}},n("时间逆序")),v:A.t8.time_minx_max},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},n("时间顺序")),v:A.t8.time_max_min}],u=[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_min_max?"green":void 0}},n("大小顺序")),v:A.t8.size_min_max},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},n("大小逆序")),v:A.t8.size_max_min}],y=[{r:r.createElement("span",{style:{color:t.user_data.file_list_pagination_mode&&t.user_data.file_list_pagination_mode!==A.yM.all?void 0:"green"}},n("全部加载文件")),v:A.yM.all},{r:r.createElement("span",{style:{color:t.user_data.file_list_pagination_mode===A.yM.pagination?"green":void 0}},n("分页滚动加载文件")),v:A.yM.pagination}],h=[{r:r.createElement("span",{style:{color:t.user_data.file_time_show_type&&t.user_data.file_time_show_type!==A.KD.current?void 0:"green"}},n("最近时间")),v:A.KD.current},{r:r.createElement("span",{style:{color:t.user_data.file_time_show_type===A.KD.time?"green":void 0}},n("准确时间")),v:A.KD.time}],_=[{r:n("文件列表展示"),items:[{r:n("文件排序"),v:"",items:[{r:r.createElement("span",{style:{color:t.user_data.dir_show_type?void 0:"green"}},n("系统默认")),v:A.t8.defualt},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.name?"green":void 0}},n("名字")),v:A.t8.name},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.time_minx_max||t.user_data.dir_show_type===A.t8.time_max_min?"green":void 0}},n("修改时间")),v:!1,items:c},{r:r.createElement("span",{style:{color:t.user_data.dir_show_type===A.t8.size_min_max||t.user_data.dir_show_type===A.t8.size_max_min?"green":void 0}},n("文件大小")),v:!1,items:u}]},{r:n("文件加载方式"),v:"",items:y},{r:n("时间展示"),v:"",items:h},{r:n("缩放调整"),v:"zoom_adjust"},{r:r.createElement("span",{style:{color:P?"green":void 0}},n("以空白搜索模式打开目录")),v:"blank_search_mode"}]}];o(A.oV.code_resource)&&_.push({r:n("添加http资源根目录"),v:"code_resource"}),o(A.oV.http_proxy)&&_.push({r:n("在此目录下载http资源"),v:"http_resource"}),null!=t&&null!==(i=t.user_data)&&void 0!==i&&i.quick_cmd&&(0,d.LL)(T(t.user_data.quick_cmd),_),a.items=_,a.textClick=function(){var e=H(N().m(function e(t){var n,r,o,i;return N().w(function(e){for(;;)switch(e.n){case 0:if(console.log(t),!1!==t){e.n=1;break}return e.a(2);case 1:if(n={},"code_resource"!==t){e.n=3;break}return e.n=2,k.ws.sendData(E.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 2:return r=e.v,m({page_self_router_api_data:["",r.context.now_absolute_path]}),S({data:void 0,overlay:!1,type:"",show:!1}),p("/setting/customer_router/"),e.a(2);case 3:if("http_resource"!==t){e.n=5;break}return e.n=4,k.ws.sendData(E.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 4:return o=e.v,m({http_download_map_path:o.context.now_absolute_path}),S({data:void 0,overlay:!1,type:"",show:!1}),p("/proxy/http/"),e.a(2);case 5:if("zoom_adjust"!==t){e.n=6;break}return S({data:void 0,overlay:!1,type:"",show:!1}),setTimeout(function(){S({show:!0,type:f.PromptEnum.ZoomAdjust,overlay:!1,data:{}})},0),e.a(2);case 6:if("object"!==D(t)||"quick_cmd"!==t.tag){e.n=7;break}(i=t.cmd)&&(i.endsWith("\r")||(i+="\r",x({show:!0,path:(0,s.GG)("file",(0,s.vX)()),cmd:i}))),e.n=12;break;case 7:if("blank_search_mode"!==t){e.n=8;break}return L(!P),S({data:void 0,overlay:!1,type:"",show:!1}),e.a(2);case 8:if(t!==A.yM.all&&t!==A.yM.pagination){e.n=9;break}n.is_pagination_mode=!0,e.n=12;break;case 9:if(t!==A.KD.current&&t!==A.KD.time){e.n=10;break}n.is_file_show_type=!0,e.n=12;break;case 10:if(t!==A.t8.defualt&&t!==A.t8.name&&t!==A.t8.size_max_min&&t!==A.t8.size_min_max&&t!==A.t8.time_max_min&&t!==A.t8.time_minx_max){e.n=11;break}n.is_dir_list_type=!0,e.n=12;break;case 11:return e.a(2);case 12:return e.n=13,l.wm.post(C.s.user_save_private_attr,K({type:t},n));case 13:return e.n=14,w();case 14:S({data:void 0,overlay:!1,type:"",show:!1}),p((0,s.vX)());case 15:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),S({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:a})}}(),xe=function(){var e=ie(te().m(function e(){var t;return te().w(function(e){for(;;)switch(e.n){case 0:return(t=new g.Nd).dir_path="".concat((0,s.GG)("file",(0,s.vX)())),k.ws.addMsg(E.HK.workflow_realtime,function(e){var t=e.context;if(e.context){var n,r=re(t.sucess_file_list);try{for(r.s();!(n=r.n()).done;){var o=n.value;(0,d.Ys)(o)}}catch(e){r.e(e)}finally{r.f()}var i,a=re(t.failed_file_list);try{for(a.s();!(i=a.n()).done;){var l=i.value;(0,d.V$)(l)}}catch(e){a.e(e)}finally{a.f()}ge(new Set(t.running_file_list))}}),e.n=1,k.ws.sendData(E.HK.workflow_realtime,t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=ie(te().m(function e(t){var n,r,o,i,a,l,c,u,f;return te().w(function(e){for(;;)switch(e.n){case 0:o=!1,i=re(null!==(n=t.files)&&void 0!==n?n:[]);try{for(i.s();!(a=i.n()).done;)(l=a.value).origin_size=l.size,l.size=(0,w.v7)(l.size),we.user_data.file_time_show_type===A.KD.time?l.show_mtime=l.mtime?(0,J.Yq)(l.mtime):"":l.show_mtime=l.mtime?(0,b.s)(l.mtime):"",o||!l.name.endsWith(".workflow.yml")&&!l.name.endsWith(".act")||(o=!0,Promise.resolve().then(function(){xe()})),l.name===g.SB&&(o=!0)}catch(e){i.e(e)}finally{i.f()}c=re(null!==(r=t.folders)&&void 0!==r?r:[]);try{for(c.s();!(u=c.n()).done;)f=u.value,we.user_data.file_time_show_type===A.KD.time?f.show_mtime=f.mtime?(0,J.Yq)(f.mtime):"":f.show_mtime=f.mtime?(0,b.s)(f.mtime):"",f.name===g.SB&&(o=!0)}catch(e){c.e(e)}finally{c.f()}he(o);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),je=function(){var e=ie(te().m(function e(){var t,n,r,o,i;return te().w(function(e){for(;;)switch(e.n){case 0:if(t=(0,s.GG)("file",(0,s.vX)()),!Se){e.n=1;break}return e.a(2);case 1:if(we.user_data.file_list_pagination_mode!==A.yM.pagination){e.n=4;break}if(!(Ee.page_num<0)){e.n=2;break}return e.a(2);case 2:return e.n=3,l.$M.post("file_get_page",{param_path:t,page_num:Ee.page_num,page_size:Ee.page_size});case 3:n=e.v,o=n.data,null!==(r=o.files)&&void 0!==r&&r.length||Ae({page_size:Ee.page_size,page_num:-1}),o.files=(0,V.cloneDeep)([].concat(ee(z.files),ee(o.files))),e.n=6;break;case 4:return e.n=5,l.$M.get(t);case 5:n=e.v;case 6:if(n.code===m.m.Success){e.n=7;break}return e.a(2);case 7:i=n.data,(0,d.yC)(i,we.user_data.dir_show_type),Oe(n.data),M(n.data),ue=n.data;case 8:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Pe=function(){Ae({page_num:1,page_size:200})};(0,r.useEffect)(function(){return Pe(),ie(te().m(function e(){return te().w(function(e){for(;;)switch(e.n){case 0:ge(new Set);case 1:return e.a(2)}},e)}))},[]);var Le=function(){je(),t({open:!1}),S({open:!1}),he(!1)};(0,r.useEffect)(function(){M({files:[],folders:[]}),Pe(),Le()},[L]),(0,r.useEffect)(function(){Le()},[Ee]);var Ce=function(){var e=ie(te().m(function e(){var t,n,r,o,i,a,c,u,f,p,v,y,h;return te().w(function(e){for(;;)switch(e.n){case 0:if(!Se){e.n=4;break}if(R([]),Z([]),le&&le.trim()){e.n=1;break}return M({files:[],folders:[]}),e.a(2);case 1:return r=(0,s.GG)("file",(0,s.vX)()),e.n=2,l.$M.post("file_get_page",{param_path:r,page_num:1,page_size:1e4,search:le.trim()});case 2:if((o=e.v).code===m.m.Success){e.n=3;break}return e.a(2);case 3:return i=o.data,(0,d.yC)(i,we.user_data.dir_show_type),Oe(i),M(i),ue=i,e.a(2);case 4:if(ue){e.n=5;break}return e.a(2);case 5:R([]),Z([]),a=[],c=[],u=re(null!==(t=ue.files)&&void 0!==t?t:[]);try{for(u.s();!(f=u.n()).done;)(p=f.value).name.includes(le)&&a.push(p)}catch(e){u.e(e)}finally{u.f()}v=re(null!==(n=ue.folders)&&void 0!==n?n:[]);try{for(v.s();!(y=v.n()).done;)(h=y.value).name.includes(le)&&c.push(h)}catch(e){v.e(e)}finally{v.f()}M({files:a,folders:c});case 6:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Ie=function(e){e.target===e.currentTarget&&(R([]),Z([]))};return r.createElement(r.Fragment,null,r.createElement(u.A,{left_children:r.createElement(p.$Z,{handleEnterPress:Ce,placeholder:G("搜索当前目录"),icon:"search",value:"",handleInputChange:function(e){ce(e)},max_width:"25em"})},r.createElement("div",{className:"mobile-context-btn"},r.createElement(P.rA,{icon:"more_horiz",title:G("右键"),onClick:function(){var e=U[U.length-1];if(void 0!==e){var t,n,r=[].concat(ee(null!==(t=z.folders)&&void 0!==t?t:[]),ee(null!==(n=z.files)&&void 0!==n?n:[]))[e];if(r){var o,i=document.querySelectorAll(".item")[e],a=i?i.getBoundingClientRect():{left:window.innerWidth/2,bottom:100},l={preventDefault:function(){},stopPropagation:function(){},clientX:a.left+10,clientY:null!==(o=a.bottom)&&void 0!==o?o:100},c=new O.ik;c.path=(0,Q.IO)((0,s.vX)(),r.name),c.filename=r.name,c.x=l.clientX,c.y=l.clientY,c.type=r.type===v.Iw.folder?v.Iw.folder:(0,O.uL)(r.name),c.size=r.origin_size,Y({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:c})}}else{var u={preventDefault:function(){},stopPropagation:function(){},clientX:window.innerWidth/2,clientY:window.innerHeight/2};Ge(u)}}})),r.createElement(q,null)),r.createElement(o.e,{baseRoute:"file",clickFun:function(){R([]),Z([])},input_path_enter:function(e){var t;!function(e){return"string"==typeof e&&(/^[a-zA-Z]:[\\\/]/.test(e)||/^\//.test(e))}(e)?I(x((0,s.vX)(),e)):(e=e.replace(0===(t=we.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),I(e)),R([]),Z([]),M({files:[],folders:[]})}}),we.user_data.file_list_pagination_mode===A.yM.pagination?r.createElement(j.$J,{handleContextMenu:Ge,clickBlank:Ie,list:z.files}):r.createElement(j.t$,{handleContextMenu:Ge,file_list:z.files,folder_list:z.folders,clickBlank:Ie}),de&&r.createElement(fe,null),ve.open&&r.createElement(se,null))}}}]);
@@ -1,16 +1,52 @@
1
1
  :root {
2
- --background: #141D24;
3
- --surfacePrimary: #20292F;
4
- --surfaceSecondary: #3A4147;
2
+ /* 深色主题 - 现代化设计 */
3
+ --background: #121212;
4
+ --surfacePrimary: #1e1e1e;
5
+ --surfaceSecondary: #2d2d2d;
5
6
  --divider: rgba(255, 255, 255, 0.12);
6
7
  --icon: #ffffff;
7
8
  --textPrimary: rgba(255, 255, 255, 0.87);
8
9
  --textSecondary: rgba(255, 255, 255, 0.6);
10
+
11
+ /* 圆角设计 */
12
+ --border-radius: 12px;
13
+ --border-radius-sm: 8px;
14
+ --border-radius-lg: 16px;
15
+
16
+ /* 现代化阴影 (深色版本) */
17
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
18
+ --shadow-md: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
19
+ --shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
20
+
21
+ /* 深色主题色彩 */
22
+ --primary: #8ab4f8;
23
+ --primary-light: #1a2a3a;
24
+ --primary-dark: #4285f4;
25
+ --secondary: #81c995;
26
+ --secondary-light: #1a2e1a;
27
+ --accent: #f28b82;
28
+ --accent-light: #2e1a1a;
29
+ --warning: #fdd663;
30
+ --warning-light: #2e2a1a;
31
+
32
+ /* 渐变色 */
33
+ --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
34
+ --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
35
+ --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
36
+
37
+ /* 现代化图标颜色 (深色适配) */
38
+ --icon-blue: #8ab4f8;
39
+ --icon-green: #81c995;
40
+ --icon-yellow: #fdd663;
41
+ --icon-red: #f28b82;
42
+ --icon-purple: #d7aefb;
43
+ --icon-teal: #78d9ec;
9
44
  }
10
45
 
11
46
  body {
12
47
  background: var(--background);
13
48
  color: var(--textPrimary);
49
+ font-family: 'Google Sans', 'Segoe UI', Roboto, sans-serif;
14
50
  }
15
51
 
16
52
  #loading {
@@ -26,27 +62,34 @@ body {
26
62
 
27
63
  .header {
28
64
  background: var(--surfacePrimary);
65
+ border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
66
+ box-shadow: var(--shadow-sm);
29
67
  }
30
68
 
31
69
  #search #input {
32
70
  background: var(--surfaceSecondary);
33
- border-color: var(--surfacePrimary);
71
+ border-color: var(--divider);
72
+ border-radius: var(--border-radius);
34
73
  }
35
74
  #search #input input::placeholder {
36
75
  color: var(--textSecondary);
37
76
  }
38
77
  #search.active #input {
39
78
  background: var(--surfacePrimary);
79
+ box-shadow: var(--shadow-md);
40
80
  }
41
81
  #search.active input {
42
82
  color: var(--textPrimary);
43
83
  }
44
84
  #search #result {
45
- background: var(--background);
85
+ background: var(--surfacePrimary);
46
86
  color: var(--textPrimary);
87
+ border-radius: var(--border-radius);
88
+ box-shadow: var(--shadow-lg);
47
89
  }
48
90
  #search .boxes {
49
91
  background: var(--surfaceSecondary);
92
+ border-radius: var(--border-radius-sm);
50
93
  }
51
94
  #search .boxes h3 {
52
95
  color: var(--textPrimary);
@@ -54,15 +97,20 @@ body {
54
97
 
55
98
  .action {
56
99
  color: var(--textPrimary) !important;
100
+ border-radius: var(--border-radius-sm);
101
+ /*transition: all 0.2s ease;*/
57
102
  }
58
103
  .action:hover {
59
- background-color: rgba(255, 255, 255, .1);
104
+ background-color: var(--primary-light);
105
+ /*transform: translateY(-1px);*/
60
106
  }
61
107
  .action i {
62
108
  color: var(--icon) !important;
63
109
  }
64
110
  .action .counter {
65
- border-color: var(--surfacePrimary);
111
+ border-color: var(--divider);
112
+ background: var(--accent-light);
113
+ color: var(--accent);
66
114
  }
67
115
 
68
116
  nav > div {
@@ -77,13 +125,21 @@ nav > div {
77
125
  color: var(--textPrimary) !important;
78
126
  }
79
127
  .breadcrumbs a:hover {
80
- background-color: rgba(255, 255, 255, .1);
128
+ background-color: var(--primary-light);
129
+ border-radius: var(--border-radius-sm);
81
130
  }
82
131
 
83
132
  #listing .item {
84
133
  background: var(--surfacePrimary);
85
134
  color: var(--textPrimary);
86
135
  border-color: var(--divider) !important;
136
+ border-radius: var(--border-radius);
137
+ box-shadow: var(--shadow-sm);
138
+ /*transition: all 0.2s ease;*/
139
+ }
140
+ #listing .item:hover {
141
+ box-shadow: var(--shadow-md);
142
+ /*transform: translateY(-2px);*/
87
143
  }
88
144
  /*#listing .item i {*/
89
145
  /* color: var(--icon);*/
@@ -99,10 +155,11 @@ nav > div {
99
155
  color: var(--textPrimary);
100
156
  }
101
157
  #listing.list .header i {
102
- color: var(--icon);
158
+ color: var(--icon-blue);
103
159
  }
104
160
  #listing.list .item.header {
105
161
  background: var(--background);
162
+ box-shadow: none;
106
163
  }
107
164
 
108
165
  .message {
@@ -112,9 +169,12 @@ nav > div {
112
169
  .card {
113
170
  background: var(--surfacePrimary);
114
171
  color: var(--textPrimary);
172
+ border-radius: var(--border-radius);
173
+ box-shadow: var(--shadow-sm);
115
174
  }
116
175
  .button--flat:hover {
117
- background: var(--surfaceSecondary);
176
+ background: var(--primary-light);
177
+ border-radius: var(--border-radius-sm);
118
178
  }
119
179
 
120
180
  .dashboard #nav ul li {
@@ -144,18 +204,22 @@ td .input:focus {
144
204
  .input {
145
205
  background: var(--surfaceSecondary);
146
206
  color: var(--textPrimary);
147
- border: 1px solid rgba(255, 255, 255, 0.05);
207
+ border: 1px solid var(--divider);
208
+ border-radius: var(--border-radius-sm);
148
209
  }
149
210
  .input:hover,
150
211
  .input:focus {
151
- border-color: rgba(255, 255, 255, 0.15);
212
+ border-color: var(--primary);
213
+ box-shadow: 0 0 0 2px var(--primary-light);
152
214
  }
153
215
  .input--red {
154
- background: #73302D;
216
+ background: var(--accent-light);
217
+ color: var(--accent);
155
218
  }
156
219
 
157
220
  .input--green {
158
- background: #147A41;
221
+ background: var(--secondary-light);
222
+ color: var(--secondary);
159
223
  }
160
224
 
161
225
  .select_option:hover {
@@ -180,59 +244,69 @@ table th {
180
244
  }
181
245
 
182
246
  .file-list li:hover {
183
- background: var(--surfaceSecondary);
247
+ background: var(--primary-light);
248
+ border-radius: var(--border-radius-sm);
184
249
  }
185
250
  .file-list li:before {
186
251
  color: var(--textSecondary);
187
252
  }
188
253
  .file-list li[aria-selected=true]:before {
189
- color: var(--icon);
254
+ color: var(--icon-blue);
190
255
  }
191
256
 
192
257
  .shell {
193
258
  background: var(--surfacePrimary);
194
259
  color: var(--textPrimary);
260
+ border-radius: var(--border-radius);
195
261
  }
196
262
  .shell__divider {
197
- background: rgba(255, 255, 255, 0.1);
263
+ background: var(--divider);
264
+ border-radius: 2px;
198
265
  }
199
266
  .shell__divider:hover {
200
- background: rgba(255, 255, 255, 0.4);
267
+ background: var(--primary);
201
268
  }
202
269
  .shell__result {
203
270
  border-top: 1px solid var(--divider);
204
271
  }
205
272
  .xterm-screen {
206
273
  background: var(--surfacePrimary);
274
+ border-radius: var(--border-radius);
207
275
  }
208
276
 
209
277
 
210
278
  #editor-container {
211
- background: var(--background)!important;
279
+ background: var(--background) !important;
212
280
  }
213
281
 
214
282
  #editor-container .bar {
215
283
  background: var(--surfacePrimary);
284
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
216
285
  }
217
286
 
218
287
  @media (max-width: 736px) {
219
288
  #file-selection {
220
289
  background: var(--surfaceSecondary) !important;
290
+ border-radius: var(--border-radius);
221
291
  }
222
292
  #file-selection span {
223
293
  color: var(--textPrimary) !important;
224
294
  }
225
295
  nav {
226
296
  background: var(--surfaceSecondary) !important;
297
+ border-radius: var(--border-radius);
227
298
  }
228
299
  #dropdown {
229
300
  background: var(--surfaceSecondary) !important;
301
+ border-radius: var(--border-radius);
230
302
  }
231
303
  }
232
304
 
233
305
  .share__box {
234
306
  background: var(--surfacePrimary) !important;
235
307
  color: var(--textPrimary);
308
+ border-radius: var(--border-radius);
309
+ box-shadow: var(--shadow-md);
236
310
  }
237
311
 
238
312
  .share__box__element {
@@ -242,43 +316,54 @@ table th {
242
316
  .dropdown_item {
243
317
  background: var(--surfacePrimary);
244
318
  margin: 0;
319
+ border-radius: var(--border-radius-sm);
245
320
  }
246
321
  .dropdown > div:hover {
247
- background: var(--surfaceSecondary);
322
+ background: var(--primary-light);
248
323
  }
249
324
  .menu ul li:hover {
250
- background: var(--surfacePrimary);
325
+ background: var(--primary-light);
326
+ border-radius: var(--border-radius-sm);
251
327
  }
252
328
  .md-context div{
253
329
  background: var(--surfaceSecondary);
254
330
  color: var(--textPrimary);
331
+ border-radius: var(--border-radius-sm);
255
332
  }
256
333
  #md-container .md-context{
257
334
  background: var(--surfacePrimary);
335
+ border-radius: var(--border-radius);
258
336
  }
259
337
  .card-content textarea {
260
338
  background: var(--surfacePrimary);
261
339
  color: var(--textPrimary);
340
+ border-radius: var(--border-radius-sm);
262
341
  }
263
342
 
264
343
  .nav_list_a,.nav_list_a a {
265
344
  background: var(--surfacePrimary);
345
+ border-radius: var(--border-radius);
266
346
  }
267
347
 
268
348
  .studio .studio-nav,.studio-nav div,.studio-body {
269
349
  background: var(--surfacePrimary) !important;
350
+ border-radius: var(--border-radius);
270
351
  }
271
352
 
272
353
  .studio-item-title:hover * {
273
- color: rgba(255, 255, 255, 0.4)
354
+ color: var(--primary);
274
355
  }
275
356
 
276
357
  .chat-message.bot{
277
- background: var(--textPrimary);
358
+ background: var(--primary-light);
359
+ border-radius: var(--border-radius);
360
+ color: var(--textPrimary);
278
361
  }
279
362
 
280
363
  .chat-input-area textarea {
281
- background: var(--textPrimary);
364
+ background: var(--surfacePrimary);
365
+ border-radius: var(--border-radius);
366
+ color: var(--textPrimary);
282
367
  }
283
368
 
284
369
  .common-box {
@@ -302,23 +387,30 @@ table th {
302
387
  }
303
388
 
304
389
  .chat-session-item {
305
- background: var(--textPrimary);
390
+ background: var(--surfacePrimary);
391
+ border-radius: var(--border-radius-sm);
392
+ color: var(--textPrimary);
306
393
  }
307
394
  .chat-session-item.active,
308
395
  .chat-session-item:hover {
309
- background: var(--textPrimary);
396
+ background: var(--primary-light);
310
397
  }
311
398
 
312
399
  .menu-select-popup {
313
- background: var(--background);
400
+ background: var(--surfacePrimary);
401
+ border-radius: var(--border-radius);
402
+ box-shadow: var(--shadow-lg);
314
403
  }
315
404
 
316
405
  .menu-select-item:hover {
317
- background:var(--surfacePrimary)
406
+ background:var(--primary-light);
407
+ border-radius: var(--border-radius-sm);
318
408
  }
319
409
 
320
410
  .usage-stats-popup {
321
411
  background: var(--surfacePrimary);
412
+ border-radius: var(--border-radius);
413
+ box-shadow: var(--shadow-lg);
322
414
  }
323
415
 
324
416
  .usage-stats-header {
@@ -331,11 +423,12 @@ table th {
331
423
 
332
424
  .usage-stats-close {
333
425
  color: var(--textSecondary);
426
+ border-radius: 50%;
334
427
  }
335
428
 
336
429
  .usage-stats-close:hover {
337
430
  color: var(--textPrimary);
338
- background: var(--surfaceSecondary);
431
+ background: var(--primary-light);
339
432
  }
340
433
 
341
434
  .usage-stats-loading,
@@ -345,6 +438,7 @@ table th {
345
438
 
346
439
  .usage-stats-row {
347
440
  background: var(--background);
441
+ border-radius: var(--border-radius-sm);
348
442
  }
349
443
 
350
444
  .usage-stats-row:nth-child(even) {
@@ -360,11 +454,78 @@ table th {
360
454
  }
361
455
 
362
456
  .usage-stats-total {
363
- background: #1e3a5f !important;
364
- border-color: #2563eb;
457
+ background: var(--primary-light) !important;
458
+ border-color: var(--primary);
459
+ border-radius: var(--border-radius);
365
460
  }
366
461
 
367
462
  .usage-stats-total .usage-stats-label,
368
463
  .usage-stats-total .usage-stats-value {
369
- color: #93c5fd;
370
- }
464
+ color: var(--primary);
465
+ }
466
+
467
+ /* 移除硬编码颜色,改用 CSS 变量 */
468
+ nav .nav_2 {
469
+ /*transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); !* 使用更柔和的缓动曲线 *!*/
470
+ border-radius: var(--border-radius-lg); /* 使用你定义的圆角变量 */
471
+ margin: 4px 8px; /* 给菜单项之间留出空间 */
472
+ width: auto;
473
+ }
474
+
475
+ /* 现代悬停态 */
476
+ nav .nav_2:hover {
477
+ background-color: var(--surfaceSecondary);
478
+ /*transform: scale(1.02); !* 轻微放大,提供物理反馈 *!*/
479
+ }
480
+
481
+ /* 现代激活态 */
482
+ nav .nav_2_active {
483
+ background-color: var(--primary-light) !important;
484
+ color: var(--primary) !important;
485
+ /*font-weight: 500;*/
486
+ }
487
+
488
+ /* 激活态图标颜色 */
489
+ nav .nav_2_active i {
490
+ color: var(--primary);
491
+ }
492
+
493
+ /* 整体悬停时,图标也会有一个微小的放大或颜色变化 */
494
+ nav .nav_2:hover i {
495
+ color: var(--textPrimary);
496
+ /*transition: color 0.2s;*/
497
+ }
498
+
499
+ .nav_list_a {
500
+ background: transparent; /* 默认透明 */
501
+ border-radius: var(--border-radius-lg);
502
+ /*transition: all 0.25s ease;*/
503
+ border: 1px solid transparent; /* 预留边框,防止 Hover 时布局抖动 */
504
+ color: var(--background);
505
+ }
506
+
507
+ .nav_list_a:hover {
508
+ background: var(--surfacePrimary);
509
+ box-shadow: var(--shadow-sm); /* 悬停时浮起 */
510
+ border-color: var(--divider);
511
+ }
512
+
513
+ /* 激活时呈现边框高亮 */
514
+ .nav_list_a.active {
515
+ background: var(--primary-light);
516
+ color: var(--primary);
517
+ }
518
+
519
+ nav {
520
+ /*border-right: 1px solid var(--divider); !* 增加右侧分割线 *!*/
521
+ background: var(--background);
522
+ }
523
+
524
+ /* 滚动条隐藏但在悬停时可见(增强交互感) */
525
+ nav::-webkit-scrollbar {
526
+ width: 6px;
527
+ }
528
+ nav:hover::-webkit-scrollbar-thumb {
529
+ background: var(--divider);
530
+ border-radius: 4px;
531
+ }