filecat 3.1.2 → 3.3.3

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
1
  /*! For license information please see 445.bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[445],{7445:(t,e,r)=>{r.r(e),r.d(e,{default:()=>W});var n=r(6540),o=r(5725),a=r(447),i=r(5997),c=r(7481),u=r(3033),l=r(6007),f=r(3459),s=r(2726),h=r(3413),p=r.n(h),y=r(2389),d=r(7952),m=r(2869),v=r(7444),g=r(6417),b=r(2042);function w(t){return w="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},w(t)}function E(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||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(){x=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 f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var k=b.prototype=v.prototype=Object.create(E);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(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){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 _(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=j(c,n);if(u){if(u===m)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=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(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,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;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,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(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(w(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,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,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(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=T,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(P),!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,m):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),m},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),P(r),m}},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;P(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),m}},e}function S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=O(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(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 k(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){L(a,n,o,i,c,"next",t)}function c(t){L(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)||O(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 O(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}function _(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 j(t){var e=(0,y.Bd)().t,r=A((0,n.useState)([]),2),h=r[0],w=r[1],L=A((0,n.useState)([]),2),O=L[0],_=L[1],j=A((0,n.useState)(""),2),I=j[0],P=j[1],C=A((0,n.useState)(""),2),T=C[0],N=C[1],F=A((0,n.useState)(!1),2),G=F[0],H=F[1],Z=A((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=A((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){k(x().mark((function t(){var e,r,n,o,a,i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/dnspod");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=S(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),_(o),r.account&&(P(r.account.id),N(r.account.token)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=k(x().mark((function t(){var e,r,n,o,a,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!G||I&&T){t.next=3;break}return new(p())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(E(h),E(O));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={id:I,token:T},e.isOpen=G,e.ddnsType=s.E2.dnspod,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=k(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=k(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},O.length>0&&O.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){P(t)}}),n.createElement(u.Sm,{placeholder:"TOKEN",value:T,handleInputChange:function(t){N(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:G,onchange:function(){H(!G)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!G,onchange:function(){H(!G)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return I="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},I(t)}function P(t){return function(t){if(Array.isArray(t))return Z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||H(t)||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 C(){C=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 f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:A(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==I(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){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 A(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===m)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=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)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")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;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,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(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(I(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,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,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(S),l(S,u,"Generator"),l(S,i,(function(){return this})),l(S,"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(j),!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,m):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),m},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),j(r),m}},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;j(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),m}},e}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function N(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 F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){N(a,n,o,i,c,"next",t)}function c(t){N(a,n,o,i,c,"throw",t)}i(void 0)}))}}function G(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)||H(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 H(t,e){if(t){if("string"==typeof t)return Z(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)?Z(t,e):void 0}}function Z(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 U(t){var e=(0,y.Bd)().t,r=G((0,n.useState)([]),2),h=r[0],w=r[1],E=G((0,n.useState)([]),2),x=E[0],S=E[1],L=G((0,n.useState)(""),2),k=L[0],A=L[1],O=G((0,n.useState)(""),2),_=O[0],j=O[1],I=G((0,n.useState)(!1),2),N=I[0],H=I[1],Z=G((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=G((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){F(C().mark((function t(){var e,r,n,o,a,i,c;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/tx");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=T(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),S(o),r.account&&(A(r.account.secretid),j(r.account.secretkey)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=F(C().mark((function t(){var e,r,n,o,a,i;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!N||k&&_){t.next=3;break}return new(p())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(P(h),P(x));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={secretid:k,secretkey:_},e.isOpen=N,e.ddnsType=s.E2.tengxun,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=F(C().mark((function t(e){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=F(C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},x.length>0&&x.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"SecretId",value:k,handleInputChange:function(t){A(t)}}),n.createElement(u.Sm,{placeholder:"SecretKey",value:_,handleInputChange:function(t){j(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:N,onchange:function(){H(!N)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!N,onchange:function(){H(!N)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function W(){var t=(0,y.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return n.createElement(o.W1,{optionList:e},n.createElement(j,null),n.createElement(U,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>i,X:()=>a});var n=r(6540);function o(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 a(t){var e,r,a,i=(r=n.useState([]),a=2,function(t){if(Array.isArray(t))return t}(r)||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}}(r,a)||function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(r,a)||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.")}()),c=i[0],u=i[1];return(0,n.useEffect)((function(){t.children?u(Array.isArray(t.children)?t.children:[t.children]):u(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,c.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===c.length-1?"small":""},e)})))}))))}function i(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}}}]);
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[445],{7445:(t,e,r)=>{r.r(e),r.d(e,{default:()=>W});var n=r(6540),o=r(5725),a=r(447),i=r(5997),c=r(7481),u=r(3033),l=r(6007),f=r(3459),s=r(2726),h=r(3413),p=r.n(h),y=r(2389),d=r(7952),m=r(7567),v=r(7444),g=r(6417),b=r(2042);function w(t){return w="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},w(t)}function E(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||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(){x=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 f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var k=b.prototype=v.prototype=Object.create(E);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(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){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 _(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=j(c,n);if(u){if(u===m)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=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(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,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;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,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(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(w(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,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,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(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=T,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(P),!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,m):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),m},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),P(r),m}},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;P(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),m}},e}function S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=O(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(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 k(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){L(a,n,o,i,c,"next",t)}function c(t){L(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)||O(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 O(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}function _(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 j(t){var e=(0,y.Bd)().t,r=A((0,n.useState)([]),2),h=r[0],w=r[1],L=A((0,n.useState)([]),2),O=L[0],_=L[1],j=A((0,n.useState)(""),2),I=j[0],P=j[1],C=A((0,n.useState)(""),2),T=C[0],N=C[1],F=A((0,n.useState)(!1),2),G=F[0],H=F[1],Z=A((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=A((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){k(x().mark((function t(){var e,r,n,o,a,i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/dnspod");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=S(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),_(o),r.account&&(P(r.account.id),N(r.account.token)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=k(x().mark((function t(){var e,r,n,o,a,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!G||I&&T){t.next=3;break}return new(p())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(E(h),E(O));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={id:I,token:T},e.isOpen=G,e.ddnsType=s.E2.dnspod,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=k(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=k(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},O.length>0&&O.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){P(t)}}),n.createElement(u.Sm,{placeholder:"TOKEN",value:T,handleInputChange:function(t){N(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:G,onchange:function(){H(!G)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!G,onchange:function(){H(!G)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return I="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},I(t)}function P(t){return function(t){if(Array.isArray(t))return Z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||H(t)||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 C(){C=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 f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:A(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==I(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){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 A(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===m)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=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)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")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;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,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(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(I(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,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,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(S),l(S,u,"Generator"),l(S,i,(function(){return this})),l(S,"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(j),!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,m):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),m},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),j(r),m}},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;j(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),m}},e}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function N(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 F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){N(a,n,o,i,c,"next",t)}function c(t){N(a,n,o,i,c,"throw",t)}i(void 0)}))}}function G(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)||H(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 H(t,e){if(t){if("string"==typeof t)return Z(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)?Z(t,e):void 0}}function Z(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 U(t){var e=(0,y.Bd)().t,r=G((0,n.useState)([]),2),h=r[0],w=r[1],E=G((0,n.useState)([]),2),x=E[0],S=E[1],L=G((0,n.useState)(""),2),k=L[0],A=L[1],O=G((0,n.useState)(""),2),_=O[0],j=O[1],I=G((0,n.useState)(!1),2),N=I[0],H=I[1],Z=G((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=G((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){F(C().mark((function t(){var e,r,n,o,a,i,c;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/tx");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=T(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),S(o),r.account&&(A(r.account.secretid),j(r.account.secretkey)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=F(C().mark((function t(){var e,r,n,o,a,i;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!N||k&&_){t.next=3;break}return new(p())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(P(h),P(x));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={secretid:k,secretkey:_},e.isOpen=N,e.ddnsType=s.E2.tengxun,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=F(C().mark((function t(e){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=F(C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},x.length>0&&x.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"SecretId",value:k,handleInputChange:function(t){A(t)}}),n.createElement(u.Sm,{placeholder:"SecretKey",value:_,handleInputChange:function(t){j(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:N,onchange:function(){H(!N)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!N,onchange:function(){H(!N)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function W(){var t=(0,y.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return n.createElement(o.W1,{optionList:e},n.createElement(j,null),n.createElement(U,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>i,X:()=>a});var n=r(6540);function o(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 a(t){var e,r,a,i=(r=n.useState([]),a=2,function(t){if(Array.isArray(t))return t}(r)||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}}(r,a)||function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(r,a)||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.")}()),c=i[0],u=i[1];return(0,n.useEffect)((function(){t.children?u(Array.isArray(t.children)?t.children:[t.children]):u(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,c.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===c.length-1?"small":""},e)})))}))))}function i(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 450.bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[450],{5726:(t,e,r)=>{function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 a,l=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){c=!0,a=t},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw a}}}}function o(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 i(t){return new Promise((function(e){var r=0,o=[];if(void 0!==t.items){var i,a=n(t.items);try{for(a.s();!(i=a.n()).done;){var l=i.value;"file"===l.kind&&"function"==typeof l.webkitGetAsEntry&&c(l.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function c(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)r++,t.file((function(t){r--,t.fullPath="".concat(n).concat(t.name),o.push(t),0===r&&e(o)}));else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(n).concat(t.name),name:t.name};o.push(i),u(t.createReader(),"".concat(n).concat(t.name))}}function u(t,i){r++,t.readEntries((function(a){if(r--,a.length>0){var l,f=n(a);try{for(f.s();!(l=f.n()).done;)c(l.value,"".concat(i,"/"))}catch(t){f.e(t)}finally{f.f()}u(t,"".concat(i,"/"))}0===r&&e(o)}))}}))}function a(t){return new Promise((function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(null),console.log("脚本加载完成")},n.onerror=function(){r(r),console.error("脚本加载失败")},document.body.appendChild(n)}))}r.d(e,{J:()=>a,T:()=>i})},7481:(t,e,r)=>{r.d(e,{S:()=>a,X:()=>i});var n=r(6540);function o(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 i(t){var e,r,i,a=(r=n.useState([]),i=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,i)||function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(r,i)||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.")}()),l=a[0],c=a[1];return(0,n.useEffect)((function(){t.children?c(Array.isArray(t.children)?t.children:[t.children]):c(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,l.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===l.length-1?"small":""},e)})))}))))}function a(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},7704:(t,e,r)=>{r.d(e,{$:()=>s});var n=r(6540),o=r(2543),i=r.n(o),a=r(3616),l=(r(9448),r(505)),c=r(2042);function u(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,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(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)?f(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 f(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 s(t){var e=u((0,n.useState)(25),2),r=e[0],o=e[1],f=(0,n.useRef)(null),s=(0,n.useCallback)(new a.FitAddon,[]),h=(0,n.useRef)(null),y=(0,n.useRef)(null),m=u((0,n.useState)(!1),2),d=m[0],p=m[1],v=(0,n.useCallback)(i().throttle((function(t){s.fit();var e=parseFloat(getComputedStyle(h.current).fontSize),r=window.innerHeight/e-4,n=(window.innerHeight-t.clientY)/e,i=2.25+f.current.offsetHeight/e;n<=r&&n>=i&&o(parseFloat(n.toFixed(2)))}),32),[]);(0,n.useEffect)((function(){t.terminal&&(t.terminal.open(y.current),t.terminal.loadAddon(s),s.fit(),t.init&&t.init(t.terminal.rows,t.terminal.cols),t.terminal.attachCustomKeyEventHandler((function(e){if(e.ctrlKey&&"c"===e.key){var r=t.terminal.getSelection();if(r)return(0,l.l)(r),(0,c.LW)("已复制"),e.preventDefault(),t.terminal.focus(),!1}else if("keydown"===e.type&&"v"===e.key&&e.ctrlKey)return!1;return!0})))}),[t.terminal]),(0,n.useEffect)((function(){return function(){t.terminal&&t.terminal.dispose()}}),[]);var g=function(){p(!1),h.current.removeEventListener("pointermove",v)};if(t.show)return t.get_simple?n.createElement("div",{className:"pty",style:{height:"100%"},ref:y}):n.createElement("div",{className:"shell",style:{height:"".concat(r,"em"),display:"".concat(t.file_shell_hidden?"none":"block")},ref:h},n.createElement("div",{className:"shell__divider",ref:f,onPointerDown:function(){p(!0),h.current.addEventListener("pointermove",v)},onPointerUp:g}),n.createElement("div",{className:"pty",style:{height:"".concat(r-1,"em")},ref:y}),d&&n.createElement("div",{className:"shell__overlay",onPointerUp:g}))}},8844:(t,e,r)=>{r.d(e,{B:()=>m});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),l=r(6417),c=r(6007);function u(t){return u="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},u(t)}function f(){f=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",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),l=new P(n||[]);return o(a,"_invoke",{value:O(t,r,l)}),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 m="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function b(){}function w(){}function E(){}var S={};s(S,a,(function(){return this}));var x=Object.getPrototypeOf,A=x&&x(x(C([])));A&&A!==r&&n.call(A,a)&&(S=A);var L=E.prototype=b.prototype=Object.create(S);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,l){var c=y(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"==u(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,l)}))}l(c.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=m;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var l=n.delegate;if(l){var c=_(l,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=y(e,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function _(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,_(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 I(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 C(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(u(e)+" is not iterable")}return w.prototype=E,o(L,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=s(E,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,s(t,c,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(j.prototype),s(j.prototype,l,(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()}))},k(L),s(L,c,"Generator"),s(L,a,(function(){return this})),s(L,"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=C,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(I),!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 l.type="throw",l.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],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(null,arguments)}function h(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}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 m(t){var e,r,u,m=(r=(0,i.L4)(l.A.selectedFileList),u=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,u)||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}}(r,u)||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.")}()),d=m[0];function p(){var e;return e=f().mark((function e(r){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.click&&t.click(r,t.name);case 1:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){h(i,n,o,a,l,"next",t)}function l(t){h(i,n,o,a,l,"throw",t)}a(void 0)}))},p.apply(this,arguments)}return m[1],n.createElement("div",s({},t.extraAttr,{onClick:function(){!function(t){p.apply(this,arguments)}(t.index)},className:"item",role:"button","data-type":t.isLink?"invalid_link":t.type,"data-dir":!t.type||t.type===o.Iw.folder,"aria-selected":null!==(0,a.kW)(d,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"}}),void 0===t.icon&&n.createElement("div",null,t.type===o.Iw.image&&null!=t.path?n.createElement("img",{loading:"lazy",src:c.$M.getDownloadUrl(t.path),alt:t.name}):n.createElement("i",{className:"material-icons"})),void 0!==t.icon&&n.createElement("div",{className:"rotating-div"},n.createElement("span",{className:"material-icons"},t.icon)),n.createElement("div",null,n.createElement("p",{className:"name"},t.name),t.size?n.createElement("p",null,t.size):n.createElement("p",null,"—"),n.createElement("p",null,t.mtime)),t.children)}}}]);
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[450],{5726:(t,e,r)=>{function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 a,l=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){c=!0,a=t},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw a}}}}function o(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 i(t){return new Promise((function(e){var r=0,o=[];if(void 0!==t.items){var i,a=n(t.items);try{for(a.s();!(i=a.n()).done;){var l=i.value;"file"===l.kind&&"function"==typeof l.webkitGetAsEntry&&c(l.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function c(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)r++,t.file((function(t){r--,t.fullPath="".concat(n).concat(t.name),o.push(t),0===r&&e(o)}));else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(n).concat(t.name),name:t.name};o.push(i),u(t.createReader(),"".concat(n).concat(t.name))}}function u(t,i){r++,t.readEntries((function(a){if(r--,a.length>0){var l,f=n(a);try{for(f.s();!(l=f.n()).done;)c(l.value,"".concat(i,"/"))}catch(t){f.e(t)}finally{f.f()}u(t,"".concat(i,"/"))}0===r&&e(o)}))}}))}function a(t){return new Promise((function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(null),console.log("脚本加载完成")},n.onerror=function(){r(r),console.error("脚本加载失败")},document.body.appendChild(n)}))}r.d(e,{J:()=>a,T:()=>i})},7481:(t,e,r)=>{r.d(e,{S:()=>a,X:()=>i});var n=r(6540);function o(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 i(t){var e,r,i,a=(r=n.useState([]),i=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,i)||function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(r,i)||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.")}()),l=a[0],c=a[1];return(0,n.useEffect)((function(){t.children?c(Array.isArray(t.children)?t.children:[t.children]):c(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,l.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===l.length-1?"small":""},e)})))}))))}function a(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},7704:(t,e,r)=>{r.d(e,{$:()=>s});var n=r(6540),o=r(2543),i=r.n(o),a=r(3616),l=(r(9448),r(505)),c=r(2042);function u(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,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(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)?f(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 f(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 s(t){var e=u((0,n.useState)(25),2),r=e[0],o=e[1],f=(0,n.useRef)(null),s=(0,n.useCallback)(new a.FitAddon,[]),h=(0,n.useRef)(null),y=(0,n.useRef)(null),d=u((0,n.useState)(!1),2),m=d[0],p=d[1],v=(0,n.useCallback)(i().throttle((function(t){s.fit();var e=parseFloat(getComputedStyle(h.current).fontSize),r=window.innerHeight/e-4,n=(window.innerHeight-t.clientY)/e,i=2.25+f.current.offsetHeight/e;n<=r&&n>=i&&o(parseFloat(n.toFixed(2)))}),32),[]);(0,n.useEffect)((function(){t.terminal&&(t.terminal.open(y.current),t.terminal.loadAddon(s),s.fit(),t.init&&t.init(t.terminal.rows,t.terminal.cols),t.terminal.attachCustomKeyEventHandler((function(e){if(e.ctrlKey&&"c"===e.key){var r=t.terminal.getSelection();if(r)return(0,l.l)(r),(0,c.LW)("已复制"),e.preventDefault(),t.terminal.focus(),!1}else if("keydown"===e.type&&"v"===e.key&&e.ctrlKey)return!1;return!0})))}),[t.terminal]),(0,n.useEffect)((function(){return function(){t.terminal&&t.terminal.dispose()}}),[]);var g=function(){p(!1),h.current.removeEventListener("pointermove",v)};if(t.show)return t.get_simple?n.createElement("div",{className:"pty",style:{height:"100%"},ref:y}):n.createElement("div",{className:"shell",style:{height:"".concat(r,"em"),display:"".concat(t.file_shell_hidden?"none":"block")},ref:h},n.createElement("div",{className:"shell__divider",ref:f,onPointerDown:function(){p(!0),h.current.addEventListener("pointermove",v)},onPointerUp:g}),n.createElement("div",{className:"pty",style:{height:"".concat(r-1,"em")},ref:y}),m&&n.createElement("div",{className:"shell__overlay",onPointerUp:g}))}},8844:(t,e,r)=>{r.d(e,{B:()=>v});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),l=r(6417),c=r(6007);function u(t){return u="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},u(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(null,arguments)}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",l=i.asyncIterator||"@@asyncIterator",c=i.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 i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),l=new P(n||[]);return o(a,"_invoke",{value:O(t,r,l)}),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 d="suspendedStart",m="suspendedYield",p="executing",v="completed",g={};function b(){}function w(){}function E(){}var S={};f(S,a,(function(){return this}));var x=Object.getPrototypeOf,A=x&&x(x(F([])));A&&A!==r&&n.call(A,a)&&(S=A);var L=E.prototype=b.prototype=Object.create(S);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,l){var c=y(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"==u(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,l)}))}l(c.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=d;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var l=n.delegate;if(l){var c=_(l,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=y(e,r,n);if("normal"===u.type){if(o=n.done?v:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function _(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,_(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 I(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function F(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(u(e)+" is not iterable")}return w.prototype=E,o(L,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,f(t,c,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(j.prototype),f(j.prototype,l,(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()}))},k(L),f(L,c,"Generator"),f(L,a,(function(){return this})),f(L,"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=F,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(N),!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 l.type="throw",l.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],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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),N(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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}function y(t){return 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,l,"next",t)}function l(t){h(i,n,o,a,l,"throw",t)}a(void 0)}))}}function d(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,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||m(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 m(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}}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}function v(t){var e,r=d((0,i.L4)(l.A.selectedFileList),2),u=r[0],h=r[1],v=d((0,i.L4)(l.A.nowFileList),2),g=v[0],b=(v[1],d((0,i.L4)(l.A.confirm),2)),w=(b[0],b[1]);function E(){return(E=y(s().mark((function e(r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.click&&t.click(r,t.name);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return n.createElement("div",f({},t.extraAttr,{onClick:function(){!function(t){E.apply(this,arguments)}(t.index)},className:"item",role:"button","data-type":t.isLink?"invalid_link":t.type,"data-dir":!t.type||t.type===o.Iw.folder,"aria-selected":null!==(0,a.kW)(u,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"},onDragStart:function(e){return n=t.index,void(u.find((function(t){return t===n}))||h([].concat((r=u,function(t){if(Array.isArray(t))return p(t)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||m(r)||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.")}()),[n])));var r,n},onDrop:function(e){return r=t.index,void(g.folders.length<=r||w({open:!0,title:"确定将文件移动并覆盖到".concat(g.folders[r].name,"吗?"),handle:(n=y(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.draggable_handle(g.folders[r].name);case 2:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})}));var r,n},draggable:void 0!==t.draggable_handle}),void 0===t.icon&&n.createElement("div",null,t.type===o.Iw.image&&null!=t.path?n.createElement("img",{loading:"lazy",src:c.$M.getDownloadUrl(t.path),alt:t.name}):n.createElement("i",{className:"material-icons"})),void 0!==t.icon&&n.createElement("div",{className:"rotating-div"},n.createElement("span",{className:"material-icons"},t.icon)),n.createElement("div",null,n.createElement("p",{className:"name"},t.name),t.size?n.createElement("p",null,t.size):n.createElement("p",null,"—"),n.createElement("p",null,t.mtime)),t.children)}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 523.bundle.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[523],{447:(e,t,n)=>{n.d(t,{WA:()=>h,ZI:()=>p,Zp:()=>s,fq:()=>v,gz:()=>m,uF:()=>f,xP:()=>d});var r=n(6540),o=n(3413),a=n.n(o),i=n(505);function c(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 l=function(e){return e[e.common=0]="common",e[e.full=1]="full",e}(l||{});function u(e,t){var n=t===l.common?"card-content":t===l.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},e.self_title?e.self_title:r.createElement("h2",null,e.title),r.createElement("div",{className:"not-select-div"},e.titleCom&&e.titleCom)),r.createElement("div",{className:n},e.children),r.createElement("div",{className:"card-action card-action-bottom-right"},e.rightBottomCom))}function s(e){return u(e,l.common)}function f(e){return u(e,l.full)}function d(e){var t,n,o=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip",ref:o,onClick:function(){var t;(0,i.l)(null!==(t=e.context)&&void 0!==t?t:e.children),new(a())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=e.context)&&void 0!==n?n:e.children))}function h(e){var t,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip"},null!==(n=e.context)&&void 0!==n?n:e.children))}function p(e){var t,n;return r.createElement("div",{className:"card floating",onKeyPress:function(t){"Enter"===t.key&&e.confirm_enter&&e.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,e.title)),r.createElement("div",{className:"card-content"},e.context&&e.context.map((function(e,t){return r.createElement("div",{key:t},e)}))),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:e.cancel},null!==(t=e.cancel_t)&&void 0!==t?t:"cancel"),r.createElement("button",{className:"button button--flat",onClick:e.confirm},null!==(n=e.confirm_t)&&void 0!==n?n:"confirm")))}function m(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var v=function(e){var t,n,o=(t=(0,r.useState)("var(--iconTertiary)"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}(t,n)||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.")}()),a=o[0],i=o[1];(0,r.useEffect)((function(){void 0===e.ok?void 0===e.success?void 0!==e.running&&i("var(--icon-yellow)"):!0===e.success?i("var(--icon-green)"):!1===e.success&&i("var(--icon-red)"):i(e.ok?"var(--icon-green)":"var(--iconTertiary)")}),[e]);var l={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:a,display:"inline-block"};return r.createElement("div",{style:l})}},505:(e,t,n)=>{function r(e){var t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}n.d(t,{l:()=>r})},3496:(e,t,n)=>{n.d(t,{s:()=>r});var r=function(e){return e.setting_sys_option_status_save="sys_option/status/save",e.setting_customer_router="customer_router",e.setting_customer_router_save="customer_router/save",e.setting_customer_workflow_router="customer_router/workflow",e.setting_customer_workflow_router_save="customer_router/workflow/save",e.user_save_user_file_list_show_type="save_user_file_list_show_type",e}({})},4777:(e,t,n)=>{function r(e){return r="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},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{Gd:()=>l,U$:()=>s,aM:()=>c,jk:()=>u});var c=function(e){return e[e.close=0]="close",e[e.length=1]="length",e[e.forver=2]="forver",e}({}),l=a((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)})),u=function(e){return e.ffmpeg="ffmpeg",e.smartmontools="smartmontools",e.ntfs_3g="ntfs_3g",e}({}),s=function(e){return e[e.auth=0]="auth",e[e.cmd=1]="cmd",e[e.cyc=2]="cyc",e}({})},7481:(e,t,n)=>{n.d(t,{S:()=>i,X:()=>a});var r=n(6540);function o(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 a(e){var t,n,a,i=(n=r.useState([]),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(n,a)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(n,a)||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.")}()),c=i[0],l=i[1];return(0,r.useEffect)((function(){e.children?l(Array.isArray(e.children)?e.children:[e.children]):l(e.rows)}),[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map((function(e,t){return r.createElement("th",{key:t},e)})))),r.createElement("tbody",null,c.map((function(t,n){return r.createElement("tr",{key:n},t.map((function(t,n){var o;return r.createElement("td",{style:{width:null!==(o=e.width)&&void 0!==o?o:"auto"},key:n,className:n===c.length-1?"small":""},t)})))}))))}function i(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map((function(e,t){return r.createElement("div",{key:t},e)})))}},8523:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Te});var r=n(6540),o=n(5725),a=n(3430),i=n(3413),c=n.n(i),l=n(6007),u=n(3459),s=n(447),f=n(5997),d=n(3033),h=n(7481),p=n(2389);function m(e){return m="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},m(e)}function v(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(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 y(){y=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),c=new I(r||[]);return o(i,"_invoke",{value:A(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",_={};function g(){}function b(){}function w(){}var E={};u(E,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==n&&r.call(k,i)&&(E=k);var S=w.prototype=g.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==m(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=O(c,r);if(l){if(l===_)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?v:h,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,_;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,_):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(m(t)+" is not iterable")}return b.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=u(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},L(C.prototype),u(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new C(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(S),u(S,l,"Generator"),u(S,i,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(V),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),V(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),_}},t}function _(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){_(a,r,o,i,c,"next",e)}function c(e){_(a,r,o,i,c,"throw",e)}i(void 0)}))}}function b(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(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 E(e){var t,n,a=(0,p.Bd)().t,i=(t=(0,r.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||b(t,n)||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.")}()),c=i[0],l=i[1],u=function(){var t=g(y().mark((function t(){var n;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.getItems){t.next=5;break}return t.next=3,e.getItems();case 3:n=t.sent,l(n);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)((function(){u()}),[]);var m=function(){var t=g(y().mark((function t(){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save){t.next=3;break}return t.next=3,e.save(c);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e.title),e.info_click&&r.createElement(f.rA,{icon:"info",onClick:function(){e.info_click()},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:a("添加"),onClick:function(){for(var t=[],n=0;n<e.headers.length-1;n++)t.push("");l([t].concat(v(c)))}}),r.createElement(f.rA,{icon:"save",title:a("保存"),onClick:m}))},r.createElement(h.X,{headers:e.headers,rows:c.map((function(t,n){for(var o=[],i=function(e){o.push(r.createElement(d.Sm,{value:t[e],handleInputChange:function(n){t[e]=n,l(v(c))},no_border:!0}))},u=0;u<e.headers.length;u++)i(u);return o.push(r.createElement(f.rA,{icon:"delete",title:a("删除"),onClick:function(){return function(e){c.splice(e,1),l(v(c))}(n)}})),o})),width:"10rem"})))}var x=n(7444),k=n(6417),S=n(8247),L=n(2042);function C(e){return C="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},C(e)}function A(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||N(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 O(){O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new I(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(N([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==C(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=A(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function A(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,A(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(C(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(V),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),V(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function j(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){j(a,r,o,i,c,"next",e)}function c(e){j(a,r,o,i,c,"throw",e)}i(void 0)}))}}function I(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||N(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 N(e,t){if(e){if("string"==typeof e)return P(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)?P(e,t):void 0}}function P(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 T(){var e=(0,p.Bd)().t,t=I((0,x.L4)(k.A.prompt_card),2),n=(t[0],t[1]),a=[e("路由"),e("auth"),e("备注")],i=I((0,x.L4)(k.A.editorSetting),2),m=(i[0],i[1]),v=I((0,r.useState)([]),2),y=v[0],_=v[1],g=function(){var e=V(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("api/customer_router");case 2:(t=e.sent).code===u.m.Sucess&&_(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){g()}),[]);var b=function(){var e=V(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("api/customer_router/save",y);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=V(O().mark((function e(t){var n;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.router){e.next=3;break}return(0,L.zN)("路由不能为空"),e.abrupt("return");case 3:return e.next=5,l.XO.get("jscode/".concat(encodeURIComponent(t.router)));case 5:n=e.sent,m({model:"ace/mode/javascript",open:!0,fileName:t.router,save:function(){var e=V(O().mark((function e(n){var r;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={context:n,router:t.router},e.next=3,l.XO.post("jscode/save",r);case 3:0===e.sent.code&&(S.xK.set_value_temp(""),m({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),S.xK.set_value_temp(n.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("自定义api路由"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){var e;e=r.createElement("div",null,'需要以 "/api" 开头的路由。'),n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:e("添加"),onClick:function(){_([{note:"",needAuth:!1,router:""}].concat(A(y)))}}),r.createElement(f.rA,{icon:"save",title:e("保存"),onClick:b}))},r.createElement(h.X,{headers:a,rows:y.map((function(t,n){var o=[r.createElement(d.Sm,{value:t.router,handleInputChange:function(e){t.router=e,_(A(y))},no_border:!0}),r.createElement(d.l6,{defaultValue:t.needAuth,onChange:function(e){t.needAuth="true"===e,_(A(y))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:t.note,handleInputChange:function(e){t.note=e,_(A(y))},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){y.splice(e,1),_(A(y))}(n)}}),r.createElement(f.rA,{icon:"edit",title:e("编辑"),onClick:function(){return w(t)}}))];return o})),width:"10rem"})))}var F=n(3496);function G(e){return G="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},G(e)}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=z(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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function M(){M=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(V([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==G(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(G(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function B(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){B(a,r,o,i,c,"next",e)}function c(e){B(a,r,o,i,c,"throw",e)}i(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||z(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 z(e,t){if(e){if("string"==typeof e)return Y(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)?Y(e,t):void 0}}function Y(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 Z(){var e=(0,p.Bd)().t,t=W((0,x.L4)(k.A.prompt_card),2),n=(t[0],t[1]),a=W((0,x.L4)(k.A.router_jump),2),i=a[0],s=a[1],f=[e("路由"),e("路径"),e("备注")],d=[e("路由"),e("文件路径"),"token","user id",e("备注")],h=function(){var e=U(M().mark((function e(t){return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(F.s.setting_customer_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=U(M().mark((function e(){var t,n,r,o;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(F.s.setting_customer_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=6;break}if(null!=i&&i.page_self_router_api_data){n=X(t.data);try{for(n.s();!(r=n.n()).done;)r.value[1]===(null==i?void 0:i.page_self_router_api_data[1])&&(0,L.N9)("已经存在的页面资源路由配置目录设置")}catch(e){n.e(e)}finally{n.f()}o={},Object.assign(o,null==i?void 0:i.page_self_router_api_data),t.data=[o].concat(function(e){if(Array.isArray(e))return Y(e)}(a=t.data)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||z(a)||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.")}()),s({})}return e.abrupt("return",t.data);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}var a}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(E,{title:e("页面资源路由"),headers:f,getItems:m,save:h,info_click:function(){var e=r.createElement("div",null,'需要以 "/api" 开头的路由,会自动识别地址,将页面转到对应结果。路径支持文件路径(如果是文件夹路径的最后最后一个名字将会成为资源实际地址,整个目录将会变成一个http目录),http地址。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}}),r.createElement(E,{title:e("workflow触发路由"),headers:d,getItems:U(M().mark((function e(){var t;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(F.s.setting_customer_workflow_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=5;break}return e.abrupt("return",t.data);case 5:return e.abrupt("return",[]);case 6:case"end":return e.stop()}}),e)}))),save:function(){var e=U(M().mark((function e(t){return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(F.s.setting_customer_workflow_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),info_click:function(){var e=r.createElement("div",null,'需要以 "/api" 开头的路由,文件路径是有效的workflow路径。token也可以是文件绝对路径,请求的时候请设置同样的authorization请求头字段。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}})),r.createElement(o.VP,null,r.createElement(T,null)))}var $=function(e){return e.username="username",e.password="password",e.password_hash="password_hash",e.navindex_remote_ssh_key="navindex_remote_ssh_key",e.user_id_name_mapping="user_id_name_mapping",e.user_id_info_data_mapping="user_id_info_data_mapping",e.user_unique_id_num="user_unique_id_num",e.role_unique_id_num="role_unique_id_num",e.sys_all_roles="sys_all_roles",e.ddns_http_url_key="ddns_http_url_key",e.ddns_tx_key="tengxun_ddns_key",e.ddns_dnspod_key="ddns_dnspod",e.ddns_ali_key="ali_ddns_key",e.navindex_net_key_list="navindex_net_key_list",e.navindex_wol_key="navindex_wol_key",e.customer_router_key="customer_router_key",e.customer_workflow_router_key="customer_workflow_router_key",e.customer_api_router_key="customer_api_router_key",e.token_setting="token_setting",e.files_pre_mulu_key="files_pre_mulu_key",e.sys_software="sys_software",e.protection_directory="sys_protection_directory",e.dir_upload_max_num="dir_upload_max_num",e.self_auth_jscode="self_auth_jscode",e.navindex_video_key="navindex_video_tag_key",e.systemd_key="systemd_key",e.vir_server_data_key="vir_server_net_data_key",e.vir_client_data_key="vir_client_net_data_key",e.vir_data_client_hash_key="vir_data_client_hash_key",e.vir_data_server_hash_key="vir_data_server_hash_key",e.language="user_language",e.navindex_rdp_key="navindex_rdp_tag_key",e.navindex_key="navindex_key_list",e.http_tag_key="http_tag_key",e.self_shell_cmd_check_open_status="self_shell_cmd_check_open_status",e.self_shell_cmd_jscode="self_shell_cmd_jscode",e.extra_env_path_list_key="extra_env_path_list_key",e.cmd_use_pty_key="cmd_use_pty_key",e.recycle_bin_key="recycle_bin_key",e.recycle_bin_status="recycle_bin_status",e}({}).self_auth_jscode,H=n(4777),K=n(7952);function q(e){return q="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},q(e)}function R(){R=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(V([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==q(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(q(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function D(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function J(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){D(a,r,o,i,c,"next",e)}function c(e){D(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Q(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(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 ee(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 te(){var e=Q((0,r.useState)(""),2),t=e[0],n=e[1],i=Q((0,r.useState)(""),2),c=i[0],m=i[1],v=Q((0,r.useState)(!1),2),y=v[0],_=v[1],g=Q((0,r.useState)(!1),2),b=g[0],w=g[1],E=Q((0,r.useState)(!1),2),C=E[0],A=E[1],O=Q((0,r.useState)(""),2),j=O[0],V=O[1],I=Q((0,x.L4)(k.A.prompt_card),2),N=(I[0],I[1]),P=Q((0,x.L4)(k.A.editorSetting),2),T=(P[0],P[1]),G=Q((0,r.useState)(H.aM.close),2),X=G[0],M=G[1],B=Q((0,r.useState)(void 0),2),U=B[0],W=B[1],z=(0,p.Bd)(),Y=z.t,Z=z.i18n,q=Q((0,x.L4)(k.A.user_base_info),2),D=q[0],ee=(q[1],(0,S.MH)().check_user_auth,Q((0,r.useState)(""),2)),te=ee[0],ne=ee[1],re=function(){var e=J(R().mark((function e(){var n;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&c){e.next=3;break}return(0,L.zN)("账号密码不能为空"),e.abrupt("return");case 3:return(n=new a.tl).username=t,n.password=c,n.user_id=D.user_data.id,e.next=9,l.wm.post("updatePassword",n);case 9:e.sent.code===u.m.Sucess&&(0,L.LW)("修改成功");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=J(R().mark((function e(){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!C){e.next=4;break}if(j){e.next=4;break}return(0,L.zN)("目录不能为空"),e.abrupt("return");case 4:return e.next=6,l.XO.post(F.s.setting_sys_option_status_save,{type:H.U$.cyc,value:j,open:C});case 6:e.sent.code===u.m.Sucess&&(0,L.LW)("修改成功");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){var e,t=function(){var e=J(R().mark((function e(){var t,n,r;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("sys_option/status");case 2:return(t=e.sent).code===u.m.Sucess&&(_(t.data.self_auth_open),w(t.data.shell_cmd_check_open),A(t.data.recycle_open),V(t.data.recycle_dir)),e.next=6,l.XO.get("token");case 6:if((n=e.sent).code!==u.m.Sucess){e.next=13;break}if(r=n.data){e.next=11;break}return e.abrupt("return");case 11:r.length&&W(r.length),r.mode&&M(r.mode);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t(),ne(null==D||null===(e=D.user_data)||void 0===e?void 0:e.language)}),[]);var ae=function(){var e=J(R().mark((function e(){var t;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("self_auth_open/jscode");case 2:t=e.sent,T({model:"ace/mode/javascript",open:!0,fileName:"",save:function(){var e=J(R().mark((function e(t){var n;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={context:t,router:$},e.next=3,l.XO.post("jscode/save",n);case 3:0===e.sent.code&&(S.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),S.xK.set_value_temp(t.data);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=J(R().mark((function e(){var t;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("shell_cmd_check_open/jscode");case 2:t=e.sent,T({model:"ace/mode/javascript",open:!0,fileName:"",save:function(){var e=J(R().mark((function e(t){var n;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={context:t},e.next=3,l.XO.post("shell_cmd_check_open/jscode/save",n);case 3:0===e.sent.code&&(S.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),S.xK.set_value_temp(t.data);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=J(R().mark((function e(){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("self_auth_open/save",{open:y});case 2:e.sent.code===u.m.Sucess&&(0,L.LW)("修改成功");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=J(R().mark((function e(){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("shell_cmd_check_open/save",{open:b});case 2:e.sent.code===u.m.Sucess&&(0,L.LW)("修改成功");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=J(R().mark((function e(){var t;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new H.Gd).mode=X,H.aM.length!==t.mode||U||(0,L.zN)("秒数不能为空"),t.length=parseInt(U),e.next=6,l.XO.post("token/save",t);case 6:e.sent.code===u.m.Sucess&&(0,L.LW)("保存成功");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),se=function(){var e=J(R().mark((function e(){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z.changeLanguage(te),e.next=3,l.wm.post("language/save",{language:te});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=J(R().mark((function e(){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("token/clear");case 2:e.sent.code===u.m.Sucess&&(0,L.LW)("清理完成,重新登录");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(s.Zp,{title:Y("修改密码"),rightBottomCom:r.createElement(f.C3,{text:Y("确定修改"),clickFun:re})},r.createElement(d.Sm,{placeholder:Y("新账号"),value:t,handleInputChange:function(e){n(e)}}),r.createElement(d.Sm,{placeholder:Y("新密码"),value:c,handleInputChange:function(e){m(e)}})),r.createElement(s.Zp,{title:Y("自定义登录auth"),rightBottomCom:r.createElement(f.C3,{text:Y("保存"),clickFun:ce}),titleCom:r.createElement(f.rA,{icon:"edit",title:Y("代码修改"),onClick:ae})},r.createElement(d.l6,{value:y,onChange:function(e){_("true"===e)},options:[{title:Y("开启"),value:!0},{title:Y("关闭"),value:!1}]})),r.createElement(s.Zp,{title:Y("自定义shell命令校验"),rightBottomCom:r.createElement(f.C3,{text:Y("保存"),clickFun:le}),titleCom:r.createElement(f.rA,{icon:"edit",title:Y("代码修改"),onClick:ie})},r.createElement(d.l6,{value:b,onChange:function(e){w("true"===e)},options:[{title:Y("开启"),value:!0},{title:Y("关闭"),value:!1}]})))),r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,Y("文件回收站"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){N({open:!0,title:"信息",context_div:r.createElement("div",null,Y("格式:[被删除的文件所在父目录] 回收站目录 [; ...]"))})},title:"信息"})),rightBottomCom:r.createElement(f.C3,{text:Y("确定修改"),clickFun:oe})},r.createElement(d.Sm,{placeholder:Y("目录"),value:j,handleInputChange:function(e){V(e)}}),r.createElement(d.l6,{value:C,onChange:function(e){A("true"===e)},options:[{title:Y("开启"),value:!0},{title:Y("关闭"),value:!1}]})),r.createElement(s.Zp,{title:Y("语言"),rightBottomCom:r.createElement(f.C3,{text:Y("保存"),clickFun:se})},r.createElement(d.l6,{value:te,onChange:function(e){ne(e)},options:[{title:"English",value:"en"},{title:"中文",value:"zh"}]})),r.createElement(s.Zp,{title:Y("token过期时间"),rightBottomCom:r.createElement(h.S,{isFlex:!0,columns:[r.createElement(f.C3,{text:Y("清空token"),clickFun:fe}),r.createElement(f.C3,{text:Y("保存"),clickFun:ue})]})},r.createElement(h.S,{isFlex:!0,columns:[r.createElement(d.U6,{value:1,context:Y("关闭"),selected:X===H.aM.close,onchange:function(){M(H.aM.close)}}),r.createElement(d.U6,{value:1,context:Y("指定时间"),selected:X===H.aM.length,onchange:function(){M(H.aM.length)}}),r.createElement(d.U6,{value:1,context:Y("永不过期"),selected:X===H.aM.forver,onchange:function(){M(H.aM.forver)}})]}),X===H.aM.length&&r.createElement(d.Sm,{placeholder:Y("秒"),value:U,handleInputChange:function(e){W(e)}})))),r.createElement(K.A,{left_children:r.createElement("span",null," ",r.createElement("span",{className:"credits"},"version:".concat("3.3.3")),r.createElement("span",{className:"credits"},"系统运行于:",D.runing_time_length))}))}var ne=n(7523),re=n(4694);function oe(e){return oe="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},oe(e)}function ae(e){return function(e){if(Array.isArray(e))return fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||se(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 ie(){ie=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(V([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==oe(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(oe(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function ce(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function le(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ce(a,r,o,i,c,"next",e)}function c(e){ce(a,r,o,i,c,"throw",e)}i(void 0)}))}}function ue(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||se(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 se(e,t){if(e){if("string"==typeof e)return fe(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)?fe(e,t):void 0}}function fe(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 de(){var e=(0,p.Bd)(),t=e.t,n=(e.i18n,(0,r.useContext)(ne.F)),a=n.initUserInfo,i=n.reloadUserInfo,c=ue((0,r.useState)([]),2),m=c[0],v=c[1],y=ue((0,r.useState)([]),2),_=y[0],g=y[1],b=ue((0,x.L4)(k.A.prompt_card),2),w=(b[0],b[1]),E=ue((0,r.useState)([]),2),C=E[0],A=E[1],O=ue((0,r.useState)([]),2),j=O[0],V=O[1],I=ue((0,r.useState)([]),2),N=I[0],P=I[1],T=ue((0,r.useState)([]),2),F=T[0],G=T[1],X=ue((0,r.useState)(""),2),M=X[0],B=X[1],U=[t("编号"),t("路径"),t("是否默认"),t("备注")],W=[t("软件"),t("是否安装"),t("路径")],z=[t("编号"),t("路径"),t("备注")],Y=[t("编号"),t("路径"),t("备注")],Z=[t("编号"),t("路径"),t("单用户并发数量"),t("系统并发数量"),t("备注")],$=((0,S.MH)().check_user_auth,function(){var e=le(ie().mark((function e(){var t,n,r,o,a,i,c,s,f,d;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("filesSetting");case 2:return(t=e.sent).code===u.m.Sucess&&v(t.data),e.next=6,l.XO.get("outside/software/get");case 6:return(n=e.sent).code===u.m.Sucess&&g(n.data),e.next=10,l.XO.get("env/path/get");case 10:return(r=e.sent).code===u.m.Sucess&&G(r.data),e.next=14,l.XO.get("protection_dir");case 14:return(o=e.sent).code===u.m.Sucess&&A(null!==(a=o.data)&&void 0!==a?a:[]),e.next=18,l.XO.get("pty_cmd");case 18:return(i=e.sent).code===u.m.Sucess&&B(i.data),e.next=22,l.XO.get("protection_dir/sys");case 22:return(c=e.sent).code===u.m.Sucess&&V(null!==(s=c.data)&&void 0!==s?s:[]),e.next=26,l.XO.get("dir_upload_max_num");case 26:(f=e.sent).code===u.m.Sucess&&P(null!==(d=f.data)&&void 0!==d?d:[]);case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());(0,r.useEffect)((function(){$()}),[]);var K=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("pty_cmd/save",{str:M});case 2:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=le(ie().mark((function e(){var t;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0;t<m.length;t++)m[t].index=t;return e.next=3,l.XO.post("filesSetting/save",m);case 3:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),i());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("protection_dir/save",C);case 2:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("protection_dir/sys/save",j);case 2:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,re.di)(N,(function(e){return e.index})),e.next=3,l.XO.post("dir_upload_max_num/save",N);case 3:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),i());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("outside/software/save",_);case 2:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),a());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(e){var t;e===H.jk.ffmpeg?t=r.createElement("div",null,"视频转换,rtsp播放器等媒体功能都需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置"):e===H.jk.smartmontools?t=r.createElement("div",null,"磁盘检查需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置。"):e===H.jk.ntfs_3g?t=r.createElement("div",null,"如果在linux需要挂载ntfs的硬盘,需要这个软件支持。"):"保护目录"===e?t=r.createElement("div",null,"在删除的时候保护目录会拒绝删除。",r.createElement("ul",null,r.createElement("li",null,"可以使用 /* 来表达该目录下所有文件都禁止删除"),r.createElement("li",null,"可以使用 /** 来表达该目录下所有子目录文件都禁止删除"))):"文件夹路径"===e?t=r.createElement("div",null,"用于在文件夹下切换根目录"):"环境路径"===e?t=r.createElement("div",null,"当在不同用户环境下运行的时候由于没有执行终端去加载PATH,这里可以添加额外的PATH路径,点击这里的保存还会更新系统上的path路径"):"pty"===e?t=r.createElement("div",null,"一些需要Pty环境的命令"):"文件上传"===e&&(t=r.createElement("div",null,"对于不同的目录(包括所有子目录),可能是机械或者固态硬盘,机械硬盘在处理多个小文件的时候会做随机i/o,由于一般只有一个盘头所以会影响整体效率,特别是写操作,这里提供了上传时候的最大数量限制,对于下载数量目前不做限制.")),w({open:!0,title:"信息",context_div:r.createElement("div",null,t)})},te=function(){var e=le(ie().mark((function e(){return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("env/path/save",{paths:F});case 2:e.sent.code===u.m.Sucess&&((0,L.LW)("保存成功"),a());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{title:t("外部软件"),titleCom:r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:Q})},r.createElement(h.X,{headers:W,rows:_.map((function(e,n){return[r.createElement("div",null,e.id),r.createElement(s.fq,{ok:e.installed}),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0,placeholder:t("默认使用环境变量")}),r.createElement(f.rA,{icon:"info",onClick:function(){ee(e.id)},title:"信息"})]})),width:"10rem"}))),r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("文件夹路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("文件夹路径")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){v([].concat(ae(m),[{note:"",default:!1,path:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:q}))},r.createElement(h.X,{headers:U,rows:m.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.l6,{value:e.default,onChange:function(e){!function(e,t,n){for(var r=[],o=0;o<m.length;o++)m[o].default=o===n&&"true"===t,r.push(m[o]);v([]),v(r)}(0,e,n)},options:[{title:t("是"),value:!0},{title:t("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,0!==n&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){m.splice(e,1),v(ae(m))}(n)}}))];return o})),width:"10rem"})),r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("个人保护路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("保护目录")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){A([].concat(ae(C),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:R}))},r.createElement(h.X,{headers:z,rows:C.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){C.splice(e,1),A(ae(C))}(n)}})];return o})),width:"10rem"})),r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("系统保护路径"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("保护目录")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){V([].concat(ae(j),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:D}))},r.createElement(h.X,{headers:z,rows:j.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){j.splice(e,1),V(ae(j))}(n)}})];return o})),width:"10rem"})),r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("文件上传最大并发限制"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){ee("文件上传")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){P([].concat(ae(N),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:J}))},r.createElement(h.X,{headers:Z,rows:N.map((function(e,n){var o=[r.createElement(d.Sm,{value:e.index,placeholder:n,handleInputChange:function(t){e.index=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.user_upload_num,handleInputChange:function(t){e.user_upload_num=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:e.sys_upload_num,handleInputChange:function(t){e.sys_upload_num=parseInt(t)},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){N.splice(e,1),P(ae(N))}(n)}})];return o})),width:"10rem"})))),r.createElement(o.VP,null,r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("PATH")),r.createElement(f.rA,{icon:"info",onClick:function(){ee("环境路径")},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){G([].concat(ae(F),[{path:"",note:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:te}))},r.createElement(h.X,{headers:Y,rows:F.map((function(e,n){var o=[r.createElement("div",null,n),r.createElement(d.Sm,{value:e.path,handleInputChange:function(t){e.path=t},no_border:!0}),r.createElement(d.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){F.splice(e,1),G(ae(F))}(n)}})];return o})),width:"10rem"})),r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("PTY CMD")),r.createElement(f.rA,{icon:"info",onClick:function(){ee("pty")},title:"信息"})),rightBottomCom:r.createElement(f.C3,{text:t("更新"),clickFun:K})},r.createElement(d.Sm,{placeholder:t("cmd need pty env"),value:M,handleInputChange:function(e){B(e)}})))))}var he=n(1499);function pe(e){var t=(0,p.Bd)(),n=t.t;return t.i18n,r.createElement(r.Fragment,null,r.createElement("h3",null,n("功能权限")),r.createElement("div",{className:"checkbox_container"},r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.user_manage),checked:e.is_selected(a.oV.user_manage),onChange:function(){e.select_auth(a.oV.user_manage)}}),n("用户管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.role_manage),checked:e.is_selected(a.oV.role_manage),onChange:function(){e.select_auth(a.oV.role_manage)}}),n("角色管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_process_close),checked:e.is_selected(a.oV.sys_process_close),onChange:function(){e.select_auth(a.oV.sys_process_close)}}),n("系统进程关闭")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.docker_container_update),checked:e.is_selected(a.oV.docker_container_update),onChange:function(){e.select_auth(a.oV.docker_container_update)}}),n("docker容器停止、删除")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.docker_images_delete),checked:e.is_selected(a.oV.docker_images_delete),onChange:function(){e.select_auth(a.oV.docker_images_delete)}}),n("docker镜像删除")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.systemd_update),checked:e.is_selected(a.oV.systemd_update),onChange:function(){e.select_auth(a.oV.systemd_update)}}),n("systemd删除、添加管理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.vir_net),checked:e.is_selected(a.oV.vir_net),onChange:function(){e.select_auth(a.oV.vir_net)}}),n("虚拟网络")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.token_update),checked:e.is_selected(a.oV.token_update),onChange:function(){e.select_auth(a.oV.token_update)}}),n("token时间修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_auth),checked:e.is_selected(a.oV.code_auth),onChange:function(){e.select_auth(a.oV.code_auth)}}),n("自定义auth")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_resource),checked:e.is_selected(a.oV.code_resource),onChange:function(){e.select_auth(a.oV.code_resource)}}),n("自定义资源路由")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.code_api),checked:e.is_selected(a.oV.code_api),onChange:function(){e.select_auth(a.oV.code_api)}}),n("自定义api路由")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.update_password),checked:e.is_selected(a.oV.update_password),onChange:function(){e.select_auth(a.oV.update_password)}}),n("修改密码")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_disk_mount),checked:e.is_selected(a.oV.sys_disk_mount),onChange:function(){e.select_auth(a.oV.sys_disk_mount)}}),n("磁盘挂载")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ddns),checked:e.is_selected(a.oV.ddns),onChange:function(){e.select_auth(a.oV.ddns)}}),"ddns"),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.outside_software_path),checked:e.is_selected(a.oV.outside_software_path),onChange:function(){e.select_auth(a.oV.outside_software_path)}}),n("外部软件路径")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_delete_cut_rename),checked:e.is_selected(a.oV.filecat_file_delete_cut_rename),onChange:function(){e.select_auth(a.oV.filecat_file_delete_cut_rename)}}),n("文件删除、剪切、重命名")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_context_update_upload_created_copy_decompression),checked:e.is_selected(a.oV.filecat_file_context_update_upload_created_copy_decompression),onChange:function(){e.select_auth(a.oV.filecat_file_context_update_upload_created_copy_decompression)}}),n("文件创建、上传、内容更新、解压缩")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.filecat_file_context_update),checked:e.is_selected(a.oV.filecat_file_context_update),onChange:function(){e.select_auth(a.oV.filecat_file_context_update)}}),n("内容更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.shell_cmd_check),checked:e.is_selected(a.oV.shell_cmd_check),onChange:function(){e.select_auth(a.oV.shell_cmd_check)}}),n("shell命令检测")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.env_path_update),checked:e.is_selected(a.oV.env_path_update),onChange:function(){e.select_auth(a.oV.env_path_update)}}),n("PATH路径修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.pty_cmd_update),checked:e.is_selected(a.oV.pty_cmd_update),onChange:function(){e.select_auth(a.oV.pty_cmd_update)}}),n("pty cmd 更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.sys_protection_dir),checked:e.is_selected(a.oV.sys_protection_dir),onChange:function(){e.select_auth(a.oV.sys_protection_dir)}}),n("系统保护路径更新")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.recycle_file_save),checked:e.is_selected(a.oV.recycle_file_save),onChange:function(){e.select_auth(a.oV.recycle_file_save)}}),n("文件回收站修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.workflow_exe),checked:e.is_selected(a.oV.workflow_exe),onChange:function(){e.select_auth(a.oV.workflow_exe)}}),n("workflow 执行")),r.createElement("div",null,r.createElement("input",{type:"checkbox",checked:e.is_selected(a.oV.workflow_exe_user,!0),onChange:function(){e.select_auth(a.oV.workflow_exe_user)}}),n("workflow 执行用户")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.workflow_api),checked:e.is_selected(a.oV.workflow_api),onChange:function(){e.select_auth(a.oV.workflow_api)}}),n("workflow触发api 修改")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.dir_upload_max_num),checked:e.is_selected(a.oV.dir_upload_max_num),onChange:function(){e.select_auth(a.oV.dir_upload_max_num)}}),n("目录文件上传数量限制修改"))),r.createElement("h3",null,n("标签编辑权限")),r.createElement("div",{className:"checkbox_container"},r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.net_site_tag_update),checked:e.is_selected(a.oV.net_site_tag_update),onChange:function(){e.select_auth(a.oV.net_site_tag_update)}}),n("网址")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ssh_proxy_tag_update),checked:e.is_selected(a.oV.ssh_proxy_tag_update),onChange:function(){e.select_auth(a.oV.ssh_proxy_tag_update)}}),n("ssh代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.http_proxy_tag_update),checked:e.is_selected(a.oV.http_proxy_tag_update),onChange:function(){e.select_auth(a.oV.http_proxy_tag_update)}}),n("http代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.browser_proxy_tag_update),checked:e.is_selected(a.oV.browser_proxy_tag_update),onChange:function(){e.select_auth(a.oV.browser_proxy_tag_update)}}),n("浏览器代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rdp_proxy_tag_update),checked:e.is_selected(a.oV.rdp_proxy_tag_update),onChange:function(){e.select_auth(a.oV.rdp_proxy_tag_update)}}),n("rdp代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.wol_proxy_tag_update),checked:e.is_selected(a.oV.wol_proxy_tag_update),onChange:function(){e.select_auth(a.oV.wol_proxy_tag_update)}}),n("网络唤醒")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rtsp_proxy_tag_update),checked:e.is_selected(a.oV.rtsp_proxy_tag_update),onChange:function(){e.select_auth(a.oV.rtsp_proxy_tag_update)}}),n("rtsp播放器")),r.createElement("h3",null,n("工具功能")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.ssh_proxy),checked:e.is_selected(a.oV.ssh_proxy),onChange:function(){e.select_auth(a.oV.ssh_proxy)}}),n("ssh代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.http_proxy),checked:e.is_selected(a.oV.http_proxy),onChange:function(){e.select_auth(a.oV.http_proxy)}}),n("http代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.browser_proxy),checked:e.is_selected(a.oV.browser_proxy),onChange:function(){e.select_auth(a.oV.browser_proxy)}}),n("浏览器代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rdp_proxy),checked:e.is_selected(a.oV.rdp_proxy),onChange:function(){e.select_auth(a.oV.rdp_proxy)}}),n("rdp代理")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.wol_proxy),checked:e.is_selected(a.oV.wol_proxy),onChange:function(){e.select_auth(a.oV.wol_proxy)}}),n("网络唤醒")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.rtsp_proxy),checked:e.is_selected(a.oV.rtsp_proxy),onChange:function(){e.select_auth(a.oV.rtsp_proxy)}}),n("rtsp播放器")),r.createElement("div",null,r.createElement("input",{type:"checkbox",disabled:e.is_disable(a.oV.crypto_ssh_file),checked:e.is_selected(a.oV.crypto_ssh_file),onChange:function(){e.select_auth(a.oV.crypto_ssh_file)}}),n("ssh密钥保存到磁盘"))))}function me(e){return me="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},me(e)}function ve(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ee(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 ye(){ye=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(V([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==me(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(me(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function _e(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ee(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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function ge(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function be(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ge(a,r,o,i,c,"next",e)}function c(e){ge(a,r,o,i,c,"throw",e)}i(void 0)}))}}function we(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Ee(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 Ee(e,t){if(e){if("string"==typeof e)return xe(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)?xe(e,t):void 0}}function xe(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 ke=new Map;function Se(){var e,t,n,i=(0,p.Bd)(),c=i.t,m=(i.i18n,(0,r.useContext)(ne.F)),v=(m.initUserInfo,m.reloadUserInfo,we((0,x.L4)(k.A.user_base_info),2)),y=(v[0],v[1],we((0,r.useState)([]),2)),_=y[0],g=y[1],b=we((0,x.L4)(k.A.prompt_card),2),w=(b[0],b[1],we((0,r.useState)(!1),2)),E=w[0],S=w[1],C=we((0,r.useState)(!1),2),A=C[0],O=C[1],j=we((0,x.L4)(k.A.confirm),2),V=(j[0],j[1]),I=we((0,r.useState)(""),2),N=I[0],P=I[1],T=we((0,r.useState)(""),2),F=T[0],G=T[1],X=we((0,r.useState)(""),2),M=X[0],B=X[1],U=we((0,r.useState)([]),2),W=U[0],z=U[1],Y=we((0,r.useState)([]),2),Z=Y[0],$=Y[1],H=we((0,r.useState)([]),2),K=H[0],q=H[1],R=we((0,r.useState)(""),2),D=R[0],J=R[1],Q=we((0,r.useState)("en"),2),ee=Q[0],te=Q[1],oe=we((0,r.useState)([]),2),ae=oe[0],ie=oe[1],ce=we((0,r.useState)(""),2),le=ce[0],ue=ce[1],se=we((0,r.useState)(!1),2),fe=se[0],de=se[1],me=we((0,r.useState)(""),2),ge=me[0],Ee=me[1],xe=we((0,r.useState)(""),2),Se=xe[0],Le=xe[1],Ce=we((0,r.useState)({}),2),Ae=Ce[0],Oe=Ce[1],je=we((0,r.useState)([]),2),Ve=je[0],Ie=je[1],Ne=[c("用户id"),c("用户名"),c("目录范围"),c("备注")],Pe=function(){var e=be(ye().mark((function e(){var t,n,r,o,a;return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.wm.get("all_users");case 2:return(t=e.sent).code===u.m.Sucess&&g(t.data),e.next=6,l.wm.get("all_roles");case 6:if((n=e.sent).code===u.m.Sucess){Ie(n.data),ke.clear(),r=_e(n.data);try{for(r.s();!(o=r.n()).done;)a=o.value,ke.set(a.role_id,a)}catch(e){r.e(e)}finally{r.f()}}case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(e){var t,n,r,o,a,i,c,l,u,s,f,d,h;P(null!==(t=null==e?void 0:e.username)&&void 0!==t?t:""),G(null!==(n=null==e?void 0:e.password)&&void 0!==n?n:""),B(null!==(r=null==e?void 0:e.cwd)&&void 0!==r?r:""),z(null!==(o=null==e?void 0:e.access_dirs)&&void 0!==o?o:[]),$(null!==(a=null==e?void 0:e.not_access_dirs)&&void 0!==a?a:[]),q(null!==(i=null==e?void 0:e.only_read_dirs)&&void 0!==i?i:[]),J(null!==(c=null==e?void 0:e.access_cmd)&&void 0!==c?c:""),te(null!==(l=null==e?void 0:e.language)&&void 0!==l?l:""),ie(null!==(u=null==e?void 0:e.auth_list)&&void 0!==u?u:[]),ue(null!==(s=null==e?void 0:e.note)&&void 0!==s?s:""),de(null!==(f=null==e?void 0:e.is_root)&&void 0!==f&&f),Ee(null!==(d=null==e?void 0:e.id)&&void 0!==d?d:""),null!=e&&e.bind_role_id?Fe(e.bind_role_id,null!==(h=e.auth_list)&&void 0!==h?h:[]):(Le(""),Oe({}))};(0,r.useEffect)((function(){Pe()}),[]);var Fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return Le(""),void Oe({});var n=ke.get(e);if(n){if(n.cwd&&B(n.cwd),n.access_dirs&&n.access_dirs.length>0&&z(n.access_dirs),n.not_access_dirs&&n.not_access_dirs.length>0&&$(n.not_access_dirs),n.only_read_dirs&&n.only_read_dirs.length>0&&q(n.only_read_dirs),n.access_cmd&&J(n.access_cmd),n.language&&te(n.language),n.auth_list&&n.auth_list.length>0){var r,o=new Set(n.auth_list),a=_e(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;o.add(i)}}catch(e){a.e(e)}finally{a.f()}ie(Array.from(o))}Le(e),Oe(n)}},Ge=function(){if(N)if((0,he.CB)(N))(0,L.zN)("username not empty char");else{if(M){var e=new a.E0;return e.language=ee,e.access_dirs=W,e.username=N,e.password=F,e.not_access_dirs=Z,e.only_read_dirs=K,e.cwd=M,e.note=le,e.access_cmd=D,e.auth_list=ae,e.bind_role_id=Se,e}(0,L.zN)("cwd not empty")}else(0,L.zN)("username not empty")},Xe=function(){var e=be(ye().mark((function e(){var t,n;return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(F){e.next=3;break}return(0,L.zN)("password not empty"),e.abrupt("return");case 3:if(!(0,he.CB)(F)){e.next=6;break}return(0,L.zN)("username not empty char"),e.abrupt("return");case 6:return t=Ge(),e.next=9,l.wm.post("create_user",t);case 9:n=e.sent,Pe(),n.code===u.m.Sucess&&((0,L.LW)("创建完成"),Pe(),S(!1),O(!1),Te(void 0));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=be(ye().mark((function e(){var t;return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ge()){e.next=3;break}return e.abrupt("return");case 3:return t.id=ge,e.next=6,l.wm.post("save_user",t);case 6:e.sent.code===u.m.Sucess&&((0,L.LW)("保存完成"),Pe());case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=be(ye().mark((function e(t){return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:V({open:!0,title:"确定删除吗",handle:function(){var e=be(ye().mark((function e(){var n;return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new a.E0).username=t,e.next=4,l.wm.post("delete_user",n);case 4:e.sent.code===u.m.Sucess&&((0,L.LW)("删除完成"),Pe(),V({open:!1,handle:null}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,c("用户"))),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:c("添加"),onClick:function(){S(!0),O(!1),Te(void 0)}}))},r.createElement(h.X,{headers:Ne,rows:_.map((function(e,t){return[r.createElement("p",null,e.id),r.createElement(s.xP,null,e.username),r.createElement(s.xP,null,e.cwd),r.createElement(s.xP,null,e.note),r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:c("编辑"),onClick:function(){return function(e){S(!1),O(!0),Te(e)}(e)}}),!e.is_root&&r.createElement(f.rA,{icon:"delete",title:c("删除"),onClick:function(){return Be(e.username)}}))]})),width:"10rem"})))),r.createElement(o.VP,{widthPer:50},(E||A)&&r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,c("".concat(E?"添加":"编辑")))," "),rightBottomCom:r.createElement("div",null,r.createElement(f.rA,{icon:"cancel",title:c("取消"),onClick:function(){S(!1),O(!1),Te(void 0)}}),E&&r.createElement(f.rA,{icon:"add_circle",title:c("添加"),onClick:Xe}),A&&r.createElement(f.rA,{icon:"save",title:c("保存"),onClick:Me}))},r.createElement("label",null,c("用户名")),r.createElement(d.Sm,{value:N,handleInputChange:function(e){return P(e)}}),r.createElement("label",null,c("密码")),r.createElement(d.Sm,{value:F,handleInputChange:function(e){return G(e)}}),r.createElement("label",null,!(null!=Ae&&null!==(e=Ae.access_dirs)&&void 0!==e&&e.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){z([].concat(ve(W),[""]))},title:"添加"}),c("目录范围")),r.createElement(d.Sm,{disabled:""!==Ae.cwd&&void 0!==Ae.cwd,value:M,handleInputChange:function(e){return B(e)}}),(null!=W?W:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ae||null===(n=Ae.access_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ae||null===(o=Ae.access_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){W[t]=e,z(ve(W))}})),0===(null==Ae||null===(a=Ae.access_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ae||null===(i=Ae.access_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){W.splice(t,1),z(ve(W))},title:c("删除")}))})),r.createElement("label",null,!(null!=Ae&&null!==(t=Ae.not_access_dirs)&&void 0!==t&&t.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){$([].concat(ve(Z),[""]))},title:c("添加")}),c("禁止目录范围")),(null!=Z?Z:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ae||null===(n=Ae.not_access_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ae||null===(o=Ae.not_access_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){Z[t]=e,$(ve(Z))}})),0===(null==Ae||null===(a=Ae.not_access_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ae||null===(i=Ae.not_access_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){Z.splice(t,1),$(ve(Z))},title:c("删除")}))})),r.createElement("label",null,!(null!=Ae&&null!==(n=Ae.only_read_dirs)&&void 0!==n&&n.length)&&r.createElement(f.rA,{icon:"add",onClick:function(){q([].concat(ve(K),[""]))},title:c("添加")}),c("只读目录范围")),(null!=K?K:[]).map((function(e,t){var n,o,a,i;return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{disabled:0!==(null==Ae||null===(n=Ae.only_read_dirs)||void 0===n?void 0:n.length)&&void 0!==(null==Ae||null===(o=Ae.only_read_dirs)||void 0===o?void 0:o.length),value:e,handleInputChange:function(e){K[t]=e,q(ve(K))}})),0===(null==Ae||null===(a=Ae.only_read_dirs)||void 0===a?void 0:a.length)||void 0===(null==Ae||null===(i=Ae.only_read_dirs)||void 0===i?void 0:i.length)&&r.createElement(f.rA,{icon:"delete",onClick:function(){K.splice(t,1),q(ve(K))},title:c("删除")}))})),r.createElement("label",null,c("可执行的命令")),r.createElement(d.Sm,{disabled:""!==Ae.access_cmd&&void 0!==Ae.access_cmd,value:D,placeholder:"use blank split",handleInputChange:function(e){return J(e)}}),!fe&&r.createElement(r.Fragment,null,r.createElement("label",null,c("角色")),r.createElement(d.l6,{value:Se,onChange:function(e){Fe(e)},options:function(){var e=[];e.push({title:"NOT",value:""});var t,n=_e(Ve);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push({title:r.role_name,value:r.role_id})}}catch(e){n.e(e)}finally{n.f()}return e}()})),r.createElement("label",null,c("语言")),r.createElement(d.l6,{disabled:""!==Ae.language&&void 0!==Ae.language,value:ee,onChange:function(e){te(e)},options:[{title:"English",value:"en"},{title:"中文",value:"zh"}]}),r.createElement("p",{className:"small"},c("标签编辑是所有人都可见的的数据")),r.createElement(pe,{is_disable:function(e){if(!0===fe)return!0;if(Se){var t,n=ke.get(Se);if(n)return(null!==(t=n.auth_list)&&void 0!==t?t:[]).includes(e)}return!1},is_selected:function(e,t){return!t&&!0===fe||void 0!==(null==ae?void 0:ae.find((function(t){return t===e})))},select_auth:function(e){ae?ae.includes(e)?((0,re.I)(ae,(function(t){return t===e})),ie(ve(ae))):ie([].concat(ve(ae),[e])):ie([e])}}),r.createElement("label",null,c("备注")),r.createElement(d.Sm,{value:le,handleInputChange:function(e){return ue(e)}})))))}function Le(e){return Le="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},Le(e)}function Ce(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(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 Ae(){Ae=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(V([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Le(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(Le(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!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 l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Oe(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function je(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Oe(a,r,o,i,c,"next",e)}function c(e){Oe(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Ve(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,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Ie(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 Ie(e,t){if(e){if("string"==typeof e)return Ne(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)?Ne(e,t):void 0}}function Ne(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 Pe(){var e=(0,p.Bd)(),t=e.t,n=(e.i18n,(0,r.useContext)(ne.F)),i=(n.initUserInfo,n.reloadUserInfo,Ve((0,r.useState)([]),2)),c=i[0],m=i[1],v=Ve((0,x.L4)(k.A.prompt_card),2),y=(v[0],v[1],Ve((0,r.useState)(!1),2)),_=y[0],g=y[1],b=Ve((0,r.useState)(!1),2),w=b[0],E=b[1],S=Ve((0,x.L4)(k.A.confirm),2),C=(S[0],S[1]),A=Ve((0,r.useState)(""),2),O=A[0],j=A[1],V=Ve((0,r.useState)(""),2),I=V[0],N=V[1],P=Ve((0,r.useState)([]),2),T=P[0],F=P[1],G=Ve((0,r.useState)([]),2),X=G[0],M=G[1],B=Ve((0,r.useState)([]),2),U=B[0],W=B[1],z=Ve((0,r.useState)(""),2),Y=z[0],Z=z[1],$=Ve((0,r.useState)(""),2),H=$[0],K=$[1],q=Ve((0,r.useState)([]),2),R=q[0],D=q[1],J=Ve((0,r.useState)(""),2),Q=J[0],ee=J[1],te=Ve((0,r.useState)(""),2),oe=te[0],ae=te[1],ie=[t("角色id"),t("角色名"),t("备注")],ce=function(){var e=je(Ae().mark((function e(){var t;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.wm.get("all_roles");case 2:(t=e.sent).code===u.m.Sucess&&m(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(e){var t,n,r,o,a,i,c,l,u,s;j(null!==(t=null==e?void 0:e.role_name)&&void 0!==t?t:""),N(null!==(n=null==e?void 0:e.cwd)&&void 0!==n?n:""),F(null!==(r=null==e?void 0:e.access_dirs)&&void 0!==r?r:[]),M(null!==(o=null==e?void 0:e.not_access_dirs)&&void 0!==o?o:[]),W(null!==(a=null==e?void 0:e.only_read_dirs)&&void 0!==a?a:[]),Z(null!==(i=null==e?void 0:e.access_cmd)&&void 0!==i?i:""),K(null!==(c=null==e?void 0:e.language)&&void 0!==c?c:""),D(null!==(l=null==e?void 0:e.auth_list)&&void 0!==l?l:[]),ee(null!==(u=null==e?void 0:e.role_id)&&void 0!==u?u:""),ae(null!==(s=null==e?void 0:e.role_note)&&void 0!==s?s:"")};(0,r.useEffect)((function(){ce()}),[]);var ue=function(){if(O){var e=new a.E0;return e.language=H,e.access_dirs=T,e.role_name=O,e.not_access_dirs=X,e.only_read_dirs=U,e.cwd=I,e.access_cmd=Y,e.auth_list=R,e.role_note=oe,e}(0,L.zN)("role_name not empty")},se=function(){var e=je(Ae().mark((function e(){var t,n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ue()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,l.wm.post("create_role",t);case 5:n=e.sent,ce(),n.code===u.m.Sucess&&((0,L.LW)("创建完成"),ce(),g(!1),E(!1),le(void 0));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=je(Ae().mark((function e(){var t;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ue()){e.next=3;break}return e.abrupt("return");case 3:return t.role_id=Q,e.next=6,l.wm.post("save_role",t);case 6:e.sent.code===u.m.Sucess&&((0,L.LW)("保存完成"),ce());case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),de=function(){var e=je(Ae().mark((function e(t){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C({open:!0,title:"确定删除吗",handle:function(){var e=je(Ae().mark((function e(){var n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new a.E0).role_id=t,e.next=4,l.wm.post("delete_role",n);case 4:e.sent.code===u.m.Sucess&&((0,L.LW)("删除完成"),ce(),C({open:!1,handle:null}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("角色"))),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){g(!0),E(!1),le(void 0)}}))},r.createElement(h.X,{headers:ie,rows:c.map((function(e,n){return[r.createElement("p",null,e.role_id),r.createElement(s.xP,null,e.role_name),r.createElement(s.xP,null,e.role_note),r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:t("编辑"),onClick:function(){return function(e){g(!1),E(!0),le(e)}(e)}}),!e.is_root&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return de(e.role_id)}}))]})),width:"10rem"})))),r.createElement(o.VP,{widthPer:50},(_||w)&&r.createElement(o.xh,null,r.createElement(s.Zp,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("".concat(_?"添加":"编辑")))," "),rightBottomCom:r.createElement("div",null,r.createElement(f.rA,{icon:"cancel",title:t("取消"),onClick:function(){g(!1),E(!1),le(void 0)}}),_&&r.createElement(f.rA,{icon:"add_circle",title:t("添加"),onClick:se}),w&&r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:fe}))},r.createElement("label",null,"角色名"),r.createElement(d.Sm,{value:O,handleInputChange:function(e){return j(e)}}),r.createElement("label",null,"角色备注"),r.createElement(d.Sm,{value:oe,handleInputChange:function(e){return ae(e)}}),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){F([].concat(Ce(T),[""]))},title:"添加"}),"目录范围"),r.createElement(d.Sm,{value:I,handleInputChange:function(e){return N(e)}}),(null!=T?T:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){T[t]=e,F(Ce(T))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){T.splice(t,1),F(Ce(T))},title:"删除"}))})),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){M([].concat(Ce(X),[""]))},title:"添加"}),"禁止目录范围"),(null!=X?X:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){X[t]=e,M(Ce(X))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){X.splice(t,1),M(Ce(X))},title:"删除"}))})),r.createElement("label",null,r.createElement(f.rA,{icon:"add",onClick:function(){W([].concat(Ce(U),[""]))},title:"添加"}),"只读目录范围"),(null!=U?U:[]).map((function(e,t){return r.createElement("div",{key:t,style:{display:"flex"}},r.createElement("div",{style:{width:"90%"}},r.createElement(d.Sm,{value:e,handleInputChange:function(e){U[t]=e,W(Ce(U))}})),r.createElement(f.rA,{icon:"delete",onClick:function(){U.splice(t,1),W(Ce(U))},title:"删除"}))})),r.createElement("label",null,"可执行的命令"),r.createElement(d.Sm,{value:Y,placeholder:"use blank split",handleInputChange:function(e){return Z(e)}}),r.createElement("label",null,"语言"),r.createElement(d.l6,{value:H,onChange:function(e){K(e)},options:[{title:"NOT",value:""},{title:"English",value:"en"},{title:"中文",value:"zh"}]}),r.createElement("p",{className:"small"},"标签编辑是所有人都可见的的数据"),r.createElement(pe,{is_disable:function(){return!1},is_selected:function(e,t){return void 0!==(null==R?void 0:R.find((function(t){return t===e})))},select_auth:function(e){R?(R.find((function(t){return t==e}))?(0,re.I)(R,(function(t){return t===e})):R.push(e),D(Ce(R))):D([e])}})))))}function Te(){var e=(0,p.Bd)().t,t=(0,S.MH)().check_user_auth,n=[{index:1,name:e("系统"),rto:"password/"},{index:1,name:e("环境"),rto:"env_setting/"},{index:1,name:e("自定义路由"),rto:"customer_router/"}];return t(a.oV.user_manage)&&n.push({index:1,name:e("用户管理"),rto:"user_manager/"}),t(a.oV.role_manage)&&n.push({index:1,name:e("角色管理"),rto:"role_manager/"}),r.createElement(o.W1,{optionList:n},r.createElement(te,null),r.createElement(de,null),r.createElement(Z,null),t(a.oV.user_manage)&&r.createElement(Se,null),t(a.oV.role_manage)&&r.createElement(Pe,null))}}}]);