{"size": 60198, "ext": "js", "max_stars_repo_path": "swagger/static/js/6.45f45a11.chunk.js", "max_stars_repo_name": "jina-ai/api", "max_stars_repo_stars_event_min_datetime": "2021-02-20T21:17:24.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-14T18:08:23.000Z", "max_issues_repo_path": "swagger/static/js/6.45f45a11.chunk.js", "max_issues_repo_name": "AnilSeervi/api", "max_issues_repo_issues_event_min_datetime": "2021-12-26T10:44:52.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-26T10:54:17.000Z", "max_forks_repo_path": "swagger/static/js/6.45f45a11.chunk.js", "max_forks_repo_name": "AnilSeervi/api", "max_forks_repo_forks_event_min_datetime": "2021-09-12T07:11:38.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-25T03:49:34.000Z"}
{"max_stars_count": 7, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 60198.0, "max_line_length": 60198, "alphanum_fraction": 0.6698063059}
(this["webpackJsonpdashboard-v1"]=this["webpackJsonpdashboard-v1"]||[]).push([[6],{103:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),a=(n(1),n(119)),s=n.n(a);function c(e){var t=e.title,n=e.subtitle,a=e.className,c=s()(a,"text-center","text-md-left","mb-sm-0");return Object(r.jsxs)("div",{className:c,children:[Object(r.jsx)("h3",{className:"page-title","data-name":"title",children:t}),Object(r.jsx)("p",{className:"page-subtitle mt-2 mb-0",children:n})]})}},104:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"i",(function(){return c})),n.d(t,"h",(function(){return s})),n.d(t,"d",(function(){return o.c})),n.d(t,"j",(function(){return l})),n.d(t,"c",(function(){return d.c})),n.d(t,"e",(function(){return d.d})),n.d(t,"b",(function(){return d.b})),n.d(t,"f",(function(){return d.f})),n.d(t,"a",(function(){return p.a}));var r=function(e){return new Blob([e],{type:"text,plain;charset=utf-8"})},a=function(e){return r(function(e){return e.reduce((function(e,t){return e+"".concat(t.uptime,',"').concat(t.formattedTimestamp,'",').concat(t.name,",").concat(t.process,",").concat(t.level,',"').concat(t.message,'",').concat(t.context,",").concat(t.host,",").concat(t.workspace_path,"\n")}),"created,formatted timestamp,name,process,level name,message,context,host,workspace\n")}(e))},s=function(e){return r(function(e){var t=e.reduce((function(t,n,r){return t+(JSON.stringify(n)+"".concat(r<e.length-1?",":"","\n"))}),"\n");return"[".concat(t,"]")}(e))},c=function(e){return r(function(e){return e.reduce((function(e,t){return e+"".concat(t.formattedTimestamp," ").concat(t.name,"@").concat(t.process," [").concat(t.level,"]: ").concat(t.message,"\n")}),"")}(e))},o=n(105),u=n(81),i=n(20);function l(e,t){var n=e.uptime,r=e.type,a=Object(i.a)(),s=new Date(n),c=Math.floor(s.valueOf()/1e3),o=s.toLocaleString();return Object(u.a)(Object(u.a)({},e),{},{id:a,idx:t,unixTime:c,timestamp:s,formattedTimestamp:o,level:r})}var d=n(91),p=n(28)},105:function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return d}));var r=n(27),a=n(81),s=n(113),c=n(178),o=s.e,u=s.f,i=function(e,t,n){return{id:e,type:"gateway"===e?"gateway":"pod",data:t,position:n}},l=function(e,t){return{id:"e-".concat(e,"-to-").concat(t),source:e,target:t,type:"step"}},d=function(e){var t,n,r,s,o=e.pods,u=null===(t=e.with)||void 0===t||null===(n=t.board)||void 0===n?void 0:n.canvas,d={with:e.with},f=[],b=[];if(null===(r=e.version)||void 0===r?void 0:r.includes("1")){var m={};o.forEach((function(e){var t=e.name;delete e.name,m[t]=Object(a.a)({},e)})),o=m}o.gateway||(o=Object(a.a)({gateway:null},o)),Object.keys(o).forEach((function(e){var t,n=o[e]||{},r=i(e,n,{});if(r.data.label=e,r.data.name=e,s&&!r.data.needs&&"gateway"!==e&&(!r.data.needs&&(r.data.needs=[]),r.data.needs.push(s)),(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.needs)&&r.data.needs.forEach((function(t){return b.push(l(t,e))})),u&&u[e]){var a=u[e],c=a.x,d=a.y;r.position={x:parseInt(c),y:parseInt(d)}}f.push(r),s=e}));var g={},v=c.nodeOffset.x,w=c.nodeOffset.y;return f.forEach((function(e){var t=p(f,e);e.data.depth=t,void 0===g[t]?g[t]=1:g[t]=g[t]+1,e.position.x||(e.position={y:t*w+w,x:g[t]*v})})),d.elements=[].concat(f,b),d};function p(e,t){var n=t.data.needs;if(n&&0!==n.length){var a=n.map((function(t){var n=e.find((function(e){return e.id===t}));return n.data.depth?n.data.depth:p(e,n)}));return Math.max.apply(Math,Object(r.a)(a))+1}return 0}},106:function(e,t,n){"use strict";var r=n(6),a=n(19),s=n.n(a),c=n(26),o=n(112),u=n.n(o),i=n(28),l=n(88),d=n(149),p=u.a.create(),f={connect:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.a.log("api - connect - settings",t),r="".concat(t.jinadHost,":").concat(t.jinadPort),p=u.a.create({baseURL:r,timeout:d.c}),e.prev=3,e.next=6,p.get("/");case 6:if(200!==e.sent.status){e.next=10;break}return l.a.log("api - connect successfully connected to jinad"),e.abrupt("return",n({connected:!0,message:"Successfully connected to Jina at ".concat(r)}));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),l.a.log("api - connect could not connect to jinad:",e.t0);case 15:return e.abrupt("return",n({connected:!1,message:"failed to connect"}));case 16:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t,n){return e.apply(this,arguments)}}(),getJinaFlowArguments:function(){var e=Object(c.a)(s.a.mark((function e(){var t,n,r,a,c,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.get("/flows/arguments");case 2:return t=e.sent,n=m(t.data),e.next=6,p.get("/pods/arguments");case 6:return r=e.sent,a=m(r.data),e.next=10,p.get("/peas/arguments");case 10:return c=e.sent,o=m(c.data),e.abrupt("return",{flow:n,pod:a,pea:o});case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),getDaemonStatus:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/status");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",daemonStatus:t.data});case 6:return e.abrupt("return",{status:"error",message:t.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),getWorkspaces:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/workspaces");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",workspaces:t.data});case 6:return e.abrupt("return",{status:"error",message:t.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),getWorkspace:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/workspaces/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",workspace:n.data});case 6:return e.abrupt("return",{status:"error",message:n.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),createWorkspace:function(){var e=Object(c.a)(s.a.mark((function e(t){var n,r,a,c,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="Successfully created workspace",r="Failed to create a workspace",a=new FormData,t&&t.forEach((function(e){"string"===typeof e?a.append("files",new Blob([e])):a.append("files",e)})),c={headers:{"Content-Type":"multipart/form-data"}},e.prev=5,e.next=8,p.post("/workspaces",a,c);case 8:if(201!==(o=e.sent).status){e.next=11;break}return e.abrupt("return",{status:"success",workspace_id:o.data,message:n});case 11:return e.abrupt("return",{status:"error",message:r});case 14:return e.prev=14,e.t0=e.catch(5),e.abrupt("return",{status:"error",message:r});case 17:case"end":return e.stop()}}),e,null,[[5,14]])})));return function(t){return e.apply(this,arguments)}}(),uploadFilesToWorkspace:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,a,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new FormData,n.forEach((function(e){"string"===typeof e?r.append("files",new Blob([e])):r.append("files",e)})),r.append("workspace_id",t),a={headers:{"Content-Type":"multipart/form-data"}},e.prev=4,e.next=7,p.post("/workspaces",r,a);case 7:if(201!==(c=e.sent).status){e.next=10;break}return e.abrupt("return",{status:"success",workspace_id:c.data});case 10:return e.abrupt("return",{status:"error",message:c.data});case 13:return e.prev=13,e.t0=e.catch(4),e.abrupt("return",{status:"error",message:e.t0});case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t,n){return e.apply(this,arguments)}}(),deleteWorkspace:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/workspaces/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:n.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - deleteWorkspace ".concat(t," error: "),e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),deleteAllWorkspaces:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/workspaces/all");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:t.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - deleteAllWorkspaces error: ",e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),getArgumentsForFlow:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/flows/arguments");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",arguments:t.data});case 6:return e.abrupt("return",{status:"error",message:t.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),getFlow:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/flows/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",flow:n.data});case 6:return e.abrupt("return",{status:"error",message:n.data});case 9:e.prev=9,e.t0=e.catch(0),l.a.log("api - getFlow error getting flow: ",e.t0);case 12:return e.abrupt("return",{status:"error",message:"Could not get flow\nFlowId:".concat(t)});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),startFlow:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,a,c,o,u,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="Successfully started flow",a="Failed to start flow",l.a.log("yamlString:",t),(c=new FormData).append("flow",new Blob([t])),n&&c.append("workspace_id",n),o={headers:{"Content-Type":"multipart/form-data"}},e.prev=7,e.next=10,p.post("/flows",c,o);case 10:if(201!==(u=e.sent).status){e.next=14;break}return i=u.data,e.abrupt("return",{status:"success",message:r,flow_id:i});case 14:return e.abrupt("return",{status:"error",message:a});case 17:return e.prev=17,e.t0=e.catch(7),l.a.log("api - startFlow error: ",e.t0),e.abrupt("return",{status:"error",message:a});case 21:case"end":return e.stop()}}),e,null,[[7,17]])})));return function(t,n){return e.apply(this,arguments)}}(),terminateFlow:function(){var e=Object(c.a)(s.a.mark((function e(t){var n,r,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="Successfully terminated flow",r="Failed to terminate flow",e.prev=2,e.next=5,p.delete("/flows/".concat(t));case 5:if(a=e.sent,l.a.log("terminate result",a),200!==a.status){e.next=9;break}return e.abrupt("return",{status:"success",message:n,flow:a.data});case 9:return e.abrupt("return",{status:"error",message:r});case 12:return e.prev=12,e.t0=e.catch(2),l.a.log("api - terminateFlow error: ",e.t0),e.abrupt("return",{status:"error",message:r});case 16:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}(),terminateAllFlows:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/flows/all");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:t.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - terminateAllFlows error: ",e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),getLogs:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/logs/".concat(t,"/").concat(n));case 3:if(200!==(r=e.sent).status){e.next=7;break}return a=r.data.split("\n").filter((function(e){return""!==e})).map(JSON.parse),e.abrupt("return",{status:"success",logs:a});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),l.a.log("api - getLogs error: ",e.t0);case 12:return e.abrupt("return",{status:"error",message:"Could not get logs for flow.\nFlowId:".concat(n)});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}(),waitForFlow:function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,a,c,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.length>2&&void 0!==o[2]?o[2]:d.a,a=o.length>3&&void 0!==o[3]?o[3]:d.b,c=0;case 3:if(!(c<r)){e.next=21;break}return l.a.log("checking for flow logs [".concat(c+1,"]")),e.prev=5,e.next=8,p.get("/logs/".concat(t,"/").concat(n));case 8:if(200!==e.sent.status){e.next=11;break}return e.abrupt("return",{status:"success",message:"Successfuly stablished logstream.\nFlowId:".concat(n)});case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),l.a.log("no flow logs yet [".concat(c+1,"]"));case 16:return e.next=18,Object(i.g)(a);case 18:++c,e.next=3;break;case 21:return e.abrupt("return",{status:"error",message:"Could not establish log stream for flow.\nFlowId:".concat(n)});case 22:case"end":return e.stop()}}),e,null,[[5,13]])})));return function(t,n){return e.apply(this,arguments)}}(),listenForLogs:function(){var e=Object(c.a)(s.a.mark((function e(t,n,r,a,c){var o,u,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=r.jinadHost.replace("http://","ws://").replace("https://","wss://"),u="".concat(o,":").concat(r.jinadPort,"/logstream/").concat(t,"/").concat(n),l.a.log("api - listenForLogs - baseURl:",u),e.prev=3,i=new WebSocket(u),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(3),e.abrupt("return",a({connected:!1,message:e.t0}));case 10:i.addEventListener("open",(function(){a({connected:!0,message:"Successfully Connected"}),i.send(JSON.stringify({from:0}))})),i.addEventListener("message",(function(e){l.a.log("api - logstream - message received: ",e);var t=JSON.parse(e.data);c(t)})),i.addEventListener("close",(function(e){a({connected:!1,message:"Connection closed"})})),i.addEventListener("error",(function(e){a({connected:!1,message:"Socket error"})}));case 14:case"end":return e.stop()}}),e,null,[[3,7]])})));return function(t,n,r,a,s){return e.apply(this,arguments)}}(),getArgumentsForPod:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/pods/arguments");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",arguments:t.data});case 6:return e.abrupt("return",{status:"error",message:t.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),getPod:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/pods/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",pod:n.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - getPod ".concat(t," error: "),e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),startPod:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.post("/pods",t);case 3:if(201!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",pod:n.data});case 6:return e.abrupt("return",{status:"error",message:n.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),terminatePod:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/pods/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:n.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - terminatePod ".concat(t," error: "),e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),terminateAllPods:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/pods/all");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:t.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - terminateAllPods error: ",e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),getArgumentsForPea:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/peas/arguments");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",arguments:t.data});case 6:return e.abrupt("return",{status:"error",message:t.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),getPea:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/peas/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",pea:n.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - getPea error getting pea ".concat(t,": "),e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),startPea:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.post("/peas",t);case 3:if(201!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",pea:n.data});case 6:return e.abrupt("return",{status:"error",message:n.data});case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",{status:"error",message:e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),terminatePea:function(){var e=Object(c.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/peas/".concat(t));case 3:if(200!==(n=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:n.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - terminatePea ".concat(t," error: "),e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),terminateAllPeas:function(){var e=Object(c.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.delete("/peas/all");case 3:if(200!==(t=e.sent).status){e.next=6;break}return e.abrupt("return",{status:"success",message:t.data});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),l.a.log("api - terminateAllPeas error: ",e.t0);case 11:return e.abrupt("return",{status:"error"});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}()},b={string:"string",boolean:"boolean",integer:"integer",array:"string"},m=function(e){return Object.entries(e).map((function(e){var t=Object(r.a)(e,2),n=t[0],a=t[1],s=a.description,c=a.default,o=a.type,u=b[o];return"undefined"===typeof c||null===c?{name:n,description:s,type:u}:{name:n,description:s,defaultValue:c,type:u}}))};t.a=f},111:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return c}));var r="SHOW_LOG_INDEX",a="HANDLE_NEW_LOG",s={logIndex:0,logLevelOccurrences:{},logs:[],logLevels:{INFO:0,SUCCESS:0,WARNING:0,ERROR:0,CRITICAL:0,DEBUG:0},logSources:{}},c=function(){return{lastLog:0,levels:{INFO:0,SUCCESS:0,WARNING:0,ERROR:0,CRITICAL:0,DEBUG:0}}}},126:function(e,t,n){"use strict";n.d(t,"k",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"p",(function(){return s})),n.d(t,"i",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return u})),n.d(t,"n",(function(){return i})),n.d(t,"o",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"j",(function(){return b})),n.d(t,"m",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"q",(function(){return w})),n.d(t,"h",(function(){return h})),n.d(t,"v",(function(){return y})),n.d(t,"t",(function(){return k})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return j})),n.d(t,"u",(function(){return x}));var r="LOAD_FLOW",a="CREATE_NEW_FLOW",s="UPDATE_SELECTED_FLOW",c="DUPLICATE_FLOW",o="ADD_NODE",u="DELETE_FLOW",i="UPDATE_NODE",l="UPDATE_NODE_DATA",d="DELETE_NODE",p="ADD_LINK",f="DELETE_LINK",b="IMPORT_FLOW",m="SET_FLOW_ARGUMENTS",g="LOAD_WORKSPACE",v="CREATE_NEW_WORKSPACE",w="UPDATE_SELECTED_WORKSPACE",h="DELETE_WORKSPACE",y={elements:[{id:"gateway",type:"gateway",data:{name:"gateway",label:"gateway"},position:{x:629,y:72}}]},k="1",O={version:"0.0",flow:[],pea:[],pod:[]},j={_userFlow:{name:"Custom Flow 1",workspaceId:"_userWorkspace",type:"user-generated",flowChart:y,isConnected:!1,daemon_id:null}},x={_userWorkspace:{name:"Workspace 1",jina_version:"latest",type:"user-generated",daemon_endpoint:"",isConnected:!1,daemon_id:"",files:[],selectedFlowId:"_userFlow",flowArguments:O}}},127:function(e,t,n){"use strict";var r=n(79),a=n(80),s=n(73);function c(){var e=Object(r.a)(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]);return c=function(){return e},e}function o(){var e=Object(r.a)(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 48px;\n  width: 48px;\n  background: transparent;\n  border-radius: 50%;\n  animation: "," 1s infinite ease-in-out;\n"]);return o=function(){return e},e}function u(){var e=Object(r.a)(["\n  50%{\n    border-color: transparent;\n  }\n  100%{\n    transform:rotatez(360deg);\n  }\n"]);return u=function(){return e},e}function i(){var e=Object(r.a)(["\n  position: absolute;\n  height: 32px;\n  width: 32px;\n  animation: "," 1s infinite ease-in;\n"]);return i=function(){return e},e}function l(){var e=Object(r.a)(["\n  border-radius: 50%;\n  border: 8px solid white;\n  border-color: ",";\n"]);return l=function(){return e},e}function d(){var e=Object(r.a)(["\n  100%{\n    transform:rotatez(-720deg);\n  }\n"]);return d=function(){return e},e}var p=Object(s.d)(d()),f=a.a.div(l(),(function(e){var t=e.theme.palette.primary.main,n=e.theme.palette.background.default;return"".concat(t," ").concat(n," ").concat(t," ").concat(n)})),b=Object(a.a)(f)(i(),p),m=Object(s.d)(u()),g=Object(a.a)(f)(o(),m),v=a.a.div(c());t.a=function(){return Object(s.c)(v,null,Object(s.c)(g,null,Object(s.c)(b,null)))}},137:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return i}));var r="FETCH_HUB_IMAGES",a="FETCH_HUB_IMAGES_SUCCESS",s="FETCH_HUB_IMAGES_FAILURE",c="PICK_FILTER",o="CLEAR_FILTERS",u={images:[],loading:!1,error:null,selectedFilters:[]},i=["name increasing","name decreasing","author increasing","author decreasing"]},141:function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"l",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"j",(function(){return o})),n.d(t,"k",(function(){return u})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return f})),n.d(t,"f",(function(){return b})),n.d(t,"m",(function(){return g}));var r="HANDLE_CONNECTION_STATUS",a="TOGGLE_SIDE_BAR",s="SHOW_BANNER",c="HIDE_BANNER",o="SHOW_ERROR",u="SHOW_MODAL",i="CLOSE_MODAL",l="FETCH_ARGUMENTS_FROM_API",d="FETCH_ARGUMENTS_FROM_DAEMON",p="LOGOUT",f="SETUSER",b=5e3,m=[{title:"Home",to:"/home",iconName:"home",matches:["home"]},{title:"Log Stream",to:"/logs",iconName:"insert_comment",matches:["logs"]},{title:"Flow Design",to:"/flow",iconName:"device_hub",matches:["flow"]},{title:"Hub",to:"/hub",iconName:"store",matches:["hub","package"]},{title:"Debug",to:"/debug",iconName:"pest_control",matches:["debug"]},{title:"Settings",to:"/settings",iconName:"settings",matches:["settings"]},{title:"Help",to:"/help",iconName:"help",matches:["help"]}];function g(){var e=null,t=localStorage.getItem("user");return t&&(e=JSON.parse(t)),{user:e,banners:[],connected:!1,currentTab:"logStream",loading:!0,menuVisible:!1,modal:null,modalParams:null,navItems:m,processes:{}}}},148:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r="UPDATE_SETTINGS",a={settings:{jinadHost:localStorage.getItem("preferences-jinadhost")||"http://localhost",jinadPort:localStorage.getItem("preferences-jinadPort")||"5000",gatewayHost:localStorage.getItem("preferences-gatewayHost")||"http://localhost",gatewayPort:localStorage.getItem("preferences-gatewayPort")||"5555",log:localStorage.getItem("preferences-log")||"/stream/log",profile:localStorage.getItem("preferences-profile")||"/stream/profile",yaml:localStorage.getItem("preferences-yaml")||"/data/yaml",shutdown:localStorage.getItem("preferences-shutdown")||"/action/shutdown",ready:localStorage.getItem("preferences-ready")||"/status/ready"}}},149:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=4e4,a=10,s=3e3},150:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return f}));var r=n(19),a=n.n(r),s=n(26),c=n(111),o=n(94),u=n(89),i=n(88),l=n(106);function d(e){return{type:c.b,payload:e}}function p(e){return{type:c.a,payload:e}}function f(e,t){return function(){var n=Object(s.a)(a.a.mark((function n(r){var s,c,d,f,b,m;return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f=function(e){r(p(e))},s=function(e){var t=e.connected,n=e.message;if(!t)return r(Object(u.g)(n,"error"))},n.next=4,l.a.waitForFlow(e,t);case 4:if("error"!==(c=n.sent).status){n.next=7;break}return n.abrupt("return",r(Object(u.g)(c.message,"error")));case 7:return n.next=9,l.a.getLogs(e,t);case 9:if("error"!==(d=n.sent).status){n.next=13;break}return d.message&&r(Object(u.g)(d.message,"error")),n.abrupt("return");case 13:b=d.logs,i.a.log("got logs:",b),b.forEach(f),m=o.a.getState().settingsState.settings,l.a.listenForLogs(e,t,m,s,f);case 18:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}},178:function(e,t,n){"use strict";n.r(t),n.d(t,"nodeOffset",(function(){return r}));var r={x:250,y:150}},204:function(e,t,n){},208:function(e,t,n){"use strict";var r=n(3),a=n(79),s=(n(1),n(80)),c=n(96),o=n(107);function u(){var e=Object(a.a)(["\n  padding: 0 1.5rem;\n  width: 1.25rem;\n  opacity: 0.75;\n"]);return u=function(){return e},e}function i(){var e=Object(a.a)(["\n  display: flex;\n  padding: 1rem 0;\n  text-decoration: none;\n  border-radius: 0.25rem;\n  ","\n"]);return i=function(){return e},e}var l=Object(s.a)(c.d)(i(),(function(e){var t=e.theme.palette;return e.selected?"color: ".concat(t.primary.main,";\n      background-color: #00919119;"):"color: ".concat(t.text.secondary,";")})),d=s.a.div(u()),p=function(e){var t,n,a=e.item,s=e.toggleSidebar,c=null===(t=Object(o.h)())||void 0===t||null===(n=t.pathname)||void 0===n?void 0:n.substring(1),u=a.matches.includes(c);return Object(r.jsxs)(l,{to:a.to,selected:u,onClick:s,children:[Object(r.jsx)(d,{children:a.icon&&Object(r.jsx)(a.icon,{})}),a.title&&Object(r.jsx)("span",{children:a.title})]})};function f(){var e=Object(a.a)(["\n  width: 4.5rem;\n"]);return f=function(){return e},e}function b(){var e=Object(a.a)(["\n  padding: 0.5rem 1.5rem;\n"]);return b=function(){return e},e}var m=s.a.div(b()),g=s.a.img(f()),v=function(){return Object(r.jsx)("a",{href:"/#",children:Object(r.jsx)(m,{children:Object(r.jsx)(g,{id:"main-logo",src:"/jina-light.svg",alt:"Jina logo"})})})};function w(){var e=Object(a.a)(["\n  height: 100vh;\n  background-color: ",";\n  border: 1px solid ",";\n  border-top: 0;\n"]);return w=function(){return e},e}var h=s.a.div(w(),(function(e){return e.theme.palette.background.default}),(function(e){return e.theme.palette.grey[300]}));t.a=function(e){var t=e.sidebarNavItems,n=e.toggleSidebar;return Object(r.jsxs)(h,{className:"w-2/12 ",children:[Object(r.jsx)(v,{}),"undefined"!==typeof t&&t.length&&Object(r.jsx)("div",{children:t.map((function(e,t){return Object(r.jsx)(p,{item:e,toggleSidebar:n},t)}))})]})}},47:function(e,t,n){"use strict";n.r(t),n.d(t,"initSentry",(function(){return s}));var r=n(1266),a=n(231);function s(){r.a({dsn:"https://085edd94ec3e479cb20f2c65f7b8cb82@o525420.ingest.sentry.io/5639443",integrations:[new a.a.BrowserTracing],tracesSampleRate:1})}},54:function(e,t,n){"use strict";n.r(t);var r=n(3),a=n(79),s=(n(1),n(96)),c=n(107),o=n(80),u=n(208),i=n(6),l=n(73),d=n(103),p=n(23);function f(){var e=Object(a.a)(["\n                    background-color: ",";\n                    color: ",";\n                    padding: 8px;\n                    border-radius: 8px;\n                  "]);return f=function(){return e},e}function b(){var e=Object(a.a)(["\n                  padding: 32px;\n                  background-color: ",";\n                "]);return b=function(){return e},e}var m=function(){var e=p.a.palette,t=["primary","secondary","background","action","text","error","warning","success","info","grey"],n=Object.entries(e).filter((function(e){var n=Object(i.a)(e,2),r=n[0];n[1];return t.includes(r)}));return Object(l.c)("div",null,Object(l.c)(d.a,{title:"Colors",className:""}),n.map((function(t){var n=Object(i.a)(t,2),r=n[0],a=n[1];return Object(l.c)("div",null,Object(l.c)("h3",null,r),Object.entries(a).map((function(t){var n=Object(i.a)(t,2),r=n[0],a=n[1];return Object(l.c)("div",{key:a,css:Object(l.b)(b(),a)},Object(l.c)("span",{css:Object(l.b)(f(),e.grey[400],e.text.primary)},r))})))})))},g=n(46),v=n(127);function w(){var e=Object(a.a)(["\n          color: ",";\n          padding: 8px;\n        "]);return w=function(){return e},e}var h=function(){var e=Object(g.f)().palette;return Object(l.c)("div",null,Object(l.c)(d.a,{title:"Misc",className:""}),Object(l.c)("span",{css:Object(l.b)(w(),e.headerTextColor)},"Loading Spinner"),Object(l.c)(v.a,null))};function y(){var e=Object(a.a)(["\n  color: ",";\n  padding: 1rem;\n"]);return y=function(){return e},e}function k(){var e=Object(a.a)(["\n  color: ",";\n  font-size: 1.5rem;\n  font-weight: 500;\n  padding: 1rem;\n"]);return k=function(){return e},e}var O=o.a.h2(k(),(function(e){return e.theme.palette.text.primary})),j=o.a.p(y(),(function(e){return e.theme.palette.text.primary})),x=function(){return Object(l.c)("div",null,Object(l.c)(d.a,{title:"Typography",className:""}),Object(l.c)(O,null," Title "),Object(l.c)(j,null,"A paragraph that could span over multiple lines"))},_=[{title:"Colors",to:"/colors",exact:!0,component:function(){return Object(r.jsx)(m,{})},matches:[]},{title:"Typography",to:"/typography",component:function(){return Object(r.jsx)(x,{})},matches:[]},{title:"Misc",to:"/misc",component:function(){return Object(r.jsx)(h,{})},matches:[]}],I=n(7),F=n(81),E={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},S=Object.keys(E).reduce((function(e,t){return Object(F.a)(Object(F.a)({},e),{},Object(I.a)({},t,"@media (min-width: ".concat(E[t],"px)")))}),{}),A=n(82),L=(n(204),n(94)),C=n(47);function D(){var e=Object(a.a)(["\n  flex-grow: 1;\n"]);return D=function(){return e},e}function W(){var e=Object(a.a)(["\n  width: 25%;\n  "," {\n    width: 16.67%;\n  }\n"]);return W=function(){return e},e}function N(){var e=Object(a.a)(["\n  display: flex;\n"]);return N=function(){return e},e}Object(C.initSentry)(),window.Cypress&&(window.store=L.a);var T=o.a.div(N()),R=o.a.aside(W(),S["lg"]),P=o.a.article(D());t.default=function(){return Object(r.jsx)(A.a,{store:L.a,children:Object(r.jsxs)(s.a,{children:[Object(r.jsxs)(T,{children:[Object(r.jsx)(R,{children:Object(r.jsx)(u.a,{sidebarNavItems:_,menuVisible:!0,toggleSidebar:function(){}})}),Object(r.jsx)(P,{children:Object(r.jsx)(c.d,{children:_.map((function(e,t){return Object(r.jsx)(c.b,{path:e.to,exact:e.exact,children:Object(r.jsx)(e.component,{})},t)}))})})]}),Object(r.jsx)(c.a,{exact:!0,from:"/",to:_[0].to})]})})}},88:function(e,t,n){"use strict";var r=n(27),a=n(180);function s(e,t,n){o.log("window.onerror - ERROR",e,t,"line: ".concat(n))}function c(e){window.logs.push(e)}var o={log:function(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];if(window.logsEnabled){var s=Object(r.a)(arguments);(e=console).log.apply(e,Object(r.a)(s)),c(s)}},isEnabled:function(){return window.logsEnabled},enable:function(){var e={};for(var t in window.navigator)e[t]=window.navigator[t];window.logs=[],c(e),window.addEventListener("error",s),window.logsEnabled=!0},disable:function(){window.removeEventListener("error",s),window.logsEnabled=!1},setFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json";window.logsFormat=e},exportLogs:function(){for(var e=window.logsFormat||"json",t=window.logs,n="[\n",r=0;r<t.length;++r){var s=t[r];n+=JSON.stringify(s)+"".concat(r<t.length-1?",":"","\n")}n+="]";var c="jina-dashboard-debug-output-".concat(new Date,".").concat(e),o=new Blob([n],{type:"text,plain;charset=utf-8"});Object(a.saveAs)(o,c)}};t.a=o},89:function(e,t,n){"use strict";n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"j",(function(){return h})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return k})),n.d(t,"i",(function(){return O})),n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return x})),n.d(t,"e",(function(){return _})),n.d(t,"f",(function(){return I}));var r=n(19),a=n.n(r),s=n(26),c=n(141),o=n(94),u=n(106),i=n(112),l=n.n(i),d=function(){var e=Object(s.a)(a.a.mark((function e(){var t,n,r,s,c,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("https://api.jina.ai/latest.json");case 2:return s=e.sent,c=s.data,o={flow:f(null===(t=c.methods.find((function(e){return"flow"===e.name})))||void 0===t?void 0:t.options),pea:f(null===(n=c.methods.find((function(e){return"pea"===e.name})))||void 0===n?void 0:n.options),pod:f(null===(r=c.methods.find((function(e){return"pod"===e.name})))||void 0===r?void 0:r.options),version:c.version},e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p={str:"string",bool:"boolean",int:"integer","typing.List[str]":"string"},f=function(e){return e?e.map((function(e){var t=e.name,n=e.help,r=e.default,a=e.type,s=p[a];return"undefined"===typeof r||null===r?{name:t,description:n,type:s}:{name:t,description:n,defaultValue:r,type:s}})):[]},b=n(92),m=n(88);function g(e,t){return function(n){n(w(e,t)),e?(n(y(t,"success")),n(function(){var e=Object(s.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:c.c}),e.next=3,u.a.getJinaFlowArguments();case 3:return n=e.sent,m.a.log("loadFlowArgumentsFromDaemon | flowArguments:",n),e.abrupt("return",t(Object(b.m)(n)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())):n(function(){var e=Object(s.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:c.b}),e.next=3,d();case 3:return n=e.sent,m.a.log("loadFlowArgumentsFromApi | flowArguments:",n),e.abrupt("return",t(Object(b.m)(n)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}function v(e,t){return function(n){n(w(e,t)),e&&n(y(t,"success"))}}function w(e,t){return{type:c.d,payload:{connected:e,message:t}}}function h(){return{type:c.l}}function y(e,t){return function(n){n(function(e,t){return{type:c.i,payload:{message:e,theme:t}}}(e,t)),setTimeout((function(){n({type:c.e})}),c.f)}}function k(e){return{type:c.j,payload:{message:e}}}function O(e,t){return{type:c.k,payload:{modal:e,modalParams:t||null}}}function j(){return{type:c.a}}function x(){return function(e){var t=o.a.getState().settingsState.settings;u.a.connect(t,(function(t){var n=t.connected,r=t.message;e(g(n,r))}))}}function _(){return{type:c.g}}function I(e){return localStorage.setItem("user",JSON.stringify(e)),{type:c.h,payload:{user:e}}}},91:function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"e",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(81),a=n(6),s=n(239),c=n(111),o=n(98),u=Object(r.a)(Object(r.a)({},{depth:0}),{label:"string",name:"string"}),i=n(105),l=Object.keys(u),d=function(e){var t=/^!/.test(e)?e.split("\n").slice(1).join("\n"):e;try{var n=s.parse(t);if("object"!==typeof n||null===n)throw new Error("Invalid YAML");return Object.keys(n.pods).forEach((function(e){n.pods[e].needs&&!Array.isArray(n.pods[e].needs)&&(n.pods[e].needs=[n.pods[e].needs])})),{data:n}}catch(r){alert("Error Parsing YAML:\n"+r.message)}},p=function(e,t){var n=e.with,c=e.elements,o=[],u=[];c.forEach((function(e){Object(i.d)(e)&&u.push(e),Object(i.e)(e)&&o.push(e)}));var d=t.pod,p=u.reduce((function(e,t){var n=t.source,r=t.target;return e[r]||(e[r]=[]),e[r].push(n),e}),{}),f=o.filter((function(e){return"gateway"!==e.data.label})).reduce((function(e,t){var n,s=t.data.label,c=Object.entries(t.data).reduce((function(e,t){var n=Object(a.a)(t,2),r=n[0],s=n[1];return l.includes(r)||(e[r]=function(e,t,n){var r=n.find((function(t){return t.name===e}));return r&&"boolean"===r.type?"true"===String(t):t}(r,s,d)),e}),{});return p[s]&&(c.needs=(n=p[s],Array.isArray(n)&&1===n.length?n[0]:n)),e[s]=Object(r.a)({},c),e}),{}),b=o.reduce((function(e,t){var n=t.position,r=n.x,a=n.y;return e[t.data.label||t.data.name]={x:parseInt(r),y:parseInt(a)},e}),{}),m={with:Object(r.a)(Object(r.a)({},n),{},{board:{canvas:b}}),pods:f};return"!Flow\n".concat(s.stringify(m))},f=function(e){var t=60,n=3600;return e<t?"".concat(Math.floor(e),"s"):e<n?"".concat(Math.floor(e/t),"m ").concat(Math.floor(e%t),"s"):"".concat(Math.floor(e/n),"h ").concat(Math.floor(e%n/t),"m ").concat(Math.floor(e%t),"s")},b=function(e){return e<1024?"".concat(e," Bytes"):e<Math.pow(1024,2)?"".concat((e/1024).toFixed(1)," KB"):e<Math.pow(1024,3)?"".concat((e/Math.pow(1024,2)).toFixed(1)," MB"):"".concat((e/Math.pow(1024,3)).toFixed(1)," GB")};function m(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=Object(c.c)(),s=e/t,u=[],i=Math.ceil(r/1e3/s)*s,l=Math.floor(r/1e3),d=function(e){for(var t=Object(o.cloneDeep)(a),r=e;r<e+s;++r){var c=n[r];c&&(t.lastLog=c.lastLog,Object.entries(c.levels).forEach((function(e){var n=e[0],r=e[1];t.levels[n]=t.levels[n]+r})))}u.push(t)},p=i-e;p<i;p+=s)d(p);return{data:u,numSeconds:e,numTicks:t,lastTimestamp:l}}function g(e){return e.charAt(0).toUpperCase()+e.slice(1)}},92:function(e,t,n){"use strict";n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"m",(function(){return f})),n.d(t,"r",(function(){return b})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return g})),n.d(t,"e",(function(){return v})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return h})),n.d(t,"f",(function(){return y})),n.d(t,"p",(function(){return k})),n.d(t,"q",(function(){return O})),n.d(t,"g",(function(){return j})),n.d(t,"l",(function(){return x})),n.d(t,"d",(function(){return _})),n.d(t,"h",(function(){return I})),n.d(t,"n",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"o",(function(){return A}));var r=n(19),a=n.n(r),s=n(26),c=n(126),o=n(89),u=n(150),i=n(88),l=n(106);function d(e){return{type:c.k,payload:e}}function p(){return{type:c.c}}function f(e){return{type:c.m,payload:e}}function b(e){return{type:c.p,payload:e}}function m(e){return{type:c.i,payload:e}}function g(e){return{type:c.j,payload:e}}function v(e){return{type:c.e,payload:e}}function w(e,t,n){return{type:c.b,payload:{data:n,id:e,position:t}}}function h(e,t){return{type:c.a,payload:{source:e,target:t}}}function y(e){return{type:c.f,payload:e}}function k(e,t){return{type:c.n,payload:{nodeId:e,nodeUpdate:t}}}function O(e,t){return{type:c.o,payload:{nodeId:e,nodeDataUpdate:t}}}function j(e){return{type:c.g,payload:e}}function x(e){return{type:c.l,payload:e}}function _(){return{type:c.d}}function I(e){return{type:c.h,payload:e}}function F(e){return{type:c.q,payload:e}}function E(e,t){return function(){var n=Object(s.a)(a.a.mark((function n(r){var s,c,u,d,p,f,m,g;return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t){n.next=9;break}return n.next=3,l.a.createWorkspace(["empty_blob"]);case 3:if(s=n.sent,c=s.status,u=s.message,d=s.workspace_id,"error"!==c){n.next=7;break}return n.abrupt("return",r(Object(o.g)(u,"error")));case 7:r(F({daemon_id:t=d}));case 9:return n.next=11,l.a.startFlow(e,t);case 11:if(p=n.sent,f=p.status,m=p.message,g=p.flow_id,i.a.log("startFlow result",p),"error"!==f){n.next=16;break}return n.abrupt("return",r(Object(o.g)(m,"error")));case 16:r(b({daemon_id:g})),r(Object(o.g)("Successfully started flow","success")),r(L(g));case 19:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}function S(e,t){return function(){var n=Object(s.a)(a.a.mark((function n(r){var s,c,u,d,p,f,b,m;return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t){n.next=10;break}return n.next=3,l.a.createWorkspace(e);case 3:if(s=n.sent,c=s.status,u=s.message,d=s.workspace_id,"error"!==c){n.next=7;break}return n.abrupt("return",r(Object(o.g)(u,"error")));case 7:t=d,n.next=17;break;case 10:return n.next=12,l.a.uploadFilesToWorkspace(t,e);case 12:if(p=n.sent,f=p.status,b=p.message,i.a.log("uploadFilesToWorkspace result",p),"error"!==f){n.next=17;break}return n.abrupt("return",r(Object(o.g)(b,"error")));case 17:return n.next=19,l.a.getWorkspace(t);case 19:if("error"!==(m=n.sent).status){n.next=22;break}return n.abrupt("return",r(Object(o.g)(m.message,"error")));case 22:r(F({files:m.workspace.arguments,daemon_id:t})),r(Object(o.g)("Successfully uploaded files to workspace","success"));case 24:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}function A(e){return function(){var t=Object(s.a)(a.a.mark((function t(n){var r,s,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.a.terminateFlow(e);case 2:if(r=t.sent,s=r.status,c=r.message,i.a.log("stopFlow result: ",r),"error"!==s){t.next=7;break}return t.abrupt("return",n(Object(o.g)(c,"error")));case 7:n(Object(o.g)(c,"success")),n(b({daemon_id:null}));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}function L(e){return function(){var t=Object(s.a)(a.a.mark((function t(n){var r,s,c,d,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.a.getFlow(e);case 2:if(r=t.sent,s=r.status,c=r.message,d=r.flow,i.a.log("got network flow:",d),"error"!==s){t.next=9;break}return t.abrupt("return",n(Object(o.g)(c,"error")));case 9:p=d.workspace_id,n(Object(u.a)(p,e));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}},94:function(e,t,n){"use strict";var r=n(175),a=n(81),s=n(6),c=n(98),o=n(126),u={example_workspace_pokedex:{jina_version:"latest",type:"example",name:"Pokedex Workspace",selectedFlowId:"example_flow_pokedex",flowArguments:o.r,isConnected:!1,daemon_endpoint:null,daemon_id:null,files:[]},example_workspace_flower:{jina_version:"latest",type:"example",name:"Flower Workspace",selectedFlowId:"example_flow_flower",flowArguments:o.r,isConnected:!1,daemon_endpoint:null,daemon_id:null,files:[]},example_workspace_southpark:{jina_version:"latest",type:"example",name:"Southpark Workspace",selectedFlowId:"example_flow_southpark",flowArguments:o.r,isConnected:!1,daemon_endpoint:null,daemon_id:null,files:[]},example_workspace_test:{jina_version:"latest",type:"example",name:"Example Workspace",selectedFlowId:"blankFlow",flowArguments:o.r,isConnected:!1,daemon_endpoint:null,daemon_id:null,files:[]}},i={example_flow_pokedex:{workspaceId:"example_workspace_pokedex",name:"Pokedex Query",yaml:"!Flow\n      with:\n        read_only: true\n        rest_api: true\n        port_expose: $JINA_PORT\n        board:\n          canvas:\n            gateway:\n              x: 250\n              y: 150\n            chunk_seg:\n              x: 250\n              y: 268\n            tf_encode:\n              x: 250\n              y: 420\n            chunk_idx:\n              x: 250\n              y: 600\n            ranker:\n              x: 250\n              y: 836\n            doc_idx:\n              x: 249\n              y: 985\n      pods:\n        gateway: {}\n        chunk_seg:\n          uses: pods/craft.yml\n          parallel: $PARALLEL\n          needs: gateway\n        tf_encode:\n          uses: pods/encode.yml\n          parallel: $PARALLEL\n          timeout_ready: 600000\n          needs: chunk_seg\n        chunk_idx:\n          uses: pods/chunk.yml\n          separated_workspace: true\n          polling: all\n          uses_reducing: _merge_all\n          timeout_ready: 100000\n          needs: tf_encode\n        ranker:\n          uses: BiMatchRanker\n          needs: chunk_idx\n        doc_idx:\n          uses: pods/doc.yml\n          needs: ranker\n      \n      "},example_flow_flower:{workspaceId:"example_workspace_flower",name:"Flower Query",yaml:"!Flow\n  with:\n    read_only: true\n    port_expose: $JINA_PORT\n    board:\n      canvas:\n        gateway:\n          x: 250\n          y: 150\n        loader:\n          x: 250\n          y: 257\n        flipper:\n          x: 252\n          y: 407\n        normalizer:\n          x: 239\n          y: 563\n        encoder:\n          x: 252\n          y: 712\n        chunk_indexer:\n          x: 250\n          y: 872\n        ranker:\n          x: 252\n          y: 1066\n        doc_indexer:\n          x: 253\n          y: 1199\n  pods:\n    gateway: {}\n    loader:\n      uses: yaml/craft-load.yml\n      read_only: true\n      needs: gateway\n    flipper:\n      uses: yaml/craft-flip.yml\n      read_only: true\n      needs: loader\n    normalizer:\n      uses: yaml/craft-normalize.yml\n      read_only: true\n      needs: flipper\n    encoder:\n      uses: $ENCODER\n      timeout_ready: 600000\n      read_only: true\n      needs: normalizer\n    chunk_indexer:\n      uses: yaml/index-chunk.yml\n      separated_workspace: true\n      polling: all\n      uses_reducing: _merge_all\n      needs: encoder\n    ranker:\n      uses: MinRanker\n      needs: chunk_indexer\n    doc_indexer:\n      uses: yaml/index-doc.yml\n      needs: ranker  \n  "},example_flow_southpark:{workspaceId:"example_workspace_southpark",name:"Southpark Query",yaml:"!Flow\nwith:\n  read_only: true\n  port_expose: $JINA_PORT\n  board:\n    canvas:\n      gateway:\n        x: 254\n        y: 147\n      splittor:\n        x: 254\n        y: 270\n      encoder:\n        x: 254\n        y: 448\n      chunk_indexer:\n        x: 251\n        y: 645\n      ranker:\n        x: 255\n        y: 862\n      doc_indexer:\n        x: 256\n        y: 1002\npods:\n  gateway: {}\n  splittor:\n    uses: pods/craft-split.yml\n    parallel: $PARALLEL\n    read_only: true\n    needs: gateway\n  encoder:\n    uses: pods/encode.yml\n    parallel: $PARALLEL\n    timeout_ready: 60000\n    read_only: true\n    needs: splittor\n  chunk_indexer:\n    uses: pods/index-chunk.yml\n    separated_workspace: true\n    polling: all\n    reducing_uses: _merge_all\n    needs: encoder\n  ranker:\n    uses: MinRanker\n    needs: chunk_indexer\n  doc_indexer:\n    uses: pods/index-doc.yml\n    needs: ranker\n"},blankFlow:{name:"Test Flow",workspaceId:"example_workspace_test",yaml:"!Flow\n    with:\n      rest_api: true\n      port_expose: 5555\n    pods:\n      pod1:\n        read_only: true\n      pod2:\n        read_only: true\n      pod3:\n        read_only: true"}},l=n(104),d=n(20),p=n(99);var f=n(105);function b(){var e={};return Object.entries(i).forEach((function(t){var n=Object(s.a)(t,2),r=n[0],c=n[1],o=Object(l.f)(c.yaml);if(null===o||void 0===o?void 0:o.data){var u=Object(l.d)(o.data);e[r]=Object(a.a)(Object(a.a)({},c),{},{type:"example",isConnected:!1,flowChart:u})}})),e}function m(){return u}var g=Object(a.a)(Object(a.a)({},function(){var e=localStorage.getItem("userWorkspaces"),t=e?JSON.parse(e):null;return Object(c.isEmpty)(t)?Object(c.cloneDeep)(o.u):t}()),m()),v=Object(a.a)(Object(a.a)({},function(){var e=localStorage.getItem("userFlows"),t=e?JSON.parse(e):null;return Object(c.isEmpty)(t)?Object(c.cloneDeep)(o.s):t}()),b()),w={selectedWorkspaceId:Object.keys(g)[0],workspaces:Object(a.a)({},g),flows:Object(a.a)({},v)};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(d.a)(),r=arguments.length>3?arguments[3]:void 0,a="Custom Flow",s=Object.values(e.flows).filter((function(e){return e.name.startsWith(a)})),c=s.map((function(e){return parseInt(e.name.substring(a.length))||0})).sort((function(e,t){return e-t})),u=c[c.length-1]||0,i=o.v;if(t){var p=Object(l.f)(t);(null===p||void 0===p?void 0:p.data)&&(i=Object(l.d)(p.data))}return e.flows[n]={isConnected:!1,name:"".concat(a," ").concat(u+1),type:"user-generated",workspaceId:r||e.selectedWorkspaceId,flowChart:i},e}var y=Object(p.a)((function(e,t){switch(t.type){case o.c:e=h(e);break;case o.i:case o.j:e=h(e,t.payload);break;case o.e:var n=t.payload;e.flows=Object(c.omit)(e.flows,n);var r=e.selectedWorkspaceId,u=e.workspaces[r].selectedFlowId,i=Object.entries(e.flows).filter((function(e){var t=Object(s.a)(e,2);t[0];return t[1].workspaceId===r}));if(u===n&&i.length){var l=i[0][0];e.workspaces[r].selectedFlowId=l}else if(!i.length){var p=Object(d.a)();h(e,void 0,p,r),e.workspaces[r].selectedFlowId=p}break;case o.p:var g=t.payload;if(e.workspaces[e.selectedWorkspaceId].selectedFlowId){var v=e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId];e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId]=Object(a.a)(Object(a.a)({},v),g)}break;case o.m:e.workspaces[e.selectedWorkspaceId].flowArguments=t.payload;break;case o.k:e.workspaces[e.selectedWorkspaceId].selectedFlowId=t.payload;break;case o.n:var w=t.payload,y=w.nodeUpdate,k=w.nodeId,O=e.workspaces[e.selectedWorkspaceId].selectedFlowId,j=e.flows[O].flowChart.elements.findIndex((function(e){return e.id===k}));if(j>=0){var x=e.flows[O].flowChart.elements[j],_=Object(a.a)(Object(a.a)({},x),y);e.flows[O].flowChart.elements[j]=_}break;case o.o:var I=t.payload,F=I.nodeDataUpdate,E=I.nodeId,S=e.workspaces[e.selectedWorkspaceId].selectedFlowId,A=e.flows[S].flowChart.elements.findIndex((function(e){return e.id===E}));if(A>=0){var L=e.flows[S].flowChart.elements[A],C=Object(a.a)(Object(a.a)({},L.data),F);e.flows[S].flowChart.elements[A].data=C}break;case o.b:var D=t.payload,W=D.data,N=D.id,T=D.position,R=Object(f.b)(N,W,T);e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements.push(R);break;case o.g:var P=t.payload,M=e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements.filter((function(e){return Object(f.e)(e)?e.id!==P:!Object(f.d)(e)||e.source!==P&&e.target!==P}));e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements=M;break;case o.a:var U=t.payload,H=U.source,B=U.target,J=Object(f.a)(H,B);e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements.push(J);break;case o.f:if(void 0!==t.payload.source){var G=t.payload,q=G.source,K=G.target;e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements=e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements.filter((function(e){return!(Object(f.d)(e)&&(e.source===q||e.target===K))}))}else{var $=t.payload;e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements=e.flows[e.workspaces[e.selectedWorkspaceId].selectedFlowId].flowChart.elements.filter((function(e){return $!==e.id}))}break;case o.l:e.selectedWorkspaceId=t.payload;break;case o.d:e=function(e){var t="Workspace",n=Object.values(e.workspaces).filter((function(e){return e.name.startsWith(t)})).map((function(e){return parseInt(e.name.substring(t.length))||0})).sort((function(e,t){return e-t})),r=n[n.length-1]||0,a=Object(d.a)(),s=Object(d.a)();return e.workspaces[a]={jina_version:o.t,flowArguments:o.r,selectedFlowId:s,name:"".concat(t," ").concat(r+1),type:"user-generated",daemon_endpoint:"",isConnected:!1,daemon_id:null,files:[]},e=h(e,void 0,s,a)}(e);break;case o.q:var z=t.payload;if(e.selectedWorkspaceId){var V=e.workspaces[e.selectedWorkspaceId];e.workspaces[e.selectedWorkspaceId]=Object(a.a)(Object(a.a)({},V),z)}break;case o.h:var Q=t.payload;e.workspaces=Object(c.omit)(e.workspaces,Q),e.flows=Object(c.pickBy)(e.flows,(function(e){return e.workspaceId!==Q}));var Y=Object.entries(e.workspaces).filter((function(e){var t=Object(s.a)(e,2);t[0];return"example"!==t[1].type}));if(e.selectedWorkspaceId===Q&&Y.length){var X=Y[0][0];e.selectedWorkspaceId=X}else Y.length||(e.workspaces=Object(a.a)(Object(a.a)({},Object(c.cloneDeep)(o.u)),m()),e.flows=Object(a.a)(Object(a.a)({},Object(c.cloneDeep)(o.s)),b()),e.selectedWorkspaceId=Object.keys(e.workspaces)[0])}!function(e){var t={};Object.entries(e).forEach((function(e){var n=Object(s.a)(e,2),r=n[0],a=n[1];"user-generated"===a.type&&(t[r]=a)})),localStorage.setItem("userFlows",JSON.stringify(t))}(e.flows),function(e){var t={};Object.entries(e).forEach((function(e){var n=Object(s.a)(e,2),r=n[0],a=n[1];"user-generated"===a.type&&(t[r]=a)})),localStorage.setItem("userWorkspaces",JSON.stringify(t))}(e.workspaces)}),w),k=n(137),O=Object(p.a)((function(e,t){switch(t.type){case k.b:e.loading=!0;break;case k.d:e.loading=!1,e.images=t.payload.images,e.error=null;break;case k.c:e.images=[],e.loading=!1,e.error=t.payload.error;break;case k.e:e.selectedFilters=Object(c.xor)(e.selectedFilters,[t.payload.filter]);break;case k.a:e.selectedFilters=e.selectedFilters.filter((function(e){return!t.payload.filters.includes(e)}))}}),k.f),j=n(242),x=n(148),_=n(88);var I=Object(p.a)((function(e,t){switch(t.type){case x.a:e.settings=Object(a.a)(Object(a.a)({},e.settings),t.payload),_.a.log("saveSettings - settings",e.settings),n=e.settings,Object.keys(n).forEach((function(e){localStorage.setItem("preferences-".concat(e),n[e])}))}var n}),x.b),F=n(111),E=Object(p.a)((function(e,t){switch(t.type){case F.b:e.logIndex=t.payload;break;case F.a:!function(){var n=t.payload;_.a.log("_handleNewLog");var r=Object(l.j)(n,e.logs.length),s=r.name,c=r.level,o=r.unixTime;e.logs.push(r);var u=e.logSources[s]?e.logSources[s]+1:1;e.logSources[s]=u;var i=e.logLevels[c]?e.logLevels[c]+1:1;e.logLevels[c]=i;var d=e.logLevelOccurrences[o]?Object(a.a)({},e.logLevelOccurrences[o]):Object(F.c)();e.logLevelOccurrences[o]=d,e.logLevelOccurrences[o].levels[c]++,e.logLevelOccurrences[o].lastLog=r.idx}()}}),F.d),S=n(141),A=Object(p.a)((function(e,t){switch(t.type){case S.d:_.a.log("handleLogConnectionStatus - status",t.payload.connected),_.a.log("handleLogConnectionStatus - message",t.payload.message),e.loading=!1,e.connected=t.payload.connected;break;case S.l:e.menuVisible=!e.menuVisible;break;case S.i:e.banners.push({message:t.payload.message,theme:t.payload.theme});break;case S.e:e.banners.shift();break;case S.j:e.banners.push({message:t.payload.message,theme:"error"});break;case S.k:e.modal=t.payload.modal,e.modalParams=t.payload.modalParams;break;case S.a:e.modal=null,e.modalParams=null;break;case F.a:e.processes[t.payload.process]=t.payload.name;break;case S.h:e.user=t.payload.user;break;case S.g:e.user=null,localStorage.removeItem("user")}}),Object(S.m)()),L=n(243),C=n(89),D={taskData:{qps:{current:"0",history:new Array(30).fill(0)},elapsed:{task_name:"No Current Task",seconds:"0s"},progress:{currentRequest:0,bar_len:0,num_bars:0},speed:{current:"0",unit:"units",history:new Array(30).fill(0)},lastUpdateChart:new Date,messages:[],bytes:[]}},W=Object(p.a)((function(e,t){switch(t.type){case"HANDLE_TASK":return function(){var n=t.payload,r=n.taskEvent,s=n.processes,c=Object(a.a)({},r),o=c.task_name,u=c.process,i=c.bar_len,d=c.num_bars,p=c.elapsed,f=c.speed,b=c.speed_unit,m=c.bytes_recv,g=c.bytes_sent,v=c.msg_recv,w=c.msg_sent,h=c.num_reqs,y=c.qps;i&&d&&(e.taskData.progress.currentRequest=h,e.taskData.progress.bar_len=i,e.taskData.progress.num_bars=d);if(v&&w){var k=e.taskData.messages.map((function(e){return e.process})).indexOf(u),O={process:u,sent:w,received:v,node:s[u]},j={process:u,sent:g,received:m,node:s[u]};k<0?(e.taskData.messages.push(O),e.taskData.bytes.push(j)):(e.taskData.messages[k]=O,e.taskData.bytes[k]=j),e.taskData.messages=e.taskData.messages.sort((function(e,t){return t.sent+t.received-(e.sent+e.received)})).slice(0,20),e.taskData.bytes=e.taskData.bytes.sort((function(e,t){return t.sent+t.received-(e.sent+e.received)})).slice(0,20)}e.taskData.lastUpdateChart=new Date,y&&(e.taskData.qps.current=parseFloat(y).toFixed(1),e.taskData.qps.history.push(parseFloat(y).toFixed(3)),e.taskData.qps.history.shift());f&&b&&(e.taskData.speed.unit=b,e.taskData.speed.current=parseFloat(f).toFixed(1),e.taskData.speed.history.push(parseFloat(f).toFixed(3)),e.taskData.speed.history.shift());p&&(e.taskData.elapsed.seconds=Object(l.e)(parseInt(p)),e.taskData.elapsed.task_name="Task: ".concat(o))}()}}),D),N=n(106),T=Object(r.combineReducers)({flowState:y,hubState:O,settingsState:I,logStreamState:E,globalState:A,taskState:W}),R=Object(r.createStore)(T,Object(j.composeWithDevTools)(Object(r.applyMiddleware)(L.a)));N.a.connect(R.getState().settingsState.settings,(function(e){var t=e.connected,n=e.message;R.dispatch(Object(C.d)(t,n))}));t.a=R}}]);