UNPKG

filecat

Version:
2 lines 20.7 kB
/*! For license information please see 659.5505561d89c712e0009c.js.LICENSE.txt */ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[659],{3659:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var r=n(2389),a=n(6540),o=n(7444),i=n(6417),c=n(4238),l=n(4944),u=n(447),s=n(5997),f=n(2042),d=n(7952),h=n(5725),m=n(7481),p=n(3033),v=n(7071),y=n(4289),w=n(8062),g=n(7856),b=n(8815);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 o,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function _(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(){k=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new I(r||[]);return a(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",m="executing",p="completed",v={};function y(){}function w(){}function g(){}var b={};u(b,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var S=g.prototype=y.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==E(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=d;return function(o,i){if(a===m)throw Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var u=f(t,n,r);if("normal"===u.type){if(a=r.done?p:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=p,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(E(t)+" is not iterable")}return w.prototype=g,a(S,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:w,configurable:!0}),w.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},A(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new j(s(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(S),u(S,l,"Generator"),u(S,i,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;N(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function S(e,t,n,r,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){S(o,r,a,i,c,"next",e)}function c(e){S(o,r,a,i,c,"throw",e)}i(void 0)}))}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){if(e){if("string"==typeof e)return C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O,N,I=a.lazy((function(){return n.e(614).then(n.bind(n,5614))})),P=-1;function F(e){var t=(0,r.Bd)().t,n=j((0,o.L4)(i.A.workflow_show),2),E=(n[0],n[1]),S=j((0,a.useState)([]),2),L=S[0],C=S[1],F=j((0,a.useState)([]),2),M=F[0],G=F[1],T=j((0,a.useState)(!1),2),X=T[0],q=T[1],z=j((0,a.useState)(void 0),2),B=z[0],J=z[1],$=j((0,a.useState)([]),2),D=$[0],H=$[1],K=j((0,a.useState)(-1),2),W=K[0],U=K[1],V=j((0,a.useState)(10),2),Y=V[0],Z=(V[1],j((0,a.useState)(0),2)),Q=(Z[0],Z[1]),R=j((0,a.useState)(0),2),ee=R[0],te=R[1],ne=j((0,a.useState)(""),2),re=ne[0],ae=ne[1],oe=j((0,a.useState)(!1),2),ie=oe[0],ce=oe[1],le=[t("序号"),t("运行名称"),t("状态"),t("运行时长"),t("日期"),t("操作")],ue=[t("名称"),t("状态"),t("cwd"),t("运行时长"),t("操作")],se=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new v._).page_num=null!=t?t:W,n.page_size=Y,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),e.next=6,l.ws.sendData(c.HK.workflow_get,n);case 6:if(r=e.sent){e.next=9;break}return e.abrupt("return");case 9:a=r.context,C(a.list.map((function(e){var t="string"==typeof e.meta?JSON.parse(e.meta):e.meta;return t.index=e.index,t}))),Q(a.total),te((0,b.gw)(a.total,Y));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new v._).search_name=t,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),ce(!0),e.next=6,l.ws.sendData(c.HK.workflow_search_by_run_name,n);case 6:if(r=e.sent){e.next=9;break}return e.abrupt("return");case 9:a=r.context,C(a.list.map((function(e){var t="string"==typeof e.meta?JSON.parse(e.meta):e.meta;return t.index=e.index,t}))),Q(a.total),te((0,b.gw)(a.total,Y)),U(0),ce(!1);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new g.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,convertEol:!0}),N=t,J(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){return q(!1),O=void 0,N=void 0,P=-1,se(),A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:N&&(N.dispose(),N=null);case 1:case"end":return e.stop()}}),e)})))}),[]);var he=function(){var e=A(k().mark((function e(t){var n,r,a,o,i,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.is_running){e.next=2;break}return e.abrupt("return");case 2:return H([]),(n=new v._).index=t.index,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),e.next=8,l.ws.sendData(c.HK.workflow_get,n);case 8:r=e.sent,a=r.context,o="string"==typeof a.one_data.data?JSON.parse(a.one_data.data):a.one_data.data,i=o.success_list,u=o.fail_list,G([].concat(_(u),_(i)));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=function(e,t,n){if(t){var r,o=x(null!=t?t:[]);try{for(o.s();!(r=o.n()).done;){var i,c,l,s=r.value,f=void 0,d=[];if(s["use-yml"])me(d,void 0,s.use_job_children_list),f="".concat(s["use-yml"]," ;").concat(null!==(c=s.duration)&&void 0!==c?c:-1);else f="".concat(s.run," ;").concat(null!==(l=s.duration)&&void 0!==l?l:-1);f=a.createElement("div",null,a.createElement(u.fq,{success:void 0===s.code?void 0:0===s.code}),"$",f),e.push({name:f,children:d,extra_data:{code:s.code,context:null!==(i=s.success_message)&&void 0!==i?i:s.fail_message}})}}catch(e){o.e(e)}finally{o.f()}}else if(n){var h,m=x(null!=n?n:[]);try{for(m.s();!(h=m.n()).done;){var p=h.value,v=a.createElement("div",null,a.createElement(u.fq,{success:void 0===p.code?void 0:0===p.code}),"$",p.name);e.push({name:v,extra_data:{code:p.code,is_job:!0,job_data:p}})}}catch(e){m.e(e)}finally{m.f()}}},pe=function(){var e=A(k().mark((function e(t){var n,r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.steps,me(r=[],null!=n?n:[]),H(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var e=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return e.next=3,new Promise((function(e){O=e,q(!0),de()}));case 3:t&&(N.reset(),N.write(t));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t||null===(n=t.extra_data)||void 0===n||!n.is_job){e.next=4;break}return e.next=3,pe(t.extra_data.job_data);case 3:return e.abrupt("return");case 4:if(null==t||null===(r=t.extra_data)||void 0===r||!r.context){e.next=8;break}ve(t.extra_data.context),e.next=11;break;case 8:if(null!=t&&t.extra_data.code){e.next=10;break}return e.abrupt("return");case 10:ve(null!==(a=t.extra_data.code)&&void 0!==a?a:"");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.createElement("div",null,a.createElement(d.A,null,B&&a.createElement(s.rA,{icon:"print",title:"打印日志",onClick:function(){q(!X)}}),a.createElement(s.rA,{icon:"close",title:t("关闭"),onClick:function(){E(!1)}})),a.createElement(h.jW,{isFull:!0,more:!0},a.createElement(h.NN,null,a.createElement(h.xh,null,a.createElement(h.fI,null,a.createElement(h.VP,null,a.createElement(u.uF,{self_title:a.createElement("span",{className:" div-row "},a.createElement("h2",null,t("历史记录"))),titleCom:a.createElement("div",{className:" div-row "},a.createElement(p.Sm,{disabled:ie,value:re,placeholder:"搜索运行名称(支持正则)",handleInputChange:function(e){ae(re)},handlerEnter:function(e){fe(e)}})),rightBottomCom:a.createElement("span",{className:" div-row "},a.createElement("span",null,Math.abs(W),"/",ee),a.createElement(p.Sm,{placeholder:"max page ".concat(ee),handleInputChange:function(e){P=parseInt(e)},handlerEnter:function(){if(P<1||P>ee)(0,f.zN)("illegal page num");else{var e=0-P;U(e),se(e)}}}),a.createElement(s.rA,{icon:"navigate_before",onClick:function(){var e=W+1;e>-1?(0,f.zN)("max page num"):(U(e),se(e))},title:"上一页"}),a.createElement(s.rA,{icon:"navigate_next",onClick:function(){var e=W-1;Math.abs(e)>ee?(0,f.zN)("min page num"):(U(e),se(e))},title:"下一页"}))},a.createElement(m.X,{headers:le,rows:L.map((function(e,n){var r;return r=e.is_running?a.createElement("div",null,a.createElement(u.fq,null),t("正在运行")):a.createElement("div",null,a.createElement(u.fq,{success:e.is_success}),e.is_success?t("成功"):t("失败")),[a.createElement("p",null,e.index),a.createElement("p",{style:{wordWrap:"break-word"}},e["run-name"]),r,a.createElement("span",null,e.duration),a.createElement("span",null,e.timestamp),a.createElement("div",null,a.createElement(s.rA,{icon:"details",title:t("详情"),onClick:function(){he(e)}}))]})),width:"10rem"}))),a.createElement(h.VP,null,a.createElement(u.Zp,{title:t("Job")},a.createElement(m.X,{headers:ue,rows:M.map((function(e,n){return[a.createElement("p",null,e.name),a.createElement("div",null,a.createElement(u.fq,{success:void 0===e.code?void 0:0===e.code}),0===e.code?t("成功"):t("失败")),a.createElement(u.xP,null,e.cwd),a.createElement("span",null,e.duration),a.createElement("div",null,a.createElement(s.rA,{icon:"details",title:t("详情"),onClick:function(){pe(e)}}),(!!e.success_message||!!e.fail_message)&&a.createElement(s.rA,{icon:"print",title:t("日志"),onClick:function(){var t;ve(null!==(t=e.success_message)&&void 0!==t?t:e.fail_message)}}))]})),width:"10rem"})),a.createElement(u.Zp,{title:"Step"},a.createElement(w.A,{list:D,click:function(e){ye(e)}}))))))),a.createElement("div",{style:{display:X?"":"none"}},a.createElement(I,{show:!0,terminal:B,init:function(){O&&(O(1),O=void 0)}})))}},7481:(e,t,n)=>{n.d(t,{S:()=>c,X:()=>i});var r=n(6540);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n=a(r.useState([]),2),o=n[0],i=n[1];return(0,r.useEffect)((function(){e.children?i(Array.isArray(e.children)?e.children:[e.children]):i(e.rows)}),[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map((function(e,t){return r.createElement("th",{key:t},e)})))),r.createElement("tbody",null,o.map((function(t,n){return r.createElement("tr",{key:n},t.map((function(t,n){var a;return r.createElement("td",{style:{width:null!==(a=e.width)&&void 0!==a?a:"auto"},key:n,className:n===o.length-1?"small":""},t)})))}))))}function c(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map((function(e,t){return r.createElement("div",{key:t},e)})))}},8062:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(6540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function o(e){return r.createElement("div",{className:"black-tip",onClick:function(){e.click&&e.click(e)},onContextMenu:function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)}},e.name)}var i=function(e){return r.createElement("li",null,e.click?r.createElement(o,a({},e.node,{name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu})):r.createElement("div",null,e.render?e.render(e.node):e.node.name),e.node.children&&e.node.children.length>0&&r.createElement("ul",null,e.node.children.map((function(t,n){return r.createElement(i,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})}))))};const c=function(e){return r.createElement("div",{className:"card-tree-view"},r.createElement("ul",null,e.list&&e.list.map((function(t,n){return r.createElement(i,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})}))))}}}]);