filecat 5.3.3 → 5.5.0

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.
Files changed (92) hide show
  1. package/build/dist/{100.1100f03272726dcab961.js → 100.8ebdf32f93ebb89fd5a9.js} +2 -2
  2. package/build/dist/181.31a1ee669b1ed24fc18b.js +2 -0
  3. package/build/dist/209.f1a40bd227438c6b6d52.js +2 -0
  4. package/build/dist/257.7686ae1c8fd42a786fb5.js +2 -0
  5. package/build/dist/29.32ef9d7ae7852a43f56c.js +2 -0
  6. package/build/dist/308.ae38e35cffd396a547c8.js +2 -0
  7. package/build/dist/349.52591db66a15ecd999d6.js +2 -0
  8. package/build/dist/402.f1c3549907e68dd44141.js +2 -0
  9. package/build/dist/441.75ad05e9094d7e4988b4.js +2 -0
  10. package/build/dist/445.435d91c360ea1eff3335.js +2 -0
  11. package/build/dist/467.1d9a78f736c194dee524.js +2 -0
  12. package/build/dist/502.90aaa83acd526e7dbcc4.js +2 -0
  13. package/build/dist/523.98924862563ceccea472.js +2 -0
  14. package/build/dist/542.1a50f0139e70cfd968cc.js +2 -0
  15. package/build/dist/567.8000d6e03db0ce0cc9ae.js +2 -0
  16. package/build/dist/602.75ab14d4601f1adb427b.js +2 -0
  17. package/build/dist/{614.20ec5ed2b559cdeb381b.js → 614.702c22f4e2d4609836c4.js} +1 -1
  18. package/build/dist/636.4179d693832acf72881b.js +2 -0
  19. package/build/dist/{273.ff6447cee75b2ca7d60d.js → 654.f42c8f1e2096e9b33683.js} +1 -1
  20. package/build/dist/659.91897ba31bcbaaf376bf.js +2 -0
  21. package/build/dist/674.d3efa9ef8434d58f023b.js +2 -0
  22. package/build/dist/757.b646b3a789c0bd0b401e.js +1 -0
  23. package/build/dist/759.deb9c1d4f58040bc8816.js +2 -0
  24. package/build/dist/811.148ebc3a727004dfa32a.js +2 -0
  25. package/build/dist/827.c175a16183659c8d162d.js +2 -0
  26. package/build/dist/{859.b7ddfa663ba2c84040a7.js → 859.ce5bfc77f8fa54a65a03.js} +2 -2
  27. package/build/dist/892.fd015e3e3451c95aacca.js +2 -0
  28. package/build/dist/943.09b30670ce9eacb614e4.js +2 -0
  29. package/build/dist/960.32060178ec62652f0ee0.js +2 -0
  30. package/build/dist/995.06d930af0980ee592fbc.js +2 -0
  31. package/build/dist/{998.f2156cc57002a7152d6f.js → 998.65cab2e5f11705458d1a.js} +2 -2
  32. package/build/dist/998.65cab2e5f11705458d1a.js.LICENSE.txt +1 -0
  33. package/build/dist/index.html +1 -1
  34. package/build/dist/main.a6dc1190b635d4719a46.js +2 -0
  35. package/build/dist/{main.34e63c70f20770dc668d.js.LICENSE.txt → main.a6dc1190b635d4719a46.js.LICENSE.txt} +2 -2
  36. package/build/main.js +1 -1
  37. package/package.json +1 -1
  38. package/shell/build.js +1 -1
  39. package/shell/config/webpack.web.config.js +1 -1
  40. package/build/dist/181.4bf3187d0433c2a35a2c.js +0 -2
  41. package/build/dist/257.fcee8337192ed6697f61.js +0 -2
  42. package/build/dist/29.8305e49e9fa37531b3aa.js +0 -2
  43. package/build/dist/308.21e5d8bdfde58f421c2b.js +0 -2
  44. package/build/dist/349.d6093d2d681e79e1291f.js +0 -2
  45. package/build/dist/402.483375aaa84fbee09bcb.js +0 -2
  46. package/build/dist/432.74539b8dfd4e8aea0158.js +0 -2
  47. package/build/dist/441.19783532a702634c183f.js +0 -2
  48. package/build/dist/445.ea569bbb50cbe31fb4a2.js +0 -2
  49. package/build/dist/467.abc573f49d7e12706b11.js +0 -2
  50. package/build/dist/502.b0d5f9cf08dcf45c68a7.js +0 -2
  51. package/build/dist/523.6f1af3989678e157598f.js +0 -2
  52. package/build/dist/542.052ecfb0f594fd6f1e80.js +0 -2
  53. package/build/dist/567.8f2c4230393161c4dab4.js +0 -2
  54. package/build/dist/602.966769eb0cb217e4dbdc.js +0 -2
  55. package/build/dist/636.5848f3ff3c0a6b3ef049.js +0 -2
  56. package/build/dist/654.51eee04a7329fc954a5d.js +0 -2
  57. package/build/dist/659.e1276f69cfeff679a4dd.js +0 -2
  58. package/build/dist/674.80d6f27efa6cb21990a5.js +0 -2
  59. package/build/dist/757.245e4eca510499ede5da.js +0 -1
  60. package/build/dist/811.46c14bd0ce878cab02b4.js +0 -2
  61. package/build/dist/892.c600dcee81bf6ce19af3.js +0 -2
  62. package/build/dist/943.e4fc59033a3974090875.js +0 -2
  63. package/build/dist/960.049f733aaff457c68626.js +0 -2
  64. package/build/dist/995.d9b2e463276f4ca88318.js +0 -2
  65. package/build/dist/main.34e63c70f20770dc668d.js +0 -2
  66. /package/build/dist/{100.1100f03272726dcab961.js.LICENSE.txt → 100.8ebdf32f93ebb89fd5a9.js.LICENSE.txt} +0 -0
  67. /package/build/dist/{181.4bf3187d0433c2a35a2c.js.LICENSE.txt → 181.31a1ee669b1ed24fc18b.js.LICENSE.txt} +0 -0
  68. /package/build/dist/{29.8305e49e9fa37531b3aa.js.LICENSE.txt → 209.f1a40bd227438c6b6d52.js.LICENSE.txt} +0 -0
  69. /package/build/dist/{257.fcee8337192ed6697f61.js.LICENSE.txt → 257.7686ae1c8fd42a786fb5.js.LICENSE.txt} +0 -0
  70. /package/build/dist/{308.21e5d8bdfde58f421c2b.js.LICENSE.txt → 29.32ef9d7ae7852a43f56c.js.LICENSE.txt} +0 -0
  71. /package/build/dist/{402.483375aaa84fbee09bcb.js.LICENSE.txt → 308.ae38e35cffd396a547c8.js.LICENSE.txt} +0 -0
  72. /package/build/dist/{349.d6093d2d681e79e1291f.js.LICENSE.txt → 349.52591db66a15ecd999d6.js.LICENSE.txt} +0 -0
  73. /package/build/dist/{432.74539b8dfd4e8aea0158.js.LICENSE.txt → 402.f1c3549907e68dd44141.js.LICENSE.txt} +0 -0
  74. /package/build/dist/{441.19783532a702634c183f.js.LICENSE.txt → 441.75ad05e9094d7e4988b4.js.LICENSE.txt} +0 -0
  75. /package/build/dist/{445.ea569bbb50cbe31fb4a2.js.LICENSE.txt → 445.435d91c360ea1eff3335.js.LICENSE.txt} +0 -0
  76. /package/build/dist/{467.abc573f49d7e12706b11.js.LICENSE.txt → 467.1d9a78f736c194dee524.js.LICENSE.txt} +0 -0
  77. /package/build/dist/{502.b0d5f9cf08dcf45c68a7.js.LICENSE.txt → 502.90aaa83acd526e7dbcc4.js.LICENSE.txt} +0 -0
  78. /package/build/dist/{523.6f1af3989678e157598f.js.LICENSE.txt → 523.98924862563ceccea472.js.LICENSE.txt} +0 -0
  79. /package/build/dist/{542.052ecfb0f594fd6f1e80.js.LICENSE.txt → 542.1a50f0139e70cfd968cc.js.LICENSE.txt} +0 -0
  80. /package/build/dist/{567.8f2c4230393161c4dab4.js.LICENSE.txt → 567.8000d6e03db0ce0cc9ae.js.LICENSE.txt} +0 -0
  81. /package/build/dist/{602.966769eb0cb217e4dbdc.js.LICENSE.txt → 602.75ab14d4601f1adb427b.js.LICENSE.txt} +0 -0
  82. /package/build/dist/{636.5848f3ff3c0a6b3ef049.js.LICENSE.txt → 636.4179d693832acf72881b.js.LICENSE.txt} +0 -0
  83. /package/build/dist/{654.51eee04a7329fc954a5d.js.LICENSE.txt → 659.91897ba31bcbaaf376bf.js.LICENSE.txt} +0 -0
  84. /package/build/dist/{659.e1276f69cfeff679a4dd.js.LICENSE.txt → 674.d3efa9ef8434d58f023b.js.LICENSE.txt} +0 -0
  85. /package/build/dist/{674.80d6f27efa6cb21990a5.js.LICENSE.txt → 759.deb9c1d4f58040bc8816.js.LICENSE.txt} +0 -0
  86. /package/build/dist/{811.46c14bd0ce878cab02b4.js.LICENSE.txt → 811.148ebc3a727004dfa32a.js.LICENSE.txt} +0 -0
  87. /package/build/dist/{892.c600dcee81bf6ce19af3.js.LICENSE.txt → 827.c175a16183659c8d162d.js.LICENSE.txt} +0 -0
  88. /package/build/dist/{859.b7ddfa663ba2c84040a7.js.LICENSE.txt → 859.ce5bfc77f8fa54a65a03.js.LICENSE.txt} +0 -0
  89. /package/build/dist/{995.d9b2e463276f4ca88318.js.LICENSE.txt → 892.fd015e3e3451c95aacca.js.LICENSE.txt} +0 -0
  90. /package/build/dist/{943.e4fc59033a3974090875.js.LICENSE.txt → 943.09b30670ce9eacb614e4.js.LICENSE.txt} +0 -0
  91. /package/build/dist/{960.049f733aaff457c68626.js.LICENSE.txt → 960.32060178ec62652f0ee0.js.LICENSE.txt} +0 -0
  92. /package/build/dist/{998.f2156cc57002a7152d6f.js.LICENSE.txt → 995.06d930af0980ee592fbc.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 432.74539b8dfd4e8aea0158.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Ze});var n=r(6540),o=r(5725),i=r(3033),a=r(447),u=r(5997),c=r(4289),l=r(2389),s=r(2042),f=r(6007),h=r(3459);function p(t){return p="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},p(t)}function d(){d=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new N(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function y(){}function m(){}var v={};c(v,i,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(A([])));w&&w!==r&&n.call(w,i)&&(v=w);var b=m.prototype=h.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==p(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function _(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function S(t){this.tryEntries.push(t)}function k(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function N(t){this.tryEntries=[[-1]],t.forEach(S,this),this.reset(!0)}function A(e){if(null!=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(p(e)+" is not iterable")}return y.prototype=m,c(b,"constructor",m),c(m,"constructor",y),y.displayName=c(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},x(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),c(b,u,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=A,N.prototype={constructor:N,reset:function(e){if(this.prev=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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];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={i:A(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function y(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return v(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)?v(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 v(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 g(t){var e=(0,l.Bd)().t,r=m((0,n.useState)(e("毫秒")),2),p=r[0],v=r[1],g=m((0,n.useState)(""),2),w=g[0],b=g[1],x=m((0,n.useState)(""),2),E=x[0],_=x[1],S=m((0,n.useState)(null),2),k=S[0],N=S[1],A=m((0,n.useState)(null),2),O=A[0],j=A[1],P=m((0,n.useState)(Date.now()),2),F=P[0],K=P[1];var C=function(){var t,e=(t=d().mark((function t(){var e,r;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.Yu.get("sys_time/get");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=10;break}return t.next=6,e.data;case 6:r=t.sent,N(r.timestamp),j(r.timezone),K(Date.now());case 10:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){y(i,n,o,a,u,"next",t)}function u(t){y(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){C();var t=setInterval((function(){K((function(t){return t+1e3}))}),1e3);return function(){return clearInterval(t)}}),[]),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("时间转换器"),rightBottomCom:n.createElement(u.C3,{text:e("确定"),clickFun:function(){if(w||E){var t=0,e=""!==w&&0!==w;if(e){if(!(0,c.kf)(w))return void(0,s.zN)("must be number !");t=parseInt(w),"分秒"===p&&(t*=1e3)}var r=new Date(e?t:E),n=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r);if(_(n),!w){var o=r.getTime();b("毫秒"===p?o:o/1e3)}}else new Noty({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(i.l6,{options:[{title:e("毫秒"),value:"毫秒"},{title:e("分秒"),value:"分秒"}],onChange:function(t){v(t)}}),n.createElement(i.Sm,{placeholder:p,value:w,handleInputChange:function(t){b(t)}}),n.createElement(i.Sm,{placeholder:e("格式化时间"),value:E,handleInputChange:function(t){_(t)}}))),n.createElement(o.VP,null,null!==k&&null!==O&&n.createElement(a.Zp,{title:e("服务器时间")},n.createElement("h1",null,e("时区"),": ",O),n.createElement("h1",null,e("时间"),": ",new Date(F).toLocaleString(navigator.language,{timeZone:O})))))}var w=r(3413),b=r.n(w),x=r(7952),E=r(8694),_=r(3029),S=r(6417),k=r(7444),N=r(8247),A=r(3430);function O(t){return O="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},O(t)}function j(){j=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==O(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(O(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function P(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){P(i,n,o,a,u,"next",t)}function u(t){P(i,n,o,a,u,"throw",t)}a(void 0)}))}}function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return C(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function I(t){var e=(0,l.Bd)().t,r=K((0,k.L4)(S.A.header_min),2),a=(r[0],r[1]),c=K((0,n.useState)(""),2),p=c[0],d=c[1],y=K((0,n.useState)(""),2),m=y[0],v=y[1],g=K((0,n.useState)(void 0),2),w=g[0],O=g[1],P=K((0,n.useState)(!1),2),C=P[0],I=P[1],L=(0,N.MH)().check_user_auth,T=function(){var t=F(j().mark((function t(){var e;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new E.qB).targetProxyUrl="string"==typeof p?p:m,t.next=4,f._U.post("close",e);case 4:if(t.sent.code===h.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:v(""),a(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=F(j().mark((function t(e){var r,n,o;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=new E.qB).targetProxyUrl="string"==typeof e?e:p,r.targetProxyUrl.startsWith("http")){t.next=5;break}return(0,s.zN)("must start with http[s]://"),t.abrupt("return");case 5:return r.sysProxyPort=w,t.next=8,f._U.post("start",r);case 8:if((n=t.sent).code===h.m.Sucess){t.next=11;break}return t.abrupt("return");case 11:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),v(o);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){T()}}),[]);var G=function(){var t=F(j().mark((function t(){var e;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.get("tag");case 2:if((e=t.sent).code!==h.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=F(j().mark((function t(e){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(b())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=F(j().mark((function t(e){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d(e.url),D(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(x.A,null,n.createElement(i.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:w,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(b())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),O(parseInt(t)))},max_width:"10rem"}),n.createElement(i.$Z,{placeholder:e("要代理的url"),icon:"link",value:p,handleInputChange:function(t){d(t)}}),n.createElement(u.rA,{icon:"play_arrow",title:e("开始代理"),onClick:D}),n.createElement(u.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){I(!C),a(!C)}}),n.createElement(u.rA,{icon:"close",title:e(e("关闭")),onClick:function(){T(),I(!1),d("")}})),n.createElement(o.jW,{isFull:C},n.createElement("div",{id:"browser"},!m&&n.createElement(_.N,{have_auth_edit:L(A.oV.browser_proxy_tag_update),getItems:G,save:M,clickItem:B,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"color",preName:"color"}]}),n.createElement("iframe",{id:"webview",src:m}))))}var L=r(4405),T=r(7374),D=r(7767),G=r(4694),M=r(5726),B=r(7567),U=r(7022),R=r(8844),H=r(8815),$=r(9214);function V(t){return V="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},V(t)}function Z(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=q(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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function z(){z=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==V(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(V(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function W(t){return function(t){if(Array.isArray(t))return Q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||q(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 Y(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function X(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Y(i,n,o,a,u,"next",t)}function u(t){Y(i,n,o,a,u,"throw",t)}a(void 0)}))}}function J(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||q(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 q(t,e){if(t){if("string"==typeof t)return Q(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)?Q(t,e):void 0}}function Q(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 tt(t){var e=J((0,k.L4)(S.A.selectedFileList),2),r=e[0],o=e[1],i=J((0,k.L4)(S.A.clickFileList),2),a=i[0],u=i[1],h=J((0,k.L4)(S.A.editorSetting),2),p=(h[0],h[1]),d=J((0,k.L4)(S.A.shellNowDir),2),y=d[0],m=(d[1],J((0,k.L4)(S.A.sshInfo),2)),v=m[0],g=(m[1],J((0,k.L4)(S.A.nowFileList),2)),w=g[0],b=g[1],x=J((0,k.L4)(S.A.enterKey),2),E=x[0],_=(x[1],J((0,k.L4)(S.A.confirm),2)),A=(_[0],_[1]),O=(0,D.Zp)(),j=(0,l.Bd)().t,P=function(){var e=X(z().mark((function e(n,i){var l,h,d,y,m,g,w,x;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,G.kW)(r,n))o((0,G.P1)(r,n));else if("ctrl"===E)o([].concat(W(r),[n]));else if("shift"===E){if(l=(0,G.a7)(r),h=l.max,d=l.min,y=[],n>=h)for(m=h;m<=n;m++)y.push(m);else for(g=d;g>=n;g--)y.push(g);o(y)}else o([n]);if(u([].concat(W(a),[n])),setTimeout((function(){u((0,G.P1)(a,n))}),300),t.type!==U.Iw.folder){e.next=17;break}if(void 0===a.find((function(t){return t===n}))){e.next=15;break}return(w=new L.x).key=v.key,w.dir="/".concat((0,c.GG)("remoteShell",(0,c.vX)())).concat(i),O((0,G.IO)((0,c.vX)(),i)),o([]),u([]),b({files:[],folders:[]}),e.abrupt("return");case 15:e.next=26;break;case 17:if(void 0===a.find((function(t){return t===n}))){e.next=26;break}if(x=function(){var e=X(z().mark((function e(){var r,n,o;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new L.x).key=v.key,r.file="/".concat((0,c.GG)("remoteShell",(0,c.vX)())).concat(i),e.next=5,f.Fg.post("get/file/text",r);case 5:n=e.sent,o=void 0,i.endsWith(U.Iw.workflow_act)?o="ace/mode/yaml":(i.endsWith(U.Iw.draw)||i.endsWith(U.Iw.excalidraw))&&(o="ace/mode/json"),p({model:o,open:!0,fileName:t.name,save:function(){var t=X(z().mark((function t(e){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,f.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(N.xK.set_value_temp(""),(0,s.LW)("success"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),N.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>H.o5)){e.next=23;break}return A({open:!0,title:j("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=X(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A({open:!1,handle:null}),t.next=3,x();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 23:return e.next=25,x();case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(){var e=X(z().mark((function e(n){var i,a,u,c,l,s;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new L.x,Object.assign(i,v),i.target=G.HS.apply(void 0,W(y).concat([n])),a=(0,$.ib)(w,r),u=a.map((function(t){return G.HS.apply(void 0,W(y).concat([t.name]))})),c=Z(u),e.prev=6,c.s();case 8:if((l=c.n()).done){e.next=17;break}return s=l.value,i.source=s,e.next=13,f.Fg.post("move",i);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),c.e(e.t0);case 22:return e.prev=22,c.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(R.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:P})}var et=r(7856),rt=r(4238),nt=r(4944);function ot(t){return ot="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},ot(t)}function it(){it=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(ot(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function at(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){at(i,n,o,a,u,"next",t)}function u(t){at(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return lt(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)?lt(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 lt(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 st=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ft(t){var e=ct((0,n.useState)(null),2),r=e[0],o=e[1],i=ct((0,k.L4)(S.A.remoteShellShow),2),a=i[0],u=(i[1],ct((0,n.useState)(!1),2)),c=(u[0],u[1]),l=ct((0,k.L4)(S.A.sshInfo),2),s=l[0],f=(l[1],ct((0,k.L4)(S.A.shellNowDir),2)),h=(f[0],f[1],ct((0,k.L4)(S.A.user_base_info),2)),p=h[0],d=(h[1],"dark"===p.user_data.theme?"#FFFFFF":"#000000"),y=function(){var t=ut(it().mark((function t(){var e,r,n;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new et.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,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},nt.ws.addMsg(rt.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=ut(it().mark((function t(e){var r,n;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new L.x).key=s.key,r.cmd=e,(n=new rt.hf(rt.HK.remote_shell_send)).context=r,t.next=7,nt.ws.send(n);case 7: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)}}(),m=function(){ut(it().mark((function t(){return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),nt.ws.isAilive()&&nt.ws.setPromise(function(){var t=ut(it().mark((function t(e){return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt.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(){m()}}),[]),(0,n.useEffect)((function(){a.show?r||(y(),c(!0)):m()}),[a]);return n.createElement(st,{show:a.show,terminal:r,init:function(t,e){r.writeln("open shell... ");var n=new rt.hf(rt.HK.remote_shell_open),o=new L.x;o.key=s.key,o.init_path=a.path,o.rows=t,o.cols=e,n.context=o,nt.ws.send(n)}})}var ht=r(1251),pt=r(2730),dt=r(9240);function yt(t){return yt="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},yt(t)}function mt(){return mt=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},mt.apply(null,arguments)}function vt(){vt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==yt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(yt(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function gt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Et(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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function wt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function bt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){wt(i,n,o,a,u,"next",t)}function u(t){wt(i,n,o,a,u,"throw",t)}a(void 0)}))}}function xt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Et(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 Et(t,e){if(t){if("string"==typeof t)return _t(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_t(t,e):void 0}}function _t(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 St,kt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),Nt=Object.values(kt),At=280;function Ot(t){var e=(0,l.Bd)().t,r=(0,n.useRef)(void 0),o=(0,D.zy)(),a=xt((0,k.L4)(S.A.nowFileList),2),p=a[0],d=a[1],y=xt((0,k.L4)(S.A.fileShowType),2),m=y[0],v=y[1],g=xt((0,k.L4)(S.A.uploadFiles),2),w=(g[0],g[1]),b=xt((0,k.L4)(S.A.showPrompt),2),E=(b[0],b[1]),_=xt((0,k.L4)(S.A.selectedFileList),2),N=_[0],A=(_[1],xt((0,k.L4)(S.A.enterKey),2)),O=(A[0],A[1]),j=xt((0,k.L4)(S.A.copyedFileList),2),P=j[0],F=j[1],K=xt((0,k.L4)(S.A.cutedFileList),2),C=K[0],I=K[1],R=xt((0,k.L4)(S.A.selectedFileList),2),V=(R[0],R[1]),Z=xt((0,k.L4)(S.A.clickFileList),2),z=(Z[0],Z[1]),W=xt((0,k.L4)(S.A.remoteShellShow),2),Y=W[0],X=W[1],J=xt((0,k.L4)(S.A.shellNowDir),2),q=(J[0],J[1],xt((0,k.L4)(S.A.sshInfo),2)),Q=q[0],et=(q[1],xt((0,n.useState)(void 0),2)),rt=et[0],nt=et[1],ot=xt((0,n.useState)(""),2),it=ot[0],at=ot[1],ut=(0,D.Zp)(),ct=xt((0,k.L4)(S.A.user_base_info),2),lt=ct[0],st=(ct[1],function(){var t=bt(vt().mark((function t(e){var r,n,o,i,a,u,l,p,y,m,v,g;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new L.x).key=Q.key,r.dir=e||"/".concat((0,c.GG)("remoteShell",(0,c.vX)())),t.next=5,f.Fg.post("get/dir",r);case 5:if((n=t.sent).code===h.m.Sucess){t.next=9;break}return(0,s.zN)("连接失败"),t.abrupt("return");case 9:o=n.data||{},i=o.folders,a=o.files,u=gt(null!=a?a:[]);try{for(u.s();!(l=u.n()).done;)(p=l.value).origin_size=p.size,p.size=(0,H.v7)(p.size),p.show_mtime=p.mtime?(0,ht.s)(p.mtime):""}catch(t){u.e(t)}finally{u.f()}y=gt(null!=i?i:[]);try{for(y.s();!(m=y.n()).done;)(v=m.value).show_mtime=v.mtime?(0,ht.s)(v.mtime):""}catch(t){y.e(t)}finally{y.f()}g={folders:i||[],files:a||[]},(0,$.yC)(g,lt.user_data.dir_show_type),d(g),St=g;case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),yt=function(){var t=bt(vt().mark((function t(){return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,st();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),wt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/At);0===t&&(t=1),nt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return kt(),yt(),wt(),window.addEventListener("resize",wt),function(){window.removeEventListener("resize",wt)}}),[o]);var Et=function(){var t=bt(vt().mark((function t(e){var r,n,o,i;return vt().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,M.T)(r);case 8:i=t.sent,w(i),E({show:!0,type:B.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_t=function(t){t.preventDefault()};function kt(){V([]),z([])}function Ot(t){(0,s.LW)(t)}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",_t),e.addEventListener("drop",Et),function(){t.close(),e.removeEventListener("dragover",_t),e.removeEventListener("drop",Et)}}),[]);var jt=xt((0,n.useState)(!1),2),Pt=jt[0],Ft=jt[1];(0,n.useEffect)((function(){var t=function(t){if(Pt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=p.files.length,r=p.folders.length,n=[],o=0;o<e+r;o++)n.push(o);V(n)}else O("ctrl");else"Escape"===t.key?V([]):"Shift"===t.key&&O("shift")},e=function(t){t.ctrlKey||O("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[p,Pt]);var Kt=function(t){t.target===t.currentTarget&&V([])};return n.createElement("div",{className:"not-select-div"},n.createElement(x.A,{left_children:n.createElement(i.$Z,{handleEnterPress:function(){var t,e;if(St){V([]),z([]);var r,n=[],o=[],i=gt(null!==(t=St.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(it)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var u,c=gt(null!==(e=St.folders)&&void 0!==e?e:[]);try{for(c.s();!(u=c.n()).done;){var l=u.value;l.name.includes(it)&&o.push(l)}}catch(t){c.e(t)}finally{c.f()}d({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){at(t)},max_width:"25em"})},N.length>0&&n.createElement(u.rA,{icon:"delete",title:e("删除"),onClick:function(){E({show:!0,type:B.PromptEnum.SshDelete,overlay:!0,data:{}})}}),N.length>0&&n.createElement(u.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,$.ib)(p,N);F(t.map((function(t){return"/".concat((0,c.GG)("remoteShell",(0,c.vX)())).concat(t.name)}))),I([]),Ot("已复制")}}),N.length>0&&n.createElement(u.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,$.ib)(p,N);I(t.map((function(t){return"/".concat((0,c.GG)("remoteShell",(0,c.vX)())).concat(t.name)}))),F([]),Ot("已剪切")}}),(P.length>0||C.length>0)&&n.createElement(u.rA,{onClick:function(){E({show:!0,type:B.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:P.length+C.length}),1===N.length&&p.files.length>=1&&(0,$.ib)(p,N)[0].type!==U.Iw.folder&&n.createElement(u.rA,{icon:"download",title:e("下载"),onClick:function(){var t=(0,$.ib)(p,N),e="/".concat((0,c.GG)("remoteShell",(0,c.vX)())).concat(decodeURIComponent(t[0].name)),r="/api/ssh/download?file=".concat(e,"&key=").concat(Q.key,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===N.length&&n.createElement(u.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){E({show:!0,type:B.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(u.rA,{icon:"terminal",title:"shell",onClick:function(){Y.show?X({show:!1,path:""}):X({show:!0,path:"/".concat((0,c.GG)("remoteShell",(0,c.vX)()))})}}),n.createElement(u.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){v((0,G.jH)(Nt,m))}}),n.createElement(u.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){E({show:!0,type:B.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(u.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){E({show:!0,type:B.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(u.rA,{icon:"upload_file",title:"上传",onClick:function(){E({show:!0,type:B.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=[],i=new Set,a=0;a<r.length;a++){var u=r[a],c=n?u.webkitRelativePath:"".concat(u.webkitRelativePath).concat(u.name);u.fullPath=c,n&&i.add((0,pt.S)(c)),o.push(u)}var l=[];if(n){var s,f=gt(i);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),w(l),E({show:!0,type:B.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(u.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement(T.e,{baseRoute:"remoteShell",clickFun:kt,input_path_enter:function(t){(0,dt.Z1)(t)?st(t):ut((0,dt.Jn)((0,c.vX)(),t)),V([]),z([]),d({files:[],folders:[]})}}),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(m),ref:r,onMouseEnter:function(){Ft(!0)},onMouseLeave:function(){Ft(!1)}},!!p&&!!p.folders&&p.folders.length>0&&n.createElement("h2",null,"文件夹"),!!p&&!!p.folders&&n.createElement("div",{onClick:Kt},p.folders.map((function(t,e){return n.createElement(tt,mt({fileHandler:st,itemWidth:rt,index:e,key:e},t))}))),!!p&&!!p.folders&&p.files.length>0&&n.createElement("h2",{onClick:Kt},"文件"),!!p&&!!p.folders&&n.createElement("div",{onClick:Kt},p.files.map((function(t,e){return n.createElement(tt,mt({fileHandler:st,itemWidth:rt,index:e+p.folders.length,key:e},t))})))),n.createElement(ft,null))}function jt(t){return jt="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},jt(t)}function Pt(){Pt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==jt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(jt(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Ft(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ft(i,n,o,a,u,"next",t)}function u(t){Ft(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return It(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)?It(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 It(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 Lt(t){var e=(0,l.Bd)().t,r=(0,D.Zp)(),o=Ct((0,n.useState)(""),2),a=o[0],c=o[1],s=Ct((0,n.useState)(""),2),p=s[0],d=s[1],y=Ct((0,n.useState)(""),2),m=y[0],v=y[1],g=Ct((0,n.useState)(""),2),w=g[0],E=g[1],O=Ct((0,n.useState)(void 0),2),j=O[0],P=O[1],F=Ct((0,n.useState)(""),2),K=F[0],C=F[1],I=Ct((0,k.L4)(S.A.shellNowDir),2),T=(I[0],I[1]),G=Ct((0,k.L4)(S.A.sshInfo),2),M=G[0],B=G[1],U=(0,N.MH)().check_user_auth,R=function(){var t=Kt(Pt().mark((function t(){var e;return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new L.x).key=M.key,t.next=4,f.Fg.post("close",e);case 4:t.sent,B({});case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(){var t=Kt(Pt().mark((function t(e){var n,o;return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=new L.x).password=e?e.password:p,n.domain=e?e.domain:w,n.port=e?e.port:j,n.username=e?e.username:a,n.private_path=e?e.private_path:m,t.next=8,f.Fg.post("start",n);case 8:(o=t.sent)&&o.code===h.m.Sucess&&(n.dir=e?e.dir:K,r((0,dt.Jn)("/toolbox/remoteShell",e.dir)),T([n.dir]),B(o.data));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$=function(){var t=Kt(Pt().mark((function t(){var e;return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.Fg.get("tag");case 2:if((e=t.sent).code!==h.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)}}(),V=function(){var t=Kt(Pt().mark((function t(e){return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.Fg.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(b())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Z=function(){var t=Kt(Pt().mark((function t(e){return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return E(e.domain),C(e.dir),P(e.port),c(e.username),d(e.password),v(e.private_path),t.next=8,H(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(x.A,null,n.createElement(i.$Z,{placeholder:e("目录"),icon:"home",value:K,handleInputChange:function(t){return C(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("账号"),icon:"verified_user",value:a,handleInputChange:function(t){return c(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("密码"),icon:"password",value:p,handleInputChange:function(t){return d(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:m,handleInputChange:function(t){return v(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("连接地址"),icon:"location_on",value:w,handleInputChange:function(t){E(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("端口"),icon:"outlet",value:j,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(b())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),P(parseInt(t)))},max_width:"7rem"}),n.createElement(u.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){H()}})),M.key?n.createElement(Ot,{close:R,data:{port:j,password:p,username:a,domain:w,dir:K}}):n.createElement(_.N,{have_auth_edit:U(A.oV.ssh_proxy_tag_update),getItems:$,save:V,clickItem:Z,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 Tt(t){return Tt="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},Tt(t)}function Dt(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"!=Tt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Tt(e)?e:e+""}function Mt(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var Bt=function(){return function(t,e,r){return e&&Dt(t.prototype,e),r&&Dt(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 ne.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=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.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=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Mt(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Mt(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Mt(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=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.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),i=ne.elementOffset(t.canvas);return nt.ws.sendData(rt.HK.wheel,{x:e.clientX-i.left,y:e.clientY-i.top,step:o,isNegative:n>0,isHorizontal:r}),e.preventDefault(),!1}})),window.addEventListener("keydown",(function(e){if(t.activeSession)return nt.ws.sendData(rt.HK.scancode,{code:ne.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return nt.ws.sendData(rt.HK.scancode,{code:ne.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var i=this;nt.ws.addMsg(rt.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),i.activeSession=!0})),nt.ws.addMsg(rt.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,i.render.update(e)})),nt.ws.addMsg(rt.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),i.activeSession=!1})),nt.ws.addMsg(rt.HK.rdp_error,(function(t){i.activeSession=!1}));var a=new rt.hf;a.cmdType=rt.HK.infos,a.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:ne.locale()},nt.ws.send(a)}}])}();function Ut(t){return Ut="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},Ut(t)}function Rt(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,Ht(n.key),n)}}function Ht(t){var e=function(t,e){if("object"!=Ut(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ut(e)?e:e+""}var $t,Vt,Zt,zt,Wt=function(){return function(t,e,r){return e&&Rt(t.prototype,e),r&&Rt(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 i=t.destRight-t.destLeft+1,a=t.destBottom-t.destTop+1,u=i*a*4,c=Module._malloc(u),l=new Uint8Array(Module.HEAPU8.buffer,c,u),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,i,a,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,u));return Module._free(n),Module._free(c),{width:i,height:a,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 Yt(t){return Yt="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},Yt(t)}function Xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Yt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jt=(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt($t={"":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),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt($t,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),Xt(Xt(Xt(Xt(Xt(Xt(Xt($t,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),qt=(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt={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"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Vt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Qt=(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt={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"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Zt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),te=(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(zt={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"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(zt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(zt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(Xt(zt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),Xt(Xt(Xt(zt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),ee={firefox:{fr:qt,en:te},chrome:{fr:Qt,en:te}};(ne=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 Bt(t)}},Canvas:{create:function(t){return new Wt(t)}},scancode:function(t){var e=ne.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Jt[t.code||ee[ne.browser()||"firefox"][e][t.keyCode]]}};var re,ne=new ne;function oe(t){return oe="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},oe(t)}function ie(){ie=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==oe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(oe(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function ae(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ue(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ae(i,n,o,a,u,"next",t)}function u(t){ae(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ce(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return le(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)?le(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 le(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 se(){var t=(0,l.Bd)().t,e=ce((0,k.L4)(S.A.header_min),2),r=(e[0],e[1]),a=(0,N.MH)().check_user_auth,c=ce((0,n.useState)(void 0),2),p=c[0],d=c[1],y=ce((0,n.useState)(void 0),2),m=y[0],v=y[1],g=ce((0,n.useState)(void 0),2),w=g[0],b=g[1],E=ce((0,n.useState)(!1),2),O=E[0],j=E[1],P=ce((0,n.useState)(!1),2),F=P[0],K=P[1],C=function(){var t=ue(ie().mark((function t(){return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,M.J)("rle.js");case 3:re=!0,t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),(0,s.zN)("加载资源失败"),t.abrupt("return");case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),I=null;(0,n.useEffect)((function(){return re||C(),function(){I&&(I.close(),I=null)}}),[]);var L=function(e){K(!0),function(n,o,i){if(n=n||e.address,o=o||e.username,i=i||e.password,!n||!o||!i)return(0,s.zN)(t("不允许为空")),void K(!1);!function(t){I||(I=ne.client.create(ne.$(t)))}("rdpwebview");var a=ne.$("rdpwebview");a.style.display="inline",a.width=window.innerWidth,a.height=window.innerHeight,j(!0),r(!0),I.connect(n,"",o,i,(function(t){ne.$("rdpwebview").style.display="none",r(!1),K(!1),j(!1)}))}(p,m,w)},T=function(){var t=ue(ie().mark((function t(){var e;return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return j(!1),t.next=3,nt.ws.sendData(rt.HK.rdp_disconnect,"");case 3:e=ne.$("rdpwebview"),e.getContext("2d").clearRect(0,0,e.width,e.height),ne.$("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=ue(ie().mark((function t(){var e;return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.J0.get("tag");case 2:if((e=t.sent).code!==h.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)}}(),G=function(){var t=ue(ie().mark((function t(e){return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.J0.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&(0,s.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=ue(ie().mark((function t(e){return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b(e.password),v(e.username),d(e.address),L(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(x.A,null,n.createElement(i.$Z,{placeholder:t("地址"),icon:"outlet",value:p,handleInputChange:function(t){return d(t)}}),n.createElement(i.$Z,{placeholder:t("账号"),icon:"http",value:m,handleInputChange:function(t){return v(t)}}),n.createElement(i.$Z,{placeholder:t("密码"),icon:"http",value:w,handleInputChange:function(t){return b(t)}}),!F&&n.createElement(u.rA,{icon:"play_arrow",title:t("连接"),onClick:L}),F&&n.createElement(u.rA,{icon:"close",title:t("关闭"),onClick:T})),n.createElement(o.jW,{isFull:O},!F&&n.createElement(_.N,{have_auth_edit:a(A.oV.rdp_proxy_tag_update),getItems:D,save:G,clickItem:B,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 fe(t){return fe="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},fe(t)}function he(){he=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==fe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(fe(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function pe(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function de(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pe(i,n,o,a,u,"next",t)}function u(t){pe(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ye(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return me(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)?me(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 me(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 ve(t){var e=(0,l.Bd)().t,r=(0,N.MH)().check_user_auth,o=ye((0,n.useState)(""),2),a=o[0],c=o[1],s=function(){var t=de(he().mark((function t(e){var r;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||a){t.next=4;break}return new(b())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,f._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===h.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(b())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=de(he().mark((function t(){var e;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.get("wol/tag");case 2:if((e=t.sent).code!==h.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)}}(),d=function(){var t=de(he().mark((function t(e){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.post("wol/tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(b())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),y=function(){var t=de(he().mark((function t(e){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(e.mac),s(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(x.A,null,n.createElement(u.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){s()}}),n.createElement(i.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:a,handleInputChange:function(t){return c(t)}})),n.createElement(_.N,{have_auth_edit:r(A.oV.wol_proxy_tag_update),getItems:p,save:d,clickItem:y,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var ge,we=r(7481),be=r(505);function xe(t){return xe="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},xe(t)}function Ee(){Ee=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==xe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(xe(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function _e(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Se(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_e(i,n,o,a,u,"next",t)}function u(t){_e(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ne(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)?Ne(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 Ne(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 Ae(){var t=ke((0,n.useState)("rsa"),2),e=t[0],r=t[1],c=ke((0,n.useState)("pem"),2),p=c[0],d=c[1],y=(0,l.Bd)(),m=y.t,v=(y.i18n,ke((0,k.L4)(S.A.confirm),2)),g=(v[0],v[1]),w=ke((0,n.useState)(""),2),b=w[0],E=w[1],_=ke((0,n.useState)(""),2),N=_[0],A=_[1],O=function(){var t=Se(Ee().mark((function t(){var r;return Ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.cD.post("generate",{type:e,form:p});case 2:(r=t.sent).code===h.m.Sucess&&(E(r.data.public_key),A(r.data.private_key),ge=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=Se(Ee().mark((function t(r){var n;return Ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(N&&b){t.next=3;break}return(0,s.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),g({open:!0,title:m("将覆盖密钥文件"),sub_title:"之前的密钥将作废。 将会作为 ".concat(n,' 文件保存到系统上的"').concat(ge,'"目录下,此目录会作为openssh(git)所使用的默认目录。'),handle:function(){var t=Se(Ee().mark((function t(){return Ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.cD.post("save_openssh",{name:n,context:"pub"===r?b:N});case 2:t.sent.code===h.m.Sucess&&((0,s.LW)("完成"),g({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(x.A,null,n.createElement(we.S,{isFlex:!0,columns:[n.createElement(i.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:m("RSA"),value:"rsa"},{title:m("DSA"),value:"dsa"},{title:m("ECDSA"),value:"ecdsa"}]}),n.createElement(i.l6,{tip:"输出格式",value:p,width:"auto",onChange:function(t){d(t)},options:[{title:m("普通PEM"),value:"pem"},{title:m("opensshPEM"),value:"openssh_pem"}]}),n.createElement(u.rA,{icon:"play_arrow",title:m("生成"),onClick:function(){O()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"公钥",titleCom:n.createElement(u.rA,{title:"复制",icon:"copy_all",onClick:function(){b&&((0,be.l)(b),(0,s.LW)("完成"))}}),rightBottomCom:"openssh_pem"===p&&n.createElement(u.C3,{text:m("保存到.ssh目录"),clickFun:function(){j("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){E(t.target.value)},value:b}))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:"私钥",titleCom:n.createElement(u.rA,{title:"复制",icon:"copy_all",onClick:function(){N&&((0,be.l)(N),(0,s.LW)("成功"))}}),rightBottomCom:"openssh_pem"===p&&n.createElement(u.C3,{text:m("保存到.ssh目录"),clickFun:function(){j("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:N,onChange:function(t){A(t.target.value)}}))))))}var Oe=r(1499),je=r(1083);function Pe(t){return Pe="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},Pe(t)}function Fe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=De(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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ke(t){return function(t){if(Array.isArray(t))return Ge(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||De(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 Ce(){Ce=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Pe(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(Pe(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Ie(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Le(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ie(i,n,o,a,u,"next",t)}function u(t){Ie(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Te(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||De(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 De(t,e){if(t){if("string"==typeof t)return Ge(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)?Ge(t,e):void 0}}function Ge(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 Me,Be,Ue,Re,He=n.lazy((function(){return Promise.all([r.e(960),r.e(91)]).then(r.bind(r,4091))}));function $e(){var t=(0,l.Bd)(),e=t.t,r=(t.i18n,Te((0,k.L4)(S.A.confirm),2)),c=(r[0],r[1],Te((0,k.L4)(S.A.showPrompt),2)),p=(c[0],c[1]),d=(0,N.MH)().check_user_auth,y=Te((0,n.useState)(""),2),m=y[0],v=y[1],g=Te((0,k.L4)(S.A.router_jump),2),w=g[0],b=g[1],O=Te((0,n.useState)("get"),2),j=O[0],P=O[1],F=Te((0,n.useState)(""),2),K=F[0],C=F[1],I=Te((0,n.useState)(void 0),2),L=I[0],T=I[1],D=Te((0,n.useState)([]),2),G=D[0],M=D[1],U=Te((0,n.useState)([]),2),R=U[0],$=U[1],V=Te((0,n.useState)(1),2),Z=V[0],z=V[1],W=Te((0,n.useState)(1),2),Y=W[0],X=W[1],J=Te((0,n.useState)(1),2),q=J[0],Q=J[1],tt=Te((0,n.useState)(),2),et=tt[0],ot=tt[1],it=Te((0,k.L4)(S.A.nav_index_add_item_by_now_list),2),at=(it[0],it[1]),ut=Te((0,k.L4)(S.A.prompt_card),2),ct=(ut[0],ut[1]);N.xK.set_value_temp("{}",0),N.xK.set_value_temp("",1),(0,n.useEffect)((function(){return Me={},Be="",Ue="",Re="",N.xK.get_editor(0).session.setMode("ace/mode/json"),w.http_download_map_path&&(T(w.http_download_map_path),b({})),nt.ws.sendData(rt.HK.http_download_water,void 0).then((function(){nt.ws.addMsg(rt.HK.http_download_water,(function(t){var e=t.context;$(e)}))})),function(){nt.ws.unConnect()}}),[]);var lt=function(){var t=Le(Ce().mark((function t(){var e;return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.get("http/tag");case 2:if((e=t.sent).code!==h.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)}}(),st=function(){var t=Le(Ce().mark((function t(e){return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.post("http/tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new Noty({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ft=function(){var t=Le(Ce().mark((function t(e){return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:C(e.url),P(e.method),T(e.local_download_path),e.header_type&&ht(e.header_type),e.headers&&(Me=JSON.parse(e.headers),1===e.header_type&&(N.xK.get_editor(0).setValue(e.headers,-1),N.xK.get_editor(0).session.setMode("ace/mode/json"))),e.form_data_list&&M(JSON.parse(e.form_data_list)),e.data&&(Be=e.data),e.body_type&&(X(e.body_type),N.xK.get_editor(1).setValue(e.data,-1),1===e.body_type?N.xK.get_editor(1).session.setMode("ace/mode/text"):2===e.body_type&&N.xK.get_editor(1).session.setMode("ace/mode/json"));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ht=function(t){z(t)},pt=function(t){X(t),1===t?N.xK.get_editor(1).session.setMode("ace/mode/text"):2===t&&N.xK.get_editor(1).session.setMode("ace/mode/json")},dt=function(t){var e=new E.vr;if(e.url=K,e.method=j,1===Z&&(Me=JSON.parse(N.xK.get_editor_value(0))),e.headers=Me,e.body_type=Y,e.header_type=Z,Y===E.RB.row)Be=N.xK.get_editor_value(1),e.data=Be;else if(Y===E.RB.json)Me["Content-Type"]="application/json",Be=N.xK.get_editor_value(1),e.data=Be;else if(Y===E.RB.form){Me["Content-Type"]="multipart/form-data",e.form_data_list=G;var r,n=Fe(G);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},yt=function(){var t=Le(Ce().mark((function t(){var e,r;return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f._U.have_http_method(j)){t.next=3;break}return(0,s.zN)("不存在的http method"),t.abrupt("return");case 3:if(K){t.next=6;break}return(0,s.zN)("url is empty"),t.abrupt("return");case 6:ot(void 0),v(""),(e=new FormData).append("data",JSON.stringify(dt(e))),r="http/send",L&&(r+="?local_download_path=".concat(L)),je.A.post(f._U.getUrl(r),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,s.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)}Ue="object"===Pe(t.data)?JSON.stringify(t.data):t.data;try{t.headers.filecat_remote_raw_headers&&(Re=JSON.stringify(JSON.parse(t.headers.filecat_remote_raw_headers),null,2))}catch(e){Re=JSON.stringify(t.headers.filecat_remote_raw_headers)}1===q?v(Ue):2===q&&v(Re)}}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),mt=function(){var t=Le(Ce().mark((function t(){var e,r,n,o;return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=dt()).local_download_path=L,G){r=Fe(G);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(G),e.headers=JSON.stringify(e.headers),"object"===Pe(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(x.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,0!==R.length&&n.createElement(a.Zp,{title:"正在下载"},n.createElement("div",null,R.map((function(t,r){var o,i;return n.createElement("div",{key:r},n.createElement("div",{className:"div-row"},n.createElement(u.rA,{icon:"cancel",title:e("取消"),onClick:function(){nt.ws.sendData(rt.HK.http_download_cancel,t.local_download_path)}}),n.createElement(a.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,H.v7)(t.loaded):"","MB / ").concat(null!==(i=t.seep)&&void 0!==i?i:"","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(a.Zp,{title:"",rightBottomCom:3===Y&&2===Z&&n.createElement(u.rA,{icon:"add",title:e("添加"),onClick:function(){M([{}].concat(Ke(G)))}})},n.createElement("div",{className:"http_url"},n.createElement(i.$Z,{not_mobile:!0,max_width:"15%",placeholder:e("协议"),icon:"http",value:j,handleInputChange:function(t){P(t)}}),n.createElement(i.$Z,{not_mobile:!0,max_width:"80%",placeholder:e("http url"),icon:"link",value:K,handleInputChange:function(t){C(t)}}),n.createElement(u.rA,{icon:"send",title:e("发送"),onClick:yt}),d(A.oV.http_proxy_tag_update)&&n.createElement(u.rA,{title:e("添加"),icon:"save_as",onClick:function(){if(d(A.oV.http_proxy_tag_update)){var t,r,o=Fe(G);try{for(o.s();!(t=o.n()).done;){if(t.value.is_file)return void(0,s.zN)(e("表单中含有文件,浏览器限制不能添加"))}}catch(t){o.e(t)}finally{o.f()}ct({open:!0,title:e("信息"),context_div:n.createElement("div",null,n.createElement("div",{className:"card-content"},n.createElement(i.Sm,{placeholderOut:e("输入标签名"),handleInputChange:function(t){return r=t}})),n.createElement("div",{className:"card-action"},n.createElement("button",{className:"button button--flat",onClick:Le(Ce().mark((function t(){var e;return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mt();case 2:(e=t.sent).name=r,at(e),ct({open:!1});case 6:case"end":return t.stop()}}),t)})))},e("确定"))))})}else(0,s.zN)("no permission")}})),n.createElement(we.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===Z,onchange:function(){ht(1)}}),n.createElement(i.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===Z,onchange:function(){ht(2)}})]}),2===Z&&n.createElement(we.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"body",context:e("row"),selected:1===Y,onchange:function(){pt(1)}}),n.createElement(i.U6,{value:2,name:"body",context:e("json"),selected:2===Y,onchange:function(){pt(2)}}),n.createElement(i.U6,{value:3,name:"body",context:e("form"),selected:3===Y,onchange:function(){pt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:1===Z?"":"none"}},n.createElement(He,{name:"",editor_id:0})),n.createElement("div",{className:"http_ace",style:{display:2===Z&&3!==Y?"":"none"}},n.createElement(He,{name:"",editor_id:1})),n.createElement("div",{style:{display:3!==Y||2!==Z?"none":""}},n.createElement(we.X,{headers:["key",e("值")],rows:G.map((function(t,r){var o=[n.createElement(i.Sm,{value:t.key,handleInputChange:function(e){t.key=e,M(Ke(G))},no_border:!0}),n.createElement(i.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,M(Ke(G))},no_border:!0}),n.createElement("div",null,n.createElement(u.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){p({show:!0,type:B.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,Oe.hU)()+Date.now().toString(),G[t].value="".concat(o,"(").concat(o.name,")"),G[t].is_file=!0,G[t].fileName=o.name,G[t].fullPath=o.fullPath,M(Ke(G)),G[t].file_object=o,p({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(u.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){G.splice(t,1),M(Ke(G))}(r)}}))];return o})),width:"10rem"})),n.createElement("div",{style:{paddingTop:"1rem"}},void 0===L?n.createElement("span",{onClick:function(){T("")}},e("下载到本地目录")):n.createElement(i.Sm,{placeholder:e("本地地址"),value:L,handleInputChange:function(t){T(t)},handlerEnter:function(){L||T(void 0)}}))),n.createElement(a.Zp,{title:et,titleCom:n.createElement("div",{className:" div-row "},n.createElement(i.U6,{value:1,name:"respone",context:e("响应体"),selected:1===q,onchange:function(){Q(1),v(Ue)}}),n.createElement(i.U6,{value:1,name:"respone",context:e("响应头"),selected:2===q,onchange:function(){Q(2),v(Re)}}),n.createElement(u.rA,{title:"复制",icon:"copy_all",onClick:function(){m&&((0,be.l)(m),(0,s.LW)("完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){v(t.target.value)},value:m}))),n.createElement(o.VP,null,n.createElement(_.N,{getItems:lt,save:st,have_auth_edit:d(A.oV.http_proxy_tag_update),clickItem:ft,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 Ve=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Ze(t){var e=(0,l.Bd)().t,r=(0,N.MH)().check_user_auth,i=[];return r(A.oV.ssh_proxy)&&i.push({index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/*"}),r(A.oV.http_proxy)&&i.push({index:1,name:e("http代理"),rto:"http/"}),r(A.oV.browser_proxy)&&i.push({index:1,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"}),r(A.oV.rdp_proxy)&&i.push({index:1,name:"rdp".concat(e("代理")),rto:"rdp/"}),r(A.oV.wol_proxy)&&i.push({index:1,name:e("网络唤醒"),rto:"netwol/"}),r(A.oV.rtsp_proxy)&&i.push({index:1,name:e("rtsp播放器"),rto:"rtsp/"}),i.push.apply(i,[{index:1,name:e("非对称密钥"),rto:"crypto/"},{index:1,name:e("时间工具"),rto:"timeutil/"}]),n.createElement(o.W1,{optionList:i},r(A.oV.ssh_proxy)&&n.createElement(Lt,null),r(A.oV.http_proxy)&&n.createElement($e,null),r(A.oV.browser_proxy)&&n.createElement(I,null),r(A.oV.rdp_proxy)&&n.createElement(se,null),r(A.oV.wol_proxy)&&n.createElement(ve,null),r(A.oV.rtsp_proxy)&&n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Ve,null)),n.createElement(Ae,null),n.createElement(g,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>u,X:()=>a});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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(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)?i(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t){var e,r=o(n.useState([]),2),i=r[0],a=r[1];return(0,n.useEffect)((function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(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,i.map((function(e,r){return n.createElement("tr",{key:r,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},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===i.length-1?"small":""},e)})))}))))}function u(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=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(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,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(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 c(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:()=>d});var l=a((function t(){c(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=a((function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])})),h=a((function t(){c(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}({}),d=a((function t(){c(this,t)}))},9240:(t,e)=>{function r(t){const e=t.lastIndexOf(".");return-1===e||0===e?"":t.slice(e)}function n(t){let e="\\";for(const r of t)if("/"===r||"\\"===r){e=r;break}return e}e.Jn=function(t,e){let r=n(t);if("."===e)return t;if(".."===e){if(t.length>1){let e=t[t.length-1]===r?1:0;for(let n=t.length-1-e;n>=0;n--)if(t[n]===r)return t.substring(0,n+1)}return t}return t.endsWith(r)&&e.startsWith(r)?t.slice(0,-1)+e:t.endsWith(r)||e.startsWith(r)?t+e:t+r+e},e.Z1=function(t){if("string"!=typeof t)return!1;return/^[a-zA-Z]:[\\\/]/.test(t)||/^\//.test(t)};const o={".com":4,".exe":3,".bat":2,".cmd":1}}}]);