filecat 4.2.0 → 4.2.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.
- package/build/dist/181.dca620b20a199752979b.js +2 -0
- package/build/dist/{523.2b1989cd8a0c932529e4.js → 523.b433286af1eea198bf28.js} +2 -2
- package/build/dist/674.d30f7012ee924cad7db5.js +2 -0
- package/build/dist/{757.892585487e4327ecb3be.js → 757.745973c287d8d4497d06.js} +1 -1
- package/build/dist/{943.ddad17589806d606e39c.js → 943.b462f3358b5deb2d820c.js} +2 -2
- package/build/dist/index.html +1 -1
- package/build/dist/{main.31899938cfee9e7ba5dd.js → main.44129c9bb2caf96928ba.js} +2 -2
- package/build/main.js +3 -3
- package/package.json +1 -1
- package/build/dist/181.aae18316b782b1bea64b.js +0 -2
- package/build/dist/674.ac4f6dad1c97bc284cb9.js +0 -2
- /package/build/dist/{181.aae18316b782b1bea64b.js.LICENSE.txt → 181.dca620b20a199752979b.js.LICENSE.txt} +0 -0
- /package/build/dist/{523.2b1989cd8a0c932529e4.js.LICENSE.txt → 523.b433286af1eea198bf28.js.LICENSE.txt} +0 -0
- /package/build/dist/{674.ac4f6dad1c97bc284cb9.js.LICENSE.txt → 674.d30f7012ee924cad7db5.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.ddad17589806d606e39c.js.LICENSE.txt → 943.b462f3358b5deb2d820c.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.31899938cfee9e7ba5dd.js.LICENSE.txt → main.44129c9bb2caf96928ba.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 181.aae18316b782b1bea64b.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[181],{7181:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var n=r(6540),o=r(5997),i=r(7952),a=r(7444),c=r(6417),u=r(8247),l=r(4289);function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:O(t,r,c)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var L={};l(L,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,a)&&(L=_);var k=E.prototype=w.prototype=Object.create(L);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var u=y(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(f(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(j.prototype),l(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;G(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,e)||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 p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var v=n.lazy((function(){return Promise.all([r.e(874),r.e(91)]).then(r.bind(r,4091))}));function d(){var t=y((0,a.L4)(c.A.editorSetting),2),e=t[0],r=t[1],f=y((0,n.useState)(!1),2),p=f[0],d=f[1],m=y((0,a.L4)(c.A.fileShellShow),2),g=m[0],w=m[1],b=y((0,a.L4)(c.A.file_shell_hidden),2),E=b[0],L=b[1];function x(){return _.apply(this,arguments)}function _(){var t;return t=s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save||!p){t.next=5;break}return t.next=3,e.save(u.xK.get_editor_value());case 3:u.xK.set_value_temp(""),d(!1);case 5:case"end":return t.stop()}}),t)})),_=function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){h(i,n,o,a,c,"next",t)}function c(t){h(i,n,o,a,c,"throw",t)}a(void 0)}))},_.apply(this,arguments)}var k=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),e.save&&p&&x())};(0,n.useEffect)((function(){return function(){d(!1)}}),[e]),(0,n.useEffect)((function(){return document.addEventListener("keydown",k),function(){document.removeEventListener("keydown",k)}}),[p,e]);var S=n.createElement("div",{id:"editor-container"},n.createElement(i.A,{ignore_tags:!0,left_children:[n.createElement(o.rA,{key:1,title:"取消",icon:"close",onClick:function(){u.xK.set_value_temp(""),r({open:!1,model:"",fileName:"",save:null})}}),n.createElement("title",{key:2},e.fileName)]},e.menu_list&&e.menu_list,e.opt_shell&&n.createElement(o.rA,{icon:"terminal",title:"shell",onClick:function(){g.show?L(!E):w({show:!0,path:(0,l.GG)("file",(0,l.vX)())})}}),p&&n.createElement(o.rA,{title:"保存",icon:"save",onClick:x})),n.createElement(v,{name:e.fileName,model:e.model,on_change:function(){p||d(!0)}}));return e.open&&S}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 674.ac4f6dad1c97bc284cb9.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[674],{2674:(t,e,r)=>{r.r(e),r.d(e,{default:()=>F});var n=r(6540),o=r(6417),a=r(7444),i=r(5997),c=r(7952),u=r(7022);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=e&&e.prototype instanceof w?e:w,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:j(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function w(){}function b(){}function x(){}var E={};f(E,i,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(G([])));L&&L!==r&&n.call(L,i)&&(E=L);var _=x.prototype=w.prototype=Object.create(E);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,a,i,c){var u=p(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function j(e,r,n){var o=y;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(l(e)+" is not iterable")}return b.prototype=x,o(_,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(N.prototype),f(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new N(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),f(_,u,"Generator"),f(_,i,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){f(a,n,o,i,c,"next",t)}function c(t){f(a,n,o,i,c,"throw",t)}i(void 0)}))}}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(t,e)||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 y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function d(t){var e=p((0,n.useState)(!1),2),r=e[0],o=e[1],a=p((0,n.useState)([]),2),i=a[0],c=a[1],l=function(t){c(t)},f=function(){var e=h(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("folder"!==t.type){e.next=7;break}if(r||!t.click||i){e.next=4;break}return e.next=4,t.click(t,l,t.pre_path);case 4:o(!r),e.next=10;break;case 7:if(!t.click){e.next=10;break}return e.next=10,t.click(t,l,t.pre_path);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=h(s().mark((function e(){var r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],"folder"!==t.type||r){e.next=6;break}return e.next=4,t.click(t,l,t.pre_path);case 4:e.next=7;break;case 6:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){c(t.children)}),[t.children]),n.createElement("div",{className:"studio-item"},n.createElement("div",{onClick:f,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===u.Iw.folder,y)},className:"studio-item-title"},n.createElement("i",{className:"material-icons studio-item-title-tag"},"file"==t.type?"":r?"arrow_drop_down":"arrow_right"),n.createElement("i",{className:"material-icons","file-type":t.type},"folder"===t.type?"folder":"text_snippet"),n.createElement("span",{className:"studio-item-name"},t.name)),r&&i&&n.createElement("div",{style:{marginLeft:20}},i.map((function(e,r){return n.createElement(n.Fragment,{key:r},n.createElement(d,{type:e.type,click:t.click,name:e.name,key:r,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))}))))}function v(t){return n.createElement("div",null,t.list.map((function(e,r){return n.createElement(d,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),key:r,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click})})))}var m=r(6007),g=r(4289),w=r(3459),b=r(8247),x=r(2042),E=r(2543),k=r.n(E),L=r(4251),_=r(7567),S=r(2389);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function j(){j=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(G([])));E&&E!==r&&n.call(E,i)&&(b=E);var k=w.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==N(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(N(e)+" is not iterable")}return g.prototype=w,o(k,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function O(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function P(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){O(a,n,o,i,c,"next",t)}function c(t){O(a,n,o,i,c,"throw",t)}i(void 0)}))}}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return C(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,e):void 0}}(t,e)||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 C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var G=n.lazy((function(){return Promise.all([r.e(874),r.e(91)]).then(r.bind(r,4091))}));function F(t){var e=A((0,a.L4)(o.A.studio),2),r=e[0],l=e[1],s=A((0,n.useState)([]),2),f=s[0],h=s[1],p=A((0,n.useState)(""),2),y=p[0],d=p[1],E=A((0,n.useState)(""),2),N=(E[0],E[1]),O=A((0,n.useState)(!1),2),C=(O[0],O[1],A((0,n.useState)({path:"",name:""}),2)),F=C[0],I=C[1],T=A((0,n.useState)(""),2),M=T[0],D=T[1],U=A((0,a.L4)(o.A.confirm),2),Y=(U[0],U[1]),$=A((0,n.useState)(!1),2),R=$[0],K=$[1],z=A((0,a.L4)(o.A.fileShellShow),2),B=z[0],W=z[1],X=A((0,a.L4)(o.A.file_shell_hidden),2),q=X[0],H=X[1],J=(0,n.useRef)(null),Q=(0,n.useRef)(null),V=A((0,n.useState)(!1),2),Z=V[0],tt=V[1],et=A((0,n.useState)(16),2),rt=et[0],nt=et[1],ot=A((0,a.L4)(o.A.showPrompt),2),at=(ot[0],ot[1]),it=(0,S.Bd)().t;var ct=function(){var t=P(j().mark((function t(){var e,n;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,g.GG)("file",r.folder_path),d(e),t.next=4,m.$M.post("studio/get/item",{path:e});case 4:(n=t.sent).code===w.m.Sucess&&h(n.data.list);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){N(""),I({}),K(!1),r.folder_path&&ct()}),[r]);var ut=function(){var t=P(j().mark((function t(e,r){var n;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.$M.get("".concat(encodeURIComponent(r)));case 2:if((n=t.sent).code!==w.m.File_Max){t.next=6;break}return(0,x.zN)("超过20MB"),t.abrupt("return");case 6:N(n.data),b.xK.set_value_temp(n.data),I({path:r,name:e}),D(r);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),lt=function(){var t=P(j().mark((function t(e,r,n){var o;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("folder"!==e.type){t.next=7;break}return t.next=3,m.$M.post("studio/get/item",{path:"".concat(n)});case 3:(o=t.sent).code===w.m.Sucess&&r(o.data.list),t.next=12;break;case 7:if(!R){t.next=10;break}return Y({open:!0,handle:function(){ut(e.name,n),Y({open:!1,handle:null}),K(!1)},title:"确定不保存就切换吗?"}),t.abrupt("return");case 10:return t.next=12,ut(e.name,n);case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();function st(){return ft.apply(this,arguments)}function ft(){return(ft=P(j().mark((function t(){var e;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R){t.next=2;break}return t.abrupt("return");case 2:return e={context:b.xK.get_editor_value()},t.next=5,m.$M.post("save/".concat(encodeURIComponent(M)),e);case 5:0===t.sent.code&&K(!1);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ht=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),R&&st())};(0,n.useEffect)((function(){return document.addEventListener("keydown",ht),function(){document.removeEventListener("keydown",ht)}}),[R]);var pt=(0,n.useCallback)(k().throttle((function(t){var e=parseFloat(getComputedStyle(Q.current).fontSize),r=window.innerWidth/e-4,n=t.clientX/e,o=2.25+J.current.offsetWidth/e;n<=r&&n>=o&&nt(parseFloat(n.toFixed(2)))}),32),[]),yt=function(){tt(!1),Q.current.removeEventListener("pointermove",pt)},dt=[{r:it("创建文件"),v:"创建文件"},{r:it("创建目录"),v:"创建目录"},{r:it("重命名"),v:"重命名"},{r:it("删除"),v:"删除"}],vt=[{r:it("重命名"),v:"重命名"},{r:it("删除"),v:"删除"}],mt=function(t,e,r,n,o){t.preventDefault();var a=new L.i;a.path=r,a.filename=e,a.x=t.clientX,a.y=t.clientY,a.items=n?dt:vt,o===ct&&(a.items=a.items.slice(0,2)),a.type=n?u.Iw.studio_folder:u.Iw.studio_file;var i=function(t){o(t)};a.textClick=function(t){switch(t){case"创建文件":at({show:!0,type:_.PromptEnum.FileNew,overlay:!0,data:{dir:r,call:i}});break;case"创建目录":at({show:!0,type:_.PromptEnum.DirNew,overlay:!0,data:{dir:r,call:i}});break;case"删除":if(R&&(F.path===r||F.path.includes(r))){at({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:function(){i(n),K(!1),I({}),N(""),b.xK.set_value_temp("")}}});break}at({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:n?function(){i(!0)}:i}});break;case"重命名":at({show:!0,type:_.PromptEnum.FileRename,overlay:!0,data:{path:r,dir:(0,g.Yp)(r),call:function(){i(!0)},filename:e}})}},at({show:!0,type:_.PromptEnum.FileMenu,overlay:!1,data:a})};return n.createElement("div",{className:"studio"},n.createElement(c.A,{ignore_tags:!0,left_children:[n.createElement(i.rA,{key:1,title:"取消",icon:"close",onClick:function(){l({}),W({show:!1,path:""}),H(void 0)}}),n.createElement("title",{key:2},F.name)]},n.createElement(i.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===q?B.show?W({show:!1,path:""}):(W({show:!0,path:(0,g.GG)("file",r.folder_path)}),H(!1)):H(!q)}}),R&&n.createElement(i.rA,{title:"保存",icon:"save",onClick:st})),n.createElement("div",{className:"studio-body",ref:Q},n.createElement("div",{className:"studio-nav",style:{width:"".concat(rt-1,"em")},onContextMenu:function(t){mt(t,F.name,(0,g.GG)("file",r.folder_path),!0,ct)}},n.createElement(v,{pre_path:y,list:f,click:lt,handleContextMenu:mt,fatherNowToggleExpansion:ct})),n.createElement("div",{className:"studio__divider",ref:J,onPointerDown:function(){tt(!0),Q.current.addEventListener("pointermove",pt)},onPointerUp:yt}),Z&&n.createElement("div",{className:"shell__overlay",onPointerUp:yt}),n.createElement("div",{className:"studio-editor",key:F.path},F.name&&n.createElement(G,{name:F.name,on_change:function(){R||K(!0)}}))))}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|