text: (this["webpackJsonprepeater-web"]=this["webpackJsonprepeater-web"]||[]).push([[7],{131:function(e,t,n){"use strict";var a=n(128),c=n.n(a),r=n(129),i=n(134),o=n(197),s=n(198),l=n.n(s),u={domain:"/",needLogin:!0};console.log("process.env.NODE_ENV:","production");var d=Object(i.a)(Object(i.a)({},{htmlTitle:"Admin - {title}"}),u),p=new function e(){var t=this;Object(o.a)(this,e),this.baseConfig={baseURL:d.domain,timeout:12e4,headers:{}},this.instance=l.a.create(this.baseConfig),this.setHeader=function(e){t.baseConfig.headers=Object(i.a)(Object(i.a)({},t.baseConfig.headers),e),t.instance=l.a.create(t.baseConfig),t.setReqInterceptors(),t.setRespInterceptors()},this.get=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"get",params:n}),a))},this.post=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"post",data:n}),a))},this.delete=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"delete",data:n}),a))},this.put=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"put",data:n}),a))},this.postOnly=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return l()(Object(i.a)(Object(i.a)(Object(i.a)({},t.baseConfig),{url:e,method:"post",data:n}),a))},this.getOnly=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return l()(Object(i.a)(Object(i.a)(Object(i.a)({},t.baseConfig),{url:e,method:"get",params:n}),a))},this.deleteBody=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"delete",data:n}),a))},this.deleteParam=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.instance(Object(i.a)(Object(i.a)({},{url:e,method:"delete",params:n}),a))},this.setReqInterceptors=function(){},this.setRespInterceptors=function(){t.instance.interceptors.response.use(function(){var e=Object(r.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t.data));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(){var e=Object(r.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.reject(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},this.setReqInterceptors(),this.setRespInterceptors()};t.a=p},162:function(e,t,n){"use strict";n(207);var a=n(211),c=(n(208),n(212)),r=(n(259),n(276)),i=(n(281),n(274)),o=n(0),s=n(435),l=n(436),u=n(15),d=i.a.Countdown,p=Date.now()+1728e5+3e4,f=function(){return Object(o.useEffect)((function(){}),[]),Object(u.jsxs)("div",{className:"home",style:{padding:20},children:[Object(u.jsxs)(a.a,{gutter:16,children:[Object(u.jsx)(c.a,{span:12,children:Object(u.jsx)(r.a,{children:Object(u.jsx)(i.a,{title:"Active",value:11.28,precision:2,valueStyle:{color:"#3f8600"},prefix:Object(u.jsx)(s.a,{}),suffix:"%"})})}),Object(u.jsx)(c.a,{span:12,children:Object(u.jsx)(r.a,{children:Object(u.jsx)(i.a,{title:"Idle",value:9.3,precision:2,valueStyle:{color:"#cf1322"},prefix:Object(u.jsx)(l.a,{}),suffix:"%"})})})]}),Object(u.jsx)(a.a,{gutter:16,children:Object(u.jsx)(c.a,{span:24,style:{marginTop:20},children:Object(u.jsx)(r.a,{children:Object(u.jsx)(d,{title:"Day Level",value:p,format:"D \u5929 H \u65f6 m \u5206 s \u79d2"})})})}),Object(u.jsxs)(a.a,{gutter:16,children:[Object(u.jsx)(c.a,{span:12,style:{marginTop:20}}),Object(u.jsx)(c.a,{span:12,style:{marginTop:20},children:Object(u.jsx)(r.a,{})})]})]})},b=(n(141),n(140)),j=(n(138),n(139)),h=(n(142),n(144)),m=n(134),v=(n(153),n(156)),O=(n(133),n(132)),x=(n(146),n(147)),g=n(130),y=n(128),k=n.n(y),I=(n(136),n(57)),w=(n(149),n(150)),C=n(129),N=n(214),P=n.n(N),S=n(131),E={getModule:function(e){return new Promise((function(t,n){return S.a.get("/module/",e).then((function(e){return t(e)})).catch((function(e){return n(e)}))}))},frozen:function(e,t){return new Promise((function(n,a){S.a.post("/module/frozen",{appName:e,ip:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))},active:function(e,t){return new Promise((function(n,a){S.a.post("/module/active",{appName:e,ip:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))},reload:function(e,t,n){return new Promise((function(a,c){S.a.post("/module/reload",{appName:e,environment:t,ip:n}).then((function(e){a(e)})).catch((function(e){c(e)}))}))},install:function(e){return new Promise((function(t,n){S.a.post("/module/install",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))},del:function(e){return new Promise((function(t,n){S.a.delete("/module/"+e).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},M=function(e){var t=e.visible,n=e.onCreate,a=e.onCancel,c=j.a.useForm(),r=Object(g.a)(c,1)[0];return Object(u.jsx)(w.a,{visible:t,title:"\u5b89\u88c5\u6a21\u5757",okText:"\u5b89\u88c5",cancelText:"\u53d6\u6d88",onOk:function(){r.validateFields().then((function(e){r.resetFields(),n(e)})).catch((function(e){console.log(e)}))},onCancel:a,children:Object(u.jsxs)(j.a,{form:r,children:[Object(u.jsx)(j.a.Item,{label:"\u5e94\u7528",name:"appName",rules:[{required:!0,message:"\u5fc5\u586b\u9879"}],children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u5e94\u7528\u540d"})}),Object(u.jsx)(j.a.Item,{label:"\u673a\u5668",name:"ip",rules:[{required:!0,pattern:/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}\b/,message:"\u975e\u6cd5\u7684IP"}],children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165 IP"})})]})})},T=function(){var e=Object(C.a)(k.a.mark((function e(t){var n;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,E.install(t);case 3:n=e.sent,w.a.error({content:n.message,title:"\u7ed3\u679c"}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),I.b.error("\u8bf7\u6c42\u5b89\u88c5\u6a21\u5757\u53d1\u751f\u9519\u8bef\uff1a"+e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=Object(o.useState)({page:1,size:10}),t=Object(g.a)(e,2),n=t[0],a=t[1],c=Object(o.useState)([]),r=Object(g.a)(c,2),i=r[0],s=r[1],l=Object(o.useState)({page:0,total:0}),d=Object(g.a)(l,2),p=d[0],f=d[1],y=Object(o.useState)(!1),N=Object(g.a)(y,2),S=N[0],R=N[1],z=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.getModule(n);case 2:t=e.sent,s(t.data),f({page:t.pageIndex,total:t.count});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(o.useEffect)((function(){z()}),[n]);var B=function(){var e=Object(C.a)(k.a.mark((function e(t){var n;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.del(t);case 2:if(!(n=e.sent).success){e.next=9;break}return I.b.info("\u5220\u9664\u6210\u529f"),e.next=7,z();case 7:return e.sent,e.abrupt("return");case 9:I.b.warning(n.message);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(C.a)(k.a.mark((function e(t,n){var a;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.frozen(t,n);case 2:return a=e.sent,w.a.error({title:"\u7ed3\u679c",content:a.message}),e.next=6,z();case 6:e.sent;case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),D=function(){var e=Object(C.a)(k.a.mark((function e(t,n){var a;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.active(t,n);case 2:return a=e.sent,w.a.error({title:"\u7ed3\u679c",content:a.message}),e.next=6,z();case 6:e.sent;case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),L=function(){var e=Object(C.a)(k.a.mark((function e(t,n,a){var c;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.reload(t,n,a);case 2:return c=e.sent,w.a.error({content:c.message,title:"\u7ed3\u679c"}),e.next=6,z();case 6:e.sent;case 7:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}(),F=[{title:"\u5e94\u7528\u540d",dataIndex:"appName",key:"appName"},{title:"\u73af\u5883",dataIndex:"environment",key:"environment"},{title:"\u673a\u5668IP",dataIndex:"ip",key:"ip"},{title:"\u7aef\u53e3",dataIndex:"port",key:"port"},{title:"\u7248\u672c\u53f7",dataIndex:"version",key:"version"},{title:"\u72b6\u6001",dataIndex:"status",key:"status",width:80,render:function(e){return Object(u.jsx)(x.a,{color:"ACTIVE"===e?"success":"error",children:"ACTIVE"===e?"\u5df2\u6fc0\u6d3b":"\u672a\u6fc0\u6d3b"})}},{title:"\u5fc3\u8df3\u65f6\u95f4",dataIndex:"gmtModified",key:"gmtModified"},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",render:function(e,t){var n="FROZEN"===t.status;return Object(u.jsxs)(v.b,{className:P.a.ActionPanel,children:[n?Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){D(t.appName,t.ip)},children:"\u6fc0\u6d3b"}):Object(u.jsx)(O.a,{type:"primary",size:"small",danger:!0,onClick:function(){A(t.appName,t.ip)},children:"\u51bb\u7ed3"}),Object(u.jsx)(O.a,{type:"ghost",size:"small",onClick:function(){L(t.appName,t.environment,t.ip)},children:"\u5237\u65b0"}),Object(u.jsx)(O.a,{type:"ghost",size:"small",onClick:function(){B(t.id)},children:"\u5220\u9664"})]})}}],q={total:p.total,current:p.page,pageSize:n.size,showTotal:function(e){return"\u5171 ".concat(e," \u6761")},showQuickJumper:!0,onChange:function(e,t){return a(Object(m.a)(Object(m.a)({},n),{},{size:t||1,page:e}))}};return Object(u.jsxs)("div",{className:P.a.ModulePanel,children:[Object(u.jsxs)(j.a,{className:P.a.SearchForm,layout:"inline",onFinish:function(e){a(Object(m.a)(Object(m.a)({},n),e))},children:[Object(u.jsx)(j.a.Item,{label:"\u5e94\u7528\u540d",name:"appName",children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u5e94\u7528\u540d"})}),Object(u.jsx)(j.a.Item,{label:"IP",name:"ip",children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u673a\u5668 IP"})}),Object(u.jsx)(j.a.Item,{children:Object(u.jsx)(O.a,{htmlType:"submit",type:"primary",children:"\u67e5\u8be2"})}),Object(u.jsx)(j.a.Item,{className:P.a.InstallButton,children:Object(u.jsx)(O.a,{type:"primary",onClick:function(){R(!0)},children:"\u5b89\u88c5\u6a21\u5757"})})]}),Object(u.jsx)(b.a,{size:"small",rowKey:function(e){return e.id},dataSource:i,columns:F,pagination:q}),Object(u.jsx)(M,{visible:S,onCreate:function(e){R(!1),T(e)},onCancel:function(){R(!1)}})]})},z=R,B=n(215),A=n.n(B),D=n(191),L=n.n(D),F=function(){var e=Object(C.a)(k.a.mark((function e(t){return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",S.a.post("/token/login",L.a.stringify(t),{headers:void 0}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q={login:F,getOnline:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return new Promise((function(n,a){S.a.get("/online/",{page:e,size:t}).then((function(e){n(e)})).catch((function(e){console.log("getOnline catch",e),a(e)}))}))},getModule:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return new Promise((function(n,a){S.a.get("/module/",{page:e,size:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))}},U=q,J=n(7),G=(n(268),n(282)),H=(n(213),n(182)),V={replayServer:function(e){return new Promise((function(t,n){S.a.get("/module/byName.json",{appName:e}).then((function(e){t(e)})).catch((function(e){n(e)}))}))},executeReplay:function(e){return new Promise((function(t,n){S.a.post("/replay/execute",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},K=function(e){var t=e.appName,n=e.traceId,a=e.visible,c=e.onCancel,r=Object(o.useState)([]),i=Object(g.a)(r,2),s=i[0],l=i[1],d=j.a.useForm(),p=Object(g.a)(d,1)[0];Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var n;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return console.log("\u4fee\u590d\u56e0\u8def\u7531\u5bfc\u81f4\u7684\u975e\u9884\u671f\u6267\u884c"),e.abrupt("return");case 3:return e.next=5,V.replayServer(t);case 5:if((n=e.sent).success){e.next=9;break}return I.b.warn("\u62c9\u53d6\u5728\u7ebf\u56de\u653e\u5217\u8868\u5931\u8d25\uff1a"+n.message),e.abrupt("return");case 9:l(n.data);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[t]);var f=Object(J.f)(),b=function(){var e=Object(C.a)(k.a.mark((function e(a,r){var i,o;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={mock:r,appName:a.appName,environment:a.environment,ip:a.ip,traceId:n},e.next=3,V.executeReplay(i);case 3:if(o=e.sent,console.log(o),!o.success){e.next=9;break}return c&&c(),w.a.confirm({content:"\u56de\u653e\u6267\u884c\u6210\u529f\uff0c\u7acb\u5373\u67e5\u770b\u8be6\u60c5\uff1f",onOk:function(){f.push("/replayResult?appName="+t+"&repeatId="+o.data)}}),e.abrupt("return");case 9:I.b.error(o.message);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(u.jsx)(w.a,{visible:a,title:"\u6267\u884c\u56de\u653e",okText:"\u56de\u653e",cancelText:"\u53d6\u6d88",onCancel:c,onOk:function(){p.validateFields().then((function(e){p.resetFields();try{var t=JSON.parse(e.record);b(t,e.mock||!1)}catch(n){console.log(n)}})).catch((function(e){console.log(e)}))},children:Object(u.jsxs)(j.a,{form:p,children:[Object(u.jsx)(j.a.Item,{name:"record",label:"\u673a\u5668",rules:[{required:!0,message:"\u5fc5\u9009\u9879"}],children:Object(u.jsx)(H.a,{placeholder:"\u9009\u62e9\u6267\u884c\u56de\u653e\u5b9e\u4f8b",children:null===s||void 0===s?void 0:s.map((function(e){var t="-"===e.version?"":" \u7248\u672c:"+e.version,n=e.ip+"[ \u73af\u5883: "+e.environment+t+"]";return Object(u.jsx)(H.a.Option,{value:JSON.stringify(e),children:n},e.id)}))})}),Object(u.jsx)(j.a.Item,{name:"mock",label:"MOCK",valuePropName:"checked",children:Object(u.jsx)(G.a,{})})]})})},W=K,Q=function(){var e=Object(o.useState)([]),t=Object(g.a)(e,2),n=t[0],a=t[1],c=Object(o.useState)(0),r=Object(g.a)(c,2),i=r[0],s=r[1],l=Object(o.useState)(1),d=Object(g.a)(l,2),p=d[0],f=d[1],j=Object(o.useState)(!1),h=Object(g.a)(j,2),m=h[0],v=h[1],x=Object(o.useState)({appName:"",traceId:""}),y=Object(g.a)(x,2),w=y[0],N=y[1];Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,U.getOnline(p);case 3:if((t=e.sent).success){e.next=7;break}return I.b.error(t.message||"\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"),e.abrupt("return");case 7:a(t.data),s(t.count),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),I.b.error("\u53d1\u751f\u4e86\u9519\u8bef");case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();e()}),[p]);var P=Object(J.f)(),S=[{title:"\u5e94\u7528\u540d",dataIndex:"appName",key:"appName"},{title:"\u6d41\u91cf\u5165\u53e3",dataIndex:"entranceDesc",key:"entranceDesc"},{title:"TraceID",dataIndex:"traceId",key:"traceId"},{title:"\u4e3b\u673a",dataIndex:"host",key:"host",width:150},{title:"\u65f6\u95f4",dataIndex:"gmtRecord",key:"gmtRecord"},{title:"\u73af\u5883",dataIndex:"environment",key:"environment"},{title:"\u64cd\u4f5c",key:"action",width:140,render:function(e,t){return Object(u.jsxs)("div",{className:A.a.ActionPanel,children:[Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){var e,n;e=t.traceId,n=t.appName,P.push("/trafficDetails?id="+e+"&appName="+n)},children:"\u8be6\u60c5"}),Object(u.jsx)(O.a,{type:"primary",size:"small",danger:!0,onClick:function(){N({appName:t.appName,traceId:t.traceId}),v(!0)},children:"\u56de\u653e"})]})}}],E={total:i,current:p,hideOnSinglePage:!0,showTotal:function(e){return"\u5171 ".concat(e," \u6761")},showQuickJumper:!0,onChange:function(e){f(e)}};return Object(u.jsxs)("div",{className:A.a.TrafficPanel,children:[Object(u.jsx)(W,{onReplay:function(){},onCancel:function(){v(!1)},appName:w.appName,traceId:w.traceId,visible:m}),Object(u.jsx)(b.a,{columns:S,dataSource:n,pagination:E,rowKey:function(e){return e.id}})]})},Z=Q,$=(n(161),n(154)),_=(n(174),n(181)),Y=(n(175),n(186)),X=n(216),ee=n.n(X),te=function(e,t){return new Promise((function(n,a){S.a.get("/online/details",{traceId:e,appName:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))},ne=n(176),ae=n.n(ne),ce=n(217),re=n.n(ce),ie=(n(178),n(179),n(180),function(e){return console.log("mode:",e.mode),Object(u.jsx)(ae.a,{className:re.a.InputLine,mode:e.mode||"json",theme:"github",onChange:e.onEditorChanged,name:"AceEditor",value:e.value||"",editorProps:{$blockScrolling:!0},enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showGutter:!0,showPrintMargin:!1,tabSize:2,readOnly:e.readOnly,highlightActiveLine:!0,width:"100%",fontSize:14,setOptions:{useWorker:!1}})}),oe=function(){var e=Object(J.f)(),t=new URLSearchParams(e.location.search),n=t.get("id"),a=t.get("appName"),c=Object(o.useState)({}),r=Object(g.a)(c,2),i=r[0],s=r[1],l=Object(o.useState)(""),d=Object(g.a)(l,2),p=d[0],f=d[1],b=Object(o.useState)("request"),j=Object(g.a)(b,2),h=j[0],m=j[1],v=Object(o.useState)(!1),x=Object(g.a)(v,2),y=x[0],I=x[1];Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!a){e.next=7;break}return e.next=3,te(n,a);case 3:t=e.sent,s(t.data),e.next=8;break;case 7:console.log("\u56e0\u4e3a\u8def\u7531\u5904\u7406Bug\uff0cfetch \u88ab\u8df3\u8fc7");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[n,a]),Object(o.useEffect)((function(){var e=new Map(Object.entries(i)).get(h)||"";f(e)}),[i,h]);return Object(u.jsxs)("div",{className:ee.a.DetailsPanel,children:[Object(u.jsxs)(Y.b,{title:"\u57fa\u7840\u4fe1\u606f",size:"small",bordered:!0,extra:Object(u.jsxs)("div",{children:[Object(u.jsx)(O.a,{type:"primary",danger:!0,onClick:function(){I(!0)},children:"\u56de\u653e"})," ",Object(u.jsx)(O.a,{type:"primary",onClick:function(){e.push("/traffic")},children:"\u8fd4\u56de\u5217\u8868"})]}),children:[Object(u.jsx)(Y.b.Item,{label:"\u5e94\u7528\u540d",span:1,children:i.appName}),Object(u.jsx)(Y.b.Item,{label:"\u6d41\u91cf\u5165\u53e3",span:1,children:i.entranceDesc}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u673a\u5668",span:1,children:i.host}),Object(u.jsx)(Y.b.Item,{label:"TraceId",span:1,children:i.traceId}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u65f6\u95f4",span:1,children:i.gmtRecord}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u73af\u5883",span:1,children:i.environment})]}),Object(u.jsx)(_.a,{}),Object(u.jsxs)("div",{children:[Object(u.jsx)("p",{className:ee.a.DetailsTitle,children:"\u8c03\u7528\u4fe1\u606f"}),Object(u.jsxs)($.a.Group,{className:ee.a.ButtonGroupPanel,defaultValue:"request",buttonStyle:"solid",onChange:function(e){var t;t=e.target.value,m(t)},children:[Object(u.jsx)($.a.Button,{value:"request",children:"\u8bf7\u6c42\u53c2\u6570"}),Object(u.jsx)($.a.Button,{value:"response",children:"\u8fd4\u56de\u7ed3\u679c"}),Object(u.jsx)($.a.Button,{value:"subInvocations",children:"\u5b50\u8c03\u7528\u8be6\u60c5"})]}),Object(u.jsx)(ie,{value:p,mode:"json",readOnly:!0})]}),Object(u.jsx)(W,{onReplay:function(){},onCancel:function(){I(!1)},appName:a,traceId:n,visible:y})]})},se=oe,le=(n(159),n(155)),ue=(n(160),n(151)),de={getModuleConfig:function(e){return new Promise((function(t,n){S.a.get("/config/",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))},pushConfig:function(e,t){return new Promise((function(n,a){S.a.post("/config/push",{appName:e,environment:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))},deleteConfig:function(e){return new Promise((function(t,n){S.a.delete("/config/"+e).then((function(e){t(e)})).catch((function(e){n(e)}))}))},updateConfig:function(e){return new Promise((function(t,n){S.a.put("/config/"+e.id).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},pe=n(218),fe=n.n(pe),be=n(280),je=function(){var e=Object(J.f)(),t=Object(o.useState)({page:1,size:10}),n=Object(g.a)(t,2),a=n[0],c=n[1],r=Object(o.useState)([]),i=Object(g.a)(r,2),s=i[0],l=i[1],d=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.getModuleConfig(a);case 3:(t=e.sent)&&l(t.data||[]),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),l([]);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();Object(o.useEffect)((function(){d()}),[a]);var p=function(){var e=Object(C.a)(k.a.mark((function e(t){return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de.deleteConfig(t);case 2:if(!e.sent.success){e.next=8;break}return I.b.info("\u5220\u9664\u6210\u529f"),e.next=7,d();case 7:e.sent;case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=[{title:"\u5e94\u7528\u540d",dataIndex:"appName",key:"appName"},{title:"\u73af\u5883",dataIndex:"environment",key:"environment"},{title:"\u914d\u7f6e\u4fe1\u606f",dataIndex:"configPreview",key:"configPreview"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"gmtCreate",key:"gmtCreate"},{title:"\u4fee\u6539\u65f6\u95f4",dataIndex:"gmtModified",key:"gmtModified"},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",render:function(t,n){return Object(u.jsxs)(v.b,{className:fe.a.ActionPanel,children:[Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){e.push("/configurationDetail?mode=preview&appName="+n.appName+"&environment="+n.environment)},children:"\u8be6\u60c5"}),Object(u.jsx)(O.a,{type:"ghost",size:"small",danger:!0,onClick:function(){!function(){var e=Object(C.a)(k.a.mark((function e(t,n){var a;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de.pushConfig(t,n);case 2:a=e.sent,I.b.info(a.message);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(n.appName,n.environment)},children:"\u63a8\u9001"}),Object(u.jsx)(le.a,{overlay:function(){return Object(u.jsxs)(ue.a,{children:[Object(u.jsx)(ue.a.Item,{onClick:function(){e.push("/configurationDetail?mode=edit&appName="+n.appName+"&environment="+n.environment)},children:"\u7f16\u8f91"},"edit"),Object(u.jsx)(ue.a.Divider,{}),Object(u.jsx)(ue.a.Item,{onClick:function(){p(n.id)},danger:!0,children:"\u5220\u9664"},"remove")]})},arrow:!0,children:Object(u.jsx)(be.a,{})})]})}}];return Object(u.jsxs)("div",{className:fe.a.ManagePanel,children:[Object(u.jsxs)(j.a,{className:fe.a.SearchPanel,layout:"inline",onFinish:function(e){return function(e){c(Object(m.a)(Object(m.a)({},a),e))}(e)},children:[Object(u.jsx)(j.a.Item,{label:"\u5e94\u7528\u540d",name:"appName",children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u5e94\u7528\u540d"})}),Object(u.jsx)(j.a.Item,{label:"\u73af\u5883",name:"environment",children:Object(u.jsx)(h.a,{autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u73af\u5883\u540d"})}),Object(u.jsx)(j.a.Item,{children:Object(u.jsx)(O.a,{htmlType:"submit",type:"primary",children:"\u67e5\u8be2"})}),Object(u.jsx)(O.a,{type:"primary",onClick:function(){e.push("/configurationDetail?mode=create")},children:"\u65b0\u5efa\u914d\u7f6e"})]}),Object(u.jsx)(b.a,{size:"small",rowKey:function(e){return e.id},dataSource:s,columns:f})]})},he=je,me=n(219),ve=n.n(me),Oe={getModuleConfig:function(e,t){return new Promise((function(n,a){S.a.get("/config/detail",{appName:e,environment:t}).then((function(e){n(e)})).catch((function(e){a(e)}))}))},saveOrUpdate:function(e){return new Promise((function(t,n){S.a.post("/config/saveOrUpdate",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},xe=ie,ge={degrade:!1,exceptionThreshold:1e3,httpEntrancePatterns:["^/regress/.*$"],javaEntranceBehaviors:[{classPattern:"com.alibaba.repeater.console.service.impl.RegressServiceImpl",includeSubClasses:!1,methodPatterns:["getRegress"]}],javaSubInvokeBehaviors:[{classPattern:"com.alibaba.repeater.console.service.impl.RegressServiceImpl",includeSubClasses:!1,methodPatterns:["getRegressInner"]},{classPattern:"com.alibaba.repeater.console.service.impl.RegressServiceImpl",includeSubClasses:!1,methodPatterns:["findPartner"]},{classPattern:"com.alibaba.repeater.console.service.impl.RegressServiceImpl",includeSubClasses:!1,methodPatterns:["slogan"]}],pluginIdentities:["mybatis","apache-http-client","hibernate","spring-data-jpa","dubbo","redis","ibatis","okhttp","http","caffeine-cache","eh-cache","guava-cache","java","socketio"],repeatIdentities:["java","http","dubbo"],sampleRate:1e4,useTtl:!0},ye=function(){var e=Object(J.f)(),t=Object(o.useState)({isPreviewMode:!1,isCreateMode:!1,appName:"",environment:"",rules:[{}]}),n=Object(g.a)(t,2),a=n[0],c=n[1],r=Object(o.useState)(""),i=Object(g.a)(r,2),s=i[0],l=i[1],d=Object(o.useState)(!1),p=Object(g.a)(d,2),f=p[0],b=p[1],v=Object(o.useState)(!1),x=Object(g.a)(v,2),y=x[0],w=x[1],N=j.a.useForm(),P=Object(g.a)(N,1)[0];Object(o.useEffect)((function(){var t=new URLSearchParams(e.location.search),n=t.get("mode"),a="preview"===n,r="create"===n,i=t.get("appName"),o=t.get("environment");"preview"===n?(b(!0),w(!0)):"edit"===n?w(!0):"create"===n&&(l(""),w(!1),b(!1)),c({isPreviewMode:a,isCreateMode:r,appName:i,environment:o,rules:r?[{required:!0,message:"\u5fc5\u586b\u9879"}]:[{}]})}),[e.location.search]),Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var t,n;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.appName||!a.environment){e.next=7;break}return e.next=3,Oe.getModuleConfig(a.appName,a.environment);case 3:t=e.sent,n=JSON.stringify(t.data.configModel,null,2),console.log(n),l(n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();a.isCreateMode?l(JSON.stringify(ge,null,"\t")):(P.setFieldsValue({appName:a.appName,environment:a.environment}),e())}),[a.appName,a.environment,a.isCreateMode]);var S=function(){var t=Object(C.a)(k.a.mark((function t(n){return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("onCreate",n),console.log("content:",s),t.next=4,Oe.saveOrUpdate(Object(m.a)(Object(m.a)({},n),{},{config:s}));case 4:t.sent.success&&(I.b.info("\u521b\u5efa\u6210\u529f"),e.push("/configuration"));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(u.jsxs)("div",{className:ve.a.EditorPanel,children:[Object(u.jsxs)(j.a,{form:P,className:ve.a.InputLine,layout:"inline",onFinish:function(){P.validateFields().then((function(e){P.resetFields(),S(e)})).catch((function(e){console.log(e)}))},children:[Object(u.jsx)(j.a.Item,{label:"\u5e94\u7528\u540d",name:"appName",rules:a.rules,children:Object(u.jsx)(h.a,{readOnly:y,autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u5e94\u7528\u540d"})}),Object(u.jsx)(j.a.Item,{label:"\u73af\u5883",name:"environment",rules:a.rules,children:Object(u.jsx)(h.a,{readOnly:y,autoComplete:"off",placeholder:"\u8bf7\u8f93\u5165\u73af\u5883\u540d"})}),a.isPreviewMode||Object(u.jsx)(j.a.Item,{children:a.isCreateMode?Object(u.jsx)(O.a,{htmlType:"submit",type:"primary",children:"\u521b\u5efa"}):Object(u.jsx)(O.a,{htmlType:"submit",type:"primary",children:"\u66f4\u65b0"})})]}),Object(u.jsx)(xe,{onEditorChanged:function(e){l(e)},readOnly:f,value:s})]})},ke=ye,Ie=n(220),we=n.n(Ie),Ce={replay:function(e){return new Promise((function(t,n){S.a.get("/replay/",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},Ne=function(){var e=Object(J.f)(),t=Object(o.useState)({page:1,size:10}),n=Object(g.a)(t,2),a=n[0],c=n[1],r=Object(o.useState)(0),i=Object(g.a)(r,2),s=i[0],l=i[1],d=Object(o.useState)([]),p=Object(g.a)(d,2),f=p[0],j=p[1],h=[{title:"repeatId",dataIndex:"repeatId",key:"repeatId"},{title:"\u5e94\u7528\u540d",dataIndex:"appName",key:"appName"},{title:"\u73af\u5883",dataIndex:"environment",key:"environment"},{title:"IP",dataIndex:"ip",key:"ip"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"gmtCreate",key:"gmtCreate"},{title:"\u72b6\u6001",dataIndex:"status",key:"status",render:function(e,t){var n="\u672a\u77e5",a="default";switch(t.status){case"PROCESSING":n="\u6267\u884c\u4e2d",a="processing";break;case"FAILED":n="\u5df2\u5931\u8d25",a="error";break;case"FINISH":n="\u5df2\u5b8c\u6210",a="success"}return Object(u.jsx)(x.a,{color:a,children:n})}},{title:"\u64cd\u4f5c",key:"action",width:70,render:function(t,n){return Object(u.jsx)("div",{className:we.a.ActionPanel,children:Object(u.jsx)(O.a,{type:"primary",size:"small",ghost:"PROCESSING"===n.status,onClick:function(){e.push("/replayResult?appName="+n.appName+"&repeatId="+n.repeatId)},children:"\u8be6\u60c5"})})}}],v={total:s,current:a.page,pageSize:a.size,showTotal:function(e){return"\u5171 ".concat(e," \u6761")},showQuickJumper:!0,onChange:function(e,t){return c(Object(m.a)(Object(m.a)({},a),{},{size:t||1,page:e}))}};return Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ce.replay(a);case 3:(t=e.sent).success&&(j(t.data||[]),l(t.count)),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),j([]),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();e()}),[a]),Object(u.jsx)("div",{className:we.a.Panel,children:Object(u.jsx)(b.a,{size:"small",pagination:v,rowKey:function(e){return e.repeatId},columns:h,dataSource:f})})},Pe=Ne,Se=n(221),Ee=n.n(Se),Me={replayResult:function(e){return new Promise((function(t,n){S.a.get("/replay/detail",e).then((function(e){t(e)})).catch((function(e){n(e)}))}))}},Te={expectColumns:[{title:"\u8282\u70b9",key:"nodeName",dataIndex:"nodeName"},{title:"\u671f\u671b\u503c",key:"expect",dataIndex:"expect"},{title:"\u5b9e\u9645\u503c",key:"actual",dataIndex:"actual"},{title:"\u539f\u56e0",key:"type",dataIndex:"type"}],mockColumns:[{title:"\u5e8f\u53f7",key:"index",dataIndex:"index"},{title:"\u5f55\u5236Identity",key:"originUri",dataIndex:"originUri"},{title:"\u56de\u653eIdentity",key:"currentUri",dataIndex:"currentUri"},{title:"\u5f55\u5236\u53c2\u6570",key:"originArgs",dataIndex:"originArgs"},{title:"\u56de\u653e\u53c2\u6570",key:"currentArgs",dataIndex:"currentArgs"},{title:"\u8017\u65f6",key:"cost",dataIndex:"cost"},{title:"\u72b6\u6001",key:"index",dataIndex:"index",render:function(e,t){if(t.skip)return Object(u.jsx)(x.a,{color:"default",children:"\u8df3\u8fc7"});var n=t.success?"\u6210\u529f":"\u5931\u8d25",a=t.success?"success":"error";return Object(u.jsx)(x.a,{color:a,children:n})}}]},Re=function(){var e,t,n,a,c,r,i=Object(J.f)(),s=new URLSearchParams(i.location.search),l=s.get("repeatId"),d=s.get("appName"),p=Object(o.useState)(),f=Object(g.a)(p,2),j=f[0],h=f[1],m=Object(o.useState)(!1),v=Object(g.a)(m,2),O=v[0],y=v[1],I=Object(o.useState)(""),w=Object(g.a)(I,2),N=w[0],P=w[1],S=Object(o.useState)(["",""]),E=Object(g.a)(S,2),M=E[0],T=E[1],R=Object(o.useState)(),z=Object(g.a)(R,2),B=z[0],A=z[1],D=Object(o.useState)(),L=Object(g.a)(D,2),F=L[0],q=L[1],U=Object(o.useState)({showBasic:!0,showExpect:!1,showDiff:!1,showMock:!1}),G=Object(g.a)(U,2),H=G[0],V=G[1];Object(o.useEffect)((function(){var e=function(){var e=Object(C.a)(k.a.mark((function e(){var t,n,a,c,r,i;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d||!l){e.next=10;break}return e.next=3,Me.replayResult({appName:d,repeatId:l});case 3:i=e.sent,h(i.data),T([null===(t=i.data)||void 0===t||null===(n=t.record)||void 0===n?void 0:n.response,null===(a=i.data)||void 0===a?void 0:a.response]),A(null===(c=i.data)||void 0===c?void 0:c.differences),q(null===(r=i.data)||void 0===r?void 0:r.mockInvocations),e.next=11;break;case 10:console.log("\u56e0\u8def\u7531\u610f\u5916\u89e6\u53d1\uff0c\u8df3\u8fc7fetch");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[d,l]);var K="";return K="PROCESSING"===(null===j||void 0===j?void 0:j.status)?"\u6267\u884c\u4e2d":(null===j||void 0===j?void 0:j.success)?"\u6210\u529f":"\u5931\u8d25",Object(u.jsxs)("div",{className:Ee.a.Panel,children:[Object(u.jsxs)("div",{children:[Object(u.jsx)("p",{className:Ee.a.CallPanel,children:"\u8c03\u7528\u5feb\u7167"}),Object(u.jsxs)($.a.Group,{style:{marginBottom:"8px"},defaultValue:"basic",buttonStyle:"solid",onChange:function(e){!function(e){var t,n,a;switch(y("basic"!==e),e){case"request":P((null===j||void 0===j||null===(t=j.record)||void 0===t?void 0:t.request)||"");break;case"response":P((null===j||void 0===j||null===(n=j.record)||void 0===n?void 0:n.response)||"");break;case"subInvocations":P((null===j||void 0===j||null===(a=j.record)||void 0===a?void 0:a.subInvocations)||"")}}(e.target.value)},children:[Object(u.jsx)($.a.Button,{checked:!0,value:"basic",children:"\u57fa\u7840\u4fe1\u606f"}),Object(u.jsx)($.a.Button,{value:"request",children:"\u8bf7\u6c42\u53c2\u6570"}),Object(u.jsx)($.a.Button,{value:"response",children:"\u8fd4\u56de\u7ed3\u679c"}),Object(u.jsx)($.a.Button,{value:"subInvocations",children:"\u5b50\u8c03\u7528\u8be6\u60c5"})]}),O?Object(u.jsx)(xe,{value:N}):Object(u.jsxs)(Y.b,{size:"small",bordered:!0,children:[Object(u.jsx)(Y.b.Item,{label:"\u5e94\u7528\u540d",span:1,children:null===j||void 0===j||null===(e=j.record)||void 0===e?void 0:e.appName}),Object(u.jsx)(Y.b.Item,{label:"\u6d41\u91cf\u5165\u53e3",span:1,children:null===j||void 0===j||null===(t=j.record)||void 0===t?void 0:t.entranceDesc}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u673a\u5668",span:1,children:null===j||void 0===j||null===(n=j.record)||void 0===n?void 0:n.host}),Object(u.jsx)(Y.b.Item,{label:"TraceId",span:1,children:null===j||void 0===j||null===(a=j.record)||void 0===a?void 0:a.traceId}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u65f6\u95f4",span:1,children:null===j||void 0===j||null===(c=j.record)||void 0===c?void 0:c.gmtRecord}),Object(u.jsx)(Y.b.Item,{label:"\u5f55\u5236\u73af\u5883",span:1,children:null===j||void 0===j||null===(r=j.record)||void 0===r?void 0:r.environment})]}),Object(u.jsx)(_.a,{})]}),Object(u.jsxs)("div",{children:[Object(u.jsx)("p",{className:Ee.a.ResultPanel,children:"\u56de\u653e\u7ed3\u679c"}),Object(u.jsxs)($.a.Group,{style:{marginBottom:"8px"},defaultValue:"basic",buttonStyle:"solid",onChange:function(e){!function(e){var t=!1,n=!1,a=!1,c=!1;switch(e){case"basic":t=!0;break;case"expect":n=!0;break;case"diff":a=!0;break;case"mock":c=!0}V({showBasic:t,showExpect:n,showDiff:a,showMock:c})}(e.target.value)},children:[Object(u.jsx)($.a.Button,{checked:!0,value:"basic",children:"\u57fa\u7840\u4fe1\u606f"}),Object(u.jsx)($.a.Button,{value:"expect",children:"\u5dee\u5f02\u8282\u70b9"}),Object(u.jsx)($.a.Button,{value:"diff",children:"\u7ed3\u679cDiff"}),Object(u.jsx)($.a.Button,{value:"mock",children:"MOCK"})]}),H.showBasic&&Object(u.jsxs)(Y.b,{size:"small",bordered:!0,children:[Object(u.jsx)(Y.b.Item,{label:"\u6267\u884c\u7ed3\u679c",span:1,children:K}),Object(u.jsx)(Y.b.Item,{label:"\u6267\u884c\u65f6\u95f4",span:1,children:null===j||void 0===j?void 0:j.gmtCreate}),Object(u.jsxs)(Y.b.Item,{label:"\u8017\u65f6",span:1,children:[null===j||void 0===j?void 0:j.cost,"ms"]}),Object(u.jsx)(Y.b.Item,{label:"\u6267\u884c\u73af\u5883",span:1,children:null===j||void 0===j?void 0:j.environment}),Object(u.jsx)(Y.b.Item,{label:"\u6267\u884c\u673a\u5668",span:1,children:null===j||void 0===j?void 0:j.ip}),Object(u.jsx)(Y.b.Item,{label:"RepeatId",span:1,children:null===j||void 0===j?void 0:j.repeatId}),Object(u.jsx)(Y.b.Item,{label:"TraceId",span:1,children:null===j||void 0===j?void 0:j.traceId})]}),H.showDiff&&Object(u.jsxs)("div",{children:[Object(u.jsx)(x.a,{style:{marginBottom:"8px"},color:"magenta",children:"\u9884\u671f"}),Object(u.jsx)(x.a,{style:{marginLeft:"780px"},color:"magenta",children:"\u5b9e\u9645"}),Object(u.jsx)(ne.diff,{theme:"github",name:"AceEditor",value:M,editorProps:{$blockScrolling:!0},enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showGutter:!0,showPrintMargin:!1,tabSize:2,readOnly:!0,highlightActiveLine:!0,width:"100%",fontSize:12,setOptions:{useWorker:!1}})]}),H.showExpect&&Object(u.jsx)(b.a,{rowKey:function(e){return e.nodeName},columns:Te.expectColumns,dataSource:B}),H.showMock&&Object(u.jsx)(b.a,{rowKey:function(e){return e.index},columns:Te.mockColumns,dataSource:F})]})]})},ze=Re,Be=n(222),Ae=n.n(Be),De={slogan:function(){return new Promise((function(e,t){S.a.get("/regress/slogan").then((function(t){e(t)})).catch((function(e){t(e)}))}))},repeater3:function(){return new Promise((function(e,t){S.a.get("/regress/get/repeater/3").then((function(t){e(t)})).catch((function(e){t(e)}))}))},getWithCache:function(){return new Promise((function(e,t){S.a.get("/regress/getWithCache/repeater").then((function(t){e(t)})).catch((function(e){t(e)}))}))}},Le=function(){var e=Object(o.useState)(""),t=Object(g.a)(e,2),n=t[0],a=t[1],c=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,De.slogan();case 2:t=e.sent,a(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,De.repeater3();case 2:t=e.sent,a(JSON.stringify(t,null,"\t"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i=function(){var e=Object(C.a)(k.a.mark((function e(){var t;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,De.getWithCache();case 2:t=e.sent,a(JSON.stringify(t,null,"\t"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.jsxs)("div",{className:Ae.a.Panel,children:[Object(u.jsxs)(v.b,{className:Ae.a.ActionPanel,children:[Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){c()},children:"/regress/slogan"}),Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){r()},children:"/regress/get/repeater/3"}),Object(u.jsx)(O.a,{type:"primary",size:"small",onClick:function(){i()},children:"/regress/getWithCache/repeater"})]}),Object(u.jsx)("div",{className:Ae.a.Title,children:Object(u.jsx)("span",{children:"\u8fd4\u56de\u7ed3\u679c"})}),Object(u.jsx)(ie,{mode:"json",value:n})]})},Fe=Le,qe=n(223),Ue=n.n(qe),Je=function(){return Object(u.jsx)("div",{className:Ue.a.aboutBox,children:Object(u.jsxs)("div",{className:Ue.a.title,children:[Object(u.jsx)("p",{children:"\u5173\u4e8e"}),"daviyang35<at>gmail.com"]})})},Ge=n(437),He=n(438),Ve=n(439),Ke=[{title:"\u9996\u9875",key:"home",component:f,path:"/home",closable:!1,isHide:!1,icon:Ge.a},{title:"\u6d41\u91cf\u7ba1\u7406",key:"traffic",component:Z,path:"/traffic",icon:He.a,static:!0},{title:"\u6d41\u91cf\u8be6\u60c5",key:"trafficDetails",component:se,path:"/trafficDetails",icon:He.a,static:!0,isHide:!0},{title:"\u914d\u7f6e\u7ba1\u7406",key:"manage",component:he,path:"/configuration",icon:He.a,static:!0},{title:"\u914d\u7f6e\u8be6\u60c5",key:"manageDetails",component:ke,path:"/configurationDetail",icon:He.a,static:!0,isHide:!0},{title:"\u6a21\u5757\u7ba1\u7406",key:"module",component:z,path:"/module",icon:He.a,static:!0},{title:"\u56de\u653e\u8bb0\u5f55",key:"replay",component:Pe,path:"/replay",icon:He.a,static:!0},{title:"\u56de\u653e\u7ed3\u679c",key:"result",component:ze,path:"/replayResult",icon:He.a,static:!0,isHide:!0},{title:"\u6d4b\u8bd5\u9875\u9762",key:"test",component:Fe,path:"/test",icon:He.a,static:!0},{title:"\u5173\u4e8e\u6211\u4eec",key:"aboutUs",component:Je,path:"/aboutUs",icon:Ve.a,static:!0}],We=[];try{var Qe=localStorage.getItem("auth_menus");Qe&&(We=JSON.parse(Qe))}catch(Ze){}Ke=Ke.filter((function(e){return e.children&&(e.children=e.children.filter((function(e){return e.static||We.includes(e.key)}))),e.static||We.includes(e.key)}));t.a=Ke},194:function(e,t){},214:function(e,t,n){e.exports={ModulePanel:"ModulePanel--VGxOt",SearchForm:"SearchForm--qZSUl",InstallButton:"InstallButton--j3uzQ"}},215:function(e,t,n){e.exports={TrafficPanel:"TrafficPanel--t0CVy",ActionPanel:"ActionPanel--tUB9c"}},216:function(e,t,n){e.exports={DetailsPanel:"DetailsPanel--B0EqC",DetailsTitle:"DetailsTitle--mjA0c",ButtonGroupPanel:"ButtonGroupPanel--Wq0UJ"}},217:function(e,t,n){e.exports={InputLine:"InputLine--LkDJn"}},218:function(e,t,n){e.exports={ManagePanel:"ManagePanel--5UYvq",SearchPanel:"SearchPanel--LfH5F"}},219:function(e,t,n){e.exports={EditorPanel:"EditorPanel--ZzSHw",InputLine:"InputLine--HiARp",CodeMirror:"CodeMirror--W2EIk","CodeMirror-scroll":"CodeMirror-scroll--bgwbm"}},220:function(e,t,n){e.exports={Panel:"Panel--+VQBy"}},221:function(e,t,n){e.exports={Panel:"Panel--4TdPR",CallPanel:"CallPanel--4vrhF",ResultPanel:"ResultPanel--IOgDk"}},222:function(e,t,n){e.exports={Panel:"Panel--bwwx7",ActionPanel:"ActionPanel--SDnZs",Title:"Title--gsvMh"}},223:function(e,t,n){e.exports={aboutBox:"aboutBox--qtEyj",title:"title--2i4MB",btns:"btns--Fyu0J"}},229:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));n(196),n(134);var a=n(162),c=(n(224),n(225)),r=(n(0),n(15)),i=function(){return Object(r.jsx)(c.a,{style:{marginTop:"10%"},status:"403",title:"403",subTitle:"\u62b1\u6b49\uff0c\u60a8\u65e0\u6743\u8bbf\u95ee\u6b64\u9875\u9762\uff0c\u5982\u6709\u7591\u95ee\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01"})},o=function e(t){var n=[];return t.forEach((function(t){n.push(t),Array.isArray(t.children)&&t.children.length>0&&(t.children.forEach((function(e){return e.parentPath=t.path})),n=n.concat(e(t.children)))})),n},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/403",t=o(a.a).find((function(t){return t.path.startsWith(e)}));return t||{title:"\u6682\u65e0\u6743\u9650",path:"/403",key:"/403",component:i}}},428:function(e,t,n){},429:function(e,t,n){"use strict";n.r(t);n(90),n(428);var a=n(2),c=n(3),r=n(5),i=n(0),o=n(65),s=n(74),l=n(77),u=n(75),d=n(76),p=n(71),f=n(72),b=n(83),j=n(64),h=n(59),m=n(6),v=n.n(m),O=n(27),x=n(267),g=n(9),y=n(11),k=n(13),I=n(14),w=function(e){Object(k.a)(n,e);var t=Object(I.a)(n);function n(){var e;return Object(g.a)(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return Object(y.a)(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){var e=this.props,t=e.message,n=e.description,a=e.children,c=this.state,r=c.error,o=c.info,s=o&&o.componentStack?o.componentStack:null,l="undefined"===typeof t?(r||"").toString():t,u="undefined"===typeof n?s:n;return r?i.createElement(M,{type:"error",message:l,description:i.createElement("pre",null,u)}):a}}]),n}(i.Component),C=n(33),N=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var c=0;for(a=Object.getOwnPropertySymbols(e);c<a.length;c++)t.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(e,a[c])&&(n[a[c]]=e[a[c]])}return n},P={success:p.a,info:b.a,error:j.a,warning:f.a},S={success:s.a,info:u.a,error:d.a,warning:l.a},E=function(e){var t,n=e.description,s=e.prefixCls,l=e.message,u=e.banner,d=e.className,p=void 0===d?"":d,f=e.style,b=e.onMouseEnter,j=e.onMouseLeave,m=e.onClick,g=e.afterClose,y=e.showIcon,k=e.closable,I=e.closeText,w=e.action,E=N(e,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","action"]),M=i.useState(!1),T=Object(r.a)(M,2),R=T[0],z=T[1],B=i.useRef(),A=i.useContext(O.b),D=A.getPrefixCls,L=A.direction,F=D("alert",s),q=function(e){var t;z(!0),null===(t=E.onClose)||void 0===t||t.call(E,e)},U=!!I||k,J=function(){var e=E.type;return void 0!==e?e:u?"warning":"info"}(),G=!(!u||void 0!==y)||y,H=v()(F,"".concat(F,"-").concat(J),(t={},Object(c.a)(t,"".concat(F,"-with-description"),!!n),Object(c.a)(t,"".concat(F,"-no-icon"),!G),Object(c.a)(t,"".concat(F,"-banner"),!!u),Object(c.a)(t,"".concat(F,"-rtl"),"rtl"===L),t),p),V=Object(x.a)(E);return i.createElement(h.b,{visible:!R,motionName:"".concat(F,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(e){return{maxHeight:e.offsetHeight}},onLeaveEnd:g},(function(e){var t=e.className,r=e.style;return i.createElement("div",Object(a.a)({ref:B,"data-show":!R,className:v()(H,t),style:Object(a.a)(Object(a.a)({},f),r),onMouseEnter:b,onMouseLeave:j,onClick:m,role:"alert"},V),G?function(){var e=E.icon,t=(n?S:P)[J]||null;return e?Object(C.c)(e,i.createElement("span",{className:"".concat(F,"-icon")},e),(function(){return{className:v()("".concat(F,"-icon"),Object(c.a)({},e.props.className,e.props.className))}})):i.createElement(t,{className:"".concat(F,"-icon")})}():null,i.createElement("div",{className:"".concat(F,"-content")},i.createElement("div",{className:"".concat(F,"-message")},l),i.createElement("div",{className:"".concat(F,"-description")},n)),w?i.createElement("div",{className:"".concat(F,"-action")},w):null,U?i.createElement("button",{type:"button",onClick:q,className:"".concat(F,"-close-icon"),tabIndex:0},I?i.createElement("span",{className:"".concat(F,"-close-text")},I):i.createElement(o.a,null)):null)}))};E.ErrorBoundary=w;var M=E,T=(n(159),n(155)),R=(n(160),n(151)),z=(n(136),n(57)),B=n(128),A=n.n(B),D=n(129),L=n(164);var F=n(163);function q(e){return function(e){if(Array.isArray(e))return Object(L.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(F.a)(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.")}()}var U=n(130),J=(n(260),n(273)),G=n(7),H=n(1),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},K=n(8),W=function(e,t){return i.createElement(K.a,Object(H.a)(Object(H.a)({},e),{},{ref:t,icon:V}))};W.displayName="SyncOutlined";var Q=i.forwardRef(W),Z=(n(224),n(225)),$=n(15),_=function(){return Object($.jsx)(Z.a,{style:{marginTop:"10%"},status:"404",title:"404",subTitle:"\u62b1\u6b49\uff0c\u60a8\u8bbf\u95ee\u7684\u9875\u9762\u4e0d\u5b58\u5728\uff01"})},Y=n(162),X=n(229),ee=J.a.TabPane,te=Object(X.a)(Y.a),ne=[],ae={};if(te&&te.length>0){var ce=te[0];ae=ce.children?ce.children[0]:ce,ne=[ae]}t.default=function(){var e=Object(G.f)(),t=Object(G.g)(),n=t.pathname,a=t.search,c=Object(i.useState)(ae.key),r=Object(U.a)(c,2),o=r[0],s=r[1],l=Object(i.useState)("/"!==n?[]:ne),u=Object(U.a)(l,2),d=u[0],p=u[1],f=Object(i.useState)(!1),b=Object(U.a)(f,2),j=b[0],h=b[1],m=n+a,v=Object(i.useCallback)((function(e){var t=e.reduce((function(e,t){return[].concat(q(e),[t.path])}),[]);console.log(t)}),[]),O=Object(i.useCallback)(Object(D.a)(A.a.mark((function e(){var t,c;return A.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/"!==n){e.next=3;break}return s(ae.path),e.abrupt("return");case 3:(t=te.find((function(e){return e.path===n})))?(c=d.find((function(e){return e.path===n})))?(c.search=a,s(c.path)):(t.search=a,d.push(t),s(t.path)):(d.find((function(e){return"/404"===e.path}))||d.push({title:"404",key:"/404",component:_,closable:!0,path:"/404"}),s("/404"));case 5:case"end":return e.stop()}}),e)}))),[n,d,a]);Object(i.useEffect)((function(){O()}),[O]);var x=function(t){if(1!==d.length){var n=d.findIndex((function(e){return e.path===t})),a=d[n-1]||{};if(d=d.filter((function(e){return e.path!==t}))||[],t!==o)return s(o),p(d),void v(d);e.push({pathname:a.path}),p(d),v(d)}else z.b.warning("\u4e0d\u80fd\u5173\u95ed\u5f53\u524d\u9875")},g=Object($.jsxs)(R.a,{children:[Object($.jsx)(R.a.Item,{onClick:function(){return h(!0),void setTimeout((function(){h(!1)}),1e3)},children:"\u5237\u65b0"},"refresh"),Object($.jsx)(R.a.Item,{onClick:function(e){x(o),e.domEvent.stopPropagation()},children:"\u5173\u95ed"},"close")]});return Object($.jsx)("div",{className:"ax-panesBox",children:Object($.jsx)(J.a,{hideAdd:!0,onChange:function(t){var n=d.find((function(e){return e.path===t}));n.search?e.push(n.path+n.search):e.push({pathname:t})},activeKey:o,type:"editable-card",onEdit:function(e,t){"remove"===t&&x(e)},tabBarGutter:0,className:"ax-Tabs",children:d.map((function(e){return Object($.jsx)(ee,{closable:e.closable,tab:Object($.jsx)(T.a,{overlay:g,placement:"bottomLeft",trigger:["contextMenu"],children:Object($.jsxs)("span",{onContextMenu:function(e){return function(e,t){e.preventDefault()}(e)},children:[j&&e.path===m&&"/403"!==e.path&&Object($.jsx)(Q,{title:"\u5237\u65b0",spin:j}),e.title]})}),children:j?Object($.jsx)("div",{style:{height:"50vh",padding:"20px"},children:Object($.jsx)(M,{message:"\u5237\u65b0\u4e2d...",type:"info"})}):Object($.jsx)(e.component,{path:e.path+(e.search||"")})},e.path)}))})})}}}]);