filecat 4.5.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -67
- package/build/dist/349.d6093d2d681e79e1291f.js +2 -0
- package/build/dist/{868.1e86eb72328fa1bdc261.js.LICENSE.txt → 349.d6093d2d681e79e1291f.js.LICENSE.txt} +1 -1
- package/build/dist/{432.5d3371a59446fc61a876.js → 432.18fa83104eda5c17d342.js} +2 -2
- package/build/dist/{441.9e51a6055ce7fb8f8ea4.js → 441.9d035db8285a67c0f316.js} +2 -2
- package/build/dist/467.632b9b9f3527eb9564b3.js +2 -0
- package/build/dist/{523.41bd2935b9fda5d375db.js → 523.9d3bf13f75635805924e.js} +2 -2
- package/build/dist/757.5a7838fe888584ece06e.js +1 -0
- package/build/dist/859.b7ddfa663ba2c84040a7.js +2 -0
- package/build/dist/{859.f38e42e308fe8117d239.js.LICENSE.txt → 859.b7ddfa663ba2c84040a7.js.LICENSE.txt} +1 -1
- package/build/dist/874.1fc3e6f65b12ea4bbb8d.js +2 -0
- package/build/dist/{943.d7496dd74d086f5c29e7.js → 943.59c1eacb0e7d499af54d.js} +2 -2
- package/build/dist/index.html +1 -1
- package/build/dist/main.88c677b751c9684f47a3.js +2 -0
- package/build/dist/{main.9637e1bd9723bef11073.js.LICENSE.txt → main.88c677b751c9684f47a3.js.LICENSE.txt} +3 -3
- package/build/main.js +1 -227
- package/build/main.js.LICENSE.txt +8 -7
- package/build/wintun-arm.dll +0 -0
- package/build/wintun-arm64.dll +0 -0
- package/build/wintun-x86.dll +0 -0
- package/package.json +4 -3
- package/shell/config/prebuild-file-path.js +17 -17
- package/shell/docker-build.sh +2 -2
- package/shell/filecat +1 -1
- package/shell/start/run.sh +2 -2
- package/build/dist/467.ff4fe06e5c74927bfa7d.js +0 -2
- package/build/dist/757.ac538cc39537eafebc51.js +0 -1
- package/build/dist/859.f38e42e308fe8117d239.js +0 -2
- package/build/dist/868.1e86eb72328fa1bdc261.js +0 -2
- package/build/dist/874.65c53193302161627183.js +0 -2
- package/build/dist/main.9637e1bd9723bef11073.js +0 -2
- /package/build/dist/{432.5d3371a59446fc61a876.js.LICENSE.txt → 432.18fa83104eda5c17d342.js.LICENSE.txt} +0 -0
- /package/build/dist/{441.9e51a6055ce7fb8f8ea4.js.LICENSE.txt → 441.9d035db8285a67c0f316.js.LICENSE.txt} +0 -0
- /package/build/dist/{467.ff4fe06e5c74927bfa7d.js.LICENSE.txt → 467.632b9b9f3527eb9564b3.js.LICENSE.txt} +0 -0
- /package/build/dist/{523.41bd2935b9fda5d375db.js.LICENSE.txt → 523.9d3bf13f75635805924e.js.LICENSE.txt} +0 -0
- /package/build/dist/{874.65c53193302161627183.js.LICENSE.txt → 874.1fc3e6f65b12ea4bbb8d.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.d7496dd74d086f5c29e7.js.LICENSE.txt → 943.59c1eacb0e7d499af54d.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 432.
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Re});var n=r(6540),o=r(5725),a=r(3033),i=r(447),c=r(5997),u=r(4289),l=r(3413),s=r.n(l);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return h(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)?h(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 h(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 p(t){var e=f((0,n.useState)("毫秒"),2),r=e[0],o=e[1],l=f((0,n.useState)(""),2),h=l[0],p=l[1],y=f((0,n.useState)(""),2),d=y[0],m=y[1];return n.createElement(i.Zp,{title:"时间转换器",rightBottomCom:n.createElement(c.C3,{text:"确定",clickFun:function(){if(h||d){var t=0,e=""!==h&&0!==h;if(e){if(!(0,u.kf)(h))return void new(s())({type:"error",text:"必须都是数字",timeout:1e3,layout:"bottomLeft"}).show();t=parseInt(h),"分秒"===r&&(t*=1e3)}var n=new Date(e?t:d),o=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(m(o),!h){var a=n.getTime();p("毫秒"===r?a:a/1e3)}}else new(s())({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(a.l6,{options:[{title:"毫秒",value:"毫秒"},{title:"分秒",value:"分秒"}],onChange:function(t){o(t)}}),n.createElement(a.Sm,{placeholder:r,value:h,handleInputChange:function(t){p(t)}}),n.createElement(a.Sm,{placeholder:"格式化时间",value:d,handleInputChange:function(t){m(t)}}))}var y=r(7952),d=r(6007),m=r(8694),v=r(3459),g=r(3029),w=r(2389),b=r(6417),x=r(7444),E=r(8247),_=r(3430);function S(t){return S="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},S(t)}function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(F([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==S(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(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=A(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=f(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 A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(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 j(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 K(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(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(S(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(N.prototype),l(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new N(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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(K),!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),K(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;K(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),m}},e}function k(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 N(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){k(a,n,o,i,c,"next",t)}function c(t){k(a,n,o,i,c,"throw",t)}i(void 0)}))}}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return A(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)?A(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 A(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,w.Bd)().t,r=O((0,x.L4)(b.A.header_min),2),i=(r[0],r[1]),u=O((0,n.useState)(""),2),l=u[0],f=u[1],h=O((0,n.useState)(""),2),p=h[0],S=h[1],k=O((0,n.useState)(void 0),2),A=k[0],j=k[1],K=O((0,n.useState)(!1),2),P=K[0],F=K[1],C=(0,E.MH)().check_user_auth,I=function(){var t=N(L().mark((function t(){var e;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new m.qB).targetProxyUrl="string"==typeof l?l:p,t.next=4,d._U.post("close",e);case 4:if(t.sent.code===v.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:S(""),i(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=N(L().mark((function t(e){var r,n,o;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new m.qB).targetProxyUrl="string"==typeof e?e:l,r.sysProxyPort=A,t.next=5,d._U.post("start",r);case 5:if((n=t.sent).code===v.m.Sucess){t.next=8;break}return t.abrupt("return");case 8:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),S(o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){I()}}),[]);var D=function(){var t=N(L().mark((function t(){var e;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=N(L().mark((function t(e){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G=function(){var t=N(L().mark((function t(e){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f(e.url),T(e.url);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:A,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),j(parseInt(t)))},max_width:"10rem"}),n.createElement(a.$Z,{placeholder:e("要代理的url"),icon:"link",value:l,handleInputChange:function(t){f(t)}}),n.createElement(c.rA,{icon:"play_arrow",title:e("开始代理"),onClick:T}),n.createElement(c.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){F(!P),i(!P)}}),n.createElement(c.rA,{icon:"close",title:e(e("关闭")),onClick:function(){I(),F(!1),f("")}})),n.createElement(o.jW,{isFull:P},n.createElement("div",{id:"browser"},!p&&n.createElement(g.N,{have_auth_edit:C(_.oV.browser_proxy_tag_update),getItems:D,save:M,clickItem:G,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"color",preName:"color"}]}),n.createElement("iframe",{id:"webview",src:p}))))}var K=r(4405),P=r(4694),F=r(5726),C=r(7567),I=r(7022),T=r(8844),D=r(8815),M=r(9214);function G(t){return G="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},G(t)}function B(){B=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(G(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function H(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=$(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 U(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$(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 R(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 V(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){R(a,n,o,i,c,"next",t)}function c(t){R(a,n,o,i,c,"throw",t)}i(void 0)}))}}function z(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)||$(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 $(t,e){if(t){if("string"==typeof t)return J(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)?J(t,e):void 0}}function J(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 Y(t){var e=z((0,x.L4)(b.A.selectedFileList),2),r=e[0],o=e[1],a=z((0,x.L4)(b.A.clickFileList),2),i=a[0],c=a[1],u=z((0,x.L4)(b.A.editorSetting),2),l=(u[0],u[1]),s=z((0,x.L4)(b.A.shellNowDir),2),f=s[0],h=s[1],p=z((0,x.L4)(b.A.sshInfo),2),y=p[0],m=(p[1],z((0,x.L4)(b.A.nowFileList),2)),g=m[0],w=m[1],_=z((0,x.L4)(b.A.remoteShellShow),2),S=_[0],L=_[1],k=z((0,x.L4)(b.A.enterKey),2),N=k[0],O=(k[1],z((0,x.L4)(b.A.confirm),2)),A=(O[0],O[1]),j=function(){var e=V(B().mark((function e(n,a){var u,s,p,m,g,b,x,_,k,O,j,F,C,T,M,G,R;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,P.kW)(r,n))o((0,P.P1)(r,n));else if("ctrl"===N)o([].concat(U(r),[n]));else if("shift"===N){if(u=(0,P.a7)(r),s=u.max,p=u.min,m=[],n>=s)for(g=s;g<=n;g++)m.push(g);else for(b=p;b>=n;b--)m.push(b);o(m)}else o([n]);if(c([].concat(U(i),[n])),setTimeout((function(){c((0,P.P1)(i,n))}),300),t.type!==I.Iw.folder){e.next=29;break}if(void 0===i.find((function(t){return t===n}))){e.next=27;break}return k=new K.x,Object.assign(k,y),k.dir=P.HS.apply(void 0,U(f).concat([a])),o([]),c([]),w({files:[],folders:[]}),e.next=15,d.Fg.post("get/dir",k);case 15:if((O=e.sent).code===v.m.Sucess){e.next=18;break}return e.abrupt("return");case 18:j=H(null!==(x=O.data.files)&&void 0!==x?x:[]);try{for(j.s();!(F=j.n()).done;)(C=F.value).origin_size=C.size,C.size=(0,D.v7)(C.size),C.show_mtime=C.mtime?(0,D.s8)(C.mtime):""}catch(t){j.e(t)}finally{j.f()}T=H(null!==(_=O.data.folders)&&void 0!==_?_:[]);try{for(T.s();!(M=T.n()).done;)(G=M.value).show_mtime=G.mtime?(0,D.s8)(G.mtime):""}catch(t){T.e(t)}finally{T.f()}return w(O.data),z=O.data,bt=z,h([].concat(U(f),[a])),S.show&&L({show:!0,path:k.dir}),e.abrupt("return");case 27:e.next=38;break;case 29:if(void 0===i.find((function(t){return t===n}))){e.next=38;break}if(R=function(){var e=V(B().mark((function e(){var r,n,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new K.x,Object.assign(r,y),r.file=P.HS.apply(void 0,U(f).concat([a])),e.next=5,d.Fg.post("get/file/text",r);case 5:n=e.sent,o=void 0,a.endsWith(I.Iw.workflow_act)?o="ace/mode/yaml":(a.endsWith(I.Iw.draw)||a.endsWith(I.Iw.excalidraw))&&(o="ace/mode/json"),l({model:o,open:!0,fileName:t.name,save:function(){var t=V(B().mark((function t(e){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,d.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(E.xK.set_value_temp(""),l({open:!1,fileName:"",save:null}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),E.xK.set_value_temp(n.data);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!("number"==typeof t.origin_size&&t.origin_size>D.o5)){e.next=35;break}return A({open:!0,title:"提示",sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=V(B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A({open:!1,handle:null}),t.next=3,R();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 35:return e.next=37,R();case 37:return e.abrupt("return");case 38:case"end":return e.stop()}var z}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(){var e=V(B().mark((function e(n){var a,i,c,u,l,s;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new K.x,Object.assign(a,y),a.target=P.HS.apply(void 0,U(f).concat([n])),i=(0,M.i)(g,r),c=i.map((function(t){return P.HS.apply(void 0,U(f).concat([t.name]))})),u=H(c),e.prev=6,u.s();case 8:if((l=u.n()).done){e.next=17;break}return s=l.value,a.source=s,e.next=13,d.Fg.post("move",a);case 13:if(e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),u.e(e.t0);case 22:return e.prev=22,u.f(),e.finish(22);case 25:return o([]),A({open:!1,handle:null}),e.next=29,t.fileHandler();case 29:case"end":return e.stop()}}),e,null,[[6,19,22,25]])})));return function(t){return e.apply(this,arguments)}}();return n.createElement(T.B,{draggable_handle:F,name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,show_mtime:t.show_mtime,click:j})}var Z=r(7856),W=r(4238),q=r(4944);function X(t){return X="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},X(t)}function Q(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ot(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 tt(){tt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==X(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(X(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function et(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 rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){et(a,n,o,i,c,"next",t)}function c(t){et(a,n,o,i,c,"throw",t)}i(void 0)}))}}function nt(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)||ot(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 ot(t,e){if(t){if("string"==typeof t)return at(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)?at(t,e):void 0}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var it=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ct(t){var e=nt((0,n.useState)(null),2),r=e[0],o=e[1],a=nt((0,x.L4)(b.A.remoteShellShow),2),i=a[0],c=(a[1],nt((0,n.useState)(!1),2)),u=c[0],l=c[1],s=nt((0,x.L4)(b.A.sshInfo),2),f=s[0],h=(s[1],nt((0,x.L4)(b.A.shellNowDir),2)),p=h[0],y=(h[1],function(){var t=rt(tt().mark((function t(){var e,r,n;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new Z.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},q.ws.addMsg(W.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=rt(tt().mark((function t(e){var r;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new W.hf(W.HK.remote_shell_send)).context=e,t.next=4,q.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()),d=function(){rt(tt().mark((function t(){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),q.ws.isAilive()&&q.ws.setPromise(function(){var t=rt(tt().mark((function t(e){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,q.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){return function(){d()}}),[]),(0,n.useEffect)((function(){if(i.show)if(r){if(u){var t=new W.hf(W.HK.remote_shell_cd);t.context=i.path,q.ws.send(t)}}else y(),l(!0);else d()}),[i]);return n.createElement(it,{show:i.show,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new W.hf(W.HK.remote_shell_open),o=new K.x;Object.assign(o,f),o.init_path=P.HS.apply(void 0,Q(p)),o.rows=t,o.cols=e,n.context=o,q.ws.send(n)}})}var ut=r(2042),lt=r(2730);function st(t){return st="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},st(t)}function ft(){return ft=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},ft.apply(null,arguments)}function ht(){ht=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==st(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(st(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function pt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gt(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 yt(t){return function(t){if(Array.isArray(t))return wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gt(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 dt(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 mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){dt(a,n,o,i,c,"next",t)}function c(t){dt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function vt(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)||gt(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 gt(t,e){if(t){if("string"==typeof t)return wt(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)?wt(t,e):void 0}}function wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var bt,xt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),Et=Object.values(xt),_t=280;function St(t){var e=(0,w.Bd)().t,r=(0,n.useRef)(void 0),o=vt((0,x.L4)(b.A.nowFileList),2),i=o[0],u=o[1],l=vt((0,x.L4)(b.A.fileShowType),2),f=l[0],h=l[1],p=vt((0,x.L4)(b.A.uploadFiles),2),m=(p[0],p[1]),g=vt((0,x.L4)(b.A.showPrompt),2),E=g[0],_=g[1],S=vt((0,x.L4)(b.A.selectedFileList),2),L=S[0],k=(S[1],vt((0,x.L4)(b.A.enterKey),2)),N=(k[0],k[1]),O=vt((0,x.L4)(b.A.copyedFileList),2),A=O[0],j=O[1],T=vt((0,x.L4)(b.A.cutedFileList),2),G=T[0],B=T[1],H=vt((0,x.L4)(b.A.selectedFileList),2),U=(H[0],H[1]),R=vt((0,x.L4)(b.A.clickFileList),2),V=(R[0],R[1]),z=vt((0,x.L4)(b.A.remoteShellShow),2),$=z[0],J=z[1],Z=vt((0,x.L4)(b.A.shellNowDir),2),W=Z[0],q=Z[1],X=vt((0,x.L4)(b.A.sshInfo),2),Q=X[0],tt=(X[1],vt((0,n.useState)(void 0),2)),et=tt[0],rt=tt[1],nt=vt((0,n.useState)(""),2),ot=nt[0],at=nt[1],it=function(){var e=mt(ht().mark((function e(){var r,n,o,a,i,c,l,s,f,h,p,y;return ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new K.x).dir=P.HS.apply(void 0,yt(W)),r.username=t.data.username,r.password=t.data.password,r.domain=t.data.domain,r.port=t.data.port,e.next=8,d.Fg.post("get/dir",r);case 8:if((n=e.sent).code===v.m.Sucess){e.next=12;break}return(0,ut.zN)("连接失败"),e.abrupt("return");case 12:o=n.data||{},a=o.folders,i=o.files,c=pt(null!=i?i:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).origin_size=s.size,s.size=(0,D.v7)(s.size),s.show_mtime=s.mtime?(0,D.s8)(s.mtime):""}catch(t){c.e(t)}finally{c.f()}f=pt(null!=a?a:[]);try{for(f.s();!(h=f.n()).done;)(p=h.value).show_mtime=p.mtime?(0,D.s8)(p.mtime):""}catch(t){f.e(t)}finally{f.f()}u(y={folders:a||[],files:i||[]}),bt=y;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),st=function(){var t=mt(ht().mark((function t(){return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,it();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),dt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/_t);0===t&&(t=1),rt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return U([]),V([]),st(),dt(),window.addEventListener("resize",dt),function(){window.removeEventListener("resize",dt)}}),[]);var gt=function(){var t=mt(ht().mark((function t(e){var r,n,o,a;return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,F.T)(r);case 8:a=t.sent,m(a),_({show:!0,type:C.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),wt=function(t){t.preventDefault()};function xt(t){new(s())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",wt),e.addEventListener("drop",gt),function(){t.close(),e.removeEventListener("dragover",wt),e.removeEventListener("drop",gt)}}),[]),(0,n.useEffect)((function(){E&&E.data&&E.data.ok&&st()}),[E]);var St=function(){var t=mt(ht().mark((function t(){var e,r,n,o,a,i,c,l,s,f,h,p;return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new K.x,Object.assign(e,Q),!(W.length<=1)){t.next=4;break}return t.abrupt("return");case 4:return r=W.slice(0,W.length-1),q(r),e.dir=P.HS.apply(void 0,yt(r)),t.next=9,d.Fg.post("get/dir",e);case 9:if((n=t.sent).code===v.m.Sucess){t.next=12;break}return t.abrupt("return");case 12:o=n.data||{},a=o.folders,i=o.files,c=pt(null!=i?i:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).size=(0,D.v7)(s.size),s.show_mtime=s.mtime?(0,D.s8)(s.mtime):""}catch(t){c.e(t)}finally{c.f()}f=pt(null!=a?a:[]);try{for(f.s();!(h=f.n()).done;)(p=h.value).show_mtime=p.mtime?(0,D.s8)(p.mtime):""}catch(t){f.e(t)}finally{f.f()}u({folders:a||[],files:i||[]}),$.show&&J({show:!0,path:P.HS.apply(void 0,yt(r))});case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Lt=vt((0,n.useState)(!1),2),kt=Lt[0],Nt=Lt[1];(0,n.useEffect)((function(){var t=function(t){if(kt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=i.files.length,r=i.folders.length,n=[],o=0;o<e+r;o++)n.push(o);U(n)}else N("ctrl");else"Escape"===t.key?U([]):"Shift"===t.key&&N("shift")},e=function(t){t.ctrlKey||N("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[i,kt]);var Ot=function(t){t.target===t.currentTarget&&U([])};return n.createElement("div",{className:"not-select-div"},n.createElement(y.A,{left_children:n.createElement(a.$Z,{handleEnterPress:function(){var t,e;if(bt){U([]),V([]);var r,n=[],o=[],a=pt(null!==(t=bt.files)&&void 0!==t?t:[]);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.name.includes(ot)&&n.push(i)}}catch(t){a.e(t)}finally{a.f()}var c,l=pt(null!==(e=bt.folders)&&void 0!==e?e:[]);try{for(l.s();!(c=l.n()).done;){var s=c.value;s.name.includes(ot)&&o.push(s)}}catch(t){l.e(t)}finally{l.f()}u({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){at(t)},max_width:"25em"})},n.createElement(c.rA,{icon:"arrow_back",title:e("返回"),onClick:St}),L.length>0&&n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){_({show:!0,type:C.PromptEnum.SshDelete,overlay:!0,data:{}})}}),L.length>0&&n.createElement(c.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,M.i)(i,L);j(t.map((function(t){return P.HS.apply(void 0,yt(W).concat([t.name]))}))),B([]),xt("已复制")}}),L.length>0&&n.createElement(c.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,M.i)(i,L);B(t.map((function(t){return P.HS.apply(void 0,yt(W).concat([t.name]))}))),j([]),xt("已剪切")}}),(A.length>0||G.length>0)&&n.createElement(c.rA,{onClick:function(){_({show:!0,type:C.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:A.length+G.length}),1===L.length&&i.files.length>=1&&i.folders.length>=1&&(0,M.i)(i,L)[0].type!==I.Iw.folder&&n.createElement(c.rA,{icon:"download",title:e("下载"),onClick:function(){var e=(0,M.i)(i,L),r="/api/ssh/download?file=".concat(P.HS.apply(void 0,yt(W).concat([e[0].name])),"&domain=").concat(t.data.domain,"&port=").concat(t.data.port,"&username=").concat(t.data.username,"&password=").concat(t.data.password,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===L.length&&n.createElement(c.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){_({show:!0,type:C.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"terminal",title:"shell",onClick:function(){$.show?J({show:!1,path:""}):J({show:!0,path:P.HS.apply(void 0,yt(W))})}}),n.createElement(c.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){h((0,P.jH)(Et,f))}}),n.createElement(c.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){_({show:!0,type:C.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){_({show:!0,type:C.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"upload_file",title:"上传",onClick:function(){_({show:!0,type:C.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],a=new Set,i=0;i<r.length;i++){var c=r[i],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&a.add((0,lt.S)(u)),o.push(c)}var l=[];if(n){var s,f=pt(a);try{for(f.s();!(s=f.n()).done;){var h=s.value;l.push({isDir:!0,fullPath:h,name:h})}}catch(t){f.e(t)}finally{f.f()}}l.push.apply(l,o),m(l),_({show:!0,type:C.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(c.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(f),ref:r,onMouseEnter:function(){Nt(!0)},onMouseLeave:function(){Nt(!1)}},!!i&&!!i.folders&&i.folders.length>0&&n.createElement("h2",null,"文件夹"),!!i&&!!i.folders&&n.createElement("div",{onClick:Ot},i.folders.map((function(t,e){return n.createElement(Y,ft({fileHandler:it,itemWidth:et,index:e,key:e},t))}))),!!i&&!!i.folders&&i.files.length>0&&n.createElement("h2",{onClick:Ot},"文件"),!!i&&!!i.folders&&n.createElement("div",{onClick:Ot},i.files.map((function(t,e){return n.createElement(Y,ft({fileHandler:it,itemWidth:et,index:e+i.folders.length,key:e},t))})))),n.createElement(ct,null))}function Lt(t){return Lt="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},Lt(t)}function kt(){kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(Lt(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Nt(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 Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Nt(a,n,o,i,c,"next",t)}function c(t){Nt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function At(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(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)?jt(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 jt(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 Kt(t){var e=(0,w.Bd)().t,r=At((0,n.useState)(""),2),o=r[0],i=r[1],u=At((0,n.useState)(""),2),l=u[0],f=u[1],h=At((0,n.useState)(""),2),p=h[0],m=h[1],S=At((0,n.useState)(""),2),L=S[0],k=S[1],N=At((0,n.useState)(void 0),2),O=N[0],A=N[1],j=At((0,n.useState)(""),2),P=j[0],F=j[1],C=At((0,n.useState)(!1),2),I=C[0],T=C[1],D=At((0,x.L4)(b.A.shellNowDir),2),M=(D[0],D[1]),G=At((0,x.L4)(b.A.sshInfo),2),B=(G[0],G[1]),H=(0,E.MH)().check_user_auth,U=function(){var t=Ot(kt().mark((function t(){var e;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new K.x).password=l,e.domain=L,e.port=O,e.username=o,t.next=7,d.Fg.post("close",e);case 7:t.sent,T(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Ot(kt().mark((function t(e){var r,n;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new K.x).password=e?e.password:l,r.domain=e?e.domain:L,r.port=e?e.port:O,r.username=e?e.username:o,r.private_path=e?e.private_path:p,t.next=8,d.Fg.post("start",r);case 8:(n=t.sent)&&n.code===v.m.Sucess&&(r.dir=e?e.dir:P,B(r),M([r.dir]),T(!0));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=Ot(kt().mark((function t(){var e;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=Ot(kt().mark((function t(e){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$=function(){var t=Ot(kt().mark((function t(e){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k(e.domain),F(e.dir),A(e.port),i(e.username),f(e.password),m(e.private_path),t.next=8,R(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:e("目录"),icon:"home",value:P,handleInputChange:function(t){return F(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("账号"),icon:"verified_user",value:o,handleInputChange:function(t){return i(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("密码"),icon:"password",value:l,handleInputChange:function(t){return f(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:p,handleInputChange:function(t){return m(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("连接地址"),icon:"location_on",value:L,handleInputChange:function(t){k(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("端口"),icon:"outlet",value:O,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),A(parseInt(t)))},max_width:"7rem"}),n.createElement(c.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){R()}})),I?n.createElement(St,{close:U,data:{port:O,password:l,username:o,domain:L,dir:P}}):n.createElement(g.N,{have_auth_edit:H(_.oV.ssh_proxy_tag_update),getItems:V,save:z,clickItem:$,items:[{key:"name",preName:e("名字")},{key:"domain",preName:e("地址")},{key:"port",preName:e("端口")},{key:"username",preName:e("账号")},{key:"password",preName:e("密码")},{key:"private_path",preName:e("私钥路径")},{key:"dir",preName:e("访问目录")},{key:"color",preName:"color"}]}))}function Pt(t){return Pt="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},Pt(t)}function Ft(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function Ct(t){var e=function(t,e){if("object"!=Pt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Pt(e)?e:e+""}function It(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var Tt=function(){return function(t,e,r){return e&&Ft(t.prototype,e),r&&Ft(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.render=new Qt.Canvas.create(this.canvas),this.activeSession=!1,this.install()}),[{key:"close",value:function(){this.activeSession=!1}},{key:"install",value:function(){var t=this;return this.canvas.addEventListener("mousemove",(function(e){var r=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:0,isPressed:!1}),e.preventDefault||t.activeSession(),!1})),this.canvas.addEventListener("mousedown",(function(e){var r=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("DOMMouseScroll",(function(e){if(t.activeSession){var r=e.detail,n=Math.round(15*Math.abs(r)/8),o=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.wheel,{x:e.clientX-o.left,y:e.clientY-o.top,step:n,isNegative:r>0,isHorizontal:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("mousewheel",(function(e){if(t.activeSession){var r=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=r?e.deltaX:e.deltaY,o=Math.round(15*Math.abs(n)/8),a=Qt.elementOffset(t.canvas);return q.ws.sendData(W.HK.wheel,{x:e.clientX-a.left,y:e.clientY-a.top,step:o,isNegative:n>0,isHorizontal:r}),e.preventDefault(),!1}})),window.addEventListener("keydown",(function(e){if(t.activeSession)return q.ws.sendData(W.HK.scancode,{code:Qt.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return q.ws.sendData(W.HK.scancode,{code:Qt.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var a=this;q.ws.addMsg(W.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),a.activeSession=!0})),q.ws.addMsg(W.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,a.render.update(e)})),q.ws.addMsg(W.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),a.activeSession=!1})),q.ws.addMsg(W.HK.rdp_error,(function(t){a.activeSession=!1}));var i=new W.hf;i.cmdType=W.HK.infos,i.context={ip:t.indexOf(":")>-1?t.split(":")[0]:t,port:t.indexOf(":")>-1?parseInt(t.split(":")[1]):3389,screen:{width:this.canvas.width,height:this.canvas.height},domain:e,username:r,password:n,locale:Qt.locale()},q.ws.send(i)}}])}();function Dt(t){return Dt="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},Dt(t)}function Mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t,e){if("object"!=Dt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Dt(e)?e:e+""}var Bt,Ht,Ut,Rt,Vt=function(){return function(t,e,r){return e&&Mt(t.prototype,e),r&&Mt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.ctx=e.getContext("2d")}),[{key:"update",value:function(t){var e=null;e=t.isCompress?function(t){var e=null;switch(t.bitsPerPixel){case 15:e="bitmap_decompress_15";break;case 16:e="bitmap_decompress_16";break;case 24:e="bitmap_decompress_24";break;case 32:e="bitmap_decompress_32";break;default:throw"invalid bitmap data format"}var r=new Uint8Array(t.data),n=Module._malloc(r.length),o=new Uint8Array(Module.HEAPU8.buffer,n,r.length);o.set(r);var a=t.destRight-t.destLeft+1,i=t.destBottom-t.destTop+1,c=a*i*4,u=Module._malloc(c),l=new Uint8Array(Module.HEAPU8.buffer,u,c),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,a,i,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,c));return Module._free(n),Module._free(u),{width:a,height:i,data:s}}(t):function(t){return{width:t.width,height:t.height,data:new Uint8ClampedArray(t.data)}}(t);var r=this.ctx.createImageData(e.width,e.height);r.data.set(e.data),this.ctx.putImageData(r,t.destLeft,t.destTop)}}])}();function zt(t){return zt="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},zt(t)}function $t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=zt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jt=($t($t($t($t($t($t($t($t($t($t(Bt={"":0,Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,Pause:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,PrintScreen:84,IntlBackslash:86,F11:87,F12:88,NumpadEqual:89,F13:100,F14:101,F15:102,F16:103,F17:104,F18:105,F19:106,F20:107,F21:108,F22:109,F23:110,KanaMode:112,Lang2:113,Lang1:114,IntlRo:115,F24:118,Convert:121,NonConvert:123,IntlYen:125,NumpadComma:126,MediaTrackPrevious:57360,MediaTrackNext:57369,NumpadEnter:57372,ControlRight:57373,VolumeMute:57376,LaunchApp2:57377,MediaPlayPause:57378,MediaStop:57380,VolumeDown:57390,VolumeUp:57392,BrowserHome:57394,NumpadDivide:57397},"PrintScreen",57399),"AltRight",57400),"NumLock",57413),"Pause",57414),"Home",57415),"ArrowUp",57416),"PageUp",57417),"ArrowLeft",57419),"ArrowRight",57421),"End",57423),$t($t($t($t($t($t($t($t($t($t(Bt,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),$t($t($t($t($t($t($t(Bt,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),Yt=($t($t($t($t($t($t($t($t($t($t(Ht={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",169:"Minus",61:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",160:"BracketLeft",164:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),$t($t($t($t($t($t($t($t($t($t(Ht,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),$t($t($t($t($t($t($t($t($t($t(Ht,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),$t($t($t($t($t($t($t($t($t($t(Ht,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),$t($t($t($t($t($t($t($t($t($t(Ht,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),$t($t($t($t($t($t($t($t($t($t(Ht,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Zt=($t($t($t($t($t($t($t($t($t($t(Ut={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),$t($t($t($t($t($t($t($t($t($t(Ut,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),$t($t($t($t($t($t($t($t($t($t(Ut,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),$t($t($t($t($t($t($t($t($t($t(Ut,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),$t($t($t($t($t($t($t($t($t($t(Ut,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),$t($t($t($t($t($t($t($t($t($t(Ut,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Wt=($t($t($t($t($t($t($t($t($t($t(Rt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft"},"220","IntlBackslash"),90,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),78,"KeyN"),77,"KeyM"),188,"Comma"),190,"Period"),$t($t($t($t($t($t($t($t($t($t(Rt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),$t($t($t($t($t($t($t($t($t($t(Rt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),$t($t($t($t($t($t($t($t($t($t(Rt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),$t($t($t(Rt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),qt={firefox:{fr:Yt,en:Wt},chrome:{fr:Zt,en:Wt}};(Qt=function(){}).prototype={$:function(t){return document.getElementById(t)},elementOffset:function(t){for(var e=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:e}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(t){return new Tt(t)}},Canvas:{create:function(t){return new Vt(t)}},scancode:function(t){var e=Qt.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Jt[t.code||qt[Qt.browser()||"firefox"][e][t.keyCode]]}};var Xt,Qt=new Qt;function te(t){return te="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},te(t)}function ee(){ee=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==te(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(te(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function re(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 ne(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){re(a,n,o,i,c,"next",t)}function c(t){re(a,n,o,i,c,"throw",t)}i(void 0)}))}}function oe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ae(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)?ae(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 ae(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 ie(){var t=(0,w.Bd)().t,e=oe((0,x.L4)(b.A.header_min),2),r=(e[0],e[1]),i=(0,E.MH)().check_user_auth,u=oe((0,n.useState)(void 0),2),l=u[0],s=u[1],f=oe((0,n.useState)(void 0),2),h=f[0],p=f[1],m=oe((0,n.useState)(void 0),2),S=m[0],L=m[1],k=oe((0,n.useState)(!1),2),N=k[0],O=k[1],A=oe((0,n.useState)(!1),2),j=A[0],K=A[1],P=function(){var t=ne(ee().mark((function t(){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,F.J)("rle.js");case 3:Xt=!0,t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),(0,ut.zN)("加载资源失败"),t.abrupt("return");case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),C=null;(0,n.useEffect)((function(){return Xt||P(),function(){C&&(C.close(),C=null)}}),[]);var I=function(e){K(!0),function(n,o,a){if(n=n||e.address,o=o||e.username,a=a||e.password,!n||!o||!a)return(0,ut.zN)(t("不允许为空")),void K(!1);!function(t){C||(C=Qt.client.create(Qt.$(t)))}("rdpwebview");var i=Qt.$("rdpwebview");i.style.display="inline",i.width=window.innerWidth,i.height=window.innerHeight,O(!0),r(!0),C.connect(n,"",o,a,(function(t){Qt.$("rdpwebview").style.display="none",r(!1),K(!1),O(!1)}))}(l,h,S)},T=function(){var t=ne(ee().mark((function t(){var e;return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O(!1),t.next=3,q.ws.sendData(W.HK.rdp_disconnect,"");case 3:e=Qt.$("rdpwebview"),e.getContext("2d").clearRect(0,0,e.width,e.height),Qt.$("rdpwebview").style.display="none",K(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=ne(ee().mark((function t(){var e;return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=ne(ee().mark((function t(e){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&(0,ut.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G=function(){var t=ne(ee().mark((function t(e){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(e.password),p(e.username),s(e.address),I(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:t("地址"),icon:"outlet",value:l,handleInputChange:function(t){return s(t)}}),n.createElement(a.$Z,{placeholder:t("账号"),icon:"http",value:h,handleInputChange:function(t){return p(t)}}),n.createElement(a.$Z,{placeholder:t("密码"),icon:"http",value:S,handleInputChange:function(t){return L(t)}}),!j&&n.createElement(c.rA,{icon:"play_arrow",title:t("连接"),onClick:I}),j&&n.createElement(c.rA,{icon:"close",title:t("关闭"),onClick:T})),n.createElement(o.jW,{isFull:N},!j&&n.createElement(g.N,{have_auth_edit:i(_.oV.rdp_proxy_tag_update),getItems:D,save:M,clickItem:G,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")},{key:"color",preName:"color"}]}),n.createElement("canvas",{id:"rdpwebview",style:{display:"none"}})))}function ce(t){return ce="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},ce(t)}function ue(){ue=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ce(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ce(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function le(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 se(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){le(a,n,o,i,c,"next",t)}function c(t){le(a,n,o,i,c,"throw",t)}i(void 0)}))}}function fe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return he(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)?he(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 he(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 pe(t){var e=(0,w.Bd)().t,r=(0,E.MH)().check_user_auth,o=fe((0,n.useState)(""),2),i=o[0],u=o[1],l=function(){var t=se(ue().mark((function t(e){var r;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||i){t.next=4;break}return new(s())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,d._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===v.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(s())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),f=function(){var t=se(ue().mark((function t(){var e;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("wol/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){var t=se(ue().mark((function t(e){return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("wol/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=se(ue().mark((function t(e){return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u(e.mac),l(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(c.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){l()}}),n.createElement(a.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:i,handleInputChange:function(t){return u(t)}})),n.createElement(g.N,{have_auth_edit:r(_.oV.wol_proxy_tag_update),getItems:f,save:h,clickItem:p,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var ye,de=r(7481),me=r(505);function ve(t){return ve="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},ve(t)}function ge(){ge=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ve(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ve(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function we(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 be(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){we(a,n,o,i,c,"next",t)}function c(t){we(a,n,o,i,c,"throw",t)}i(void 0)}))}}function xe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ee(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)?Ee(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 Ee(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 _e(){var t=xe((0,n.useState)("rsa"),2),e=t[0],r=t[1],u=xe((0,n.useState)("pem"),2),l=u[0],s=u[1],f=(0,w.Bd)(),h=f.t,p=(f.i18n,xe((0,x.L4)(b.A.confirm),2)),m=(p[0],p[1]),g=xe((0,n.useState)(""),2),E=g[0],_=g[1],S=xe((0,n.useState)(""),2),L=S[0],k=S[1],N=function(){var t=be(ge().mark((function t(){var r;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("generate",{type:e,form:l});case 2:(r=t.sent).code===v.m.Sucess&&(_(r.data.public_key),k(r.data.private_key),ye=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=be(ge().mark((function t(r){var n;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(L&&E){t.next=3;break}return(0,ut.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),m({open:!0,title:"将覆盖密钥文件",sub_title:"将会作为 ".concat(n,' 文件保存到系统上的"').concat(ye,'"目录下,此目录会作为openssh(git)所使用的默认目录。之前的密钥将作废。'),handle:function(){var t=be(ge().mark((function t(){return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("save_openssh",{name:n,context:"pub"===r?E:L});case 2:t.sent.code===v.m.Sucess&&((0,ut.LW)("保存成功"),m({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null,n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:h("RSA"),value:"rsa"},{title:h("DSA"),value:"dsa"},{title:h("ECDSA"),value:"ecdsa"}]}),n.createElement(a.l6,{tip:"输出格式",value:l,width:"auto",onChange:function(t){s(t)},options:[{title:h("普通PEM"),value:"pem"},{title:h("opensshPEM"),value:"openssh_pem"}]}),n.createElement(c.rA,{icon:"play_arrow",title:h("生成"),onClick:function(){N()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(i.Zp,{title:"公钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,me.l)(E),(0,ut.LW)("复制完成"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){O("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){_(t.target.value)},value:E}))),n.createElement(o.VP,null,n.createElement(i.Zp,{title:"私钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){L&&((0,me.l)(L),(0,ut.LW)("复制成功"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){O("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:L,onChange:function(t){k(t.target.value)}}))))))}var Se=r(1499),Le=r(1083);function ke(t){return ke="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},ke(t)}function Ne(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Fe(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 Oe(t){return function(t){if(Array.isArray(t))return Ce(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Fe(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 Ae(){Ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ke(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ke(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function je(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 Ke(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){je(a,n,o,i,c,"next",t)}function c(t){je(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Pe(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)||Fe(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 Fe(t,e){if(t){if("string"==typeof t)return Ce(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)?Ce(t,e):void 0}}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Ie,Te,De,Me,Ge,Be=n.lazy((function(){return Promise.all([r.e(874),r.e(91)]).then(r.bind(r,4091))}));function He(){var t=(0,w.Bd)(),e=t.t,r=(t.i18n,Pe((0,x.L4)(b.A.confirm),2)),u=(r[0],r[1],Pe((0,x.L4)(b.A.showPrompt),2)),l=(u[0],u[1]),f=(0,E.MH)().check_user_auth,h=Pe((0,n.useState)(""),2),p=h[0],S=h[1],L=Pe((0,x.L4)(b.A.router_jump),2),k=L[0],N=L[1],O=Pe((0,n.useState)("get"),2),A=O[0],j=O[1],K=Pe((0,n.useState)(""),2),P=K[0],F=K[1],I=Pe((0,n.useState)(void 0),2),T=I[0],M=I[1],G=Pe((0,n.useState)([]),2),B=G[0],H=G[1],U=Pe((0,n.useState)([]),2),R=U[0],V=U[1],z=Pe((0,n.useState)(1),2),$=z[0],J=z[1],Y=Pe((0,n.useState)(1),2),Z=Y[0],X=Y[1],Q=Pe((0,n.useState)(1),2),tt=Q[0],et=Q[1],rt=Pe((0,n.useState)(),2),nt=rt[0],ot=rt[1],at=Pe((0,x.L4)(b.A.nav_index_add_item_by_now_list),2),it=(at[0],at[1]),ct=Pe((0,x.L4)(b.A.prompt_card),2),lt=(ct[0],ct[1]);E.xK.set_value_temp("{}"),(0,n.useEffect)((function(){return Ie={},Te={},De="",Me="",Ge="",E.xK.get_editor().session.setMode("ace/mode/json"),k.http_download_map_path&&(M(k.http_download_map_path),N({})),q.ws.sendData(W.HK.http_download_water,void 0).then((function(){q.ws.addMsg(W.HK.http_download_water,(function(t){var e=t.context;V(e)}))})),function(){q.ws.unConnect()}}),[]);var st=function(){var t=Ke(Ae().mark((function t(){var e;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("http/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ft=function(){var t=Ke(Ae().mark((function t(e){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("http/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ht=function(){var t=Ke(Ae().mark((function t(e){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:F(e.url),j(e.method),M(e.local_download_path),e.header_type&&pt(e.header_type),e.headers&&(Ie=JSON.parse(e.headers),1===e.header_type&&(E.xK.get_editor().setValue(e.headers,-1),E.xK.get_editor().session.setMode("ace/mode/json"))),e.form_data_list&&H(JSON.parse(e.form_data_list)),e.json_data&&(Te=JSON.parse(e.json_data)),e.data&&(De=e.data),e.body_type&&(X(e.body_type),2===e.header_type&&(1===e.body_type?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===e.body_type&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=function(t){try{1===$?Ie=JSON.parse(E.xK.get_editor_value()):2===$&&(1===Z?De=E.xK.get_editor_value():2===Z&&(Te=JSON.parse(E.xK.get_editor_value())))}catch(t){(0,ut.zN)(t.message)}J(t),1===t?(E.xK.get_editor().setValue(JSON.stringify(Ie,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")):2===t&&(1===Z?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===Z&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")))},yt=function(t){if(2===$){if(E.xK.get_editor_value())try{1===Z?De=E.xK.get_editor_value():2===Z&&(Te=JSON.parse(E.xK.get_editor_value()))}catch(t){return void(0,ut.zN)(t.message)}X(t),1===t?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===t&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))}},dt=function(t){var e=new m.vr;if(e.url=P,e.method=A,1===$&&(Ie=JSON.parse(E.xK.get_editor_value())),e.headers=Ie,e.body_type=Z,e.header_type=$,Z===m.RB.row)2===$&&(De=E.xK.get_editor_value()),e.data=De,e.json_data=JSON.stringify(Te);else if(Z===m.RB.json)Ie["Content-Type"]="application/json",1===$&&E.xK.get_editor().setValue(JSON.stringify(Ie),-1),2===$&&(Te=JSON.parse(E.xK.get_editor_value())),e.json_data=JSON.stringify(Te),e.data=De;else if(Z===m.RB.form){Ie["Content-Type"]="multipart/form-data",e.form_data_list=B;var r,n=Ne(B);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.key&&o.is_file&&t&&t.append(o.fullPath,o.file_object)}}catch(t){n.e(t)}finally{n.f()}}return e},mt=function(){var t=Ke(Ae().mark((function t(){var e,r;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d._U.have_http_method(A)){t.next=3;break}return(0,ut.zN)("不存在的http method"),t.abrupt("return");case 3:if(P){t.next=6;break}return(0,ut.zN)("url is empty"),t.abrupt("return");case 6:ot(void 0),S(""),(e=new FormData).append("data",JSON.stringify(dt(e))),r="http/send",T&&(r+="?local_download_path=".concat(T)),Le.A.post(d._U.getUrl(r),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,ut.zN)(t.message)})).then((function(t){if(t){if(t.headers.filecat_remote_code)try{var e=JSON.parse(t.headers.filecat_remote_code);ot(200===e?n.createElement("span",{style:{color:"green"}},"200"):e)}catch(t){console.log(t)}Me="object"===ke(t.data)?JSON.stringify(t.data):t.data;try{t.headers.filecat_remote_raw_headers&&(Ge=JSON.stringify(JSON.parse(t.headers.filecat_remote_raw_headers),null,2))}catch(e){Ge=JSON.stringify(t.headers.filecat_remote_raw_headers)}1===tt?S(Me):2===tt&&S(Ge)}}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=Ke(Ae().mark((function t(){var e,r,n,o;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=dt()).local_download_path=T,B){r=Ne(B);try{for(r.s();!(n=r.n()).done;)(o=n.value).is_file&&(o.file_object=void 0)}catch(t){r.e(t)}finally{r.f()}}return e.form_data_list=JSON.stringify(B),e.headers=JSON.stringify(e.headers),"object"===ke(e.data)&&(e.data=JSON.stringify(e.data)),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,0!==R.length&&n.createElement(i.Zp,{title:"正在下载"},n.createElement("div",null,R.map((function(t,r){var o,a;return n.createElement("div",{key:r},n.createElement("div",{className:"div-row"},n.createElement(c.rA,{icon:"cancel",title:e("取消"),onClick:function(){q.ws.sendData(W.HK.http_download_cancel,t.local_download_path)}}),n.createElement(i.xP,{context:t.filename,tip_context:t.local_download_path}),n.createElement("span",{style:{paddingLeft:".3rem",color:"green"}},"".concat(null!==(o=t.progresses)&&void 0!==o?o:0,"% ").concat(t.loaded?(0,D.v7)(t.loaded):"","MB / ").concat(null!==(a=t.seep)&&void 0!==a?a:"","MB/s "))),n.createElement("div",{style:{width:t.progresses?"".concat(t.progresses,"%"):"0",backgroundColor:"#40c4ff",height:"5px",transition:"0.2s ease width",borderRadius:"10px"}}))})))),n.createElement(i.Zp,{title:"",rightBottomCom:3===Z&&2===$&&n.createElement(c.rA,{icon:"add",title:e("添加"),onClick:function(){H([{}].concat(Oe(B)))}})},n.createElement("div",{className:"http_url"},n.createElement(a.$Z,{not_mobile:!0,max_width:"15%",placeholder:e("协议"),icon:"http",value:A,handleInputChange:function(t){j(t)}}),n.createElement(a.$Z,{not_mobile:!0,max_width:"80%",placeholder:e("http url"),icon:"link",value:P,handleInputChange:function(t){F(t)}}),n.createElement(c.rA,{icon:"send",title:e("发送"),onClick:mt}),f(_.oV.http_proxy_tag_update)&&n.createElement(c.rA,{title:"添加",icon:"save_as",onClick:function(){if(f(_.oV.http_proxy_tag_update)){var t,r,o=Ne(B);try{for(o.s();!(t=o.n()).done;){if(t.value.is_file)return void(0,ut.zN)("表单中含有文件,浏览器限制不能添加")}}catch(t){o.e(t)}finally{o.f()}lt({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement("div",{className:"card-content"},n.createElement(a.Sm,{placeholderOut:e("输入标签名"),handleInputChange:function(t){return r=t}})),n.createElement("div",{className:"card-action"},n.createElement("button",{className:"button button--flat",onClick:Ke(Ae().mark((function t(){var e;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vt();case 2:(e=t.sent).name=r,it(e),lt({open:!1});case 6:case"end":return t.stop()}}),t)})))},"确定")))})}else(0,ut.zN)("no permission")}})),n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===$,onchange:function(){pt(1)}}),n.createElement(a.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===$,onchange:function(){pt(2)}})]}),n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"body",context:e("row"),selected:1===Z,onchange:function(){yt(1)}}),n.createElement(a.U6,{value:2,name:"body",context:e("json"),selected:2===Z,onchange:function(){yt(2)}}),n.createElement(a.U6,{value:3,name:"body",context:e("form"),selected:3===Z,onchange:function(){yt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:3===Z&&2===$?"none":""}},n.createElement(Be,{name:""})),n.createElement("div",{style:{display:3!==Z||2!==$?"none":""}},n.createElement(de.X,{headers:["key",e("值")],rows:B.map((function(t,r){var o=[n.createElement(a.Sm,{value:t.key,handleInputChange:function(e){t.key=e,H(Oe(B))},no_border:!0}),n.createElement(a.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,H(Oe(B))},no_border:!0}),n.createElement("div",null,n.createElement(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){l({show:!0,type:C.PromptEnum.UploadFile,overlay:!0,data:{extra_data:{only_file:!0},call:function(e){var r,n=null===(r=e.currentTarget)||void 0===r?void 0:r.files;if(n){var o=n[0];o.fullPath=(0,Se.hU)()+Date.now().toString(),B[t].value="".concat(o,"(").concat(o.name,")"),B[t].is_file=!0,B[t].fileName=o.name,B[t].fullPath=o.fullPath,H(Oe(B)),B[t].file_object=o,l({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){B.splice(t,1),H(Oe(B))}(r)}}))];return o})),width:"10rem"})),n.createElement("div",{style:{paddingTop:"1rem"}},void 0===T?n.createElement("span",{onClick:function(){M("")}},"下载到本地目录"):n.createElement(a.Sm,{placeholder:e("本地地址"),value:T,handleInputChange:function(t){M(t)},handlerEnter:function(){T||M(void 0)}}))),n.createElement(i.Zp,{title:nt,titleCom:n.createElement("div",{className:" div-row "},n.createElement(a.U6,{value:1,name:"respone",context:e("响应体"),selected:1===tt,onchange:function(){et(1),S(Me)}}),n.createElement(a.U6,{value:1,name:"respone",context:e("响应头"),selected:2===tt,onchange:function(){et(2),S(Ge)}}),n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){p&&((0,me.l)(p),(0,ut.LW)("复制完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){S(t.target.value)},value:p}))),n.createElement(o.VP,null,n.createElement(g.N,{getItems:st,save:ft,have_auth_edit:f(_.oV.http_proxy_tag_update),clickItem:ht,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"method",preName:"method"},{key:"headers",preName:"headers"},{key:"data",preName:"data"},{key:"form_data_list",preName:"form_data_list"},{key:"local_download_path",preName:"local_download_path"},{key:"color",preName:"color"}]})))))}var Ue=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Re(t){var e=(0,w.Bd)().t,r=(0,E.MH)().check_user_auth,a=[];return r(_.oV.ssh_proxy)&&a.push({index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/"}),r(_.oV.http_proxy)&&a.push({index:1,name:e("http代理"),rto:"http/"}),r(_.oV.browser_proxy)&&a.push({index:1,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"}),r(_.oV.rdp_proxy)&&a.push({index:1,name:"rdp".concat(e("代理")),rto:"rdp/"}),r(_.oV.wol_proxy)&&a.push({index:1,name:e("网络唤醒"),rto:"netwol/"}),r(_.oV.rtsp_proxy)&&a.push({index:1,name:e("rtsp播放器"),rto:"rtsp/"}),a.push.apply(a,[{index:1,name:e("非对称密钥"),rto:"crypto/"},{index:1,name:e("时间工具"),rto:"timeutil/"}]),n.createElement(o.W1,{optionList:a},r(_.oV.ssh_proxy)&&n.createElement(Kt,null),r(_.oV.http_proxy)&&n.createElement(He,null),r(_.oV.browser_proxy)&&n.createElement(j,null),r(_.oV.rdp_proxy)&&n.createElement(ie,null),r(_.oV.wol_proxy)&&n.createElement(pe,null),r(_.oV.rtsp_proxy)&&n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Ue,null)),n.createElement(_e,null),n.createElement(o.xh,null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(p,null)))))}},7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(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)?a(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 a(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=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(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,a.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===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>f,RB:()=>p,eq:()=>s,qB:()=>l,vo:()=>h,vr:()=>y});var l=i((function t(){u(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=i((function t(){u(this,t),o(this,"open",!1),o(this,"model",s.udp),o(this,"key","")})),h=i((function t(){u(this,t),o(this,"open",!1),o(this,"key","")})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=i((function t(){u(this,t)}))}}]);
|
|
1
|
+
/*! For license information please see 432.18fa83104eda5c17d342.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Re});var n=r(6540),o=r(5725),a=r(3033),i=r(447),c=r(5997),u=r(4289),l=r(3413),s=r.n(l);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return h(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)?h(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 h(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 p(t){var e=f((0,n.useState)("毫秒"),2),r=e[0],o=e[1],l=f((0,n.useState)(""),2),h=l[0],p=l[1],y=f((0,n.useState)(""),2),d=y[0],m=y[1];return n.createElement(i.Zp,{title:"时间转换器",rightBottomCom:n.createElement(c.C3,{text:"确定",clickFun:function(){if(h||d){var t=0,e=""!==h&&0!==h;if(e){if(!(0,u.kf)(h))return void new(s())({type:"error",text:"必须都是数字",timeout:1e3,layout:"bottomLeft"}).show();t=parseInt(h),"分秒"===r&&(t*=1e3)}var n=new Date(e?t:d),o=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(m(o),!h){var a=n.getTime();p("毫秒"===r?a:a/1e3)}}else new(s())({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(a.l6,{options:[{title:"毫秒",value:"毫秒"},{title:"分秒",value:"分秒"}],onChange:function(t){o(t)}}),n.createElement(a.Sm,{placeholder:r,value:h,handleInputChange:function(t){p(t)}}),n.createElement(a.Sm,{placeholder:"格式化时间",value:d,handleInputChange:function(t){m(t)}}))}var y=r(7952),d=r(6007),m=r(8694),v=r(3459),g=r(3029),w=r(2389),b=r(6417),x=r(7444),E=r(8247),_=r(3430);function S(t){return S="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},S(t)}function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(F([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==S(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(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=A(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=f(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 A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(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 j(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 K(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(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(S(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(N.prototype),l(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new N(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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(K),!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),K(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;K(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),m}},e}function k(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 N(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){k(a,n,o,i,c,"next",t)}function c(t){k(a,n,o,i,c,"throw",t)}i(void 0)}))}}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return A(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)?A(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 A(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,w.Bd)().t,r=O((0,x.L4)(b.A.header_min),2),i=(r[0],r[1]),u=O((0,n.useState)(""),2),l=u[0],f=u[1],h=O((0,n.useState)(""),2),p=h[0],S=h[1],k=O((0,n.useState)(void 0),2),A=k[0],j=k[1],K=O((0,n.useState)(!1),2),P=K[0],F=K[1],C=(0,E.MH)().check_user_auth,I=function(){var t=N(L().mark((function t(){var e;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new m.qB).targetProxyUrl="string"==typeof l?l:p,t.next=4,d._U.post("close",e);case 4:if(t.sent.code===v.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:S(""),i(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=N(L().mark((function t(e){var r,n,o;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new m.qB).targetProxyUrl="string"==typeof e?e:l,r.sysProxyPort=A,t.next=5,d._U.post("start",r);case 5:if((n=t.sent).code===v.m.Sucess){t.next=8;break}return t.abrupt("return");case 8:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),S(o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){I()}}),[]);var D=function(){var t=N(L().mark((function t(){var e;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=N(L().mark((function t(e){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G=function(){var t=N(L().mark((function t(e){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f(e.url),T(e.url);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:A,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),j(parseInt(t)))},max_width:"10rem"}),n.createElement(a.$Z,{placeholder:e("要代理的url"),icon:"link",value:l,handleInputChange:function(t){f(t)}}),n.createElement(c.rA,{icon:"play_arrow",title:e("开始代理"),onClick:T}),n.createElement(c.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){F(!P),i(!P)}}),n.createElement(c.rA,{icon:"close",title:e(e("关闭")),onClick:function(){I(),F(!1),f("")}})),n.createElement(o.jW,{isFull:P},n.createElement("div",{id:"browser"},!p&&n.createElement(g.N,{have_auth_edit:C(_.oV.browser_proxy_tag_update),getItems:D,save:M,clickItem:G,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"color",preName:"color"}]}),n.createElement("iframe",{id:"webview",src:p}))))}var K=r(4405),P=r(4694),F=r(5726),C=r(7567),I=r(7022),T=r(8844),D=r(8815),M=r(9214);function G(t){return G="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},G(t)}function B(){B=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(G(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function H(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=$(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 U(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$(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 R(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 V(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){R(a,n,o,i,c,"next",t)}function c(t){R(a,n,o,i,c,"throw",t)}i(void 0)}))}}function z(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)||$(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 $(t,e){if(t){if("string"==typeof t)return J(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)?J(t,e):void 0}}function J(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 Y(t){var e=z((0,x.L4)(b.A.selectedFileList),2),r=e[0],o=e[1],a=z((0,x.L4)(b.A.clickFileList),2),i=a[0],c=a[1],u=z((0,x.L4)(b.A.editorSetting),2),l=(u[0],u[1]),s=z((0,x.L4)(b.A.shellNowDir),2),f=s[0],h=s[1],p=z((0,x.L4)(b.A.sshInfo),2),y=p[0],m=(p[1],z((0,x.L4)(b.A.nowFileList),2)),g=m[0],w=m[1],_=z((0,x.L4)(b.A.remoteShellShow),2),S=_[0],L=_[1],k=z((0,x.L4)(b.A.enterKey),2),N=k[0],O=(k[1],z((0,x.L4)(b.A.confirm),2)),A=(O[0],O[1]),j=function(){var e=V(B().mark((function e(n,a){var u,s,p,m,g,b,x,_,k,O,j,F,C,T,M,G,R;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,P.kW)(r,n))o((0,P.P1)(r,n));else if("ctrl"===N)o([].concat(U(r),[n]));else if("shift"===N){if(u=(0,P.a7)(r),s=u.max,p=u.min,m=[],n>=s)for(g=s;g<=n;g++)m.push(g);else for(b=p;b>=n;b--)m.push(b);o(m)}else o([n]);if(c([].concat(U(i),[n])),setTimeout((function(){c((0,P.P1)(i,n))}),300),t.type!==I.Iw.folder){e.next=29;break}if(void 0===i.find((function(t){return t===n}))){e.next=27;break}return k=new K.x,Object.assign(k,y),k.dir=P.HS.apply(void 0,U(f).concat([a])),o([]),c([]),w({files:[],folders:[]}),e.next=15,d.Fg.post("get/dir",k);case 15:if((O=e.sent).code===v.m.Sucess){e.next=18;break}return e.abrupt("return");case 18:j=H(null!==(x=O.data.files)&&void 0!==x?x:[]);try{for(j.s();!(F=j.n()).done;)(C=F.value).origin_size=C.size,C.size=(0,D.v7)(C.size),C.show_mtime=C.mtime?(0,D.s8)(C.mtime):""}catch(t){j.e(t)}finally{j.f()}T=H(null!==(_=O.data.folders)&&void 0!==_?_:[]);try{for(T.s();!(M=T.n()).done;)(G=M.value).show_mtime=G.mtime?(0,D.s8)(G.mtime):""}catch(t){T.e(t)}finally{T.f()}return w(O.data),z=O.data,bt=z,h([].concat(U(f),[a])),S.show&&L({show:!0,path:k.dir}),e.abrupt("return");case 27:e.next=38;break;case 29:if(void 0===i.find((function(t){return t===n}))){e.next=38;break}if(R=function(){var e=V(B().mark((function e(){var r,n,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new K.x,Object.assign(r,y),r.file=P.HS.apply(void 0,U(f).concat([a])),e.next=5,d.Fg.post("get/file/text",r);case 5:n=e.sent,o=void 0,a.endsWith(I.Iw.workflow_act)?o="ace/mode/yaml":(a.endsWith(I.Iw.draw)||a.endsWith(I.Iw.excalidraw))&&(o="ace/mode/json"),l({model:o,open:!0,fileName:t.name,save:function(){var t=V(B().mark((function t(e){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,d.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(E.xK.set_value_temp(""),l({open:!1,fileName:"",save:null}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),E.xK.set_value_temp(n.data);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!("number"==typeof t.origin_size&&t.origin_size>D.o5)){e.next=35;break}return A({open:!0,title:"提示",sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=V(B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A({open:!1,handle:null}),t.next=3,R();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 35:return e.next=37,R();case 37:return e.abrupt("return");case 38:case"end":return e.stop()}var z}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(){var e=V(B().mark((function e(n){var a,i,c,u,l,s;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new K.x,Object.assign(a,y),a.target=P.HS.apply(void 0,U(f).concat([n])),i=(0,M.i)(g,r),c=i.map((function(t){return P.HS.apply(void 0,U(f).concat([t.name]))})),u=H(c),e.prev=6,u.s();case 8:if((l=u.n()).done){e.next=17;break}return s=l.value,a.source=s,e.next=13,d.Fg.post("move",a);case 13:if(e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),u.e(e.t0);case 22:return e.prev=22,u.f(),e.finish(22);case 25:return o([]),A({open:!1,handle:null}),e.next=29,t.fileHandler();case 29:case"end":return e.stop()}}),e,null,[[6,19,22,25]])})));return function(t){return e.apply(this,arguments)}}();return n.createElement(T.B,{draggable_handle:F,name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,show_mtime:t.show_mtime,click:j})}var Z=r(7856),W=r(4238),X=r(4944);function q(t){return q="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},q(t)}function Q(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ot(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 tt(){tt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==q(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(q(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function et(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 rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){et(a,n,o,i,c,"next",t)}function c(t){et(a,n,o,i,c,"throw",t)}i(void 0)}))}}function nt(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)||ot(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 ot(t,e){if(t){if("string"==typeof t)return at(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)?at(t,e):void 0}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var it=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ct(t){var e=nt((0,n.useState)(null),2),r=e[0],o=e[1],a=nt((0,x.L4)(b.A.remoteShellShow),2),i=a[0],c=(a[1],nt((0,n.useState)(!1),2)),u=c[0],l=c[1],s=nt((0,x.L4)(b.A.sshInfo),2),f=s[0],h=(s[1],nt((0,x.L4)(b.A.shellNowDir),2)),p=h[0],y=(h[1],function(){var t=rt(tt().mark((function t(){var e,r,n;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new Z.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},X.ws.addMsg(W.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=rt(tt().mark((function t(e){var r;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new W.hf(W.HK.remote_shell_send)).context=e,t.next=4,X.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()),d=function(){rt(tt().mark((function t(){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),X.ws.isAilive()&&X.ws.setPromise(function(){var t=rt(tt().mark((function t(e){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,X.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){return function(){d()}}),[]),(0,n.useEffect)((function(){if(i.show)if(r){if(u){var t=new W.hf(W.HK.remote_shell_cd);t.context=i.path,X.ws.send(t)}}else y(),l(!0);else d()}),[i]);return n.createElement(it,{show:i.show,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new W.hf(W.HK.remote_shell_open),o=new K.x;Object.assign(o,f),o.init_path=P.HS.apply(void 0,Q(p)),o.rows=t,o.cols=e,n.context=o,X.ws.send(n)}})}var ut=r(2042),lt=r(2730);function st(t){return st="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},st(t)}function ft(){return ft=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},ft.apply(null,arguments)}function ht(){ht=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==st(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(st(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function pt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gt(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 yt(t){return function(t){if(Array.isArray(t))return wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gt(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 dt(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 mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){dt(a,n,o,i,c,"next",t)}function c(t){dt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function vt(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)||gt(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 gt(t,e){if(t){if("string"==typeof t)return wt(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)?wt(t,e):void 0}}function wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var bt,xt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),Et=Object.values(xt),_t=280;function St(t){var e=(0,w.Bd)().t,r=(0,n.useRef)(void 0),o=vt((0,x.L4)(b.A.nowFileList),2),i=o[0],u=o[1],l=vt((0,x.L4)(b.A.fileShowType),2),f=l[0],h=l[1],p=vt((0,x.L4)(b.A.uploadFiles),2),m=(p[0],p[1]),g=vt((0,x.L4)(b.A.showPrompt),2),E=g[0],_=g[1],S=vt((0,x.L4)(b.A.selectedFileList),2),L=S[0],k=(S[1],vt((0,x.L4)(b.A.enterKey),2)),N=(k[0],k[1]),O=vt((0,x.L4)(b.A.copyedFileList),2),A=O[0],j=O[1],T=vt((0,x.L4)(b.A.cutedFileList),2),G=T[0],B=T[1],H=vt((0,x.L4)(b.A.selectedFileList),2),U=(H[0],H[1]),R=vt((0,x.L4)(b.A.clickFileList),2),V=(R[0],R[1]),z=vt((0,x.L4)(b.A.remoteShellShow),2),$=z[0],J=z[1],Z=vt((0,x.L4)(b.A.shellNowDir),2),W=Z[0],X=Z[1],q=vt((0,x.L4)(b.A.sshInfo),2),Q=q[0],tt=(q[1],vt((0,n.useState)(void 0),2)),et=tt[0],rt=tt[1],nt=vt((0,n.useState)(""),2),ot=nt[0],at=nt[1],it=function(){var e=mt(ht().mark((function e(){var r,n,o,a,i,c,l,s,f,h,p,y;return ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new K.x).dir=P.HS.apply(void 0,yt(W)),r.username=t.data.username,r.password=t.data.password,r.domain=t.data.domain,r.port=t.data.port,e.next=8,d.Fg.post("get/dir",r);case 8:if((n=e.sent).code===v.m.Sucess){e.next=12;break}return(0,ut.zN)("连接失败"),e.abrupt("return");case 12:o=n.data||{},a=o.folders,i=o.files,c=pt(null!=i?i:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).origin_size=s.size,s.size=(0,D.v7)(s.size),s.show_mtime=s.mtime?(0,D.s8)(s.mtime):""}catch(t){c.e(t)}finally{c.f()}f=pt(null!=a?a:[]);try{for(f.s();!(h=f.n()).done;)(p=h.value).show_mtime=p.mtime?(0,D.s8)(p.mtime):""}catch(t){f.e(t)}finally{f.f()}u(y={folders:a||[],files:i||[]}),bt=y;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),st=function(){var t=mt(ht().mark((function t(){return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,it();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),dt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/_t);0===t&&(t=1),rt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return U([]),V([]),st(),dt(),window.addEventListener("resize",dt),function(){window.removeEventListener("resize",dt)}}),[]);var gt=function(){var t=mt(ht().mark((function t(e){var r,n,o,a;return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,F.T)(r);case 8:a=t.sent,m(a),_({show:!0,type:C.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),wt=function(t){t.preventDefault()};function xt(t){new(s())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",wt),e.addEventListener("drop",gt),function(){t.close(),e.removeEventListener("dragover",wt),e.removeEventListener("drop",gt)}}),[]),(0,n.useEffect)((function(){E&&E.data&&E.data.ok&&st()}),[E]);var St=function(){var t=mt(ht().mark((function t(){var e,r,n,o,a,i,c,l,s,f,h,p;return ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new K.x,Object.assign(e,Q),!(W.length<=1)){t.next=4;break}return t.abrupt("return");case 4:return r=W.slice(0,W.length-1),X(r),e.dir=P.HS.apply(void 0,yt(r)),t.next=9,d.Fg.post("get/dir",e);case 9:if((n=t.sent).code===v.m.Sucess){t.next=12;break}return t.abrupt("return");case 12:o=n.data||{},a=o.folders,i=o.files,c=pt(null!=i?i:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).size=(0,D.v7)(s.size),s.show_mtime=s.mtime?(0,D.s8)(s.mtime):""}catch(t){c.e(t)}finally{c.f()}f=pt(null!=a?a:[]);try{for(f.s();!(h=f.n()).done;)(p=h.value).show_mtime=p.mtime?(0,D.s8)(p.mtime):""}catch(t){f.e(t)}finally{f.f()}u({folders:a||[],files:i||[]}),$.show&&J({show:!0,path:P.HS.apply(void 0,yt(r))});case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Lt=vt((0,n.useState)(!1),2),kt=Lt[0],Nt=Lt[1];(0,n.useEffect)((function(){var t=function(t){if(kt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=i.files.length,r=i.folders.length,n=[],o=0;o<e+r;o++)n.push(o);U(n)}else N("ctrl");else"Escape"===t.key?U([]):"Shift"===t.key&&N("shift")},e=function(t){t.ctrlKey||N("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[i,kt]);var Ot=function(t){t.target===t.currentTarget&&U([])};return n.createElement("div",{className:"not-select-div"},n.createElement(y.A,{left_children:n.createElement(a.$Z,{handleEnterPress:function(){var t,e;if(bt){U([]),V([]);var r,n=[],o=[],a=pt(null!==(t=bt.files)&&void 0!==t?t:[]);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.name.includes(ot)&&n.push(i)}}catch(t){a.e(t)}finally{a.f()}var c,l=pt(null!==(e=bt.folders)&&void 0!==e?e:[]);try{for(l.s();!(c=l.n()).done;){var s=c.value;s.name.includes(ot)&&o.push(s)}}catch(t){l.e(t)}finally{l.f()}u({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){at(t)},max_width:"25em"})},n.createElement(c.rA,{icon:"arrow_back",title:e("返回"),onClick:St}),L.length>0&&n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){_({show:!0,type:C.PromptEnum.SshDelete,overlay:!0,data:{}})}}),L.length>0&&n.createElement(c.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,M.i)(i,L);j(t.map((function(t){return P.HS.apply(void 0,yt(W).concat([t.name]))}))),B([]),xt("已复制")}}),L.length>0&&n.createElement(c.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,M.i)(i,L);B(t.map((function(t){return P.HS.apply(void 0,yt(W).concat([t.name]))}))),j([]),xt("已剪切")}}),(A.length>0||G.length>0)&&n.createElement(c.rA,{onClick:function(){_({show:!0,type:C.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:A.length+G.length}),1===L.length&&i.files.length>=1&&i.folders.length>=1&&(0,M.i)(i,L)[0].type!==I.Iw.folder&&n.createElement(c.rA,{icon:"download",title:e("下载"),onClick:function(){var e=(0,M.i)(i,L),r="/api/ssh/download?file=".concat(P.HS.apply(void 0,yt(W).concat([e[0].name])),"&domain=").concat(t.data.domain,"&port=").concat(t.data.port,"&username=").concat(t.data.username,"&password=").concat(t.data.password,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===L.length&&n.createElement(c.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){_({show:!0,type:C.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"terminal",title:"shell",onClick:function(){$.show?J({show:!1,path:""}):J({show:!0,path:P.HS.apply(void 0,yt(W))})}}),n.createElement(c.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){h((0,P.jH)(Et,f))}}),n.createElement(c.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){_({show:!0,type:C.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){_({show:!0,type:C.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"upload_file",title:"上传",onClick:function(){_({show:!0,type:C.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],a=new Set,i=0;i<r.length;i++){var c=r[i],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&a.add((0,lt.S)(u)),o.push(c)}var l=[];if(n){var s,f=pt(a);try{for(f.s();!(s=f.n()).done;){var h=s.value;l.push({isDir:!0,fullPath:h,name:h})}}catch(t){f.e(t)}finally{f.f()}}l.push.apply(l,o),m(l),_({show:!0,type:C.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(c.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(f),ref:r,onMouseEnter:function(){Nt(!0)},onMouseLeave:function(){Nt(!1)}},!!i&&!!i.folders&&i.folders.length>0&&n.createElement("h2",null,"文件夹"),!!i&&!!i.folders&&n.createElement("div",{onClick:Ot},i.folders.map((function(t,e){return n.createElement(Y,ft({fileHandler:it,itemWidth:et,index:e,key:e},t))}))),!!i&&!!i.folders&&i.files.length>0&&n.createElement("h2",{onClick:Ot},"文件"),!!i&&!!i.folders&&n.createElement("div",{onClick:Ot},i.files.map((function(t,e){return n.createElement(Y,ft({fileHandler:it,itemWidth:et,index:e+i.folders.length,key:e},t))})))),n.createElement(ct,null))}function Lt(t){return Lt="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},Lt(t)}function kt(){kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(Lt(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Nt(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 Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Nt(a,n,o,i,c,"next",t)}function c(t){Nt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function At(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(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)?jt(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 jt(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 Kt(t){var e=(0,w.Bd)().t,r=At((0,n.useState)(""),2),o=r[0],i=r[1],u=At((0,n.useState)(""),2),l=u[0],f=u[1],h=At((0,n.useState)(""),2),p=h[0],m=h[1],S=At((0,n.useState)(""),2),L=S[0],k=S[1],N=At((0,n.useState)(void 0),2),O=N[0],A=N[1],j=At((0,n.useState)(""),2),P=j[0],F=j[1],C=At((0,n.useState)(!1),2),I=C[0],T=C[1],D=At((0,x.L4)(b.A.shellNowDir),2),M=(D[0],D[1]),G=At((0,x.L4)(b.A.sshInfo),2),B=(G[0],G[1]),H=(0,E.MH)().check_user_auth,U=function(){var t=Ot(kt().mark((function t(){var e;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new K.x).password=l,e.domain=L,e.port=O,e.username=o,t.next=7,d.Fg.post("close",e);case 7:t.sent,T(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Ot(kt().mark((function t(e){var r,n;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new K.x).password=e?e.password:l,r.domain=e?e.domain:L,r.port=e?e.port:O,r.username=e?e.username:o,r.private_path=e?e.private_path:p,t.next=8,d.Fg.post("start",r);case 8:(n=t.sent)&&n.code===v.m.Sucess&&(r.dir=e?e.dir:P,B(r),M([r.dir]),T(!0));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=Ot(kt().mark((function t(){var e;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=Ot(kt().mark((function t(e){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$=function(){var t=Ot(kt().mark((function t(e){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k(e.domain),F(e.dir),A(e.port),i(e.username),f(e.password),m(e.private_path),t.next=8,R(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:e("目录"),icon:"home",value:P,handleInputChange:function(t){return F(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("账号"),icon:"verified_user",value:o,handleInputChange:function(t){return i(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("密码"),icon:"password",value:l,handleInputChange:function(t){return f(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:p,handleInputChange:function(t){return m(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("连接地址"),icon:"location_on",value:L,handleInputChange:function(t){k(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("端口"),icon:"outlet",value:O,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),A(parseInt(t)))},max_width:"7rem"}),n.createElement(c.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){R()}})),I?n.createElement(St,{close:U,data:{port:O,password:l,username:o,domain:L,dir:P}}):n.createElement(g.N,{have_auth_edit:H(_.oV.ssh_proxy_tag_update),getItems:V,save:z,clickItem:$,items:[{key:"name",preName:e("名字")},{key:"domain",preName:e("地址")},{key:"port",preName:e("端口")},{key:"username",preName:e("账号")},{key:"password",preName:e("密码")},{key:"private_path",preName:e("私钥路径")},{key:"dir",preName:e("访问目录")},{key:"color",preName:"color"}]}))}function Pt(t){return Pt="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},Pt(t)}function Ft(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function Ct(t){var e=function(t,e){if("object"!=Pt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Pt(e)?e:e+""}function It(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var Tt=function(){return function(t,e,r){return e&&Ft(t.prototype,e),r&&Ft(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.render=new Qt.Canvas.create(this.canvas),this.activeSession=!1,this.install()}),[{key:"close",value:function(){this.activeSession=!1}},{key:"install",value:function(){var t=this;return this.canvas.addEventListener("mousemove",(function(e){var r=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:0,isPressed:!1}),e.preventDefault||t.activeSession(),!1})),this.canvas.addEventListener("mousedown",(function(e){var r=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:It(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("DOMMouseScroll",(function(e){if(t.activeSession){var r=e.detail,n=Math.round(15*Math.abs(r)/8),o=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.wheel,{x:e.clientX-o.left,y:e.clientY-o.top,step:n,isNegative:r>0,isHorizontal:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("mousewheel",(function(e){if(t.activeSession){var r=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=r?e.deltaX:e.deltaY,o=Math.round(15*Math.abs(n)/8),a=Qt.elementOffset(t.canvas);return X.ws.sendData(W.HK.wheel,{x:e.clientX-a.left,y:e.clientY-a.top,step:o,isNegative:n>0,isHorizontal:r}),e.preventDefault(),!1}})),window.addEventListener("keydown",(function(e){if(t.activeSession)return X.ws.sendData(W.HK.scancode,{code:Qt.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return X.ws.sendData(W.HK.scancode,{code:Qt.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var a=this;X.ws.addMsg(W.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),a.activeSession=!0})),X.ws.addMsg(W.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,a.render.update(e)})),X.ws.addMsg(W.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),a.activeSession=!1})),X.ws.addMsg(W.HK.rdp_error,(function(t){a.activeSession=!1}));var i=new W.hf;i.cmdType=W.HK.infos,i.context={ip:t.indexOf(":")>-1?t.split(":")[0]:t,port:t.indexOf(":")>-1?parseInt(t.split(":")[1]):3389,screen:{width:this.canvas.width,height:this.canvas.height},domain:e,username:r,password:n,locale:Qt.locale()},X.ws.send(i)}}])}();function Dt(t){return Dt="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},Dt(t)}function Mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t,e){if("object"!=Dt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Dt(e)?e:e+""}var Bt,Ht,Ut,Rt,Vt=function(){return function(t,e,r){return e&&Mt(t.prototype,e),r&&Mt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.ctx=e.getContext("2d")}),[{key:"update",value:function(t){var e=null;e=t.isCompress?function(t){var e=null;switch(t.bitsPerPixel){case 15:e="bitmap_decompress_15";break;case 16:e="bitmap_decompress_16";break;case 24:e="bitmap_decompress_24";break;case 32:e="bitmap_decompress_32";break;default:throw"invalid bitmap data format"}var r=new Uint8Array(t.data),n=Module._malloc(r.length),o=new Uint8Array(Module.HEAPU8.buffer,n,r.length);o.set(r);var a=t.destRight-t.destLeft+1,i=t.destBottom-t.destTop+1,c=a*i*4,u=Module._malloc(c),l=new Uint8Array(Module.HEAPU8.buffer,u,c),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,a,i,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,c));return Module._free(n),Module._free(u),{width:a,height:i,data:s}}(t):function(t){return{width:t.width,height:t.height,data:new Uint8ClampedArray(t.data)}}(t);var r=this.ctx.createImageData(e.width,e.height);r.data.set(e.data),this.ctx.putImageData(r,t.destLeft,t.destTop)}}])}();function zt(t){return zt="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},zt(t)}function $t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=zt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jt=($t($t($t($t($t($t($t($t($t($t(Bt={"":0,Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,Pause:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,PrintScreen:84,IntlBackslash:86,F11:87,F12:88,NumpadEqual:89,F13:100,F14:101,F15:102,F16:103,F17:104,F18:105,F19:106,F20:107,F21:108,F22:109,F23:110,KanaMode:112,Lang2:113,Lang1:114,IntlRo:115,F24:118,Convert:121,NonConvert:123,IntlYen:125,NumpadComma:126,MediaTrackPrevious:57360,MediaTrackNext:57369,NumpadEnter:57372,ControlRight:57373,VolumeMute:57376,LaunchApp2:57377,MediaPlayPause:57378,MediaStop:57380,VolumeDown:57390,VolumeUp:57392,BrowserHome:57394,NumpadDivide:57397},"PrintScreen",57399),"AltRight",57400),"NumLock",57413),"Pause",57414),"Home",57415),"ArrowUp",57416),"PageUp",57417),"ArrowLeft",57419),"ArrowRight",57421),"End",57423),$t($t($t($t($t($t($t($t($t($t(Bt,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),$t($t($t($t($t($t($t(Bt,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),Yt=($t($t($t($t($t($t($t($t($t($t(Ht={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",169:"Minus",61:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",160:"BracketLeft",164:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),$t($t($t($t($t($t($t($t($t($t(Ht,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),$t($t($t($t($t($t($t($t($t($t(Ht,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),$t($t($t($t($t($t($t($t($t($t(Ht,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),$t($t($t($t($t($t($t($t($t($t(Ht,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),$t($t($t($t($t($t($t($t($t($t(Ht,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Zt=($t($t($t($t($t($t($t($t($t($t(Ut={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),$t($t($t($t($t($t($t($t($t($t(Ut,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),$t($t($t($t($t($t($t($t($t($t(Ut,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),$t($t($t($t($t($t($t($t($t($t(Ut,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),$t($t($t($t($t($t($t($t($t($t(Ut,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),$t($t($t($t($t($t($t($t($t($t(Ut,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Wt=($t($t($t($t($t($t($t($t($t($t(Rt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft"},"220","IntlBackslash"),90,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),78,"KeyN"),77,"KeyM"),188,"Comma"),190,"Period"),$t($t($t($t($t($t($t($t($t($t(Rt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),$t($t($t($t($t($t($t($t($t($t(Rt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),$t($t($t($t($t($t($t($t($t($t(Rt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),$t($t($t(Rt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),Xt={firefox:{fr:Yt,en:Wt},chrome:{fr:Zt,en:Wt}};(Qt=function(){}).prototype={$:function(t){return document.getElementById(t)},elementOffset:function(t){for(var e=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:e}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(t){return new Tt(t)}},Canvas:{create:function(t){return new Vt(t)}},scancode:function(t){var e=Qt.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Jt[t.code||Xt[Qt.browser()||"firefox"][e][t.keyCode]]}};var qt,Qt=new Qt;function te(t){return te="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},te(t)}function ee(){ee=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==te(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(te(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function re(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 ne(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){re(a,n,o,i,c,"next",t)}function c(t){re(a,n,o,i,c,"throw",t)}i(void 0)}))}}function oe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ae(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)?ae(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 ae(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 ie(){var t=(0,w.Bd)().t,e=oe((0,x.L4)(b.A.header_min),2),r=(e[0],e[1]),i=(0,E.MH)().check_user_auth,u=oe((0,n.useState)(void 0),2),l=u[0],s=u[1],f=oe((0,n.useState)(void 0),2),h=f[0],p=f[1],m=oe((0,n.useState)(void 0),2),S=m[0],L=m[1],k=oe((0,n.useState)(!1),2),N=k[0],O=k[1],A=oe((0,n.useState)(!1),2),j=A[0],K=A[1],P=function(){var t=ne(ee().mark((function t(){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,F.J)("rle.js");case 3:qt=!0,t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),(0,ut.zN)("加载资源失败"),t.abrupt("return");case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),C=null;(0,n.useEffect)((function(){return qt||P(),function(){C&&(C.close(),C=null)}}),[]);var I=function(e){K(!0),function(n,o,a){if(n=n||e.address,o=o||e.username,a=a||e.password,!n||!o||!a)return(0,ut.zN)(t("不允许为空")),void K(!1);!function(t){C||(C=Qt.client.create(Qt.$(t)))}("rdpwebview");var i=Qt.$("rdpwebview");i.style.display="inline",i.width=window.innerWidth,i.height=window.innerHeight,O(!0),r(!0),C.connect(n,"",o,a,(function(t){Qt.$("rdpwebview").style.display="none",r(!1),K(!1),O(!1)}))}(l,h,S)},T=function(){var t=ne(ee().mark((function t(){var e;return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O(!1),t.next=3,X.ws.sendData(W.HK.rdp_disconnect,"");case 3:e=Qt.$("rdpwebview"),e.getContext("2d").clearRect(0,0,e.width,e.height),Qt.$("rdpwebview").style.display="none",K(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=ne(ee().mark((function t(){var e;return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=ne(ee().mark((function t(e){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&(0,ut.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G=function(){var t=ne(ee().mark((function t(e){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(e.password),p(e.username),s(e.address),I(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(a.$Z,{placeholder:t("地址"),icon:"outlet",value:l,handleInputChange:function(t){return s(t)}}),n.createElement(a.$Z,{placeholder:t("账号"),icon:"http",value:h,handleInputChange:function(t){return p(t)}}),n.createElement(a.$Z,{placeholder:t("密码"),icon:"http",value:S,handleInputChange:function(t){return L(t)}}),!j&&n.createElement(c.rA,{icon:"play_arrow",title:t("连接"),onClick:I}),j&&n.createElement(c.rA,{icon:"close",title:t("关闭"),onClick:T})),n.createElement(o.jW,{isFull:N},!j&&n.createElement(g.N,{have_auth_edit:i(_.oV.rdp_proxy_tag_update),getItems:D,save:M,clickItem:G,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")},{key:"color",preName:"color"}]}),n.createElement("canvas",{id:"rdpwebview",style:{display:"none"}})))}function ce(t){return ce="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},ce(t)}function ue(){ue=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ce(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ce(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function le(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 se(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){le(a,n,o,i,c,"next",t)}function c(t){le(a,n,o,i,c,"throw",t)}i(void 0)}))}}function fe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return he(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)?he(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 he(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 pe(t){var e=(0,w.Bd)().t,r=(0,E.MH)().check_user_auth,o=fe((0,n.useState)(""),2),i=o[0],u=o[1],l=function(){var t=se(ue().mark((function t(e){var r;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||i){t.next=4;break}return new(s())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,d._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===v.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(s())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),f=function(){var t=se(ue().mark((function t(){var e;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("wol/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){var t=se(ue().mark((function t(e){return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("wol/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=se(ue().mark((function t(e){return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u(e.mac),l(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(c.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){l()}}),n.createElement(a.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:i,handleInputChange:function(t){return u(t)}})),n.createElement(g.N,{have_auth_edit:r(_.oV.wol_proxy_tag_update),getItems:f,save:h,clickItem:p,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var ye,de=r(7481),me=r(505);function ve(t){return ve="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},ve(t)}function ge(){ge=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ve(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ve(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function we(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 be(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){we(a,n,o,i,c,"next",t)}function c(t){we(a,n,o,i,c,"throw",t)}i(void 0)}))}}function xe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ee(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)?Ee(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 Ee(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 _e(){var t=xe((0,n.useState)("rsa"),2),e=t[0],r=t[1],u=xe((0,n.useState)("pem"),2),l=u[0],s=u[1],f=(0,w.Bd)(),h=f.t,p=(f.i18n,xe((0,x.L4)(b.A.confirm),2)),m=(p[0],p[1]),g=xe((0,n.useState)(""),2),E=g[0],_=g[1],S=xe((0,n.useState)(""),2),L=S[0],k=S[1],N=function(){var t=be(ge().mark((function t(){var r;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("generate",{type:e,form:l});case 2:(r=t.sent).code===v.m.Sucess&&(_(r.data.public_key),k(r.data.private_key),ye=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=be(ge().mark((function t(r){var n;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(L&&E){t.next=3;break}return(0,ut.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),m({open:!0,title:"将覆盖密钥文件",sub_title:"将会作为 ".concat(n,' 文件保存到系统上的"').concat(ye,'"目录下,此目录会作为openssh(git)所使用的默认目录。之前的密钥将作废。'),handle:function(){var t=be(ge().mark((function t(){return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("save_openssh",{name:n,context:"pub"===r?E:L});case 2:t.sent.code===v.m.Sucess&&((0,ut.LW)("保存成功"),m({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null,n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:h("RSA"),value:"rsa"},{title:h("DSA"),value:"dsa"},{title:h("ECDSA"),value:"ecdsa"}]}),n.createElement(a.l6,{tip:"输出格式",value:l,width:"auto",onChange:function(t){s(t)},options:[{title:h("普通PEM"),value:"pem"},{title:h("opensshPEM"),value:"openssh_pem"}]}),n.createElement(c.rA,{icon:"play_arrow",title:h("生成"),onClick:function(){N()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(i.Zp,{title:"公钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,me.l)(E),(0,ut.LW)("复制完成"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){O("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){_(t.target.value)},value:E}))),n.createElement(o.VP,null,n.createElement(i.Zp,{title:"私钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){L&&((0,me.l)(L),(0,ut.LW)("复制成功"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){O("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:L,onChange:function(t){k(t.target.value)}}))))))}var Se=r(1499),Le=r(1083);function ke(t){return ke="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},ke(t)}function Ne(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Fe(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 Oe(t){return function(t){if(Array.isArray(t))return Ce(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Fe(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 Ae(){Ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ke(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(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=N(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=f(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 N(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,N(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=f(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 O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(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(ke(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new L(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),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=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,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),A(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;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function je(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 Ke(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){je(a,n,o,i,c,"next",t)}function c(t){je(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Pe(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)||Fe(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 Fe(t,e){if(t){if("string"==typeof t)return Ce(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)?Ce(t,e):void 0}}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Ie,Te,De,Me,Ge,Be=n.lazy((function(){return Promise.all([r.e(874),r.e(91)]).then(r.bind(r,4091))}));function He(){var t=(0,w.Bd)(),e=t.t,r=(t.i18n,Pe((0,x.L4)(b.A.confirm),2)),u=(r[0],r[1],Pe((0,x.L4)(b.A.showPrompt),2)),l=(u[0],u[1]),f=(0,E.MH)().check_user_auth,h=Pe((0,n.useState)(""),2),p=h[0],S=h[1],L=Pe((0,x.L4)(b.A.router_jump),2),k=L[0],N=L[1],O=Pe((0,n.useState)("get"),2),A=O[0],j=O[1],K=Pe((0,n.useState)(""),2),P=K[0],F=K[1],I=Pe((0,n.useState)(void 0),2),T=I[0],M=I[1],G=Pe((0,n.useState)([]),2),B=G[0],H=G[1],U=Pe((0,n.useState)([]),2),R=U[0],V=U[1],z=Pe((0,n.useState)(1),2),$=z[0],J=z[1],Y=Pe((0,n.useState)(1),2),Z=Y[0],q=Y[1],Q=Pe((0,n.useState)(1),2),tt=Q[0],et=Q[1],rt=Pe((0,n.useState)(),2),nt=rt[0],ot=rt[1],at=Pe((0,x.L4)(b.A.nav_index_add_item_by_now_list),2),it=(at[0],at[1]),ct=Pe((0,x.L4)(b.A.prompt_card),2),lt=(ct[0],ct[1]);E.xK.set_value_temp("{}"),(0,n.useEffect)((function(){return Ie={},Te={},De="",Me="",Ge="",E.xK.get_editor().session.setMode("ace/mode/json"),k.http_download_map_path&&(M(k.http_download_map_path),N({})),X.ws.sendData(W.HK.http_download_water,void 0).then((function(){X.ws.addMsg(W.HK.http_download_water,(function(t){var e=t.context;V(e)}))})),function(){X.ws.unConnect()}}),[]);var st=function(){var t=Ke(Ae().mark((function t(){var e;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("http/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ft=function(){var t=Ke(Ae().mark((function t(e){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("http/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ht=function(){var t=Ke(Ae().mark((function t(e){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:F(e.url),j(e.method),M(e.local_download_path),e.header_type&&pt(e.header_type),e.headers&&(Ie=JSON.parse(e.headers),1===e.header_type&&(E.xK.get_editor().setValue(e.headers,-1),E.xK.get_editor().session.setMode("ace/mode/json"))),e.form_data_list&&H(JSON.parse(e.form_data_list)),e.json_data&&(Te=JSON.parse(e.json_data)),e.data&&(De=e.data),e.body_type&&(q(e.body_type),2===e.header_type&&(1===e.body_type?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===e.body_type&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=function(t){try{1===$?Ie=JSON.parse(E.xK.get_editor_value()):2===$&&(1===Z?De=E.xK.get_editor_value():2===Z&&(Te=JSON.parse(E.xK.get_editor_value())))}catch(t){(0,ut.zN)(t.message)}J(t),1===t?(E.xK.get_editor().setValue(JSON.stringify(Ie,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")):2===t&&(1===Z?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===Z&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")))},yt=function(t){if(2===$){if(E.xK.get_editor_value())try{1===Z?De=E.xK.get_editor_value():2===Z&&(Te=JSON.parse(E.xK.get_editor_value()))}catch(t){return void(0,ut.zN)(t.message)}q(t),1===t?(E.xK.get_editor().setValue(De,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===t&&(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))}},dt=function(t){var e=new m.vr;if(e.url=P,e.method=A,1===$&&(Ie=JSON.parse(E.xK.get_editor_value())),e.headers=Ie,e.body_type=Z,e.header_type=$,Z===m.RB.row)2===$&&(De=E.xK.get_editor_value()),e.data=De,e.json_data=JSON.stringify(Te);else if(Z===m.RB.json)Ie["Content-Type"]="application/json",1===$&&E.xK.get_editor().setValue(JSON.stringify(Ie),-1),2===$&&(Te=JSON.parse(E.xK.get_editor_value())),e.json_data=JSON.stringify(Te),e.data=De;else if(Z===m.RB.form){Ie["Content-Type"]="multipart/form-data",e.form_data_list=B;var r,n=Ne(B);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.key&&o.is_file&&t&&t.append(o.fullPath,o.file_object)}}catch(t){n.e(t)}finally{n.f()}}return e},mt=function(){var t=Ke(Ae().mark((function t(){var e,r;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d._U.have_http_method(A)){t.next=3;break}return(0,ut.zN)("不存在的http method"),t.abrupt("return");case 3:if(P){t.next=6;break}return(0,ut.zN)("url is empty"),t.abrupt("return");case 6:ot(void 0),S(""),(e=new FormData).append("data",JSON.stringify(dt(e))),r="http/send",T&&(r+="?local_download_path=".concat(T)),Le.A.post(d._U.getUrl(r),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,ut.zN)(t.message)})).then((function(t){if(t){if(t.headers.filecat_remote_code)try{var e=JSON.parse(t.headers.filecat_remote_code);ot(200===e?n.createElement("span",{style:{color:"green"}},"200"):e)}catch(t){console.log(t)}Me="object"===ke(t.data)?JSON.stringify(t.data):t.data;try{t.headers.filecat_remote_raw_headers&&(Ge=JSON.stringify(JSON.parse(t.headers.filecat_remote_raw_headers),null,2))}catch(e){Ge=JSON.stringify(t.headers.filecat_remote_raw_headers)}1===tt?S(Me):2===tt&&S(Ge)}}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=Ke(Ae().mark((function t(){var e,r,n,o;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=dt()).local_download_path=T,B){r=Ne(B);try{for(r.s();!(n=r.n()).done;)(o=n.value).is_file&&(o.file_object=void 0)}catch(t){r.e(t)}finally{r.f()}}return e.form_data_list=JSON.stringify(B),e.headers=JSON.stringify(e.headers),"object"===ke(e.data)&&(e.data=JSON.stringify(e.data)),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,0!==R.length&&n.createElement(i.Zp,{title:"正在下载"},n.createElement("div",null,R.map((function(t,r){var o,a;return n.createElement("div",{key:r},n.createElement("div",{className:"div-row"},n.createElement(c.rA,{icon:"cancel",title:e("取消"),onClick:function(){X.ws.sendData(W.HK.http_download_cancel,t.local_download_path)}}),n.createElement(i.xP,{context:t.filename,tip_context:t.local_download_path}),n.createElement("span",{style:{paddingLeft:".3rem",color:"green"}},"".concat(null!==(o=t.progresses)&&void 0!==o?o:0,"% ").concat(t.loaded?(0,D.v7)(t.loaded):"","MB / ").concat(null!==(a=t.seep)&&void 0!==a?a:"","MB/s "))),n.createElement("div",{style:{width:t.progresses?"".concat(t.progresses,"%"):"0",backgroundColor:"#40c4ff",height:"5px",transition:"0.2s ease width",borderRadius:"10px"}}))})))),n.createElement(i.Zp,{title:"",rightBottomCom:3===Z&&2===$&&n.createElement(c.rA,{icon:"add",title:e("添加"),onClick:function(){H([{}].concat(Oe(B)))}})},n.createElement("div",{className:"http_url"},n.createElement(a.$Z,{not_mobile:!0,max_width:"15%",placeholder:e("协议"),icon:"http",value:A,handleInputChange:function(t){j(t)}}),n.createElement(a.$Z,{not_mobile:!0,max_width:"80%",placeholder:e("http url"),icon:"link",value:P,handleInputChange:function(t){F(t)}}),n.createElement(c.rA,{icon:"send",title:e("发送"),onClick:mt}),f(_.oV.http_proxy_tag_update)&&n.createElement(c.rA,{title:"添加",icon:"save_as",onClick:function(){if(f(_.oV.http_proxy_tag_update)){var t,r,o=Ne(B);try{for(o.s();!(t=o.n()).done;){if(t.value.is_file)return void(0,ut.zN)("表单中含有文件,浏览器限制不能添加")}}catch(t){o.e(t)}finally{o.f()}lt({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement("div",{className:"card-content"},n.createElement(a.Sm,{placeholderOut:e("输入标签名"),handleInputChange:function(t){return r=t}})),n.createElement("div",{className:"card-action"},n.createElement("button",{className:"button button--flat",onClick:Ke(Ae().mark((function t(){var e;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vt();case 2:(e=t.sent).name=r,it(e),lt({open:!1});case 6:case"end":return t.stop()}}),t)})))},"确定")))})}else(0,ut.zN)("no permission")}})),n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===$,onchange:function(){pt(1)}}),n.createElement(a.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===$,onchange:function(){pt(2)}})]}),n.createElement(de.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"body",context:e("row"),selected:1===Z,onchange:function(){yt(1)}}),n.createElement(a.U6,{value:2,name:"body",context:e("json"),selected:2===Z,onchange:function(){yt(2)}}),n.createElement(a.U6,{value:3,name:"body",context:e("form"),selected:3===Z,onchange:function(){yt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:3===Z&&2===$?"none":""}},n.createElement(Be,{name:""})),n.createElement("div",{style:{display:3!==Z||2!==$?"none":""}},n.createElement(de.X,{headers:["key",e("值")],rows:B.map((function(t,r){var o=[n.createElement(a.Sm,{value:t.key,handleInputChange:function(e){t.key=e,H(Oe(B))},no_border:!0}),n.createElement(a.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,H(Oe(B))},no_border:!0}),n.createElement("div",null,n.createElement(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){l({show:!0,type:C.PromptEnum.UploadFile,overlay:!0,data:{extra_data:{only_file:!0},call:function(e){var r,n=null===(r=e.currentTarget)||void 0===r?void 0:r.files;if(n){var o=n[0];o.fullPath=(0,Se.hU)()+Date.now().toString(),B[t].value="".concat(o,"(").concat(o.name,")"),B[t].is_file=!0,B[t].fileName=o.name,B[t].fullPath=o.fullPath,H(Oe(B)),B[t].file_object=o,l({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){B.splice(t,1),H(Oe(B))}(r)}}))];return o})),width:"10rem"})),n.createElement("div",{style:{paddingTop:"1rem"}},void 0===T?n.createElement("span",{onClick:function(){M("")}},"下载到本地目录"):n.createElement(a.Sm,{placeholder:e("本地地址"),value:T,handleInputChange:function(t){M(t)},handlerEnter:function(){T||M(void 0)}}))),n.createElement(i.Zp,{title:nt,titleCom:n.createElement("div",{className:" div-row "},n.createElement(a.U6,{value:1,name:"respone",context:e("响应体"),selected:1===tt,onchange:function(){et(1),S(Me)}}),n.createElement(a.U6,{value:1,name:"respone",context:e("响应头"),selected:2===tt,onchange:function(){et(2),S(Ge)}}),n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){p&&((0,me.l)(p),(0,ut.LW)("复制完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){S(t.target.value)},value:p}))),n.createElement(o.VP,null,n.createElement(g.N,{getItems:st,save:ft,have_auth_edit:f(_.oV.http_proxy_tag_update),clickItem:ht,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"method",preName:"method"},{key:"headers",preName:"headers"},{key:"data",preName:"data"},{key:"form_data_list",preName:"form_data_list"},{key:"local_download_path",preName:"local_download_path"},{key:"color",preName:"color"}]})))))}var Ue=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Re(t){var e=(0,w.Bd)().t,r=(0,E.MH)().check_user_auth,a=[];return r(_.oV.ssh_proxy)&&a.push({index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/"}),r(_.oV.http_proxy)&&a.push({index:1,name:e("http代理"),rto:"http/"}),r(_.oV.browser_proxy)&&a.push({index:1,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"}),r(_.oV.rdp_proxy)&&a.push({index:1,name:"rdp".concat(e("代理")),rto:"rdp/"}),r(_.oV.wol_proxy)&&a.push({index:1,name:e("网络唤醒"),rto:"netwol/"}),r(_.oV.rtsp_proxy)&&a.push({index:1,name:e("rtsp播放器"),rto:"rtsp/"}),a.push.apply(a,[{index:1,name:e("非对称密钥"),rto:"crypto/"},{index:1,name:e("时间工具"),rto:"timeutil/"}]),n.createElement(o.W1,{optionList:a},r(_.oV.ssh_proxy)&&n.createElement(Kt,null),r(_.oV.http_proxy)&&n.createElement(He,null),r(_.oV.browser_proxy)&&n.createElement(j,null),r(_.oV.rdp_proxy)&&n.createElement(ie,null),r(_.oV.wol_proxy)&&n.createElement(pe,null),r(_.oV.rtsp_proxy)&&n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Ue,null)),n.createElement(_e,null),n.createElement(o.xh,null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(p,null)))))}},7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(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)?a(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 a(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=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(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,a.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===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>f,RB:()=>p,qB:()=>l,vo:()=>h,vr:()=>y});var l=i((function t(){u(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=i((function t(){u(this,t),o(this,"open",!1),o(this,"key","")})),h=i((function t(){u(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",s.udp)})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=i((function t(){u(this,t)}))}}]);
|