filecat 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 432.bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function 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,c(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 c(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>f,RB:()=>p,eq:()=>s,qB:()=>l,vo:()=>h,vr:()=>y});var l=a((function t(){u(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=a((function t(){u(this,t),o(this,"open",!1),o(this,"model",s.udp),o(this,"key","")})),h=a((function t(){u(this,t),o(this,"open",!1),o(this,"key","")})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=a((function t(){u(this,t)}))},7481:(t,e,r)=>{r.d(e,{S:()=>a,X:()=>i});var n=r(6540);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r,i,a=(r=n.useState([]),i=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(r,i)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=a[0],u=a[1];return(0,n.useEffect)((function(){t.children?u(Array.isArray(t.children)?t.children:[t.children]):u(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,c.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===c.length-1?"small":""},e)})))}))))}function a(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},4091:(t,e,r)=>{r.d(e,{A:()=>h});var n=r(6540),o=r(952),i=r.n(o),a=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(4522)),c=r.n(a),u=r(8247);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=(0,n.useRef)(null);return(0,n.useEffect)((function(){var r,n=i().edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:u.xK.get_value_temp(),showPrintMargin:!1,theme:"ace/theme/cloud9_day",mode:c().getModeForPath(null!==(r=t.name)&&void 0!==r?r:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return n.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),n.container.addEventListener("wheel",(function(t){t.preventDefault()})),n.focus(),n.on("change",(function(e){t.on_change&&t.on_change()})),e.current=n,u.xK.set_editor_temp(n),function(){u.xK.set_editor_temp(null),n.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}r(47),i().config.set("basePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("modePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("themePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("workerPath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Me});var n=r(6540),o=r(5725),i=r(3033),a=r(447),c=r(5997),u=r(4289),l=r(3413),s=r.n(l);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t){var e=f((0,n.useState)("毫秒"),2),r=e[0],o=e[1],l=f((0,n.useState)(""),2),h=l[0],p=l[1],y=f((0,n.useState)(""),2),d=y[0],m=y[1];return n.createElement(a.Zp,{title:"时间转换器",rightBottomCom:n.createElement(c.C3,{text:"确定",clickFun:function(){if(h||d){var t=0,e=""!==h&&0!==h;if(e){if(!(0,u.kf)(h))return void new(s())({type:"error",text:"必须都是数字",timeout:1e3,layout:"bottomLeft"}).show();t=parseInt(h),"分秒"===r&&(t*=1e3)}var n=new Date(e?t:d),o=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(m(o),!h){var i=n.getTime();p("毫秒"===r?i:i/1e3)}}else new(s())({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(i.l6,{options:[{title:"毫秒",value:"毫秒"},{title:"分秒",value:"分秒"}],onChange:function(t){o(t)}}),n.createElement(i.Sm,{placeholder:r,value:h,handleInputChange:function(t){p(t)}}),n.createElement(i.Sm,{placeholder:"格式化时间",value:d,handleInputChange:function(t){m(t)}}))}var y=r(7952),d=r(6007),m=r(8694),v=r(3459),g=r(3029),w=r(2389),b=r(6417),x=r(7444);function E(t){return E="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},E(t)}function S(){S=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new K(n||[]);return o(a,"_invoke",{value:N(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(F([])));L&&L!==r&&n.call(L,a)&&(b=L);var _=w.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==E(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(E(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,K.prototype={constructor:K,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function L(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){L(i,n,o,a,c,"next",t)}function c(t){L(i,n,o,a,c,"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,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(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 N(t){var e=(0,w.Bd)().t,r=k((0,x.L4)(b.A.header_min),2),a=(r[0],r[1]),u=k((0,n.useState)(""),2),l=u[0],f=u[1],h=k((0,n.useState)(""),2),p=h[0],E=h[1],L=k((0,n.useState)(void 0),2),O=L[0],N=L[1],j=k((0,n.useState)(!1),2),A=j[0],P=j[1],K=function(){var t=_(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new m.qB).targetProxyUrl="string"==typeof l?l:p,t.next=4,d._U.post("close",e);case 4:if(t.sent.code===v.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:E(""),a(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){var t=_(S().mark((function t(e){var r,n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new m.qB).targetProxyUrl="string"==typeof e?e:l,r.sysProxyPort=O,t.next=5,d._U.post("start",r);case 5:if((n=t.sent).code===v.m.Sucess){t.next=8;break}return t.abrupt("return");case 8:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),E(o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){K()}}),[]);var C=function(){var t=_(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=_(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=_(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f(e.url),F(e.url);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:O,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),N(parseInt(t)))},max_width:"10rem"}),n.createElement(i.$Z,{placeholder:e("要代理的url"),icon:"link",value:l,handleInputChange:function(t){f(t)}}),n.createElement(c.rA,{icon:"play_arrow",title:e("开始代理"),onClick:F}),n.createElement(c.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){P(!A),a(!A)}}),n.createElement(c.rA,{icon:"close",title:e(e("关闭")),onClick:function(){K(),P(!1),f("")}})),n.createElement(o.jW,{isFull:A},n.createElement("div",{id:"browser"},!p&&n.createElement(g.N,{getItems:C,save:I,clickItem:T,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"}]}),n.createElement("iframe",{id:"webview",src:p}))))}var j=r(4405),A=r(4694),P=r(5726),K=r(2869),F=r(7022),C=r(8844),I=r(1499),T=r(8247),D=r(8815);function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function M(){M=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(G(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=z(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function U(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||z(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||z(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 z(t,e){if(t){if("string"==typeof t)return Y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function J(t){var e=$((0,x.L4)(b.A.selectedFileList),2),r=e[0],o=e[1],i=$((0,x.L4)(b.A.clickFileList),2),a=i[0],c=i[1],u=$((0,x.L4)(b.A.editorSetting),2),l=(u[0],u[1]),s=$((0,x.L4)(b.A.shellNowDir),2),f=s[0],h=s[1],p=$((0,x.L4)(b.A.sshInfo),2),y=p[0],m=(p[1],$((0,x.L4)(b.A.nowFileList),2)),g=(m[0],m[1]),w=$((0,x.L4)(b.A.remoteShellShow),2),E=w[0],S=w[1],L=$((0,x.L4)(b.A.enterKey),2),_=L[0],k=(L[1],$((0,x.L4)(b.A.confirm),2)),O=(k[0],k[1]),N=function(){var e=H(M().mark((function e(n,i){var u,s,p,m,w,b,x,L,k,N,P,K,C,G;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,A.kW)(r,n))o((0,A.P1)(r,n));else if("ctrl"===_)o([].concat(U(r),[n]));else if("shift"===_){if(u=(0,A.a7)(r),s=u.max,p=u.min,m=[],n>=s)for(w=s;w<=n;w++)m.push(w);else for(b=p;b>=n;b--)m.push(b);o(m)}else o([n]);if(c([].concat(U(a),[n])),setTimeout((function(){c((0,A.P1)(a,n))}),300),t.type!==F.Iw.folder){e.next=26;break}if(void 0===a.find((function(t){return t===n}))){e.next=24;break}return L=new j.x,Object.assign(L,y),L.dir=A.HS.apply(void 0,U(f).concat([i])),e.next=12,d.Fg.post("get/dir",L);case 12:if((k=e.sent).code===v.m.Sucess){e.next=15;break}return e.abrupt("return");case 15:N=B(null!==(x=k.data.files)&&void 0!==x?x:[]);try{for(N.s();!(P=N.n()).done;)(K=P.value).origin_size=K.size,K.size=(0,D.v7)(K.size)}catch(t){N.e(t)}finally{N.f()}return g(k.data),R=k.data,wt=R,h([].concat(U(f),[i])),E.show&&S({show:!0,path:L.dir}),o([]),c([]),e.abrupt("return");case 24:e.next=38;break;case 26:if(void 0===a.find((function(t){return t===n}))){e.next=38;break}if((C=(0,I.kr)(i))||(C="txt"),!C){e.next=38;break}if(G=function(){var e=H(M().mark((function e(){var r,n;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new j.x,Object.assign(r,y),r.file=A.HS.apply(void 0,U(f).concat([i])),e.next=5,d.Fg.post("get/file/text",r);case 5:n=e.sent,l({model:C,open:!0,fileName:t.name,save:function(){var t=H(M().mark((function t(e){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,d.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(T.xK.set_value_temp(""),l({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),T.xK.set_value_temp(n.data);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!("number"==typeof t.origin_size&&t.origin_size>D.o5)){e.next=35;break}return O({open:!0,title:"提示",sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=H(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O({open:!1,handle:null}),t.next=3,G();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 35:return e.next=37,G();case 37:return e.abrupt("return");case 38:case"end":return e.stop()}var R}),e)})));return function(t,r){return e.apply(this,arguments)}}();return n.createElement(C.B,{name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,click:N})}var Z=r(7856),V=r(4238),W=r(4944),q=r(7704);function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function Q(){Q=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==X(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(X(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function tt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function et(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tt(i,n,o,a,c,"next",t)}function c(t){tt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function rt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||nt(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 nt(t,e){if(t){if("string"==typeof t)return ot(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)?ot(t,e):void 0}}function ot(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 it(t){var e=rt((0,n.useState)(null),2),r=e[0],o=e[1],i=rt((0,x.L4)(b.A.remoteShellShow),2),a=i[0],c=(i[1],rt((0,n.useState)(!1),2)),u=c[0],l=c[1],s=rt((0,x.L4)(b.A.sshInfo),2),f=s[0],h=(s[1],rt((0,x.L4)(b.A.shellNowDir),2)),p=h[0],y=(h[1],function(){var t=et(Q().mark((function t(){var e,r,n;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new Z.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},W.ws.addMsg(V.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=et(Q().mark((function t(e){var r;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new V.hf(V.HK.remote_shell_send)).context=e,t.next=4,W.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()),d=function(){et(Q().mark((function t(){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),W.ws.isAilive()&&W.ws.setPromise(function(){var t=et(Q().mark((function t(e){var r;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new V.hf(V.HK.remote_shell_cancel)).context="",W.ws.unSubscribeUnconnect(),t.next=5,W.ws.send(r);case 5:return t.next=7,W.ws.unConnect();case 7:e();case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){d()}}),[]),(0,n.useEffect)((function(){if(a.show)if(r){if(u){var t=new V.hf(V.HK.remote_shell_cd);t.context=a.path,W.ws.send(t)}}else y(),l(!0);else d()}),[a]),n.createElement(q.$,{show:a.show,terminal:r,init:function(t,e){r.writeln("open shell... ");var n,o=new V.hf(V.HK.remote_shell_open),i=new j.x;Object.assign(i,f),i.init_path=A.HS.apply(void 0,function(t){if(Array.isArray(t))return ot(t)}(n=p)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||nt(n)||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.")}()),i.rows=t,i.cols=e,o.context=i,W.ws.send(o)}})}var at=r(9214),ct=r(2042),ut=r(2730);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function st(){return st=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},st.apply(null,arguments)}function ft(){ft=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(lt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ht(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=vt(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function pt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||vt(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 yt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function dt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yt(i,n,o,a,c,"next",t)}function c(t){yt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||vt(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 vt(t,e){if(t){if("string"==typeof t)return gt(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)?gt(t,e):void 0}}function gt(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 wt,bt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),xt=Object.values(bt),Et=280;function St(t){var e=(0,w.Bd)().t,r=(0,n.useRef)(void 0),o=mt((0,x.L4)(b.A.nowFileList),2),a=o[0],u=o[1],l=mt((0,x.L4)(b.A.fileShowType),2),f=l[0],h=l[1],p=mt((0,x.L4)(b.A.uploadFiles),2),m=(p[0],p[1]),g=mt((0,x.L4)(b.A.showPrompt),2),E=g[0],S=g[1],L=mt((0,x.L4)(b.A.selectedFileList),2),_=L[0],k=(L[1],mt((0,x.L4)(b.A.enterKey),2)),O=(k[0],k[1]),N=mt((0,x.L4)(b.A.copyedFileList),2),C=N[0],I=N[1],T=mt((0,x.L4)(b.A.cutedFileList),2),G=T[0],M=T[1],B=mt((0,x.L4)(b.A.selectedFileList),2),U=(B[0],B[1]),R=mt((0,x.L4)(b.A.clickFileList),2),H=(R[0],R[1]),$=mt((0,x.L4)(b.A.remoteShellShow),2),z=$[0],Y=$[1],Z=mt((0,x.L4)(b.A.shellNowDir),2),V=Z[0],W=Z[1],q=mt((0,x.L4)(b.A.sshInfo),2),X=q[0],Q=(q[1],mt((0,n.useState)(void 0),2)),tt=Q[0],et=Q[1],rt=mt((0,n.useState)(""),2),nt=rt[0],ot=rt[1],lt=function(){var e=dt(ft().mark((function e(){var r,n,o,i,a,c,l,s,f;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new j.x).dir=A.HS.apply(void 0,pt(V)),r.username=t.data.username,r.password=t.data.password,r.domain=t.data.domain,r.port=t.data.port,e.next=8,d.Fg.post("get/dir",r);case 8:if((n=e.sent).code===v.m.Sucess){e.next=12;break}return(0,ct.zN)("连接失败"),e.abrupt("return");case 12:o=n.data||{},i=o.folders,a=o.files,c=ht(null!=a?a:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).origin_size=s.size,s.size=(0,D.v7)(s.size)}catch(t){c.e(t)}finally{c.f()}u(f={folders:i||[],files:a||[]}),wt=f;case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),yt=function(){var t=dt(ft().mark((function t(){return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,lt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/Et);0===t&&(t=1),et("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return U([]),H([]),yt(),vt(),window.addEventListener("resize",vt),function(){window.removeEventListener("resize",vt)}}),[]);var gt=function(){var t=dt(ft().mark((function t(e){var r,n,o,i;return ft().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,P.T)(r);case 8:i=t.sent,m(i),S({show:!0,type:K.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),bt=function(t){t.preventDefault()};function St(t){new(s())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",bt),e.addEventListener("drop",gt),function(){t.close(),e.removeEventListener("dragover",bt),e.removeEventListener("drop",gt)}}),[]),(0,n.useEffect)((function(){E&&E.data&&E.data.ok&&yt()}),[E]);var Lt=function(){var t=dt(ft().mark((function t(){var e,r,n,o,i,a,c,l,s;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new j.x,Object.assign(e,X),!(V.length<=1)){t.next=4;break}return t.abrupt("return");case 4:return r=V.slice(0,V.length-1),W(r),e.dir=A.HS.apply(void 0,pt(r)),t.next=9,d.Fg.post("get/dir",e);case 9:if((n=t.sent).code===v.m.Sucess){t.next=12;break}return t.abrupt("return");case 12:o=n.data||{},i=o.folders,a=o.files,c=ht(null!=a?a:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).size=(0,D.v7)(s.size)}catch(t){c.e(t)}finally{c.f()}u({folders:i||[],files:a||[]}),z.show&&Y({show:!0,path:A.HS.apply(void 0,pt(r))});case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_t=mt((0,n.useState)(!1),2),kt=_t[0],Ot=_t[1];(0,n.useEffect)((function(){var t=function(t){if(kt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=a.files.length,r=a.folders.length,n=[],o=0;o<e+r;o++)n.push(o);U(n)}else O("ctrl");else"Escape"===t.key?U([]):"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)}}),[a,kt]);var Nt=function(t){t.target===t.currentTarget&&U([])};return n.createElement("div",{className:"not-select-div"},n.createElement(y.A,{left_children:n.createElement(i.$Z,{handleEnterPress:function(){var t,e;if(wt){U([]),H([]);var r,n=[],o=[],i=ht(null!==(t=wt.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(nt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,l=ht(null!==(e=wt.folders)&&void 0!==e?e:[]);try{for(l.s();!(c=l.n()).done;){var s=c.value;s.name.includes(nt)&&o.push(s)}}catch(t){l.e(t)}finally{l.f()}u({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){ot(t)},max_width:"25em"})},n.createElement(c.rA,{icon:"arrow_back",title:e("返回"),onClick:Lt}),_.length>0&&n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){S({show:!0,type:K.PromptEnum.SshDelete,overlay:!0,data:{}})}}),_.length>0&&n.createElement(c.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,at.i)(a,_);I(t.map((function(t){return A.HS.apply(void 0,pt(V).concat([t.name]))}))),M([]),St("已复制")}}),_.length>0&&n.createElement(c.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,at.i)(a,_);M(t.map((function(t){return A.HS.apply(void 0,pt(V).concat([t.name]))}))),I([]),St("已剪切")}}),(C.length>0||G.length>0)&&n.createElement(c.rA,{onClick:function(){S({show:!0,type:K.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:C.length+G.length}),1===_.length&&a.files.length>=1&&a.folders.length>=1&&(0,at.i)(a,_)[0].type!==F.Iw.folder&&n.createElement(c.rA,{icon:"download",title:e("下载"),onClick:function(){var e=(0,at.i)(a,_),r="/api/ssh/download?file=".concat(A.HS.apply(void 0,pt(V).concat([e[0].name])),"&domain=").concat(t.data.domain,"&port=").concat(t.data.port,"&username=").concat(t.data.username,"&password=").concat(t.data.password,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===_.length&&n.createElement(c.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){S({show:!0,type:K.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"terminal",title:"shell",onClick:function(){z.show?Y({show:!1,path:""}):Y({show:!0,path:A.HS.apply(void 0,pt(V))})}}),n.createElement(c.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){h((0,A.jH)(xt,f))}}),n.createElement(c.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){S({show:!0,type:K.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){S({show:!0,type:K.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"upload_file",title:"上传",onClick:function(){S({show:!0,type:K.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 c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,ut.S)(u)),o.push(c)}var l=[];if(n){var s,f=ht(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),m(l),S({show:!0,type:K.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(c.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(f),ref:r,onMouseEnter:function(){Ot(!0)},onMouseLeave:function(){Ot(!1)}},!!a&&!!a.folders&&a.folders.length>0&&n.createElement("h2",null,"文件夹"),!!a&&!!a.folders&&n.createElement("div",{onClick:Nt},a.folders.map((function(t,e){return n.createElement(J,st({itemWidth:tt,index:e,key:e},t))}))),!!a&&!!a.folders&&a.files.length>0&&n.createElement("h2",{onClick:Nt},"文件"),!!a&&!!a.folders&&n.createElement("div",{onClick:Nt},a.files.map((function(t,e){return n.createElement(J,st({itemWidth:tt,index:e+a.folders.length,key:e},t))})))),n.createElement(it,null))}function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function _t(){_t=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function kt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){kt(i,n,o,a,c,"next",t)}function c(t){kt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function At(t){var e=(0,w.Bd)().t,r=Nt((0,n.useState)(""),2),o=r[0],a=r[1],u=Nt((0,n.useState)(""),2),l=u[0],f=u[1],h=Nt((0,n.useState)(""),2),p=h[0],m=h[1],E=Nt((0,n.useState)(""),2),S=E[0],L=E[1],_=Nt((0,n.useState)(void 0),2),k=_[0],O=_[1],N=Nt((0,n.useState)(""),2),A=N[0],P=N[1],K=Nt((0,n.useState)(!1),2),F=K[0],C=K[1],I=Nt((0,x.L4)(b.A.shellNowDir),2),T=(I[0],I[1]),D=Nt((0,x.L4)(b.A.sshInfo),2),G=(D[0],D[1]),M=function(){var t=Ot(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new j.x).password=l,e.domain=S,e.port=k,e.username=o,t.next=7,d.Fg.post("close",e);case 7:t.sent,C(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=Ot(_t().mark((function t(e){var r,n;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new j.x).password=e?e.password:l,r.domain=e?e.domain:S,r.port=e?e.port:k,r.username=e?e.username:o,r.private_path=e?e.private_path:p,t.next=8,d.Fg.post("start",r);case 8:(n=t.sent)&&n.code===v.m.Sucess&&(r.dir=e?e.dir:A,G(r),T([r.dir]),C(!0));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),U=function(){var t=Ot(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Ot(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(){var t=Ot(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(e.domain),P(e.dir),O(e.port),a(e.username),f(e.password),m(e.private_path),t.next=8,B(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:e("目录"),icon:"home",value:A,handleInputChange:function(t){return P(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("账号"),icon:"verified_user",value:o,handleInputChange:function(t){return a(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("密码"),icon:"password",value:l,handleInputChange:function(t){return f(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:p,handleInputChange:function(t){return m(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("连接地址"),icon:"location_on",value:S,handleInputChange:function(t){L(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("端口"),icon:"outlet",value:k,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),O(parseInt(t)))},max_width:"7rem"}),n.createElement(c.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){B()}})),F?n.createElement(St,{close:M,data:{port:k,password:l,username:o,domain:S,dir:A}}):n.createElement(g.N,{getItems:U,save:R,clickItem:H,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("访问目录")}]}))}function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function Kt(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,Ft(n.key),n)}}function Ft(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}function Ct(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var It=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.render=new qt.Canvas.create(this.canvas),this.activeSession=!1,this.install()},e=[{key:"install",value:function(){var t=this;return this.canvas.addEventListener("mousemove",(function(e){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:0,isPressed:!1}),e.preventDefault||t.activeSession(),!1})),this.canvas.addEventListener("mousedown",(function(e){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("DOMMouseScroll",(function(e){if(t.activeSession){var r=e.detail,n=Math.round(15*Math.abs(r)/8),o=qt.elementOffset(t.canvas);return W.ws.sendData(V.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=qt.elementOffset(t.canvas);return W.ws.sendData(V.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 W.ws.sendData(V.HK.scancode,{code:qt.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return W.ws.sendData(V.HK.scancode,{code:qt.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var i=this;W.ws.addMsg(V.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),i.activeSession=!0})),W.ws.addMsg(V.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,i.render.update(e)})),W.ws.addMsg(V.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),i.activeSession=!1})),W.ws.addMsg(V.HK.rdp_error,(function(t){i.activeSession=!1}));var a=new V.hf;a.cmdType=V.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:qt.locale()},W.ws.send(a)}}],e&&Kt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}var Mt,Bt,Ut,Rt,Ht=function(){return 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")},(e=[{key:"update",value:function(t){var e;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,c=i*a*4,u=Module._malloc(c),l=new Uint8Array(Module.HEAPU8.buffer,u,c),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,i,a,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,c));return Module._free(n),Module._free(u),{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)}}])&&Dt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function $t(t){return $t="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},$t(t)}function zt(t,e,r){return(e=function(t){var e=function(t){if("object"!=$t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$t(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Mt={"":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),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Mt,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),zt(zt(zt(zt(zt(zt(zt(Mt,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),Jt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt={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"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Zt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Vt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft"},"220","IntlBackslash"),90,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),78,"KeyN"),77,"KeyM"),188,"Comma"),190,"Period"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),zt(zt(zt(Rt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),Wt={firefox:{fr:Jt,en:Vt},chrome:{fr:Zt,en:Vt}};(qt=function(){}).prototype={$:function(t){return document.getElementById(t)},elementOffset:function(t){for(var e=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:e}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(t){return new It(t)}},Canvas:{create:function(t){return new Ht(t)}},scancode:function(t){var e=qt.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Yt[t.code||Wt[qt.browser()||"firefox"][e][t.keyCode]]}};var qt=new qt;function Xt(t){return Xt="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},Xt(t)}function Qt(){Qt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Xt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Xt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function te(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ee(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){te(i,n,o,a,c,"next",t)}function c(t){te(i,n,o,a,c,"throw",t)}a(void 0)}))}}function re(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return 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 oe(){var t=(0,w.Bd)().t,e=re((0,x.L4)(b.A.header_min),2),r=(e[0],e[1]),a=re((0,n.useState)(void 0),2),u=a[0],l=a[1],f=re((0,n.useState)(void 0),2),h=f[0],p=f[1],m=re((0,n.useState)(void 0),2),E=m[0],S=m[1],L=re((0,n.useState)(!1),2),_=L[0],k=L[1],O=re((0,n.useState)(!1),2),N=O[0],j=O[1],A=function(){var t=ee(Qt().mark((function t(){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,P.J)("rle.js");case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),(0,ct.zN)("加载资源失败"),t.abrupt("return");case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),K=null;(0,n.useEffect)((function(){return A(),function(){K&&(K.remove(),K=null)}}),[]);var F=function(e){j(!0),function(n,o,i){if(n=n||e.address,o=o||e.username,i=i||e.password,!n||!o||!i)return(0,ct.zN)(t("不允许为空")),void j(!1);K||(K=qt.client.create(qt.$("rdpwebview")));var a=qt.$("rdpwebview");a.style.display="inline",a.width=window.innerWidth,a.height=window.innerHeight,k(!0),r(!0),K.connect(n,"",o,i,(function(t){qt.$("rdpwebview").style.display="none",r(!1),j(!1),k(!1)}))}(u,h,E)},C=function(){var t=ee(Qt().mark((function t(){var e;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k(!1),t.next=3,W.ws.sendData(V.HK.rdp_disconnect,"");case 3:(e=qt.$("rdpwebview")).getContext("2d").clearRect(0,0,e.width,e.height),qt.$("rdpwebview").style.display="none",j(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=ee(Qt().mark((function t(){var e;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=ee(Qt().mark((function t(e){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=ee(Qt().mark((function t(e){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S(e.password),p(e.username),l(e.address),F(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:t("地址"),icon:"outlet",value:u,handleInputChange:function(t){return l(t)}}),n.createElement(i.$Z,{placeholder:t("账号"),icon:"http",value:h,handleInputChange:function(t){return p(t)}}),n.createElement(i.$Z,{placeholder:t("密码"),icon:"http",value:E,handleInputChange:function(t){return S(t)}}),!N&&n.createElement(c.rA,{icon:"play_arrow",title:t("连接"),onClick:F}),N&&n.createElement(c.rA,{icon:"close",title:t("关闭"),onClick:C})),n.createElement(o.jW,{isFull:_},!N&&n.createElement(g.N,{getItems:I,save:T,clickItem:D,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")}]}),n.createElement("canvas",{id:"rdpwebview",style:{display:"none"}})))}function ie(t){return ie="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},ie(t)}function ae(){ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ie(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ie(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ce(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ue(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ce(i,n,o,a,c,"next",t)}function c(t){ce(i,n,o,a,c,"throw",t)}a(void 0)}))}}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(t){var e,r,o=(0,w.Bd)().t,a=(e=(0,n.useState)(""),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,r)||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}}(e,r)||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.")}()),u=a[0],l=a[1],f=function(){var t=ue(ae().mark((function t(e){var r;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||u){t.next=4;break}return new(s())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,d._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===v.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(s())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=ue(ae().mark((function t(){var e;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("wol/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),p=function(){var t=ue(ae().mark((function t(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("wol/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=ue(ae().mark((function t(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l(e.mac),f(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(c.rA,{icon:"play_arrow",title:o("发送"),onClick:function(){f()}}),n.createElement(i.$Z,{placeholder:o("目标设备mac地址"),icon:"laptop_mac",value:u,handleInputChange:function(t){return l(t)}})),n.createElement(g.N,{getItems:h,save:p,clickItem:m,items:[{key:"name",preName:o("名字")},{key:"mac",preName:"mac"+o("地址")}]}))}var fe,he=r(7481),pe=r(505);function ye(t){return ye="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},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ye(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ye(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function me(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ve(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){me(i,n,o,a,c,"next",t)}function c(t){me(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return we(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)?we(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 we(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 be(){var t=ge((0,n.useState)("rsa"),2),e=t[0],r=t[1],u=ge((0,n.useState)("pem"),2),l=u[0],s=u[1],f=(0,w.Bd)(),h=f.t,p=(f.i18n,ge((0,x.L4)(b.A.confirm),2)),m=(p[0],p[1]),g=ge((0,n.useState)(""),2),E=g[0],S=g[1],L=ge((0,n.useState)(""),2),_=L[0],k=L[1],O=function(){var t=ve(de().mark((function t(){var r;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("generate",{type:e,form:l});case 2:(r=t.sent).code===v.m.Sucess&&(S(r.data.public_key),k(r.data.private_key),fe=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=ve(de().mark((function t(r){var n;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_&&E){t.next=3;break}return(0,ct.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),m({open:!0,title:"将覆盖密钥文件",sub_title:"将会作为 ".concat(n,' 文件保存到系统上的"').concat(fe,'"目录下,此目录会作为openssh(git)所使用的默认目录。之前的密钥将作废。'),handle:function(){var t=ve(de().mark((function t(){return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("save_openssh",{name:n,context:"pub"===r?E:_});case 2:t.sent.code===v.m.Sucess&&((0,ct.LW)("保存成功"),m({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null,n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:h("RSA"),value:"rsa"},{title:h("DSA"),value:"dsa"},{title:h("ECDSA"),value:"ecdsa"}]}),n.createElement(i.l6,{tip:"输出格式",value:l,width:"auto",onChange:function(t){s(t)},options:[{title:h("普通PEM"),value:"pem"},{title:h("opensshPEM"),value:"openssh_pem"}]}),n.createElement(c.rA,{icon:"play_arrow",title:h("生成"),onClick:function(){O()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"公钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,pe.l)(E),(0,ct.LW)("复制完成"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){N("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){S(t.target.value)},value:E}))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:"私钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){_&&((0,pe.l)(_),(0,ct.LW)("复制成功"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){N("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:_,onChange:function(t){k(t.target.value)}}))))))}var xe,Ee,Se,Le,_e,ke=r(4091),Oe=r(1083);function Ne(t){return Ne="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},Ne(t)}function je(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ie(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Ae(t){return function(t){if(Array.isArray(t))return Te(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ie(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 Pe(){Pe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Ne(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ke(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Fe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ke(i,n,o,a,c,"next",t)}function c(t){Ke(i,n,o,a,c,"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,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Ie(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 Ie(t,e){if(t){if("string"==typeof t)return Te(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)?Te(t,e):void 0}}function Te(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 De(){var t=(0,w.Bd)(),e=t.t,r=(t.i18n,Ce((0,x.L4)(b.A.confirm),2)),u=(r[0],r[1],Ce((0,x.L4)(b.A.showPrompt),2)),l=(u[0],u[1]),f=Ce((0,n.useState)(""),2),h=f[0],p=f[1],E=Ce((0,n.useState)("get"),2),S=E[0],L=E[1],_=Ce((0,n.useState)(""),2),k=_[0],O=_[1],N=Ce((0,n.useState)([]),2),j=N[0],A=N[1],P=Ce((0,n.useState)(1),2),F=P[0],C=P[1],D=Ce((0,n.useState)(1),2),G=D[0],M=D[1],B=Ce((0,n.useState)(1),2),U=B[0],R=B[1],H=Ce((0,n.useState)(),2),$=H[0],z=H[1],Y=Ce((0,x.L4)(b.A.nav_index_add_item_by_now_list),2),J=(Y[0],Y[1]),Z=Ce((0,x.L4)(b.A.prompt_card),2),V=(Z[0],Z[1]);T.xK.set_value_temp("{}"),(0,n.useEffect)((function(){xe={},Ee={},Se="",Le="",_e="",T.xK.get_editor().session.setMode("ace/mode/json")}),[]);var W=function(){var t=Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("http/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),q=function(){var t=Fe(Pe().mark((function t(e){return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("http/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),X=function(){var t=Fe(Pe().mark((function t(e){return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:O(e.url),L(e.method),e.header_type&&Q(e.header_type),e.headers&&(xe=JSON.parse(e.headers),1===e.header_type&&(T.xK.get_editor().setValue(e.headers,-1),T.xK.get_editor().session.setMode("ace/mode/json"))),e.form_data_list&&A(JSON.parse(e.form_data_list)),e.json_data&&(Ee=JSON.parse(e.json_data)),e.data&&(Se=e.data),e.body_type&&(M(e.body_type),1===e.body_type?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===e.body_type&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json")));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Q=function(t){try{1===F&&(xe=JSON.parse(T.xK.get_editor_value()))}catch(t){(0,ct.zN)(t.message)}C(t),1===t?(T.xK.get_editor().setValue(JSON.stringify(xe,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json")):2===t&&(1===G?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===G&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json")))},tt=function(t){if(2===F){if(T.xK.get_editor_value())try{1===G?Se=T.xK.get_editor_value():2===G&&(Ee=JSON.parse(T.xK.get_editor_value()))}catch(t){return void(0,ct.zN)(t.message)}M(t),1===t?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===t&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json"))}},et=function(t){var e=new m.vr;if(e.url=k,e.method=S,1===F&&(xe=JSON.parse(T.xK.get_editor_value())),e.headers=xe,e.body_type=G,e.header_type=F,G===m.RB.row)Se=T.xK.get_editor_value(),e.data=Se,e.json_data=JSON.stringify(Ee);else if(G===m.RB.json)xe["Content-Type"]="application/json",1===F&&T.xK.get_editor().setValue(JSON.stringify(xe),-1),Ee=JSON.parse(T.xK.get_editor_value()),e.json_data=JSON.stringify(Ee),e.data=Se;else if(G===m.RB.form){xe["Content-Type"]="multipart/form-data",e.form_data_list=j;var r,n=je(j);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},rt=function(){var t=Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d._U.have_http_method(S)){t.next=3;break}return(0,ct.zN)("不存在的http method"),t.abrupt("return");case 3:if(k){t.next=6;break}return(0,ct.zN)("url is empty"),t.abrupt("return");case 6:z(void 0),p(""),(e=new FormData).append("data",JSON.stringify(et(e))),Oe.A.post(d._U.getUrl("http/send"),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,ct.zN)(t.message)})).then((function(t){t&&(200===t.status?z(n.createElement("span",{style:{color:"green"}},"200")):z(t.status),Le="object"===Ne(t.data)?JSON.stringify(t.data):t.data,_e=JSON.stringify(t.headers.filecat_remote_raw_headers),1===U?p(Le):2===U&&p(_e))}));case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),nt=function(){var t=Fe(Pe().mark((function t(){var e,r,n,o;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=et(),j){r=je(j);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(j),e.headers=JSON.stringify(e.headers),"object"===Ne(e.data)&&(e.data=JSON.stringify(e.data)),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"",rightBottomCom:3===G&&2===F&&n.createElement(c.rA,{icon:"add",title:e("添加"),onClick:function(){A([{}].concat(Ae(j)))}})},n.createElement("div",{className:"http_url"},n.createElement(i.$Z,{max_width:"15%",placeholder:e("协议"),icon:"http",value:S,handleInputChange:function(t){L(t)}}),n.createElement(i.$Z,{max_width:"80%",placeholder:e("http url"),icon:"link",value:k,handleInputChange:function(t){O(t)}}),n.createElement(c.rA,{icon:"send",title:e("发送"),onClick:rt}),n.createElement(c.rA,{title:"添加",icon:"save_as",onClick:function(){var t,r,o=je(j);try{for(o.s();!(t=o.n()).done;)if(t.value.is_file)return void(0,ct.zN)("表单中含有文件,浏览器限制不能添加")}catch(t){o.e(t)}finally{o.f()}V({open:!0,title:"信息",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:Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:(e=t.sent).name=r,J(e),V({open:!1});case 6:case"end":return t.stop()}}),t)})))},"确定")))})}})),n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===F,onchange:function(){Q(1)}}),n.createElement(i.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===F,onchange:function(){Q(2)}})]}),n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"body",context:e("row"),selected:1===G,onchange:function(){tt(1)}}),n.createElement(i.U6,{value:2,name:"body",context:e("json"),selected:2===G,onchange:function(){tt(2)}}),n.createElement(i.U6,{value:3,name:"body",context:e("form"),selected:3===G,onchange:function(){tt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:3===G&&2===F?"none":""}},n.createElement(ke.A,{name:""})),n.createElement("div",{style:{display:3!==G||2!==F?"none":""}},n.createElement(he.X,{headers:["key",e("值")],rows:j.map((function(t,r){var o=[n.createElement(i.Sm,{value:t.key,handleInputChange:function(e){t.key=e,A(Ae(j))},no_border:!0}),n.createElement(i.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,A(Ae(j))},no_border:!0}),n.createElement("div",null,n.createElement(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){l({show:!0,type:K.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,I.hU)()+Date.now().toString(),j[t].value="".concat(o,"(").concat(o.name,")"),j[t].is_file=!0,j[t].fileName=o.name,j[t].fullPath=o.fullPath,A(Ae(j)),j[t].file_object=o,l({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){j.splice(t,1),A(Ae(j))}(r)}}))];return o})),width:"10rem"}))),n.createElement(a.Zp,{title:$,titleCom:n.createElement("div",{className:" div-row "},n.createElement(i.U6,{value:1,name:"respone",context:e("响应体"),selected:1===U,onchange:function(){R(1),p(Le)}}),n.createElement(i.U6,{value:1,name:"respone",context:e("响应头"),selected:2===U,onchange:function(){R(2),p(_e)}}),n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){h&&((0,pe.l)(h),(0,ct.LW)("复制完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){p(t.target.value)},value:h}))),n.createElement(o.VP,null,n.createElement(g.N,{getItems:W,save:q,clickItem:X,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"}]})))))}var Ge=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Me(t){var e=(0,w.Bd)().t,r=[{index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/"},{index:2,name:e("http代理"),rto:"http/"},{index:3,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"},{index:4,name:"rdp".concat(e("代理")),rto:"rdp/"},{index:5,name:e("网络唤醒"),rto:"netwol/"},{index:6,name:e("rtsp播放器"),rto:"rtsp/"},{index:7,name:e("非对称密钥"),rto:"crypto/"},{index:8,name:e("时间工具"),rto:"timeutil/"}];return n.createElement(o.W1,{optionList:r},n.createElement(At,null),n.createElement(De,null),n.createElement(N,null),n.createElement(oe,null),n.createElement(se,null),n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Ge,null)),n.createElement(be,null),n.createElement(o.xh,null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(p,null)))))}}}]);
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function 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,c(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 c(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>f,RB:()=>p,eq:()=>s,qB:()=>l,vo:()=>h,vr:()=>y});var l=a((function t(){u(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=a((function t(){u(this,t),o(this,"open",!1),o(this,"model",s.udp),o(this,"key","")})),h=a((function t(){u(this,t),o(this,"open",!1),o(this,"key","")})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=a((function t(){u(this,t)}))},7481:(t,e,r)=>{r.d(e,{S:()=>a,X:()=>i});var n=r(6540);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r,i,a=(r=n.useState([]),i=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(r,i)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=a[0],u=a[1];return(0,n.useEffect)((function(){t.children?u(Array.isArray(t.children)?t.children:[t.children]):u(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,c.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===c.length-1?"small":""},e)})))}))))}function a(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},4091:(t,e,r)=>{r.d(e,{A:()=>h});var n=r(6540),o=r(952),i=r.n(o),a=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(4522)),c=r.n(a),u=r(8247);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=(0,n.useRef)(null);return(0,n.useEffect)((function(){var r,n=i().edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:u.xK.get_value_temp(),showPrintMargin:!1,theme:"ace/theme/cloud9_day",mode:c().getModeForPath(null!==(r=t.name)&&void 0!==r?r:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return n.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),n.container.addEventListener("wheel",(function(t){t.preventDefault()})),n.focus(),n.on("change",(function(e){t.on_change&&t.on_change()})),e.current=n,u.xK.set_editor_temp(n),function(){u.xK.set_editor_temp(null),n.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}r(47),i().config.set("basePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("modePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("themePath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("workerPath","https://cdn.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Me});var n=r(6540),o=r(5725),i=r(3033),a=r(447),c=r(5997),u=r(4289),l=r(3413),s=r.n(l);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t){var e=f((0,n.useState)("毫秒"),2),r=e[0],o=e[1],l=f((0,n.useState)(""),2),h=l[0],p=l[1],y=f((0,n.useState)(""),2),d=y[0],m=y[1];return n.createElement(a.Zp,{title:"时间转换器",rightBottomCom:n.createElement(c.C3,{text:"确定",clickFun:function(){if(h||d){var t=0,e=""!==h&&0!==h;if(e){if(!(0,u.kf)(h))return void new(s())({type:"error",text:"必须都是数字",timeout:1e3,layout:"bottomLeft"}).show();t=parseInt(h),"分秒"===r&&(t*=1e3)}var n=new Date(e?t:d),o=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(m(o),!h){var i=n.getTime();p("毫秒"===r?i:i/1e3)}}else new(s())({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(i.l6,{options:[{title:"毫秒",value:"毫秒"},{title:"分秒",value:"分秒"}],onChange:function(t){o(t)}}),n.createElement(i.Sm,{placeholder:r,value:h,handleInputChange:function(t){p(t)}}),n.createElement(i.Sm,{placeholder:"格式化时间",value:d,handleInputChange:function(t){m(t)}}))}var y=r(7952),d=r(6007),m=r(8694),v=r(3459),g=r(3029),w=r(2389),b=r(6417),x=r(7444);function E(t){return E="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},E(t)}function S(){S=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new K(n||[]);return o(a,"_invoke",{value:N(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(F([])));L&&L!==r&&n.call(L,a)&&(b=L);var _=w.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==E(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(E(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,K.prototype={constructor:K,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function L(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){L(i,n,o,a,c,"next",t)}function c(t){L(i,n,o,a,c,"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,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(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 N(t){var e=(0,w.Bd)().t,r=k((0,x.L4)(b.A.header_min),2),a=(r[0],r[1]),u=k((0,n.useState)(""),2),l=u[0],f=u[1],h=k((0,n.useState)(""),2),p=h[0],E=h[1],L=k((0,n.useState)(void 0),2),O=L[0],N=L[1],j=k((0,n.useState)(!1),2),A=j[0],P=j[1],K=function(){var t=_(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new m.qB).targetProxyUrl="string"==typeof l?l:p,t.next=4,d._U.post("close",e);case 4:if(t.sent.code===v.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:E(""),a(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){var t=_(S().mark((function t(e){var r,n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new m.qB).targetProxyUrl="string"==typeof e?e:l,r.sysProxyPort=O,t.next=5,d._U.post("start",r);case 5:if((n=t.sent).code===v.m.Sucess){t.next=8;break}return t.abrupt("return");case 8:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),E(o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){K()}}),[]);var C=function(){var t=_(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=_(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=_(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f(e.url),F(e.url);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:O,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),N(parseInt(t)))},max_width:"10rem"}),n.createElement(i.$Z,{placeholder:e("要代理的url"),icon:"link",value:l,handleInputChange:function(t){f(t)}}),n.createElement(c.rA,{icon:"play_arrow",title:e("开始代理"),onClick:F}),n.createElement(c.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){P(!A),a(!A)}}),n.createElement(c.rA,{icon:"close",title:e(e("关闭")),onClick:function(){K(),P(!1),f("")}})),n.createElement(o.jW,{isFull:A},n.createElement("div",{id:"browser"},!p&&n.createElement(g.N,{getItems:C,save:I,clickItem:T,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"}]}),n.createElement("iframe",{id:"webview",src:p}))))}var j=r(4405),A=r(4694),P=r(5726),K=r(2869),F=r(7022),C=r(8844),I=r(1499),T=r(8247),D=r(8815);function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function M(){M=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(G(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=z(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function U(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||z(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||z(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 z(t,e){if(t){if("string"==typeof t)return Y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function J(t){var e=$((0,x.L4)(b.A.selectedFileList),2),r=e[0],o=e[1],i=$((0,x.L4)(b.A.clickFileList),2),a=i[0],c=i[1],u=$((0,x.L4)(b.A.editorSetting),2),l=(u[0],u[1]),s=$((0,x.L4)(b.A.shellNowDir),2),f=s[0],h=s[1],p=$((0,x.L4)(b.A.sshInfo),2),y=p[0],m=(p[1],$((0,x.L4)(b.A.nowFileList),2)),g=(m[0],m[1]),w=$((0,x.L4)(b.A.remoteShellShow),2),E=w[0],S=w[1],L=$((0,x.L4)(b.A.enterKey),2),_=L[0],k=(L[1],$((0,x.L4)(b.A.confirm),2)),O=(k[0],k[1]),N=function(){var e=H(M().mark((function e(n,i){var u,s,p,m,w,b,x,L,k,N,P,K,C,G;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,A.kW)(r,n))o((0,A.P1)(r,n));else if("ctrl"===_)o([].concat(U(r),[n]));else if("shift"===_){if(u=(0,A.a7)(r),s=u.max,p=u.min,m=[],n>=s)for(w=s;w<=n;w++)m.push(w);else for(b=p;b>=n;b--)m.push(b);o(m)}else o([n]);if(c([].concat(U(a),[n])),setTimeout((function(){c((0,A.P1)(a,n))}),300),t.type!==F.Iw.folder){e.next=26;break}if(void 0===a.find((function(t){return t===n}))){e.next=24;break}return L=new j.x,Object.assign(L,y),L.dir=A.HS.apply(void 0,U(f).concat([i])),e.next=12,d.Fg.post("get/dir",L);case 12:if((k=e.sent).code===v.m.Sucess){e.next=15;break}return e.abrupt("return");case 15:N=B(null!==(x=k.data.files)&&void 0!==x?x:[]);try{for(N.s();!(P=N.n()).done;)(K=P.value).origin_size=K.size,K.size=(0,D.v7)(K.size)}catch(t){N.e(t)}finally{N.f()}return g(k.data),R=k.data,wt=R,h([].concat(U(f),[i])),E.show&&S({show:!0,path:L.dir}),o([]),c([]),e.abrupt("return");case 24:e.next=38;break;case 26:if(void 0===a.find((function(t){return t===n}))){e.next=38;break}if((C=(0,I.kr)(i))||(C="txt"),!C){e.next=38;break}if(G=function(){var e=H(M().mark((function e(){var r,n;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new j.x,Object.assign(r,y),r.file=A.HS.apply(void 0,U(f).concat([i])),e.next=5,d.Fg.post("get/file/text",r);case 5:n=e.sent,l({model:C,open:!0,fileName:t.name,save:function(){var t=H(M().mark((function t(e){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,d.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(T.xK.set_value_temp(""),l({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),T.xK.set_value_temp(n.data);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!("number"==typeof t.origin_size&&t.origin_size>D.o5)){e.next=35;break}return O({open:!0,title:"提示",sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=H(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O({open:!1,handle:null}),t.next=3,G();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 35:return e.next=37,G();case 37:return e.abrupt("return");case 38:case"end":return e.stop()}var R}),e)})));return function(t,r){return e.apply(this,arguments)}}();return n.createElement(C.B,{name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,click:N})}var Z=r(7856),V=r(4238),W=r(4944),q=r(7704);function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function Q(){Q=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==X(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(X(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function tt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function et(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tt(i,n,o,a,c,"next",t)}function c(t){tt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function rt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||nt(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 nt(t,e){if(t){if("string"==typeof t)return ot(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)?ot(t,e):void 0}}function ot(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 it(t){var e=rt((0,n.useState)(null),2),r=e[0],o=e[1],i=rt((0,x.L4)(b.A.remoteShellShow),2),a=i[0],c=(i[1],rt((0,n.useState)(!1),2)),u=c[0],l=c[1],s=rt((0,x.L4)(b.A.sshInfo),2),f=s[0],h=(s[1],rt((0,x.L4)(b.A.shellNowDir),2)),p=h[0],y=(h[1],function(){var t=et(Q().mark((function t(){var e,r,n;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new Z.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},W.ws.addMsg(V.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=et(Q().mark((function t(e){var r;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new V.hf(V.HK.remote_shell_send)).context=e,t.next=4,W.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()),d=function(){et(Q().mark((function t(){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),W.ws.isAilive()&&W.ws.setPromise(function(){var t=et(Q().mark((function t(e){var r;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new V.hf(V.HK.remote_shell_cancel)).context="",W.ws.unSubscribeUnconnect(),t.next=5,W.ws.send(r);case 5:return t.next=7,W.ws.unConnect();case 7:e();case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){d()}}),[]),(0,n.useEffect)((function(){if(a.show)if(r){if(u){var t=new V.hf(V.HK.remote_shell_cd);t.context=a.path,W.ws.send(t)}}else y(),l(!0);else d()}),[a]),n.createElement(q.$,{show:a.show,terminal:r,init:function(t,e){r.writeln("open shell... ");var n,o=new V.hf(V.HK.remote_shell_open),i=new j.x;Object.assign(i,f),i.init_path=A.HS.apply(void 0,function(t){if(Array.isArray(t))return ot(t)}(n=p)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||nt(n)||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.")}()),i.rows=t,i.cols=e,o.context=i,W.ws.send(o)}})}var at=r(9214),ct=r(2042),ut=r(2730);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function st(){return st=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},st.apply(null,arguments)}function ft(){ft=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(lt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ht(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=vt(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function pt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||vt(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 yt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function dt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yt(i,n,o,a,c,"next",t)}function c(t){yt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||vt(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 vt(t,e){if(t){if("string"==typeof t)return gt(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)?gt(t,e):void 0}}function gt(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 wt,bt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),xt=Object.values(bt),Et=280;function St(t){var e=(0,w.Bd)().t,r=(0,n.useRef)(void 0),o=mt((0,x.L4)(b.A.nowFileList),2),a=o[0],u=o[1],l=mt((0,x.L4)(b.A.fileShowType),2),f=l[0],h=l[1],p=mt((0,x.L4)(b.A.uploadFiles),2),m=(p[0],p[1]),g=mt((0,x.L4)(b.A.showPrompt),2),E=g[0],S=g[1],L=mt((0,x.L4)(b.A.selectedFileList),2),_=L[0],k=(L[1],mt((0,x.L4)(b.A.enterKey),2)),O=(k[0],k[1]),N=mt((0,x.L4)(b.A.copyedFileList),2),C=N[0],I=N[1],T=mt((0,x.L4)(b.A.cutedFileList),2),G=T[0],M=T[1],B=mt((0,x.L4)(b.A.selectedFileList),2),U=(B[0],B[1]),R=mt((0,x.L4)(b.A.clickFileList),2),H=(R[0],R[1]),$=mt((0,x.L4)(b.A.remoteShellShow),2),z=$[0],Y=$[1],Z=mt((0,x.L4)(b.A.shellNowDir),2),V=Z[0],W=Z[1],q=mt((0,x.L4)(b.A.sshInfo),2),X=q[0],Q=(q[1],mt((0,n.useState)(void 0),2)),tt=Q[0],et=Q[1],rt=mt((0,n.useState)(""),2),nt=rt[0],ot=rt[1],lt=function(){var e=dt(ft().mark((function e(){var r,n,o,i,a,c,l,s,f;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new j.x).dir=A.HS.apply(void 0,pt(V)),r.username=t.data.username,r.password=t.data.password,r.domain=t.data.domain,r.port=t.data.port,e.next=8,d.Fg.post("get/dir",r);case 8:if((n=e.sent).code===v.m.Sucess){e.next=12;break}return(0,ct.zN)("连接失败"),e.abrupt("return");case 12:o=n.data||{},i=o.folders,a=o.files,c=ht(null!=a?a:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).origin_size=s.size,s.size=(0,D.v7)(s.size)}catch(t){c.e(t)}finally{c.f()}u(f={folders:i||[],files:a||[]}),wt=f;case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),yt=function(){var t=dt(ft().mark((function t(){return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,lt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/Et);0===t&&(t=1),et("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return U([]),H([]),yt(),vt(),window.addEventListener("resize",vt),function(){window.removeEventListener("resize",vt)}}),[]);var gt=function(){var t=dt(ft().mark((function t(e){var r,n,o,i;return ft().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,P.T)(r);case 8:i=t.sent,m(i),S({show:!0,type:K.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),bt=function(t){t.preventDefault()};function St(t){new(s())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",bt),e.addEventListener("drop",gt),function(){t.close(),e.removeEventListener("dragover",bt),e.removeEventListener("drop",gt)}}),[]),(0,n.useEffect)((function(){E&&E.data&&E.data.ok&&yt()}),[E]);var Lt=function(){var t=dt(ft().mark((function t(){var e,r,n,o,i,a,c,l,s;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new j.x,Object.assign(e,X),!(V.length<=1)){t.next=4;break}return t.abrupt("return");case 4:return r=V.slice(0,V.length-1),W(r),e.dir=A.HS.apply(void 0,pt(r)),t.next=9,d.Fg.post("get/dir",e);case 9:if((n=t.sent).code===v.m.Sucess){t.next=12;break}return t.abrupt("return");case 12:o=n.data||{},i=o.folders,a=o.files,c=ht(null!=a?a:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).size=(0,D.v7)(s.size)}catch(t){c.e(t)}finally{c.f()}u({folders:i||[],files:a||[]}),z.show&&Y({show:!0,path:A.HS.apply(void 0,pt(r))});case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_t=mt((0,n.useState)(!1),2),kt=_t[0],Ot=_t[1];(0,n.useEffect)((function(){var t=function(t){if(kt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=a.files.length,r=a.folders.length,n=[],o=0;o<e+r;o++)n.push(o);U(n)}else O("ctrl");else"Escape"===t.key?U([]):"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)}}),[a,kt]);var Nt=function(t){t.target===t.currentTarget&&U([])};return n.createElement("div",{className:"not-select-div"},n.createElement(y.A,{left_children:n.createElement(i.$Z,{handleEnterPress:function(){var t,e;if(wt){U([]),H([]);var r,n=[],o=[],i=ht(null!==(t=wt.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(nt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,l=ht(null!==(e=wt.folders)&&void 0!==e?e:[]);try{for(l.s();!(c=l.n()).done;){var s=c.value;s.name.includes(nt)&&o.push(s)}}catch(t){l.e(t)}finally{l.f()}u({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){ot(t)},max_width:"25em"})},n.createElement(c.rA,{icon:"arrow_back",title:e("返回"),onClick:Lt}),_.length>0&&n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){S({show:!0,type:K.PromptEnum.SshDelete,overlay:!0,data:{}})}}),_.length>0&&n.createElement(c.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,at.i)(a,_);I(t.map((function(t){return A.HS.apply(void 0,pt(V).concat([t.name]))}))),M([]),St("已复制")}}),_.length>0&&n.createElement(c.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,at.i)(a,_);M(t.map((function(t){return A.HS.apply(void 0,pt(V).concat([t.name]))}))),I([]),St("已剪切")}}),(C.length>0||G.length>0)&&n.createElement(c.rA,{onClick:function(){S({show:!0,type:K.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:C.length+G.length}),1===_.length&&a.files.length>=1&&a.folders.length>=1&&(0,at.i)(a,_)[0].type!==F.Iw.folder&&n.createElement(c.rA,{icon:"download",title:e("下载"),onClick:function(){var e=(0,at.i)(a,_),r="/api/ssh/download?file=".concat(A.HS.apply(void 0,pt(V).concat([e[0].name])),"&domain=").concat(t.data.domain,"&port=").concat(t.data.port,"&username=").concat(t.data.username,"&password=").concat(t.data.password,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===_.length&&n.createElement(c.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){S({show:!0,type:K.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"terminal",title:"shell",onClick:function(){z.show?Y({show:!1,path:""}):Y({show:!0,path:A.HS.apply(void 0,pt(V))})}}),n.createElement(c.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){h((0,A.jH)(xt,f))}}),n.createElement(c.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){S({show:!0,type:K.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){S({show:!0,type:K.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"upload_file",title:"上传",onClick:function(){S({show:!0,type:K.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 c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,ut.S)(u)),o.push(c)}var l=[];if(n){var s,f=ht(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),m(l),S({show:!0,type:K.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(c.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(f),ref:r,onMouseEnter:function(){Ot(!0)},onMouseLeave:function(){Ot(!1)}},!!a&&!!a.folders&&a.folders.length>0&&n.createElement("h2",null,"文件夹"),!!a&&!!a.folders&&n.createElement("div",{onClick:Nt},a.folders.map((function(t,e){return n.createElement(J,st({itemWidth:tt,index:e,key:e},t))}))),!!a&&!!a.folders&&a.files.length>0&&n.createElement("h2",{onClick:Nt},"文件"),!!a&&!!a.folders&&n.createElement("div",{onClick:Nt},a.files.map((function(t,e){return n.createElement(J,st({itemWidth:tt,index:e+a.folders.length,key:e},t))})))),n.createElement(it,null))}function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function _t(){_t=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function kt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){kt(i,n,o,a,c,"next",t)}function c(t){kt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function At(t){var e=(0,w.Bd)().t,r=Nt((0,n.useState)(""),2),o=r[0],a=r[1],u=Nt((0,n.useState)(""),2),l=u[0],f=u[1],h=Nt((0,n.useState)(""),2),p=h[0],m=h[1],E=Nt((0,n.useState)(""),2),S=E[0],L=E[1],_=Nt((0,n.useState)(void 0),2),k=_[0],O=_[1],N=Nt((0,n.useState)(""),2),A=N[0],P=N[1],K=Nt((0,n.useState)(!1),2),F=K[0],C=K[1],I=Nt((0,x.L4)(b.A.shellNowDir),2),T=(I[0],I[1]),D=Nt((0,x.L4)(b.A.sshInfo),2),G=(D[0],D[1]),M=function(){var t=Ot(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new j.x).password=l,e.domain=S,e.port=k,e.username=o,t.next=7,d.Fg.post("close",e);case 7:t.sent,C(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=Ot(_t().mark((function t(e){var r,n;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new j.x).password=e?e.password:l,r.domain=e?e.domain:S,r.port=e?e.port:k,r.username=e?e.username:o,r.private_path=e?e.private_path:p,t.next=8,d.Fg.post("start",r);case 8:(n=t.sent)&&n.code===v.m.Sucess&&(r.dir=e?e.dir:A,G(r),T([r.dir]),C(!0));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),U=function(){var t=Ot(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Ot(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.Fg.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(){var t=Ot(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(e.domain),P(e.dir),O(e.port),a(e.username),f(e.password),m(e.private_path),t.next=8,B(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:e("目录"),icon:"home",value:A,handleInputChange:function(t){return P(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("账号"),icon:"verified_user",value:o,handleInputChange:function(t){return a(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("密码"),icon:"password",value:l,handleInputChange:function(t){return f(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:p,handleInputChange:function(t){return m(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("连接地址"),icon:"location_on",value:S,handleInputChange:function(t){L(t)},max_width:"15rem"}),n.createElement(i.$Z,{placeholder:e("端口"),icon:"outlet",value:k,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),O(parseInt(t)))},max_width:"7rem"}),n.createElement(c.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){B()}})),F?n.createElement(St,{close:M,data:{port:k,password:l,username:o,domain:S,dir:A}}):n.createElement(g.N,{getItems:U,save:R,clickItem:H,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("访问目录")}]}))}function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function Kt(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,Ft(n.key),n)}}function Ft(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}function Ct(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var It=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.render=new qt.Canvas.create(this.canvas),this.activeSession=!1,this.install()},e=[{key:"install",value:function(){var t=this;return this.canvas.addEventListener("mousemove",(function(e){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:0,isPressed:!1}),e.preventDefault||t.activeSession(),!1})),this.canvas.addEventListener("mousedown",(function(e){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=qt.elementOffset(t.canvas);return W.ws.sendData(V.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Ct(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("DOMMouseScroll",(function(e){if(t.activeSession){var r=e.detail,n=Math.round(15*Math.abs(r)/8),o=qt.elementOffset(t.canvas);return W.ws.sendData(V.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=qt.elementOffset(t.canvas);return W.ws.sendData(V.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 W.ws.sendData(V.HK.scancode,{code:qt.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return W.ws.sendData(V.HK.scancode,{code:qt.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var i=this;W.ws.addMsg(V.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),i.activeSession=!0})),W.ws.addMsg(V.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,i.render.update(e)})),W.ws.addMsg(V.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),i.activeSession=!1})),W.ws.addMsg(V.HK.rdp_error,(function(t){i.activeSession=!1}));var a=new V.hf;a.cmdType=V.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:qt.locale()},W.ws.send(a)}}],e&&Kt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}var Mt,Bt,Ut,Rt,Ht=function(){return 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")},(e=[{key:"update",value:function(t){var e;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,c=i*a*4,u=Module._malloc(c),l=new Uint8Array(Module.HEAPU8.buffer,u,c),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,i,a,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,c));return Module._free(n),Module._free(u),{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)}}])&&Dt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function $t(t){return $t="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},$t(t)}function zt(t,e,r){return(e=function(t){var e=function(t){if("object"!=$t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$t(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Mt={"":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),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Mt,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),zt(zt(zt(zt(zt(zt(zt(Mt,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),Jt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt={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"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Bt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Zt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Vt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft"},"220","IntlBackslash"),90,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),78,"KeyN"),77,"KeyM"),188,"Comma"),190,"Period"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),zt(zt(zt(Rt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),Wt={firefox:{fr:Jt,en:Vt},chrome:{fr:Zt,en:Vt}};(qt=function(){}).prototype={$:function(t){return document.getElementById(t)},elementOffset:function(t){for(var e=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:e}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(t){return new It(t)}},Canvas:{create:function(t){return new Ht(t)}},scancode:function(t){var e=qt.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Yt[t.code||Wt[qt.browser()||"firefox"][e][t.keyCode]]}};var qt=new qt;function Xt(t){return Xt="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},Xt(t)}function Qt(){Qt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Xt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Xt(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function te(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ee(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){te(i,n,o,a,c,"next",t)}function c(t){te(i,n,o,a,c,"throw",t)}a(void 0)}))}}function re(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return 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 oe(){var t=(0,w.Bd)().t,e=re((0,x.L4)(b.A.header_min),2),r=(e[0],e[1]),a=re((0,n.useState)(void 0),2),u=a[0],l=a[1],f=re((0,n.useState)(void 0),2),h=f[0],p=f[1],m=re((0,n.useState)(void 0),2),E=m[0],S=m[1],L=re((0,n.useState)(!1),2),_=L[0],k=L[1],O=re((0,n.useState)(!1),2),N=O[0],j=O[1],A=function(){var t=ee(Qt().mark((function t(){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,P.J)("rle.js");case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),(0,ct.zN)("加载资源失败"),t.abrupt("return");case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),K=null;(0,n.useEffect)((function(){return A(),function(){K&&(K.remove(),K=null)}}),[]);var F=function(e){j(!0),function(n,o,i){if(n=n||e.address,o=o||e.username,i=i||e.password,!n||!o||!i)return(0,ct.zN)(t("不允许为空")),void j(!1);K||(K=qt.client.create(qt.$("rdpwebview")));var a=qt.$("rdpwebview");a.style.display="inline",a.width=window.innerWidth,a.height=window.innerHeight,k(!0),r(!0),K.connect(n,"",o,i,(function(t){qt.$("rdpwebview").style.display="none",r(!1),j(!1),k(!1)}))}(u,h,E)},C=function(){var t=ee(Qt().mark((function t(){var e;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k(!1),t.next=3,W.ws.sendData(V.HK.rdp_disconnect,"");case 3:(e=qt.$("rdpwebview")).getContext("2d").clearRect(0,0,e.width,e.height),qt.$("rdpwebview").style.display="none",j(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=ee(Qt().mark((function t(){var e;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.get("tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=ee(Qt().mark((function t(e){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.J0.post("tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=ee(Qt().mark((function t(e){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S(e.password),p(e.username),l(e.address),F(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(i.$Z,{placeholder:t("地址"),icon:"outlet",value:u,handleInputChange:function(t){return l(t)}}),n.createElement(i.$Z,{placeholder:t("账号"),icon:"http",value:h,handleInputChange:function(t){return p(t)}}),n.createElement(i.$Z,{placeholder:t("密码"),icon:"http",value:E,handleInputChange:function(t){return S(t)}}),!N&&n.createElement(c.rA,{icon:"play_arrow",title:t("连接"),onClick:F}),N&&n.createElement(c.rA,{icon:"close",title:t("关闭"),onClick:C})),n.createElement(o.jW,{isFull:_},!N&&n.createElement(g.N,{getItems:I,save:T,clickItem:D,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")}]}),n.createElement("canvas",{id:"rdpwebview",style:{display:"none"}})))}function ie(t){return ie="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},ie(t)}function ae(){ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ie(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ie(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ce(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ue(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ce(i,n,o,a,c,"next",t)}function c(t){ce(i,n,o,a,c,"throw",t)}a(void 0)}))}}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(t){var e,r,o=(0,w.Bd)().t,a=(e=(0,n.useState)(""),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,r)||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}}(e,r)||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.")}()),u=a[0],l=a[1],f=function(){var t=ue(ae().mark((function t(e){var r;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||u){t.next=4;break}return new(s())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,d._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===v.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(s())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=ue(ae().mark((function t(){var e;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("wol/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),p=function(){var t=ue(ae().mark((function t(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("wol/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=ue(ae().mark((function t(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l(e.mac),f(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(y.A,null,n.createElement(c.rA,{icon:"play_arrow",title:o("发送"),onClick:function(){f()}}),n.createElement(i.$Z,{placeholder:o("目标设备mac地址"),icon:"laptop_mac",value:u,handleInputChange:function(t){return l(t)}})),n.createElement(g.N,{getItems:h,save:p,clickItem:m,items:[{key:"name",preName:o("名字")},{key:"mac",preName:"mac"+o("地址")}]}))}var fe,he=r(7481),pe=r(505);function ye(t){return ye="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},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ye(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ye(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function me(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ve(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){me(i,n,o,a,c,"next",t)}function c(t){me(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return we(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)?we(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 we(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 be(){var t=ge((0,n.useState)("rsa"),2),e=t[0],r=t[1],u=ge((0,n.useState)("pem"),2),l=u[0],s=u[1],f=(0,w.Bd)(),h=f.t,p=(f.i18n,ge((0,x.L4)(b.A.confirm),2)),m=(p[0],p[1]),g=ge((0,n.useState)(""),2),E=g[0],S=g[1],L=ge((0,n.useState)(""),2),_=L[0],k=L[1],O=function(){var t=ve(de().mark((function t(){var r;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("generate",{type:e,form:l});case 2:(r=t.sent).code===v.m.Sucess&&(S(r.data.public_key),k(r.data.private_key),fe=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=ve(de().mark((function t(r){var n;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_&&E){t.next=3;break}return(0,ct.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),m({open:!0,title:"将覆盖密钥文件",sub_title:"将会作为 ".concat(n,' 文件保存到系统上的"').concat(fe,'"目录下,此目录会作为openssh(git)所使用的默认目录。之前的密钥将作废。'),handle:function(){var t=ve(de().mark((function t(){return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.cD.post("save_openssh",{name:n,context:"pub"===r?E:_});case 2:t.sent.code===v.m.Sucess&&((0,ct.LW)("保存成功"),m({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null,n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:h("RSA"),value:"rsa"},{title:h("DSA"),value:"dsa"},{title:h("ECDSA"),value:"ecdsa"}]}),n.createElement(i.l6,{tip:"输出格式",value:l,width:"auto",onChange:function(t){s(t)},options:[{title:h("普通PEM"),value:"pem"},{title:h("opensshPEM"),value:"openssh_pem"}]}),n.createElement(c.rA,{icon:"play_arrow",title:h("生成"),onClick:function(){O()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"公钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,pe.l)(E),(0,ct.LW)("复制完成"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){N("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){S(t.target.value)},value:E}))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:"私钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){_&&((0,pe.l)(_),(0,ct.LW)("复制成功"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:h("保存到.ssh目录"),clickFun:function(){N("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:_,onChange:function(t){k(t.target.value)}}))))))}var xe,Ee,Se,Le,_e,ke=r(4091),Oe=r(1083);function Ne(t){return Ne="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},Ne(t)}function je(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ie(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Ae(t){return function(t){if(Array.isArray(t))return Te(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ie(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 Pe(){Pe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(P([])));E&&E!==r&&n.call(E,a)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Ne(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(S),l(S,u,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ke(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Fe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ke(i,n,o,a,c,"next",t)}function c(t){Ke(i,n,o,a,c,"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,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Ie(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 Ie(t,e){if(t){if("string"==typeof t)return Te(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)?Te(t,e):void 0}}function Te(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 De(){var t=(0,w.Bd)(),e=t.t,r=(t.i18n,Ce((0,x.L4)(b.A.confirm),2)),u=(r[0],r[1],Ce((0,x.L4)(b.A.showPrompt),2)),l=(u[0],u[1]),f=Ce((0,n.useState)(""),2),h=f[0],p=f[1],E=Ce((0,n.useState)("get"),2),S=E[0],L=E[1],_=Ce((0,n.useState)(""),2),k=_[0],O=_[1],N=Ce((0,n.useState)([]),2),j=N[0],A=N[1],P=Ce((0,n.useState)(1),2),F=P[0],C=P[1],D=Ce((0,n.useState)(1),2),G=D[0],M=D[1],B=Ce((0,n.useState)(1),2),U=B[0],R=B[1],H=Ce((0,n.useState)(),2),$=H[0],z=H[1],Y=Ce((0,x.L4)(b.A.nav_index_add_item_by_now_list),2),J=(Y[0],Y[1]),Z=Ce((0,x.L4)(b.A.prompt_card),2),V=(Z[0],Z[1]);T.xK.set_value_temp("{}"),(0,n.useEffect)((function(){xe={},Ee={},Se="",Le="",_e="",T.xK.get_editor().session.setMode("ace/mode/json")}),[]);var W=function(){var t=Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.get("http/tag");case 2:if((e=t.sent).code!==v.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),q=function(){var t=Fe(Pe().mark((function t(e){return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d._U.post("http/tag/save",e);case 2:t.sent.code!==v.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),X=function(){var t=Fe(Pe().mark((function t(e){return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:O(e.url),L(e.method),e.header_type&&Q(e.header_type),e.headers&&(xe=JSON.parse(e.headers),1===e.header_type&&(T.xK.get_editor().setValue(e.headers,-1),T.xK.get_editor().session.setMode("ace/mode/json"))),e.form_data_list&&A(JSON.parse(e.form_data_list)),e.json_data&&(Ee=JSON.parse(e.json_data)),e.data&&(Se=e.data),e.body_type&&(M(e.body_type),2===e.header_type&&(1===e.body_type?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===e.body_type&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json"))));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Q=function(t){try{1===F?xe=JSON.parse(T.xK.get_editor_value()):2===F&&(1===G?Se=T.xK.get_editor_value():2===G&&(Ee=JSON.parse(T.xK.get_editor_value())))}catch(t){(0,ct.zN)(t.message)}C(t),1===t?(T.xK.get_editor().setValue(JSON.stringify(xe,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json")):2===t&&(1===G?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===G&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json")))},tt=function(t){if(2===F){if(T.xK.get_editor_value())try{1===G?Se=T.xK.get_editor_value():2===G&&(Ee=JSON.parse(T.xK.get_editor_value()))}catch(t){return void(0,ct.zN)(t.message)}M(t),1===t?(T.xK.get_editor().setValue(Se,-1),T.xK.get_editor().session.setMode("ace/mode/text")):2===t&&(T.xK.get_editor().setValue(JSON.stringify(Ee,null,2),-1),T.xK.get_editor().session.setMode("ace/mode/json"))}},et=function(t){var e=new m.vr;if(e.url=k,e.method=S,1===F&&(xe=JSON.parse(T.xK.get_editor_value())),e.headers=xe,e.body_type=G,e.header_type=F,G===m.RB.row)2===F&&(Se=T.xK.get_editor_value()),e.data=Se,e.json_data=JSON.stringify(Ee);else if(G===m.RB.json)xe["Content-Type"]="application/json",1===F&&T.xK.get_editor().setValue(JSON.stringify(xe),-1),2===F&&(Ee=JSON.parse(T.xK.get_editor_value())),e.json_data=JSON.stringify(Ee),e.data=Se;else if(G===m.RB.form){xe["Content-Type"]="multipart/form-data",e.form_data_list=j;var r,n=je(j);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},rt=function(){var t=Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d._U.have_http_method(S)){t.next=3;break}return(0,ct.zN)("不存在的http method"),t.abrupt("return");case 3:if(k){t.next=6;break}return(0,ct.zN)("url is empty"),t.abrupt("return");case 6:z(void 0),p(""),(e=new FormData).append("data",JSON.stringify(et(e))),Oe.A.post(d._U.getUrl("http/send"),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,ct.zN)(t.message)})).then((function(t){t&&(200===t.status?z(n.createElement("span",{style:{color:"green"}},"200")):z(t.status),Le="object"===Ne(t.data)?JSON.stringify(t.data):t.data,_e=JSON.stringify(t.headers.filecat_remote_raw_headers),1===U?p(Le):2===U&&p(_e))}));case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),nt=function(){var t=Fe(Pe().mark((function t(){var e,r,n,o;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=et(),j){r=je(j);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(j),e.headers=JSON.stringify(e.headers),"object"===Ne(e.data)&&(e.data=JSON.stringify(e.data)),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(y.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"",rightBottomCom:3===G&&2===F&&n.createElement(c.rA,{icon:"add",title:e("添加"),onClick:function(){A([{}].concat(Ae(j)))}})},n.createElement("div",{className:"http_url"},n.createElement(i.$Z,{max_width:"15%",placeholder:e("协议"),icon:"http",value:S,handleInputChange:function(t){L(t)}}),n.createElement(i.$Z,{max_width:"80%",placeholder:e("http url"),icon:"link",value:k,handleInputChange:function(t){O(t)}}),n.createElement(c.rA,{icon:"send",title:e("发送"),onClick:rt}),n.createElement(c.rA,{title:"添加",icon:"save_as",onClick:function(){var t,r,o=je(j);try{for(o.s();!(t=o.n()).done;)if(t.value.is_file)return void(0,ct.zN)("表单中含有文件,浏览器限制不能添加")}catch(t){o.e(t)}finally{o.f()}V({open:!0,title:"信息",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:Fe(Pe().mark((function t(){var e;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:(e=t.sent).name=r,J(e),V({open:!1});case 6:case"end":return t.stop()}}),t)})))},"确定")))})}})),n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===F,onchange:function(){Q(1)}}),n.createElement(i.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===F,onchange:function(){Q(2)}})]}),n.createElement(he.S,{isFlex:!0,columns:[n.createElement(i.U6,{value:1,name:"body",context:e("row"),selected:1===G,onchange:function(){tt(1)}}),n.createElement(i.U6,{value:2,name:"body",context:e("json"),selected:2===G,onchange:function(){tt(2)}}),n.createElement(i.U6,{value:3,name:"body",context:e("form"),selected:3===G,onchange:function(){tt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:3===G&&2===F?"none":""}},n.createElement(ke.A,{name:""})),n.createElement("div",{style:{display:3!==G||2!==F?"none":""}},n.createElement(he.X,{headers:["key",e("值")],rows:j.map((function(t,r){var o=[n.createElement(i.Sm,{value:t.key,handleInputChange:function(e){t.key=e,A(Ae(j))},no_border:!0}),n.createElement(i.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,A(Ae(j))},no_border:!0}),n.createElement("div",null,n.createElement(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){l({show:!0,type:K.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,I.hU)()+Date.now().toString(),j[t].value="".concat(o,"(").concat(o.name,")"),j[t].is_file=!0,j[t].fileName=o.name,j[t].fullPath=o.fullPath,A(Ae(j)),j[t].file_object=o,l({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){j.splice(t,1),A(Ae(j))}(r)}}))];return o})),width:"10rem"}))),n.createElement(a.Zp,{title:$,titleCom:n.createElement("div",{className:" div-row "},n.createElement(i.U6,{value:1,name:"respone",context:e("响应体"),selected:1===U,onchange:function(){R(1),p(Le)}}),n.createElement(i.U6,{value:1,name:"respone",context:e("响应头"),selected:2===U,onchange:function(){R(2),p(_e)}}),n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){h&&((0,pe.l)(h),(0,ct.LW)("复制完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){p(t.target.value)},value:h}))),n.createElement(o.VP,null,n.createElement(g.N,{getItems:W,save:q,clickItem:X,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"}]})))))}var Ge=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Me(t){var e=(0,w.Bd)().t,r=[{index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/"},{index:2,name:e("http代理"),rto:"http/"},{index:3,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"},{index:4,name:"rdp".concat(e("代理")),rto:"rdp/"},{index:5,name:e("网络唤醒"),rto:"netwol/"},{index:6,name:e("rtsp播放器"),rto:"rtsp/"},{index:7,name:e("非对称密钥"),rto:"crypto/"},{index:8,name:e("时间工具"),rto:"timeutil/"}];return n.createElement(o.W1,{optionList:r},n.createElement(At,null),n.createElement(De,null),n.createElement(N,null),n.createElement(oe,null),n.createElement(se,null),n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Ge,null)),n.createElement(be,null),n.createElement(o.xh,null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(p,null)))))}}}]);