openc3-cosmos-tool-tlmgrapher 5.1.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/tlmgrapher/js/163.js +24 -0
- data/tools/tlmgrapher/js/163.js.map +1 -0
- data/tools/tlmgrapher/js/463.js +2 -0
- data/tools/tlmgrapher/js/463.js.map +1 -0
- data/tools/tlmgrapher/js/app.js +1 -1
- data/tools/tlmgrapher/js/app.js.map +1 -1
- metadata +6 -6
- data/tools/tlmgrapher/js/569.js +0 -2
- data/tools/tlmgrapher/js/569.js.map +0 -1
- data/tools/tlmgrapher/js/798.js +0 -24
- data/tools/tlmgrapher/js/798.js.map +0 -1
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3-cosmos-tool-tlmgrapher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: " This plugin adds the OpenC3 COSMOS Tlm Grapher tool\n"
|
15
15
|
email:
|
@@ -24,10 +24,10 @@ files:
|
|
24
24
|
- Rakefile
|
25
25
|
- plugin.txt
|
26
26
|
- tools/tlmgrapher/index.html
|
27
|
-
- tools/tlmgrapher/js/
|
28
|
-
- tools/tlmgrapher/js/
|
29
|
-
- tools/tlmgrapher/js/
|
30
|
-
- tools/tlmgrapher/js/
|
27
|
+
- tools/tlmgrapher/js/163.js
|
28
|
+
- tools/tlmgrapher/js/163.js.map
|
29
|
+
- tools/tlmgrapher/js/463.js
|
30
|
+
- tools/tlmgrapher/js/463.js.map
|
31
31
|
- tools/tlmgrapher/js/app.js
|
32
32
|
- tools/tlmgrapher/js/app.js.map
|
33
33
|
homepage: https://github.com/OpenC3/openc3
|
data/tools/tlmgrapher/js/569.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
(self["webpackChunk_openc3_cosmos_tool_tlmgrapher"]=self["webpackChunk_openc3_cosmos_tool_tlmgrapher"]||[]).push([[569],{9569:function(e,t,n){"use strict";function i(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",t="0d0bbf9172a8d03d7bb950d1372caf1adba13111",n=new Function("return this")(),a="__coverage__",s={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",statementMap:{0:{start:{line:1,column:13},end:{line:8,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:7,column:1566}},4:{start:{line:1,column:295},end:{line:3,column:58}},5:{start:{line:2,column:14},end:{line:2,column:35}},6:{start:{line:3,column:117},end:{line:3,column:134}},7:{start:{line:4,column:14},end:{line:4,column:33}},8:{start:{line:6,column:14},end:{line:6,column:33}},9:{start:{line:7,column:151},end:{line:7,column:798}},10:{start:{line:7,column:629},end:{line:7,column:650}},11:{start:{line:7,column:673},end:{line:7,column:695}},12:{start:{line:7,column:711},end:{line:7,column:723}},13:{start:{line:7,column:738},end:{line:7,column:762}},14:{start:{line:7,column:978},end:{line:7,column:1e3}},15:{start:{line:7,column:1212},end:{line:7,column:1234}},16:{start:{line:7,column:1500},end:{line:7,column:1526}},17:{start:{line:9,column:22},end:{line:9,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:8,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:275},end:{line:1,column:276}},loc:{start:{line:1,column:294},end:{line:3,column:59}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:352},end:{line:1,column:353}},loc:{start:{line:1,column:358},end:{line:3,column:13}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:3,column:101},end:{line:3,column:102}},loc:{start:{line:3,column:116},end:{line:3,column:135}},line:3},4:{name:"(anonymous_4)",decl:{start:{line:3,column:1283},end:{line:3,column:1284}},loc:{start:{line:3,column:1289},end:{line:5,column:13}},line:3},5:{name:"(anonymous_5)",decl:{start:{line:5,column:266},end:{line:5,column:267}},loc:{start:{line:5,column:272},end:{line:7,column:13}},line:5},6:{name:"(anonymous_6)",decl:{start:{line:7,column:135},end:{line:7,column:136}},loc:{start:{line:7,column:150},end:{line:7,column:799}},line:7},7:{name:"(anonymous_7)",decl:{start:{line:7,column:623},end:{line:7,column:624}},loc:{start:{line:7,column:629},end:{line:7,column:650}},line:7},8:{name:"(anonymous_8)",decl:{start:{line:7,column:667},end:{line:7,column:668}},loc:{start:{line:7,column:673},end:{line:7,column:695}},line:7},9:{name:"(anonymous_9)",decl:{start:{line:7,column:705},end:{line:7,column:706}},loc:{start:{line:7,column:711},end:{line:7,column:723}},line:7},10:{name:"(anonymous_10)",decl:{start:{line:7,column:732},end:{line:7,column:733}},loc:{start:{line:7,column:738},end:{line:7,column:762}},line:7},11:{name:"(anonymous_11)",decl:{start:{line:7,column:962},end:{line:7,column:963}},loc:{start:{line:7,column:977},end:{line:7,column:1001}},line:7},12:{name:"(anonymous_12)",decl:{start:{line:7,column:1196},end:{line:7,column:1197}},loc:{start:{line:7,column:1211},end:{line:7,column:1235}},line:7},13:{name:"(anonymous_13)",decl:{start:{line:7,column:1484},end:{line:7,column:1485}},loc:{start:{line:7,column:1499},end:{line:7,column:1527}},line:7}},branchMap:{0:{loc:{start:{line:7,column:808},end:{line:7,column:1041}},type:"cond-expr",locations:[{start:{line:7,column:829},end:{line:7,column:1032}},{start:{line:7,column:1033},end:{line:7,column:1041}}],line:7},1:{loc:{start:{line:7,column:1042},end:{line:7,column:1275}},type:"cond-expr",locations:[{start:{line:7,column:1063},end:{line:7,column:1266}},{start:{line:7,column:1267},end:{line:7,column:1275}}],line:7}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"0d0bbf9172a8d03d7bb950d1372caf1adba13111"},o=n[a]||(n[a]={});o[e]&&o[e].hash===t||(o[e]=s);var l=o[e];return i=function(){return l},l}n.r(t),n.d(t,{default:function(){return Me}}),i(),i().s[0]++;var a=function(){i().f[0]++;var e=(i().s[1]++,this),t=(i().s[2]++,e._self._c);return i().s[3]++,t("div",[t("top-bar",{attrs:{menus:e.menus,title:e.title}}),t("div",[t("v-snackbar",{attrs:{top:"",type:e.alertType,icon:e.alertType,timeout:5e3},scopedSlots:e._u([{key:"action",fn:function(n){var a=n.attrs;return i().f[1]++,i().s[4]++,[t("v-btn",e._b({attrs:{text:""},on:{click:function(){i().f[2]++,i().s[5]++,e.showAlert=!1}}},"v-btn",a,!1),[e._v(" Close ")])]}}]),model:{value:e.showAlert,callback:function(t){i().f[3]++,i().s[6]++,e.showAlert=t},expression:"showAlert"}},[t("v-icon",[e._v(" mdi-"+e._s(e.alertType)+" ")]),e._v(" "+e._s(e.alert)+" ")],1),t("div",{directives:[{name:"show",rawName:"v-show",value:null===this.selectedGraphId,expression:"this.selectedGraphId === null"}]},[t("v-row",{staticClass:"my-5"},[t("v-spacer"),t("span",[e._v(" Add a graph from the menu bar or select an existing graph to continue ")]),t("v-spacer")],1)],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:null!==this.selectedGraphId,expression:"this.selectedGraphId !== null"}],staticClass:"px-1",attrs:{justify:"space-between"}},[t("v-col",{attrs:{cols:"11"}},[t("target-packet-item-chooser",{attrs:{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,"initial-item-name":this.$route.params.item,"button-text":"Add Item","choose-item":""},on:{click:e.addItem}})],1),t("v-col",{attrs:{cols:"1"}},[t("v-btn",{directives:[{name:"show",rawName:"v-show",value:"pause"===e.state,expression:"state === 'pause'"}],staticClass:"pulse",attrs:{color:"primary",fab:"","data-test":"start-graph"},on:{click:function(){i().f[4]++,i().s[7]++,e.state="start"}}},[t("v-icon",{attrs:{large:""}},[e._v("mdi-play")])],1),t("v-btn",{directives:[{name:"show",rawName:"v-show",value:"start"===e.state,expression:"state === 'start'"}],attrs:{color:"primary",fab:"","data-test":"pause-graph"},on:{click:function(){i().f[5]++,i().s[8]++,e.state="pause"}}},[t("v-icon",{attrs:{large:""}},[e._v("mdi-pause")])],1)],1)],1),t("div",{staticClass:"grid"},e._l(e.graphs,(function(n){return i().f[6]++,i().s[9]++,t("div",{key:n,ref:"gridItem".concat(n),refInFor:!0,staticClass:"item",attrs:{id:"gridItem".concat(n)}},[t("div",{staticClass:"item-content"},[t("graph",{ref:"graph".concat(n),refInFor:!0,attrs:{id:n,state:e.state,"start-time":e.startTime,"selected-graph-id":e.selectedGraphId,"seconds-graphed":e.settings.secondsGraphed.value,"points-saved":e.settings.pointsSaved.value,"points-graphed":e.settings.pointsGraphed.value},on:{"close-graph":function(){return i().f[7]++,i().s[10]++,e.closeGraph(n)},"min-max-graph":function(){return i().f[8]++,i().s[11]++,e.minMaxGraph(n)},resize:function(){return i().f[9]++,i().s[12]++,e.resize()},click:function(){return i().f[10]++,i().s[13]++,e.graphSelected(n)},started:e.graphStarted}})],1)])})),0)],1),e.showOpenConfig?(i().b[0][0]++,t("open-config-dialog",{attrs:{tool:e.toolName},on:{success:e.openConfiguration},model:{value:e.showOpenConfig,callback:function(t){i().f[11]++,i().s[14]++,e.showOpenConfig=t},expression:"showOpenConfig"}})):(i().b[0][1]++,e._e()),e.showSaveConfig?(i().b[1][0]++,t("save-config-dialog",{attrs:{tool:e.toolName},on:{success:e.saveConfiguration},model:{value:e.showSaveConfig,callback:function(t){i().f[12]++,i().s[15]++,e.showSaveConfig=t},expression:"showSaveConfig"}})):(i().b[1][1]++,e._e()),t("settings-dialog",{directives:[{name:"show",rawName:"v-show",value:e.showSettingsDialog,expression:"showSettingsDialog"}],attrs:{settings:e.settings},model:{value:e.showSettingsDialog,callback:function(t){i().f[13]++,i().s[16]++,e.showSettingsDialog=t},expression:"showSettingsDialog"}})],1)},s=(i().s[17]++,[]),o=n(5789),l=n(8081),r=n(9502),c=n(615),u=(n(6728),n(9805),n(4083),n(3450),n(6710),n(8178),n(8188),n(1939),n(6259)),d=n(6964),m=n(426),h=n(7871),p=n(2261),v=(n(1372),n(1245),n(7950),n(9529),n(3675),n(4898),n(5825),n(7170),n(8857),n(8329),n(6279),n(427),n(171),n(7093),n(1159),n(2516),n(4349),n(5273),n(6729),n(1801),n(574),n(5787),n(9271),n(3160),n(5688),n(3157),n(3333),n(315),n(556),n(9224),n(7233),n(8673),n(5734),n(8233),n(1235),n(9644)),f=n.n(v),g=n(4091),A=new g["default"],_=f().create({baseURL:location.origin,timeout:6e4,params:{}});_.interceptors.response.use((function(e){return e}),(function(e){if(e.response){var t,n,i,a,s,o,l,r,c,u;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0),e.response.headers["ignore-errors"]&&e.response.headers["ignore-errors"].includes(e.response.status.toString()))return Promise.reject(e);var d="HTTP ".concat(e.response.status," - ");if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(d+="".concat(e.response.statusText," ")),null!==(n=e.response)&&void 0!==n&&null!==(i=n.config)&&void 0!==i&&i.data&&(d+="".concat(e.response.config.data," ")),null!==(a=e.response)&&void 0!==a&&null!==(s=a.data)&&void 0!==s&&s.message)d+="".concat(e.response.data.message);else if(null!==(o=e.response)&&void 0!==o&&null!==(l=o.data)&&void 0!==l&&l.exception)d+="".concat(e.response.data.exception);else if(null!==(r=e.response)&&void 0!==r&&null!==(c=r.data)&&void 0!==c&&null!==(u=c.error)&&void 0!==u&&u.message)e.response.data.error.class&&(d+="".concat(e.response.data.error.class," ")),d+="".concat(e.response.data.error.message);else{var m;d+="".concat(null===(m=e.response)||void 0===m?void 0:m.data)}throw A.$notify&&A.$notify.serious({title:"Network error",body:d}),e}throw e}));var C=_,y=function(){function e(){(0,m.Z)(this,e),(0,p.Z)(this,"id",1)}return(0,h.Z)(e,[{key:"exec",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t,n){var i,a,s,l,r=arguments;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:{},a=r.length>3&&void 0!==r[3]?r[3]:{},e.prev=2,e.next=5,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](2),OpenC3Auth.login();case 10:return this.id=this.id+1,e.prev=11,i["scope"]=window.openc3Scope,e.next=15,C.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:n,id:this.id,keyword_params:i},{headers:(0,d.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},a)});case 15:return s=e.sent,e.abrupt("return",s.data.result);case 19:throw e.prev=19,e.t1=e["catch"](11),l=new Error,e.t1.response?(l.name=e.t1.response.data.error.data.class,l.message=e.t1.response.data.error.data.message):e.t1.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l;case 24:case"end":return e.stop()}}),e,this,[[2,7],[11,19]])})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"decode_openc3_type",value:function(e){if(null!==e&&"object"===(0,u.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(e,t){return this.exec("map_target_to_interface",[e,t])}},{key:"connect_interface",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.length>0?this.exec("connect_interface",[e,n]):this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(e){return this.exec("get_tlm_cnts",[e])}},{key:"get_item",value:function(e,t,n){return this.exec("get_item",[e,t,n])}},{key:"get_parameter",value:function(e,t,n){return this.exec("get_parameter",[e,t,n])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(e,t){return this.exec("get_telemetry",[e,t])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_all_telemetry_names",value:function(e){return this.exec("get_all_telemetry_names",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t,n,i){var a,s,l,r,c,u=arguments;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=u.length>3&&void 0!==u[3]?u[3]:30,e.next=3,this.exec("get_tlm_packet",[t,n],{type:i,stale_time:a});case 3:if(s=e.sent,null!=s)for(l=s.length,r=null,c=0;c<l;c++)r=this.decode_openc3_type(s[c][1]),null!==r&&(s[c][1]=r);return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n,i){return e.apply(this,arguments)}return t}()},{key:"get_packet_derived_items",value:function(e,t){return this.exec("get_packet_derived_items",[e,t])}},{key:"get_tlm_buffer",value:function(e,t){return this.exec("get_tlm_buffer",[e,t])}},{key:"get_tlm_values",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t){var n,i,a,s,l,r=arguments;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:30,e.next=3,this.exec("get_tlm_values",[t],{stale_time:n});case 3:for(i=e.sent,a=i[0].length,s=null,l=0;l<a;l++)s=this.decode_openc3_type(i[0][l]),null!==s&&(i[0][l]=s);return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"get_limits",value:function(e,t,n){return this.exec("get_limits",[e,t,n])}},{key:"tlm",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t,n,i){var a,s,l,r,c=arguments;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=c.length>3&&void 0!==c[3]?c[3]:"CONVERTED",s=null,void 0!==n){e.next=8;break}return e.next=5,this.exec("tlm",[t]);case 5:s=e.sent,e.next=24;break;case 8:if(void 0!==i){e.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n)){e.next=15;break}return e.next=12,this.exec("tlm",[t],{type:n});case 12:s=e.sent,e.next=19;break;case 15:throw l=new Error,l.name="TypeError",l.message="Invalid data type ".concat(n,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),l;case 19:e.next=24;break;case 21:return e.next=23,this.exec("tlm",[t,n,i],{type:a});case 23:s=e.sent;case 24:return r=this.decode_openc3_type(s),null!==r&&(s=r),e.abrupt("return",s);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,i){return e.apply(this,arguments)}return t}()},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_all_command_names",value:function(e){return this.exec("get_all_command_names",[e])}},{key:"get_command",value:function(e,t){return this.exec("get_command",[e,t])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,t,n,i])}},{key:"get_cmd_buffer",value:function(e,t){return this.exec("get_cmd_buffer",[e,t])}},{key:"_cmd",value:function(e,t,n,i,a){var s=null;for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(s=this.encode_openc3_type(i[o]),null!==s&&(i[o]=s));return this.exec(e,[t,n,i],{},a)}},{key:"get_cmd_hazardous",value:function(e,t,n){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,n)}},{key:"cmd",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===t?this.exec("cmd",e,{},i):this._cmd("cmd",e,t,n,i)}},{key:"cmd_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,n)}},{key:"cmd_raw",value:function(e,t,n){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,n)}},{key:"cmd_raw_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,n)}},{key:"cmd_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,n)}},{key:"cmd_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,n)}},{key:"cmd_raw_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,n)}},{key:"cmd_raw_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,n)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,t){return this.exec("send_raw",[e,t])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,t){return this.exec("load_config",[e,t])}},{key:"save_config",value:function(e,t,n){return this.exec("save_config",[e,t,n])}},{key:"delete_config",value:function(e,t){return this.exec("delete_config",[e,t])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,t){return this.exec("save_setting",[e,t])}},{key:"hashString",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t){var n,i,a;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return n=(new TextEncoder).encode(t),e.next=4,crypto.subtle.digest("SHA-256",n);case 4:return i=e.sent,a=new Uint8Array(i),e.abrupt("return",Array.from(a).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}(),b=function(){var e=this,t=e._self._c;return t("div",[t("v-card",{nativeOn:{click:function(t){return e.$emit("click")}}},[t("v-system-bar",{directives:[{name:"show",rawName:"v-show",value:!e.hideSystemBar,expression:"!hideSystemBar"}],class:e.selectedGraphId===e.id?"active":"inactive"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.errors.length,expression:"errors.length !== 0"}],staticClass:"mx-2"},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{attrs:{"data-test":"error-graph-icon"},on:{click:function(t){e.errorDialog=!0}}},[e._v("mdi-alert")])],1)]}}])},[t("span",[e._v("Errors")])])],1),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{attrs:{"data-test":"edit-graph-icon"},on:{click:function(t){e.editGraph=!0}}},[e._v(" mdi-pencil ")])],1)]}}])},[t("span",[e._v(" Edit ")])]),t("v-spacer"),t("span",[e._v(e._s(e.title))]),t("v-spacer"),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.calcFullSize,expression:"calcFullSize"}],attrs:{"data-test":"collapse-all"},on:{click:e.collapseAll}},[e._v(" mdi-arrow-collapse ")]),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.calcFullSize,expression:"!calcFullSize"}],attrs:{"data-test":"expand-all"},on:{click:e.expandAll}},[e._v(" mdi-arrow-expand ")])],1)]}}])},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.calcFullSize,expression:"calcFullSize"}]},[e._v(" Collapse ")]),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.calcFullSize,expression:"!calcFullSize"}]},[e._v(" Expand ")])])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.fullWidth,expression:"fullWidth"}],attrs:{"data-test":"collapse-width"},on:{click:e.collapseWidth}},[e._v(" mdi-arrow-collapse-horizontal ")]),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.fullWidth,expression:"!fullWidth"}],attrs:{"data-test":"expand-width"},on:{click:e.expandWidth}},[e._v(" mdi-arrow-expand-horizontal ")])],1)]}}])},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.fullWidth,expression:"fullWidth"}]},[e._v(" Collapse Width ")]),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.fullWidth,expression:"!fullWidth"}]},[e._v(" Expand Width ")])])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.fullHeight,expression:"fullHeight"}],attrs:{"data-test":"collapse-height"},on:{click:e.collapseHeight}},[e._v(" mdi-arrow-collapse-vertical ")]),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.fullHeight,expression:"!fullHeight"}],attrs:{"data-test":"expand-height"},on:{click:e.expandHeight}},[e._v(" mdi-arrow-expand-vertical ")])],1)]}}])},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.fullHeight,expression:"fullHeight"}]},[e._v(" Collapse Height ")]),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.fullHeight,expression:"!fullHeight"}]},[e._v(" Expand Height ")])])],1),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}],attrs:{"data-test":"minimize-screen-icon"},on:{click:e.minMaxTransition}},[e._v(" mdi-window-minimize ")]),t("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.expand,expression:"!expand"}],attrs:{"data-test":"maximize-screen-icon"},on:{click:e.minMaxTransition}},[e._v(" mdi-window-maximize ")])],1)]}}])},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}]},[e._v(" Minimize ")]),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.expand,expression:"!expand"}]},[e._v(" Maximize ")])]),t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({},"div",a,!1),i),[t("v-icon",{attrs:{"data-test":"close-graph-icon"},on:{click:function(t){return e.$emit("close-graph")}}},[e._v(" mdi-close-box ")])],1)]}}])},[t("span",[e._v(" Close ")])])],1),t("v-expand-transition",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.expand,expression:"expand"}],ref:"chart",staticClass:"pa-1",attrs:{id:"chart"}},[t("div",{attrs:{id:"chart".concat(e.id)}}),t("div",{attrs:{id:"betweenCharts"}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showOverview,expression:"showOverview"}],attrs:{id:"overview".concat(e.id)}})])])],1),t("v-dialog",{attrs:{"max-width":"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("input")},input:function(t){return e.editGraphClose()}},model:{value:e.editGraph,callback:function(t){e.editGraph=t},expression:"editGraph"}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Edit Graph")]),t("v-spacer")],1),t("v-card",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"pb-2",attrs:{label:"Title","hide-details":"","data-test":"edit-graph-title"},model:{value:e.title,callback:function(t){e.title=t},expression:"title"}})],1),t("v-card-text",{staticClass:"pa-0"},[e._v(" Select a start date/time for the graph. Leave blank for start now. ")]),t("date-time-chooser",{attrs:{required:!1,"date-label":"Start Date","time-label":"Start Time"},on:{"date-time":function(t){e.graphStartDateTime=t}}}),t("v-card-text",{staticClass:"pa-0"},[e._v(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ")]),t("date-time-chooser",{attrs:{"date-label":"End Date","time-label":"End Time"},on:{"date-time":function(t){e.graphEndDateTime=t}}}),t("v-row",{attrs:{dense:""}},[t("v-select",{attrs:{label:"Legend Position",items:e.legendPositions,"data-test":"edit-legend-position"},model:{value:e.legendPosition,callback:function(t){e.legendPosition=t},expression:"legendPosition"}})],1),t("v-card-text",{staticClass:"pa-0"},[e._v(" Optional Y axis settings. ")]),t("v-row",{attrs:{dense:""}},[t("v-col",{staticClass:"px-2"},[t("v-text-field",{attrs:{"hide-details":"",label:"Min Y",type:"number","data-test":"graph-min-y"},model:{value:e.graphMinY,callback:function(t){e.graphMinY=t},expression:"graphMinY"}})],1),t("v-col",{staticClass:"px-2"},[t("v-text-field",{attrs:{"hide-details":"",label:"Max Y",type:"number","data-test":"graph-max-y"},model:{value:e.graphMaxY,callback:function(t){e.graphMaxY=t},expression:"graphMaxY"}})],1)],1),t("v-data-table",{staticClass:"elevation-1 my-2",attrs:{"item-key":"itemId",headers:e.itemHeaders,items:e.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},scopedSlots:e._u([{key:"item.actions",fn:function(n){var i=n.item;return[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var a=n.on,s=n.attrs;return[t("div",e._g(e._b({},"div",s,!1),a),[t("v-btn",{attrs:{icon:"","data-test":"delete-item-icon".concat(i.itemId)},on:{click:function(){return e.removeItems([i])}}},[t("v-icon",[e._v("mdi-delete")])],1)],1)]}}],null,!0)},[t("span",[e._v("Remove")])])]}},{key:"no-data",fn:function(){return[t("span",[e._v("Currently no items on this graph")])]},proxy:!0}])}),t("v-card-actions",[t("v-btn",{attrs:{color:"primary"},on:{click:function(t){return e.editGraphClose()}}},[e._v(" Ok ")])],1)],1)],1),t("v-dialog",{attrs:{"max-width":"600"},model:{value:e.errorDialog,callback:function(t){e.errorDialog=t},expression:"errorDialog"}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Errors")]),t("v-spacer")],1),t("v-card",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"pb-2",attrs:{readonly:"","hide-details":"",label:"Graph Title"},model:{value:e.title,callback:function(t){e.title=t},expression:"title"}})],1),t("v-row",{staticClass:"my-3"},[t("v-textarea",{attrs:{readonly:"",rows:"8",value:e.error}})],1),t("v-row",[t("v-btn",{attrs:{block:""},on:{click:e.clearErrors}},[e._v(" Clear ")])],1)],1)],1),e.editGraphMenu?t("v-menu",{attrs:{"position-x":e.editGraphMenuX,"position-y":e.editGraphMenuY,absolute:"","offset-y":""},model:{value:e.editGraphMenu,callback:function(t){e.editGraphMenu=t},expression:"editGraphMenu"}},[t("v-list",[t("v-list-item",{on:{click:function(t){e.editGraph=!0}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v(" Edit "+e._s(e.title)+" ")])],1)],1)],1):e._e(),e.editItem?t("v-dialog",{attrs:{"max-width":"600"},on:{keydown:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;e.editItem=!1}},model:{value:e.editItem,callback:function(t){e.editItem=t},expression:"editItem"}},[t("v-card",{staticClass:"pa-3"},[t("v-card-title",{staticClass:"headline"},[e._v("Edit Item")]),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Value Type",items:e.valueTypes},model:{value:e.currentType,callback:function(t){e.currentType=t},expression:"currentType"}}),t("v-select",{attrs:{outlined:"","hide-details":"",label:"Color",items:e.colors},on:{change:function(t){return e.changeColor(t)}},model:{value:e.selectedItem.color,callback:function(t){e.$set(e.selectedItem,"color",t)},expression:"selectedItem.color"}}),t("v-card-actions",[t("v-btn",{attrs:{color:"primary"},on:{click:function(t){return e.closeEditItem()}}},[e._v("Ok")])],1)],1)],1):e._e(),e.itemMenu?t("v-menu",{attrs:{"position-x":e.itemMenuX,"position-y":e.itemMenuY,absolute:"","offset-y":""},model:{value:e.itemMenu,callback:function(t){e.itemMenu=t},expression:"itemMenu"}},[t("v-list",[t("v-list-item",{on:{click:function(t){return e.openEditItem()}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v(" Edit "+e._s(e.selectedItem.itemName)+" ")])],1),t("v-list-item",{on:{click:function(t){return e.removeItems([e.selectedItem])}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v(" Delete "+e._s(e.selectedItem.itemName)+" ")])],1)],1)],1):e._e(),e.legendMenu?t("v-menu",{attrs:{"position-x":e.legendMenuX,"position-y":e.legendMenuY,absolute:"","offset-y":""},model:{value:e.legendMenu,callback:function(t){e.legendMenu=t},expression:"legendMenu"}},[t("v-list",[t("v-list-item",{on:{click:function(t){return e.moveLegend("top")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Top")])],1),t("v-list-item",{on:{click:function(t){return e.moveLegend("bottom")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Bottom")])],1),t("v-list-item",{on:{click:function(t){return e.moveLegend("left")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend Left")])],1),t("v-list-item",{on:{click:function(t){return e.moveLegend("right")}}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"}},[e._v("Legend RIght")])],1)],1)],1):e._e()],1)},w=[],x=n(7302),k=(n(6886),n(3108),n(2501),n(3489),n(1951),n(5883),function(){var e=this,t=e._self._c;return t("div",[t("v-row",[t("v-col",[t("v-menu",{attrs:{"close-on-content-click":"",transition:"scale-transition","offset-y":"","max-width":"290px","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on;return[t("v-text-field",e._g({attrs:{label:e.dateLabel,name:"date".concat(Date.now()),rules:e.dateRules,type:"date","data-test":"date-chooser"},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}},i))]}}])})],1),t("v-col",[t("v-text-field",{attrs:{label:e.timeLabel,name:"time".concat(Date.now()),rules:e.timeRules,type:"time",step:"1","data-test":"time-chooser"},on:{change:e.onChange},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1)],1)],1)}),N=[],S=n(1200),I=n(247),T={props:{required:{type:Boolean,default:!0},initialDate:{type:Date,default:null},initialTime:{type:Date,default:null},dateLabel:{type:String,default:"Date"},timeLabel:{type:String,default:"Time"}},data:function(){return{date:null,time:null,rules:{required:function(e){return!!e||"Required"},date:function(e){if(!e)return!0;try{return(0,S.Z)((0,I.Z)(e,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch(t){return"Invalid date (YYYY-MM-DD)"}},time:function(e){if(!e)return!0;try{return(0,S.Z)((0,I.Z)(e,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch(t){return"Invalid time (HH:MM:SS)"}}}}},computed:{dateRules:function(){var e=[this.rules.date];return(this.time||this.required)&&e.push(this.rules.required),e},timeRules:function(){var e=[this.rules.time];return(this.date||this.required)&&e.push(this.rules.required),e}},methods:{onChange:function(){this.date&&this.time?this.$emit("date-time",this.date+" "+this.time):this.$emit("date-time",null)}}},M=T,G=n(3287),D=(0,G.Z)(M,k,N,!1,null,null,null),O=D.exports,E=n(5685),L=n(6522),z=n.n(L),R=n(3053),P=n(6700),$=n(7146);$.ju.staleThreshold=60;var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,m.Z)(this,e),this._cable=$.zD(t)}return(0,h.Z)(e,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){return n._cable.subscriptions.create((0,d.Z)({channel:e,scope:t,token:localStorage.openc3Token},a),i)}))}}]),e}();n(6461);var H={components:{DateTimeChooser:O},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},hideSystemBar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number}},data:function(){return{itemHeaders:[{text:"Target Name",value:"targetName"},{text:"Packet Name",value:"packetName"},{text:"Item Name",value:"itemName"},{text:"Actions",value:"actions",sortable:!1}],valueTypes:["CONVERTED","RAW"],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",legendPositions:["top","bottom","left","right"],selectedItem:null,showOverview:!this.hideOverview,currentType:null,title:"",overview:null,data:[[]],graphMinY:"",graphMaxY:"",graphStartDateTime:this.startTime,graphEndDateTime:null,indexes:{},items:this.initialItems||[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new Z,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["cornflowerblue","red","lime","darkorange","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},editItems:function(){if(!this.items)return[];var e=0;return this.items.map((function(t){return e+=1,(0,d.Z)((0,d.Z)({},t),{},{itemId:e})}))},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created:function(){this.title="Graph ".concat(this.id);var e,t=(0,l.Z)(this.items.entries());try{for(t.s();!(e=t.n()).done;){var n=(0,x.Z)(e.value,2),i=n[0],a=n[1];this.data.push([]),this.indexes[this.subscriptionKey(a)]=i+1,void 0===a.color&&(a.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)}}catch(s){t.e(s)}finally{t.f()}},mounted:function(){var e=this,t=this.items.reduce((function(t,n){var i={spanGaps:!0};return t.chartSeries.push((0,d.Z)((0,d.Z)({},i),{},{item:n,label:n.itemName,stroke:function(t,n){return e.items[n-1].color},value:function(e,t){return"string"===typeof t||isNaN(t)?"NaN":null==t?"--":t.toFixed(2)}})),t.overviewSeries.push((0,d.Z)({},i)),t}),{chartSeries:[],overviewSeries:[]}),n=t.chartSeries,i=t.overviewSeries,a={};if(this.sparkline)this.hideSystemBar=!0,this.hideOverview=!0,this.showOverview=!1,a={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new E.Z(a,this.data,document.getElementById("chart".concat(this.id)));else{a=(0,d.Z)((0,d.Z)((0,d.Z)((0,d.Z)({},this.getSize("chart")),this.getScales()),this.getAxes("chart")),{},{series:[{label:"Time",value:function(e,t){return null==t?"--":(0,R.Z)((0,P.Z)(1e3*t),"yyyy-MM-dd HH:mm:ss")}}].concat((0,c.Z)(n)),cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"}},hooks:{setScale:[function(t,n){if("x"==n&&!e.zoomOverview&&e.overview){e.zoomChart=!0;var i=Math.round(e.overview.valToPos(t.scales.x.min,"x")),a=Math.round(e.overview.valToPos(t.scales.x.max,"x"));e.overview.setSelect({left:i,width:a-i}),e.zoomChart=!1}}],ready:[function(t){var n=t.root.querySelector(".u-over");n.addEventListener("contextmenu",(function(t){t.preventDefault(),e.itemMenu=!1,e.legendMenu=!1,e.editGraphMenuX=t.clientX,e.editGraphMenuY=t.clientY,e.editGraphMenu=!0})),n.addEventListener("mouseenter",(function(t){e.$emit("resize")})),n.addEventListener("mouseleave",(function(t){e.$emit("resize")}));var i=t.root.querySelector(".u-legend");i.addEventListener("contextmenu",(function(n){n.preventDefault(),e.editGraphMenu=!1,e.legendMenu=!1,e.itemMenuX=n.clientX,e.itemMenuY=n.clientY;var a=n.target.closest(".u-series"),s=Array.prototype.slice.call(i.childNodes).indexOf(a),o=t.series[s];o.item?(e.selectedItem=o.item,e.itemMenu=!0):(e.itemMenu=!1,e.legendMenuX=n.clientX,e.legendMenuY=n.clientY,e.legendMenu=!0)}))}]}}),this.graph=new E.Z(a,this.data,document.getElementById("chart".concat(this.id)));var s=(0,d.Z)((0,d.Z)((0,d.Z)((0,d.Z)({},this.getSize("overview")),this.getScales()),this.getAxes("overview")),{},{series:(0,c.Z)(i),cursor:{y:!1,points:{show:!1},drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[function(t){if(!e.zoomChart){e.zoomOverview=!0;var n=t.posToVal(t.select.left,"x"),i=t.posToVal(t.select.left+t.select.width,"x");e.graph.setScale("x",{min:n,max:i}),e.zoomOverview=!1}}]}});this.overview=new E.Z(s,this.data,document.getElementById("overview".concat(this.id))),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.handleResize)}"stop"!==this.state&&this.subscribe()},beforeDestroy:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect(),window.removeEventListener("resize",this.handleResize)},watch:{state:function(e,t){switch(e){case"start":"stop"===t&&this.subscribe();break;case"stop":this.subscription.unsubscribe(),this.subscription=null;break}},data:function(e,t){if("pause"!==this.state){this.graph.setData(e),this.overview&&this.overview.setData(e);var n=e[0][e[0].length-1],i=e[0][e[0].length-this.pointsGraphed],a=e[0][0];a<n-this.secondsGraphed&&(a=n-this.secondsGraphed),i>a&&(a=i),this.graph.setScale("x",{min:a,max:n})}},graphMinY:function(e,t){var n=parseFloat(e);isNaN(n)||(this.graphMinY=n),this.setGraphRange()},graphMaxY:function(e,t){var n=parseFloat(e);isNaN(n)||(this.graphMaxY=n),this.setGraphRange()},graphStartDateTime:function(e){this.needToUpdate=!0,e&&"string"===typeof e&&(this.graphStartDateTime=1e6*new Date(this.graphStartDateTime).getTime())},graphEndDateTime:function(e){this.needToUpdate=!0,e&&"string"===typeof e&&(this.graphEndDateTime=1e6*new Date(this.graphEndDateTime).getTime())}},methods:{moveLegend:function(e){switch(e){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=e,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(){this.editGraph=!1,this.needToUpdate&&(this.removeItemsFromSubscription(),this.addItemsToSubscription(),this.needToUpdate=!1),this.moveLegend(this.legendPosition)},handleResize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview"))},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){var e=this,t=.1;(this.graphMinY||0===this.graphMinY||this.graphMaxY||0===this.graphMaxY)&&(t=0),this.graph.scales.y.range=function(n,i,a){var s=i;(e.graphMinY||0===e.graphMinY)&&(s=e.graphMinY);var o=a;return(e.graphMaxY||0===e.graphMaxY)&&(o=e.graphMaxY),E.Z.rangeNum(s,o,t,!0)}},subscribe:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:function(t){return e.received(t)},connected:function(){e.addItemsToSubscription(e.items,t)},disconnected:function(){e.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:(new Date).getTime()})},rejected:function(){e.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:(new Date).getTime()})}}).then((function(t){e.subscription=t}))},getSize:function(e){var t=document.getElementById("openc3-nav-drawer"),n=t.classList.contains("v-navigation-drawer--open")?t.clientWidth:0,i=0;if("right"===this.legendPosition||"left"===this.legendPosition){var a=document.getElementsByClassName("u-legend")[0];i=a.clientWidth}var s=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-n-i,o=Math.max(document.documentElement.clientHeight,window.innerHeight||0),l=document.getElementsByClassName("c-chooser")[0],r=100;"overview"===e?this.fullHeight&&!this.hideOverview&&(this.showOverview=!0):l&&(r=o-l.clientHeight-r-190,this.fullHeight||(r=r/2+10));var c=s-60;return this.fullWidth||(c=c/2-10),{width:this.width||c,height:this.height||r}},getScales:function(){return{scales:{x:{range:function(e,t,n){return null==t?[1566453600,1566497660]:[t,n]}},y:{range:function(e,t,n){return null==t?[-100,100]:E.Z.rangeNum(t,n,.1,!0)}}}}},getAxes:function(e){var t="rgba(0, 0, 0, .1)",n="black";return this.$vuetify.theme.dark&&(t="rgba(255, 255, 255, .1)",n="white"),{axes:[{stroke:n,grid:{show:!0,stroke:t,width:2}},{size:70,stroke:n,grid:{show:"overview"!==e,stroke:t,width:2}}]}},openEditItem:function(){this.currentType=this.selectedItem.valueType,this.editItem=!0},closeEditItem:function(){this.editItem=!1,this.selectedItem.valueType!==this.currentType&&this.changeType()},changeColor:function(e){var t=this.subscriptionKey(this.selectedItem),n=this.indexes[t];this.items[n-1].color=e,this.graph.root.querySelectorAll(".u-marker")[n].style.borderColor=e},changeType:function(){this.removeItems([this.selectedItem]),this.selectedItem.valueType=this.currentType,this.addItems([this.selectedItem])},addItems:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CONVERTED",a=(0,l.Z)(e);try{for(a.s();!(t=a.n()).done;){var s=t.value;s.valueType||(s.valueType=i),void 0===s.color&&(s.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0),this.items.push(s);var o=this.data.length;this.graph.addSeries({spanGaps:!0,item:s,label:s.itemName,stroke:function(e,t){return n.items[t-1].color},value:function(e,t){return"string"===typeof t||isNaN(t)?"NaN":null===t?"--":t.toFixed(2)}},o),this.overview&&this.overview.addSeries({spanGaps:!0,stroke:function(e,t){return n.items[t-1].color}},o);var r=Array(this.data[0].length);this.data.splice(o,0,r),this.indexes[this.subscriptionKey(s)]=o}}catch(c){a.e(c)}finally{a.f()}this.addItemsToSubscription(e)},addItemsToSubscription:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.graphEndDateTime;this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){e.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(e.subscriptionKey),start_time:e.graphStartDateTime,end_time:n})}))},removeItems:function(e){this.removeItemsFromSubscription(e);var t,n=(0,l.Z)(e.map(this.subscriptionKey));try{for(n.s();!(t=n.n()).done;){var i=t.value,a=this.reorderIndexes(i);this.colors.unshift(this.graph.series[a].stroke),this.items.splice(a-1,1),this.data.splice(a,1),this.graph.delSeries(a),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(a),this.overview.setData(this.data))}}catch(s){n.e(s)}finally{n.f()}},removeItemsFromSubscription:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items;this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,items:e.map(this.subscriptionKey)})},reorderIndexes:function(e){var t=this.indexes[e];for(var n in delete this.indexes[e],this.indexes)this.indexes[n]>t&&(this.indexes[n]-=1);return t},received:function(e){for(var t=JSON.parse(e),n=0;n<t.length;n++){var i=t[n].__time/1e9,a=t[0].length;if(0==a||i>t[0][a-1]){for(var s=0;s<this.data.length;s++)this.data[s].push(null);this.set_data_at_index(this.data[0].length-1,i,t[n])}else{var o=z()(this.data[0],i,this.bs_comparator);if(o>=0)this.set_data_at_index(o,i,t[n]);else{for(var l=-o-1,r=0;r<this.data.length;r++)this.data[r].splice(l,0,null);this.set_data_at_index(l,i,t[n])}}}null===this.startTime&&(this.graphStartDateTime=1e9*this.data[0][0],this.$emit("started",this.graphStartDateTime))},bs_comparator:function(e,t){return e-t},set_data_at_index:function(e,t,n){this.data[0][e]=t;for(var i=0,a=Object.entries(n);i<a.length;i++){var s=(0,x.Z)(a[i],2),o=s[0],r=s[1];if("time"!=o){var c=this.indexes[o];if(c){var u=this.data[c];if(r.raw)u[e]=null;else if("string"===typeof r){if(u[e]=null,!o.includes("__RAW")){var d,m=(0,l.Z)(this.items);try{for(m.s();!(d=m.n()).done;){var h=d.value;if(this.subscriptionKey(h)===o){this.selectedItem=h;break}}}catch(p){m.e(p)}finally{m.f()}this.currentType="RAW",this.changeType()}}else u[e]=r}}}},subscriptionKey:function(e){return"DECOM__TLM__".concat(e.targetName,"__").concat(e.packetName,"__").concat(e.itemName,"__").concat(e.valueType)}}},Y=H,F=(n(654),n(8862),(0,G.Z)(Y,b,w,!1,null,"380bc4e2",null)),W=F.exports,U=(n(4908),function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Open Configuration")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,t){return t.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(n){var i=n.item;return[t("v-btn",{staticClass:"mt-1",attrs:{"data-test":"item-delete",icon:""},on:{click:function(t){return e.deleteConfig(i)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})]),t("v-row",[t("v-btn",{attrs:{type:"submit",color:"success","data-test":"open-config-submit-btn",disabled:!!e.error},on:{click:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")]),t("v-spacer"),t("v-btn",{attrs:{color:"primary","data-test":"open-config-cancel-btn"},on:{click:e.cancel}},[e._v(" Cancel ")])],1)],1)])],1)])],1)}),B=[],X={props:{tool:String,value:Boolean},data:function(){return{configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.selectedItem||null===this.selectedItem?"Must select a config":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,t=-1;(new y).list_configs(this.tool).then((function(n){e.configs=n.map((function(e){return t+=1,{configId:t,config:e}}))})).catch((function(t){e.$emit("warning","Failed to connect to OpenC3. ".concat(t))}))},methods:{itemSelected:function(e){e.value?this.selectedItem=e.item:this.selectedItem=null},success:function(){this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedItem=null},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null},deleteConfig:function(e){var t=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(n){t.selectedItem.config===e.config&&(t.selectedItem=null),t.configs.splice(t.configs.indexOf(e),1),(new y).delete_config(t.tool,e.config)})).catch((function(n){n&&t.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(n))}))}}},q=X,j=(0,G.Z)(q,U,B,!1,null,"88421d46",null),V=j.exports,K=function(){var e=this,t=e._self._c;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("Save Configuration")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t("v-data-table",{attrs:{"show-select":"","single-select":"","item-key":"configId",search:e.search,headers:e.headers,items:e.configs,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},on:{"item-selected":e.itemSelected,"click:row":function(e,t){return t.select(e)}},scopedSlots:e._u([{key:"item.actions",fn:function(n){var i=n.item;return[t("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(t){return e.deleteConfig(i)}}},[t("v-icon",[e._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{attrs:{"hide-details":"",autofocus:"",disabled:!!e.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},model:{value:e.configName,callback:function(t){e.configName=t},expression:"configName"}})],1),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"ma-2 red--text",domProps:{textContent:e._s(e.error)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:""},on:{click:e.cancel}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"save-config-submit-btn",disabled:!!e.error},on:{click:function(t){return t.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)])],1)},J=[],Q={props:{tool:String,value:Boolean},data:function(){return{configName:"",configs:[],headers:[{text:"Configuration",value:"config"},{text:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedItem:null}},computed:{error:function(){return""===this.configName?"Config must have a name":null},show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},mounted:function(){var e=this,t=-1;(new y).list_configs(this.tool).then((function(n){e.configs=n.map((function(e){return t+=1,{configId:t,config:e}}))})).catch((function(t){e.$emit("warning","Failed to connect to OpenC3. ".concat(t))}))},methods:{itemSelected:function(e){e.value?(this.selectedItem=e.item,this.configName=e.item.config):(this.selectedItem=null,this.configName="")},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedItem=null,this.configName=""},deleteConfig:function(e){var t=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(n){t.configName===e.config&&(t.selectedItem=null,t.configName=""),t.configs.splice(t.configs.indexOf(e.config),1),(new y).delete_config(t.tool,e.config)})).catch((function(n){n&&t.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(n))}))}}},ee=Q,te=(0,G.Z)(ee,K,J,!1,null,null,null),ne=te.exports,ie=(n(4115),n(634),function(){var e=this,t=e._self._c;return t("v-container",{staticClass:"c-chooser px-0"},[t("v-row",[t("v-col",{attrs:{cols:e.colSize,"data-test":"select-target"}},[t("v-autocomplete",{attrs:{label:"Select Target","hide-details":"",dense:"",items:e.targetNames,"item-text":"label","item-value":"value"},on:{change:e.targetNameChanged},model:{value:e.selectedTargetName,callback:function(t){e.selectedTargetName=t},expression:"selectedTargetName"}})],1),t("v-col",{attrs:{cols:e.colSize,"data-test":"select-packet"}},[t("v-autocomplete",{attrs:{label:"Select Packet","hide-details":"",dense:"",disabled:e.packetsDisabled||e.buttonDisabled,items:e.packetNames,"item-text":"label","item-value":"value"},on:{change:e.packetNameChanged},model:{value:e.selectedPacketName,callback:function(t){e.selectedPacketName=t},expression:"selectedPacketName"}})],1),e.chooseItem&&!e.buttonDisabled?t("v-col",{attrs:{cols:e.colSize,"data-test":"select-item"}},[t("v-autocomplete",{attrs:{label:"Select Item","hide-details":"",dense:"",disabled:e.itemsDisabled||e.buttonDisabled,items:e.itemNames,"item-text":"label","item-value":"value"},on:{change:function(t){return e.itemNameChanged(t)}},model:{value:e.selectedItemName,callback:function(t){e.selectedItemName=t},expression:"selectedItemName"}})],1):e._e(),e.buttonText?t("v-col",{attrs:{cols:e.colSize}},[t("v-btn",{attrs:{disabled:e.buttonDisabled,block:"",color:"primary","data-test":"select-send"},on:{click:e.buttonPressed}},[e._v(" "+e._s(e.actualButtonText)+" ")])],1):e._e()],1),t("v-row",{attrs:{"no-gutters":""}},[e.hazardous?t("v-col",{staticClass:"openc3-yellow",attrs:{cols:e.colSize}},[e._v(" Description: "+e._s(e.description)+" (HAZARDOUS) ")]):t("v-col",{attrs:{cols:e.colSize}},[e._v(" Description: "+e._s(e.description)+" ")])],1)],1)}),ae=[],se=(n(9228),{props:{allowAll:{type:Boolean,default:!1},allowAllTargets:{type:Boolean,default:!1},buttonText:{type:String,default:null},chooseItem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},initialTargetName:{type:String,default:""},initialPacketName:{type:String,default:""},initialItemName:{type:String,default:""},mode:{type:String,default:"tlm",validator:function(e){return["cmd","tlm"].includes(e)}},reduced:{type:String,default:"DECOM",validator:function(e){return["REDUCED_DAY","REDUCED_HOUR","REDUCED_MINUTE","DECOM"].includes(e)}},unknown:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},data:function(){var e,t,n;return{targetNames:[],packetNames:[],itemNames:[],selectedTargetName:null===(e=this.initialTargetName)||void 0===e?void 0:e.toUpperCase(),selectedPacketName:null===(t=this.initialPacketName)||void 0===t?void 0:t.toUpperCase(),selectedItemName:null===(n=this.initialItemName)||void 0===n?void 0:n.toUpperCase(),description:"",hazardous:!1,internalDisabled:!1,packetsDisabled:!1,itemsDisabled:!1,api:null,ALL:{label:"[ ALL ]",value:"ALL",description:"ALL"},UNKNOWN:{label:"[ UNKNOWN ]",value:"UNKNOWN",description:"UNKNOWN"}}},created:function(){var e=this;this.internalDisabled=!0,this.api=new y,this.api.get_target_list().then((function(t){e.targetNames=t.map((function(e){return{label:e,value:e}})),e.allowAllTargets&&e.targetNames.unshift(e.ALL),e.selectedTargetName||(e.selectedTargetName=e.targetNames[0].value,e.targetNameChanged(e.selectedTargetName)),e.updatePackets(),e.unknown&&e.targetNames.push(e.UNKNOWN)}))},computed:{actualButtonText:function(){return"ALL"===this.selectedPacketName?"Add Target":"ALL"===this.selectedItemName?"Add Packet":this.buttonText},buttonDisabled:function(){return this.disabled||this.internalDisabled},targetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"49%",float:"left"}},packetChooserStyle:function(){return this.chooseItem||this.buttonText?{width:"25%",float:"left","margin-right":"5px"}:{width:"50%",float:"right"}},colSize:function(){return!!this.vertical&&12}},watch:{mode:function(e,t){this.updatePackets(),this.itemNames=[]},reduced:function(e,t){this.updateItems()}},methods:{updatePackets:function(){var e=this;if("UNKNOWN"===this.selectedTargetName)return this.packetNames=[this.UNKNOWN],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.UNKNOWN.value),void(this.description="UNKNOWN");if("ALL"===this.selectedTargetName)return this.packetNames=[this.ALL],this.selectedPacketName=this.packetNames[0].value,this.packetNameChanged(this.ALL.value),void(this.description="ALL");this.internalDisabled=!0;var t="tlm"===this.mode?"get_all_telemetry_names":"get_all_command_names";this.api[t](this.selectedTargetName).then((function(t){e.packetNames=t.map((function(e){return{label:e,value:e}})),e.allowAll&&e.packetNames.unshift(e.ALL),e.selectedPacketName||(e.selectedPacketName=e.packetNames[0].value),e.packetNameChanged(e.selectedPacketName);e.packetNames.find((function(t){return t.value===e.selectedPacketName}));e.chooseItem&&e.updateItems(),e.internalDisabled=!1}))},updateItems:function(){var e=this;if("ALL"!==this.selectedPacketName){this.internalDisabled=!0;var t="tlm"===this.mode?"get_telemetry":"get_command";this.api[t](this.selectedTargetName,this.selectedPacketName).then((function(t){e.itemNames=t.items.map((function(t){return"DECOM"===e.reduced?[{label:t.name,value:t.name,description:t.description}]:e.makeReducedItems(t)})).reduce((function(e,t){return e.concat(t)}),[]),e.allowAll&&e.itemNames.unshift(e.ALL),e.selectedItemName||(e.selectedItemName=e.itemNames[0].value),e.description=e.itemNames[0].description,e.internalDisabled=!1,e.$emit("on-set",{targetName:e.selectedTargetName,packetName:e.selectedPacketName,itemName:e.selectedItemName,reduced:e.reduced})}))}},makeReducedItems:function(e){var t=!e.array_size&&!e.states;return t&&["UINT","INT","FLOAT"].includes(e.data_type)?["MIN","MAX","AVG","STDDEV"].map((function(t){return{label:"".concat(e.name,"_").concat(t),value:"".concat(e.name,"_").concat(t),description:"".concat(t," ").concat(e.description)}})):[]},targetNameChanged:function(e){this.selectedTargetName=e,this.selectedPacketName="",this.selectedItemName="",this.updatePackets()},packetNameChanged:function(e){var t=this;if("ALL"===e)this.itemsDisabled=!0,this.internalDisabled=!1;else{this.itemsDisabled=!1;var n=this.packetNames.find((function(t){return e===t.value}));this.selectedPacketName=n.value;var i="tlm"===this.mode?"get_telemetry":"get_command";this.api[i](this.selectedTargetName,this.selectedPacketName).then((function(e){t.description=e.description,t.hazardous=e.hazardous}))}this.chooseItem?(this.selectedItemName="",this.updateItems()):this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},itemNameChanged:function(e){var t=this.itemNames.find((function(t){return e===t.value}));this.selectedItemName=t.value,this.description=t.description,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,reduced:this.reduced})},buttonPressed:function(){"ALL"===this.selectedPacketName?this.allTargetPacketItems():"ALL"===this.selectedItemName?this.allPacketItems():this.chooseItem?this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemName,reduced:this.reduced}):this.$emit("click",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},allTargetPacketItems:function(){var e=this;this.packetNames.forEach((function(t){if(t!==e.ALL){var n="tlm"===e.mode?"get_telemetry":"get_command";e.api[n](e.selectedTargetName,t.value).then((function(n){n.items.forEach((function(n){e.$emit("click",{targetName:e.selectedTargetName,packetName:t.value,itemName:n["name"],reduced:e.reduced})}))}))}}))},allPacketItems:function(){var e=this;this.itemNames.forEach((function(t){t!==e.ALL&&e.$emit("click",{targetName:e.selectedTargetName,packetName:e.selectedPacketName,itemName:t.value,reduced:e.reduced})}))}}}),oe=se,le=(n(7537),(0,G.Z)(oe,ie,ae,!1,null,null,null)),re=le.exports,ce=function(){var e=this,t=e._self._c;return t("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(n,i){return t("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(i){var a=i.on,s=i.attrs;return[t("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT("".concat(e.title," ").concat(n.label))}},"v-btn",s,!1),a),[t("span",{domProps:{textContent:e._s(n.label)}}),t("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:n.radioGroup,"hide-details":"",dense:""}},[e._l(n.items,(function(i,a){return[i.divider?t("v-divider"):t("v-list-item",{key:a,attrs:{disabled:i.disabled,"data-test":e.formatDT("".concat(e.title," ").concat(n.label," ").concat(i.label))},on:{click:i.command}},[i.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):e._e(),i.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:i.label,value:i.label},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}})],1):e._e(),i.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:i.disabled}},[e._v(e._s(i.icon))])],1):e._e(),i.radio||i.checkbox?e._e():t("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":"")},[e._v(e._s(i.label))])],1)]}))],2)],1)],1)})),t("v-spacer"),t("v-toolbar-title",[e._v(e._s(e.title))]),t("v-spacer")],2)])},ue=[],de=(n(5940),n(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}},mounted:function(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}}),me=de,he=(n(4387),(0,G.Z)(me,ce,ue,!1,null,"6b1b57d9",null)),pe=he.exports,ve=n(7955);function fe(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",t="70dfbad085f72194b9c723e79dc598ea30d6067c",n=new Function("return this")(),i="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:786}},4:{start:{line:1,column:153},end:{line:1,column:165}},5:{start:{line:1,column:373},end:{line:1,column:666}},6:{start:{line:1,column:594},end:{line:1,column:630}},7:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:137},end:{line:1,column:138}},loc:{start:{line:1,column:152},end:{line:1,column:166}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:358},end:{line:1,column:359}},loc:{start:{line:1,column:372},end:{line:1,column:667}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:578},end:{line:1,column:579}},loc:{start:{line:1,column:593},end:{line:1,column:631}},line:1}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"70dfbad085f72194b9c723e79dc598ea30d6067c"},s=n[i]||(n[i]={});s[e]&&s[e].hash===t||(s[e]=a);var o=s[e];return fe=function(){return o},o}fe(),fe().s[0]++;var ge=function(){fe().f[0]++;var e=(fe().s[1]++,this),t=(fe().s[2]++,e._self._c);return fe().s[3]++,t("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(t){fe().f[1]++,fe().s[4]++,e.show=t},expression:"show"}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v("TlmGrapher Settings")]),t("v-spacer")],1),t("v-card",{staticClass:"pa-3"},[t("v-card-text",[e._l(e.settings,(function(n){return fe().f[2]++,fe().s[5]++,t("div",{key:n.title},[t("v-row",{staticClass:"my-5"},[t("v-text-field",{attrs:{"hide-details":"auto",type:"number",rules:n.rules,label:n.title},model:{value:n.value,callback:function(t){fe().f[3]++,fe().s[6]++,e.$set(n,"value",e._n(t))},expression:"item.value"}})],1)],1)})),t("v-row",[t("span",{staticClass:"red--text"},[e._v(" Increasing these values may cause issues ")])])],2)],1)],1)},Ae=(fe().s[7]++,[]),_e={Accept:"application/json"};(0,d.Z)((0,d.Z)({},_e),{},{"Content-Type":"application/json"});function Ce(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",t="668446e5bf70515b864f7406b938a47b9dc34381",n=new Function("return this")(),i="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/SettingsDialog.vue",statementMap:{0:{start:{line:13,column:4},end:{line:13,column:13}},1:{start:{line:18,column:8},end:{line:18,column:25}},2:{start:{line:21,column:8},end:{line:21,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:9},end:{line:14,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:17,column:6},end:{line:17,column:7}},loc:{start:{line:17,column:12},end:{line:19,column:7}},line:17},2:{name:"(anonymous_2)",decl:{start:{line:20,column:6},end:{line:20,column:7}},loc:{start:{line:20,column:17},end:{line:22,column:7}},line:20}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,sources:["SettingsDialog.vue"],names:[],mappings:";AAqDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"SettingsDialog.vue",sourceRoot:"src/tools/TlmGrapher",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-dialog v-model="show" width="600">\n <v-system-bar>\n <v-spacer />\n <span>TlmGrapher Settings</span>\n <v-spacer />\n </v-system-bar>\n <v-card class="pa-3">\n <v-card-text>\n <div v-for="item in settings" :key="item.title">\n <v-row class="my-5">\n <v-text-field\n hide-details="auto"\n type="number"\n :rules="item.rules"\n :label="item.title"\n v-model.number="item.value"\n />\n </v-row>\n </div>\n <v-row>\n <span class="red--text">\n Increasing these values may cause issues\n </span>\n </v-row>\n </v-card-text>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport Api from \'@openc3/tool-common/src/services/api\'\n\nexport default {\n props: {\n settings: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {}\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {},\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"668446e5bf70515b864f7406b938a47b9dc34381"},s=n[i]||(n[i]={});s[e]&&s[e].hash===t||(s[e]=a);var o=s[e];return Ce=function(){return o},o}Ce();var ye={props:{settings:{type:Object,required:!0},value:Boolean},data:function(){return Ce().f[0]++,Ce().s[0]++,{}},computed:{show:{get:function(){return Ce().f[1]++,Ce().s[1]++,this.value},set:function(e){Ce().f[2]++,Ce().s[2]++,this.$emit("input",e)}}},methods:{}},be=ye,we=(0,G.Z)(be,ge,Ae,!1,null,null,null),xe=we.exports;function ke(){var e="/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",t="c6332ef5ef5c67a3be97fca61b3541ac86ad9bd8",n=new Function("return this")(),i="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-tlmgrapher/src/tools/TlmGrapher/TlmGrapher.vue",statementMap:{0:{start:{line:12,column:27},end:{line:12,column:30}},1:{start:{line:23,column:4},end:{line:123,column:5}},2:{start:{line:47,column:16},end:{line:47,column:42}},3:{start:{line:54,column:16},end:{line:54,column:42}},4:{start:{line:66,column:16},end:{line:66,column:31}},5:{start:{line:76,column:16},end:{line:76,column:36}},6:{start:{line:83,column:16},end:{line:83,column:36}},7:{start:{line:90,column:16},end:{line:90,column:35}},8:{start:{line:100,column:16},end:{line:100,column:46}},9:{start:{line:110,column:29},end:{line:110,column:50}},10:{start:{line:115,column:29},end:{line:115,column:50}},11:{start:{line:120,column:29},end:{line:120,column:50}},12:{start:{line:126,column:4},end:{line:131,column:6}},13:{start:{line:134,column:4},end:{line:136,column:6}},14:{start:{line:135,column:6},end:{line:135,column:39}},15:{start:{line:137,column:27},end:{line:137,column:55}},16:{start:{line:139,column:4},end:{line:151,column:5}},17:{start:{line:144,column:6},end:{line:148,column:8}},18:{start:{line:149,column:11},end:{line:151,column:5}},19:{start:{line:150,column:6},end:{line:150,column:44}},20:{start:{line:155,column:6},end:{line:155,column:29}},21:{start:{line:156,column:6},end:{line:156,column:33}},22:{start:{line:157,column:6},end:{line:157,column:27}},23:{start:{line:160,column:6},end:{line:160,column:59}},24:{start:{line:163,column:6},end:{line:163,column:58}},25:{start:{line:166,column:6},end:{line:166,column:31}},26:{start:{line:169,column:6},end:{line:169,column:68}},27:{start:{line:170,column:6},end:{line:172,column:7}},28:{start:{line:171,column:8},end:{line:171,column:28}},29:{start:{line:175,column:17},end:{line:175,column:29}},30:{start:{line:176,column:6},end:{line:176,column:26}},31:{start:{line:177,column:6},end:{line:177,column:23}},32:{start:{line:178,column:6},end:{line:187,column:8}},33:{start:{line:179,column:20},end:{line:181,column:10}},34:{start:{line:182,column:8},end:{line:182,column:29}},35:{start:{line:183,column:8},end:{line:183,column:33}},36:{start:{line:184,column:8},end:{line:186,column:30}},37:{start:{line:185,column:10},end:{line:185,column:43}},38:{start:{line:190,column:18},end:{line:190,column:80}},39:{start:{line:191,column:6},end:{line:191,column:29}},40:{start:{line:192,column:6},end:{line:192,column:52}},41:{start:{line:193,column:6},end:{line:193,column:33}},42:{start:{line:197,column:6},end:{line:199,column:7}},43:{start:{line:198,column:8},end:{line:198,column:30}},44:{start:{line:200,column:6},end:{line:200,column:22}},45:{start:{line:203,column:6},end:{line:203,column:31}},46:{start:{line:204,column:6},end:{line:209,column:7}},47:{start:{line:206,column:10},end:{line:206,column:43}},48:{start:{line:212,column:6},end:{line:217,column:7}},49:{start:{line:214,column:10},end:{line:214,column:43}},50:{start:{line:222,column:6},end:{line:224,column:7}},51:{start:{line:223,column:8},end:{line:223,column:29}},52:{start:{line:227,column:21},end:{line:240,column:8}},53:{start:{line:229,column:24},end:{line:229,column:67}},54:{start:{line:230,column:25},end:{line:230,column:47}},55:{start:{line:231,column:8},end:{line:239,column:9}},56:{start:{line:241,column:6},end:{line:257,column:10}},57:{start:{line:244,column:10},end:{line:244,column:42}},58:{start:{line:245,column:10},end:{line:248,column:12}},59:{start:{line:251,column:10},end:{line:256,column:11}},60:{start:{line:252,column:12},end:{line:255,column:14}},61:{start:{line:260,column:6},end:{line:260,column:38}},62:{start:{line:261,column:6},end:{line:276,column:10}},63:{start:{line:264,column:10},end:{line:266,column:11}},64:{start:{line:265,column:12},end:{line:265,column:44}},65:{start:{line:269,column:10},end:{line:275,column:11}},66:{start:{line:270,column:12},end:{line:273,column:14}},67:{start:{line:274,column:12},end:{line:274,column:44}},68:{start:{line:279,column:6},end:{line:279,column:27}},69:{start:{line:280,column:6},end:{line:280,column:28}},70:{start:{line:281,column:21},end:{line:281,column:42}},71:{start:{line:282,column:6},end:{line:284,column:7}},72:{start:{line:283,column:8},end:{line:283,column:23}},73:{start:{line:285,column:6},end:{line:285,column:28}},74:{start:{line:286,column:19},end:{line:286,column:23}},75:{start:{line:287,column:6},end:{line:296,column:8}},76:{start:{line:288,column:23},end:{line:288,column:49}},77:{start:{line:289,column:8},end:{line:289,column:36}},78:{start:{line:290,column:8},end:{line:290,column:44}},79:{start:{line:291,column:8},end:{line:291,column:46}},80:{start:{line:292,column:8},end:{line:292,column:44}},81:{start:{line:293,column:8},end:{line:293,column:44}},82:{start:{line:294,column:8},end:{line:294,column:49}},83:{start:{line:295,column:8},end:{line:295,column:43}},84:{start:{line:297,column:6},end:{line:297,column:26}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:9},end:{line:124,column:3}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:46,column:23},end:{line:46,column:24}},loc:{start:{line:46,column:29},end:{line:48,column:15}},line:46},2:{name:"(anonymous_2)",decl:{start:{line:53,column:23},end:{line:53,column:24}},loc:{start:{line:53,column:29},end:{line:55,column:15}},line:53},3:{name:"(anonymous_3)",decl:{start:{line:65,column:23},end:{line:65,column:24}},loc:{start:{line:65,column:29},end:{line:67,column:15}},line:65},4:{name:"(anonymous_4)",decl:{start:{line:75,column:23},end:{line:75,column:24}},loc:{start:{line:75,column:29},end:{line:77,column:15}},line:75},5:{name:"(anonymous_5)",decl:{start:{line:82,column:23},end:{line:82,column:24}},loc:{start:{line:82,column:29},end:{line:84,column:15}},line:82},6:{name:"(anonymous_6)",decl:{start:{line:89,column:23},end:{line:89,column:24}},loc:{start:{line:89,column:29},end:{line:91,column:15}},line:89},7:{name:"(anonymous_7)",decl:{start:{line:99,column:23},end:{line:99,column:24}},loc:{start:{line:99,column:29},end:{line:101,column:15}},line:99},8:{name:"(anonymous_8)",decl:{start:{line:110,column:18},end:{line:110,column:19}},loc:{start:{line:110,column:29},end:{line:110,column:50}},line:110},9:{name:"(anonymous_9)",decl:{start:{line:115,column:18},end:{line:115,column:19}},loc:{start:{line:115,column:29},end:{line:115,column:50}},line:115},10:{name:"(anonymous_10)",decl:{start:{line:120,column:18},end:{line:120,column:19}},loc:{start:{line:120,column:29},end:{line:120,column:50}},line:120},11:{name:"(anonymous_11)",decl:{start:{line:125,column:11},end:{line:125,column:12}},loc:{start:{line:125,column:23},end:{line:152,column:3}},line:125},12:{name:"(anonymous_12)",decl:{start:{line:134,column:25},end:{line:134,column:26}},loc:{start:{line:134,column:41},end:{line:136,column:5}},line:134},13:{name:"(anonymous_13)",decl:{start:{line:154,column:18},end:{line:154,column:19}},loc:{start:{line:154,column:35},end:{line:158,column:5}},line:154},14:{name:"(anonymous_14)",decl:{start:{line:159,column:27},end:{line:159,column:28}},loc:{start:{line:159,column:44},end:{line:161,column:5}},line:159},15:{name:"(anonymous_15)",decl:{start:{line:162,column:27},end:{line:162,column:28}},loc:{start:{line:162,column:39},end:{line:164,column:5}},line:162},16:{name:"(anonymous_16)",decl:{start:{line:165,column:19},end:{line:165,column:20}},loc:{start:{line:165,column:33},end:{line:167,column:5}},line:165},17:{name:"(anonymous_17)",decl:{start:{line:168,column:13},end:{line:168,column:14}},loc:{start:{line:168,column:51},end:{line:173,column:5}},line:168},18:{name:"(anonymous_18)",decl:{start:{line:174,column:14},end:{line:174,column:15}},loc:{start:{line:174,column:26},end:{line:188,column:5}},line:174},19:{name:"(anonymous_19)",decl:{start:{line:178,column:21},end:{line:178,column:22}},loc:{start:{line:178,column:33},end:{line:187,column:7}},line:178},20:{name:"(anonymous_20)",decl:{start:{line:184,column:19},end:{line:184,column:20}},loc:{start:{line:184,column:25},end:{line:186,column:9}},line:184},21:{name:"(anonymous_21)",decl:{start:{line:189,column:16},end:{line:189,column:17}},loc:{start:{line:189,column:30},end:{line:194,column:5}},line:189},22:{name:"(anonymous_22)",decl:{start:{line:195,column:20},end:{line:195,column:21}},loc:{start:{line:195,column:32},end:{line:201,column:5}},line:195},23:{name:"(anonymous_23)",decl:{start:{line:202,column:17},end:{line:202,column:18}},loc:{start:{line:202,column:31},end:{line:210,column:5}},line:202},24:{name:"(anonymous_24)",decl:{start:{line:205,column:8},end:{line:205,column:9}},loc:{start:{line:205,column:14},end:{line:207,column:9}},line:205},25:{name:"(anonymous_25)",decl:{start:{line:211,column:12},end:{line:211,column:13}},loc:{start:{line:211,column:24},end:{line:218,column:5}},line:211},26:{name:"(anonymous_26)",decl:{start:{line:213,column:8},end:{line:213,column:9}},loc:{start:{line:213,column:14},end:{line:215,column:9}},line:213},27:{name:"(anonymous_27)",decl:{start:{line:219,column:18},end:{line:219,column:19}},loc:{start:{line:219,column:34},end:{line:225,column:5}},line:219},28:{name:"(anonymous_28)",decl:{start:{line:226,column:23},end:{line:226,column:24}},loc:{start:{line:226,column:39},end:{line:258,column:5}},line:226},29:{name:"(anonymous_29)",decl:{start:{line:227,column:46},end:{line:227,column:47}},loc:{start:{line:227,column:56},end:{line:240,column:7}},line:227},30:{name:"(anonymous_30)",decl:{start:{line:243,column:14},end:{line:243,column:15}},loc:{start:{line:243,column:28},end:{line:249,column:9}},line:243},31:{name:"(anonymous_31)",decl:{start:{line:250,column:15},end:{line:250,column:16}},loc:{start:{line:250,column:26},end:{line:257,column:9}},line:250},32:{name:"(anonymous_32)",decl:{start:{line:259,column:23},end:{line:259,column:24}},loc:{start:{line:259,column:39},end:{line:277,column:5}},line:259},33:{name:"(anonymous_33)",decl:{start:{line:263,column:14},end:{line:263,column:15}},loc:{start:{line:263,column:28},end:{line:267,column:9}},line:263},34:{name:"(anonymous_34)",decl:{start:{line:268,column:15},end:{line:268,column:16}},loc:{start:{line:268,column:26},end:{line:276,column:9}},line:268},35:{name:"(anonymous_35)",decl:{start:{line:278,column:4},end:{line:278,column:5}},loc:{start:{line:278,column:39},end:{line:298,column:5}},line:278},36:{name:"(anonymous_36)",decl:{start:{line:287,column:21},end:{line:287,column:22}},loc:{start:{line:287,column:41},end:{line:296,column:7}},line:287}},branchMap:{0:{loc:{start:{line:110,column:29},end:{line:110,column:50}},type:"binary-expr",locations:[{start:{line:110,column:29},end:{line:110,column:36}},{start:{line:110,column:40},end:{line:110,column:50}}],line:110},1:{loc:{start:{line:115,column:29},end:{line:115,column:50}},type:"binary-expr",locations:[{start:{line:115,column:29},end:{line:115,column:36}},{start:{line:115,column:40},end:{line:115,column:50}}],line:115},2:{loc:{start:{line:120,column:29},end:{line:120,column:50}},type:"binary-expr",locations:[{start:{line:120,column:29},end:{line:120,column:36}},{start:{line:120,column:40},end:{line:120,column:50}}],line:120},3:{loc:{start:{line:139,column:4},end:{line:151,column:5}},type:"if",locations:[{start:{line:139,column:4},end:{line:151,column:5}},{start:{line:149,column:11},end:{line:151,column:5}}],line:139},4:{loc:{start:{line:140,column:6},end:{line:142,column:29}},type:"binary-expr",locations:[{start:{line:140,column:6},end:{line:140,column:31}},{start:{line:141,column:6},end:{line:141,column:31}},{start:{line:142,column:6},end:{line:142,column:29}}],line:140},5:{loc:{start:{line:149,column:11},end:{line:151,column:5}},type:"if",locations:[{start:{line:149,column:11},end:{line:151,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:149},6:{loc:{start:{line:168,column:29},end:{line:168,column:49}},type:"default-arg",locations:[{start:{line:168,column:45},end:{line:168,column:49}}],line:168},7:{loc:{start:{line:170,column:6},end:{line:172,column:7}},type:"if",locations:[{start:{line:170,column:6},end:{line:172,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:170},8:{loc:{start:{line:222,column:6},end:{line:224,column:7}},type:"if",locations:[{start:{line:222,column:6},end:{line:224,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:222},9:{loc:{start:{line:251,column:10},end:{line:256,column:11}},type:"if",locations:[{start:{line:251,column:10},end:{line:256,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:251},10:{loc:{start:{line:264,column:10},end:{line:266,column:11}},type:"if",locations:[{start:{line:264,column:10},end:{line:266,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:264},11:{loc:{start:{line:269,column:10},end:{line:275,column:11}},type:"if",locations:[{start:{line:269,column:10},end:{line:275,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:269}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0]},inputSourceMap:{version:3,sources:["TlmGrapher.vue"],names:[],mappings:";AA+JA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"TlmGrapher.vue",sourceRoot:"src/tools/TlmGrapher",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <div>\n <v-snackbar\n v-model="showAlert"\n top\n :type="alertType"\n :icon="alertType"\n :timeout="5000"\n >\n <v-icon> mdi-{{ alertType }} </v-icon>\n {{ alert }}\n <template v-slot:action="{ attrs }">\n <v-btn\n text\n v-bind="attrs"\n @click="\n () => {\n showAlert = false\n }\n "\n >\n Close\n </v-btn>\n </template>\n </v-snackbar>\n\n <div v-show="this.selectedGraphId === null">\n <v-row class="my-5">\n <v-spacer />\n <span>\n Add a graph from the menu bar or select an existing graph to\n continue\n </span>\n <v-spacer />\n </v-row>\n </div>\n\n <v-row\n class="px-1"\n justify="space-between"\n v-show="this.selectedGraphId !== null"\n >\n <v-col cols="11">\n <target-packet-item-chooser\n :initial-target-name="this.$route.params.target"\n :initial-packet-name="this.$route.params.packet"\n :initial-item-name="this.$route.params.item"\n @click="addItem"\n button-text="Add Item"\n choose-item\n />\n </v-col>\n <v-col cols="1">\n <v-btn\n v-show="state === \'pause\'"\n class="pulse"\n v-on:click="\n () => {\n state = \'start\'\n }\n "\n color="primary"\n fab\n data-test="start-graph"\n >\n <v-icon large>mdi-play</v-icon>\n </v-btn>\n <v-btn\n v-show="state === \'start\'"\n v-on:click="\n () => {\n state = \'pause\'\n }\n "\n color="primary"\n fab\n data-test="pause-graph"\n >\n <v-icon large>mdi-pause</v-icon>\n </v-btn>\n </v-col>\n </v-row>\n\n <div class="grid">\n <div\n class="item"\n v-for="graph in graphs"\n :key="graph"\n :id="`gridItem${graph}`"\n :ref="`gridItem${graph}`"\n >\n <div class="item-content">\n <graph\n :ref="`graph${graph}`"\n :id="graph"\n :state="state"\n :start-time="startTime"\n :selected-graph-id="selectedGraphId"\n :seconds-graphed="settings.secondsGraphed.value"\n :points-saved="settings.pointsSaved.value"\n :points-graphed="settings.pointsGraphed.value"\n @close-graph="() => closeGraph(graph)"\n @min-max-graph="() => minMaxGraph(graph)"\n @resize="() => resize()"\n @click="() => graphSelected(graph)"\n @started="graphStarted"\n />\n </div>\n </div>\n </div>\n </div>\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <open-config-dialog\n v-if="showOpenConfig"\n v-model="showOpenConfig"\n :tool="toolName"\n @success="openConfiguration"\n />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <save-config-dialog\n v-if="showSaveConfig"\n v-model="showSaveConfig"\n :tool="toolName"\n @success="saveConfiguration"\n />\n \x3c!-- Note we\'re using v-if here so it gets re-created each time and refreshes the list --\x3e\n <settings-dialog\n v-show="showSettingsDialog"\n v-model="showSettingsDialog"\n :settings="settings"\n />\n </div>\n</template>\n\n<script>\nimport { OpenC3Api } from \'@openc3/tool-common/src/services/openc3-api\'\nimport Graph from \'@openc3/tool-common/src/components/Graph.vue\'\nimport OpenConfigDialog from \'@openc3/tool-common/src/components/OpenConfigDialog\'\nimport SaveConfigDialog from \'@openc3/tool-common/src/components/SaveConfigDialog\'\nimport TargetPacketItemChooser from \'@openc3/tool-common/src/components/TargetPacketItemChooser\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\nimport Muuri from \'muuri\'\n\nimport SettingsDialog from \'@/tools/TlmGrapher/SettingsDialog\'\n\nconst MURRI_REFRESH_TIME = 250\nexport default {\n components: {\n Graph,\n OpenConfigDialog,\n SaveConfigDialog,\n SettingsDialog,\n TargetPacketItemChooser,\n TopBar,\n },\n data() {\n return {\n alert: \'\',\n alertType: \'success\',\n showAlert: false,\n title: \'COSMOS Telemetry Grapher\',\n toolName: \'telemetry-grapher\',\n showOpenConfig: false,\n showSaveConfig: false,\n showSettingsDialog: false,\n grid: null,\n state: \'stop\', // Valid: stop, start, pause\n startTime: null, // Start time in nanoseconds\n // Setup defaults to show an initial graph\n graphs: [0],\n selectedGraphId: 0,\n counter: 1,\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.showOpenConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.showSaveConfig = true\n },\n },\n ],\n },\n {\n label: \'Graph\',\n items: [\n {\n label: \'Add Graph\',\n icon: \'mdi-plus\',\n command: () => {\n this.addGraph()\n },\n },\n {\n divider: true,\n },\n {\n label: \'Start / Resume\',\n icon: \'mdi-play\',\n command: () => {\n this.state = \'start\'\n },\n },\n {\n label: \'Pause\',\n icon: \'mdi-pause\',\n command: () => {\n this.state = \'pause\'\n },\n },\n {\n label: \'Stop\',\n icon: \'mdi-stop\',\n command: () => {\n this.state = \'stop\'\n },\n },\n {\n divider: true,\n },\n {\n label: \'Settings\',\n icon: \'mdi-cog\',\n command: () => {\n this.showSettingsDialog = true\n },\n },\n ],\n },\n ],\n settings: {\n secondsGraphed: {\n title: \'Seconds Graphed\',\n value: 1000,\n rules: [(value) => !!value || \'Required\'],\n },\n pointsSaved: {\n title: \'Points Saved\',\n value: 1000000,\n rules: [(value) => !!value || \'Required\'],\n },\n pointsGraphed: {\n title: \'Points Graphed\',\n value: 1000,\n rules: [(value) => !!value || \'Required\'],\n },\n },\n }\n },\n mounted: function () {\n this.grid = new Muuri(\'.grid\', {\n dragEnabled: true,\n layoutOnResize: true,\n // Only allow drags starting from the v-system-bar title\n dragHandle: \'.v-system-bar\',\n })\n // Sometimes when we move graphs, other graphs become non-interactive\n // This seems to fix that issue\n this.grid.on(\'move\', function (data) {\n data.item.getGrid().synchronize()\n })\n const previousConfig = this.getLocalStorageConfig()\n // If we\'re passed in the route then manually addItem\n if (\n this.$route.params.target &&\n this.$route.params.packet &&\n this.$route.params.item\n ) {\n this.addItem({\n targetName: this.$route.params.target.toUpperCase(),\n packetName: this.$route.params.packet.toUpperCase(),\n itemName: this.$route.params.item.toUpperCase(),\n })\n } else if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n methods: {\n alertHandler: function (event) {\n this.alert = event.text\n this.alertType = event.type\n this.showAlert = true\n },\n setLocalStorageConfig: function (value) {\n localStorage[\'lastconfig__telemetry_grapher\'] = value\n },\n getLocalStorageConfig: function () {\n return localStorage[\'lastconfig__telemetry_grapher\']\n },\n graphSelected: function (id) {\n this.selectedGraphId = id\n },\n addItem: function (item, startGraphing = true) {\n this.$refs[`graph${this.selectedGraphId}`][0].addItems([item])\n if (startGraphing === true) {\n this.state = \'start\'\n }\n },\n addGraph: function () {\n const id = this.counter\n this.graphs.push(id)\n this.counter += 1\n this.$nextTick(function () {\n var items = this.grid.add(this.$refs[`gridItem${id}`], {\n active: false,\n })\n this.grid.show(items)\n this.selectedGraphId = id\n setTimeout(() => {\n this.grid.refreshItems().layout()\n }, MURRI_REFRESH_TIME)\n })\n },\n closeGraph: function (id) {\n var items = this.grid.getItems([document.getElementById(`gridItem${id}`)])\n this.grid.remove(items)\n this.graphs.splice(this.graphs.indexOf(id), 1)\n this.selectedGraphId = null\n },\n closeAllGraphs: function () {\n // Make a copy of this.graphs to iterate on since closeGraph modifies in place\n for (let graph of [...this.graphs]) {\n this.closeGraph(graph)\n }\n this.counter = 0\n },\n minMaxGraph: function (id) {\n this.selectedGraphId = id\n setTimeout(\n () => {\n this.grid.refreshItems().layout()\n },\n MURRI_REFRESH_TIME * 2 // Double the time since there is more animation\n )\n },\n resize: function () {\n setTimeout(\n () => {\n this.grid.refreshItems().layout()\n },\n MURRI_REFRESH_TIME * 2 // Double the time since there is more animation\n )\n },\n graphStarted: function (time) {\n // Only set startTime once when notified by the first graph to start\n // This allows us to have a uniform start time on all graphs\n if (this.startTime === null) {\n this.startTime = time\n }\n },\n saveConfiguration: function (name) {\n const config = this.grid.getItems().map((item) => {\n // Map the gridItem id to the graph id\n const graphId = `graph${item.getElement().id.substring(8)}`\n const vueGraph = this.$refs[graphId][0]\n return {\n items: vueGraph.items,\n title: vueGraph.title,\n fullWidth: vueGraph.fullWidth,\n fullHeight: vueGraph.fullHeight,\n graphMinX: vueGraph.graphMinX,\n graphMaxX: vueGraph.graphMaxX,\n legendPosition: vueGraph.legendPosition,\n }\n })\n new OpenC3Api()\n .save_config(this.toolName, name, JSON.stringify(config))\n .then((response) => {\n this.setLocalStorageConfig(name)\n this.alertHandler({\n text: `Saved configuration: ${name}`,\n type: \'success\',\n })\n })\n .catch((error) => {\n if (error) {\n this.alertHandler({\n text: `Failed to save configuration: ${name}. ${error}`,\n type: \'error\',\n })\n }\n })\n },\n openConfiguration: function (name) {\n this.setLocalStorageConfig(name)\n new OpenC3Api()\n .load_config(this.toolName, name)\n .then((response) => {\n if (response) {\n this.loadConfiguration(response)\n }\n })\n .catch((error) => {\n if (error) {\n this.alertHandler({\n text: `Failed to open configuration: ${name}. ${error}`,\n type: \'error\',\n })\n this.setLocalStorageConfig(null)\n }\n })\n },\n async loadConfiguration(configStr) {\n this.closeAllGraphs()\n await this.$nextTick()\n const config = JSON.parse(configStr)\n for (let graph of config) {\n this.addGraph()\n }\n await this.$nextTick()\n const that = this\n config.forEach(function (graph, i) {\n let vueGraph = that.$refs[`graph${i}`][0]\n vueGraph.title = graph.title\n vueGraph.fullWidth = graph.fullWidth\n vueGraph.fullHeight = graph.fullHeight\n vueGraph.graphMinX = graph.graphMinX\n vueGraph.graphMaxX = graph.graphMaxX\n vueGraph.moveLegend(graph.legendPosition)\n vueGraph.addItems([...graph.items])\n })\n this.state = \'start\'\n },\n },\n}\n<\/script>\n\n<style lang="scss" scoped>\n.v-navigation-drawer {\n z-index: 2;\n}\n.theme--dark.v-navigation-drawer {\n background-color: var(--v-primary-darken2);\n}\n.grid {\n position: relative;\n}\n.item {\n position: absolute;\n z-index: 1;\n}\n.item.muuri-item-dragging {\n z-index: 3;\n}\n.item.muuri-item-releasing {\n z-index: 2;\n}\n.item.muuri-item-hidden {\n z-index: 0;\n}\n.item-content {\n position: relative;\n cursor: pointer;\n border-radius: 6px;\n margin: 5px;\n}\n\n.pulse {\n animation: pulse 1s infinite;\n}\n\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c6332ef5ef5c67a3be97fca61b3541ac86ad9bd8"},s=n[i]||(n[i]={});s[e]&&s[e].hash===t||(s[e]=a);var o=s[e];return ke=function(){return o},o}ke();var Ne=(ke().s[0]++,250),Se={components:{Graph:W,OpenConfigDialog:V,SaveConfigDialog:ne,SettingsDialog:xe,TargetPacketItemChooser:re,TopBar:pe},data:function(){var e=this;return ke().f[0]++,ke().s[1]++,{alert:"",alertType:"success",showAlert:!1,title:"COSMOS Telemetry Grapher",toolName:"telemetry-grapher",showOpenConfig:!1,showSaveConfig:!1,showSettingsDialog:!1,grid:null,state:"stop",startTime:null,graphs:[0],selectedGraphId:0,counter:1,menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:function(){ke().f[1]++,ke().s[2]++,e.showOpenConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){ke().f[2]++,ke().s[3]++,e.showSaveConfig=!0}}]},{label:"Graph",items:[{label:"Add Graph",icon:"mdi-plus",command:function(){ke().f[3]++,ke().s[4]++,e.addGraph()}},{divider:!0},{label:"Start / Resume",icon:"mdi-play",command:function(){ke().f[4]++,ke().s[5]++,e.state="start"}},{label:"Pause",icon:"mdi-pause",command:function(){ke().f[5]++,ke().s[6]++,e.state="pause"}},{label:"Stop",icon:"mdi-stop",command:function(){ke().f[6]++,ke().s[7]++,e.state="stop"}},{divider:!0},{label:"Settings",icon:"mdi-cog",command:function(){ke().f[7]++,ke().s[8]++,e.showSettingsDialog=!0}}]}],settings:{secondsGraphed:{title:"Seconds Graphed",value:1e3,rules:[function(e){return ke().f[8]++,ke().s[9]++,ke().b[0][0]++,!!e||(ke().b[0][1]++,"Required")}]},pointsSaved:{title:"Points Saved",value:1e6,rules:[function(e){return ke().f[9]++,ke().s[10]++,ke().b[1][0]++,!!e||(ke().b[1][1]++,"Required")}]},pointsGraphed:{title:"Points Graphed",value:1e3,rules:[function(e){return ke().f[10]++,ke().s[11]++,ke().b[2][0]++,!!e||(ke().b[2][1]++,"Required")}]}}}},mounted:function(){ke().f[11]++,ke().s[12]++,this.grid=new ve.Z(".grid",{dragEnabled:!0,layoutOnResize:!0,dragHandle:".v-system-bar"}),ke().s[13]++,this.grid.on("move",(function(e){ke().f[12]++,ke().s[14]++,e.item.getGrid().synchronize()}));var e=(ke().s[15]++,this.getLocalStorageConfig());ke().s[16]++,ke().b[4][0]++,this.$route.params.target&&(ke().b[4][1]++,this.$route.params.packet)&&(ke().b[4][2]++,this.$route.params.item)?(ke().b[3][0]++,ke().s[17]++,this.addItem({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase(),itemName:this.$route.params.item.toUpperCase()})):(ke().b[3][1]++,ke().s[18]++,e?(ke().b[5][0]++,ke().s[19]++,this.openConfiguration(e)):ke().b[5][1]++)},methods:{alertHandler:function(e){ke().f[13]++,ke().s[20]++,this.alert=e.text,ke().s[21]++,this.alertType=e.type,ke().s[22]++,this.showAlert=!0},setLocalStorageConfig:function(e){ke().f[14]++,ke().s[23]++,localStorage["lastconfig__telemetry_grapher"]=e},getLocalStorageConfig:function(){return ke().f[15]++,ke().s[24]++,localStorage["lastconfig__telemetry_grapher"]},graphSelected:function(e){ke().f[16]++,ke().s[25]++,this.selectedGraphId=e},addItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(ke().b[6][0]++,!0);ke().f[17]++,ke().s[26]++,this.$refs["graph".concat(this.selectedGraphId)][0].addItems([e]),ke().s[27]++,!0===t?(ke().b[7][0]++,ke().s[28]++,this.state="start"):ke().b[7][1]++},addGraph:function(){ke().f[18]++;var e=(ke().s[29]++,this.counter);ke().s[30]++,this.graphs.push(e),ke().s[31]++,this.counter+=1,ke().s[32]++,this.$nextTick((function(){var t=this;ke().f[19]++;var n=(ke().s[33]++,this.grid.add(this.$refs["gridItem".concat(e)],{active:!1}));ke().s[34]++,this.grid.show(n),ke().s[35]++,this.selectedGraphId=e,ke().s[36]++,setTimeout((function(){ke().f[20]++,ke().s[37]++,t.grid.refreshItems().layout()}),Ne)}))},closeGraph:function(e){ke().f[21]++;var t=(ke().s[38]++,this.grid.getItems([document.getElementById("gridItem".concat(e))]));ke().s[39]++,this.grid.remove(t),ke().s[40]++,this.graphs.splice(this.graphs.indexOf(e),1),ke().s[41]++,this.selectedGraphId=null},closeAllGraphs:function(){ke().f[22]++,ke().s[42]++;for(var e=0,t=(0,c.Z)(this.graphs);e<t.length;e++){var n=t[e];ke().s[43]++,this.closeGraph(n)}ke().s[44]++,this.counter=0},minMaxGraph:function(e){var t=this;ke().f[23]++,ke().s[45]++,this.selectedGraphId=e,ke().s[46]++,setTimeout((function(){ke().f[24]++,ke().s[47]++,t.grid.refreshItems().layout()}),2*Ne)},resize:function(){var e=this;ke().f[25]++,ke().s[48]++,setTimeout((function(){ke().f[26]++,ke().s[49]++,e.grid.refreshItems().layout()}),2*Ne)},graphStarted:function(e){ke().f[27]++,ke().s[50]++,null===this.startTime?(ke().b[8][0]++,ke().s[51]++,this.startTime=e):ke().b[8][1]++},saveConfiguration:function(e){var t=this;ke().f[28]++;var n=(ke().s[52]++,this.grid.getItems().map((function(e){ke().f[29]++;var n=(ke().s[53]++,"graph".concat(e.getElement().id.substring(8))),i=(ke().s[54]++,t.$refs[n][0]);return ke().s[55]++,{items:i.items,title:i.title,fullWidth:i.fullWidth,fullHeight:i.fullHeight,graphMinX:i.graphMinX,graphMaxX:i.graphMaxX,legendPosition:i.legendPosition}})));ke().s[56]++,(new y).save_config(this.toolName,e,JSON.stringify(n)).then((function(n){ke().f[30]++,ke().s[57]++,t.setLocalStorageConfig(e),ke().s[58]++,t.alertHandler({text:"Saved configuration: ".concat(e),type:"success"})})).catch((function(n){ke().f[31]++,ke().s[59]++,n?(ke().b[9][0]++,ke().s[60]++,t.alertHandler({text:"Failed to save configuration: ".concat(e,". ").concat(n),type:"error"})):ke().b[9][1]++}))},openConfiguration:function(e){var t=this;ke().f[32]++,ke().s[61]++,this.setLocalStorageConfig(e),ke().s[62]++,(new y).load_config(this.toolName,e).then((function(e){ke().f[33]++,ke().s[63]++,e?(ke().b[10][0]++,ke().s[64]++,t.loadConfiguration(e)):ke().b[10][1]++})).catch((function(n){ke().f[34]++,ke().s[65]++,n?(ke().b[11][0]++,ke().s[66]++,t.alertHandler({text:"Failed to open configuration: ".concat(e,". ").concat(n),type:"error"}),ke().s[67]++,t.setLocalStorageConfig(null)):ke().b[11][1]++}))},loadConfiguration:function(e){var t=this;return(0,r.Z)((0,o.Z)().mark((function n(){var i,a,s,r;return(0,o.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return ke().f[35]++,ke().s[68]++,t.closeAllGraphs(),ke().s[69]++,n.next=6,t.$nextTick();case 6:ke().s[70]++,i=JSON.parse(e),ke().s[71]++,a=(0,l.Z)(i);try{for(a.s();!(s=a.n()).done;)s.value,ke().s[72]++,t.addGraph()}catch(o){a.e(o)}finally{a.f()}return ke().s[73]++,n.next=13,t.$nextTick();case 13:ke().s[74]++,r=t,ke().s[75]++,i.forEach((function(e,t){ke().f[36]++;var n=(ke().s[76]++,r.$refs["graph".concat(t)][0]);ke().s[77]++,n.title=e.title,ke().s[78]++,n.fullWidth=e.fullWidth,ke().s[79]++,n.fullHeight=e.fullHeight,ke().s[80]++,n.graphMinX=e.graphMinX,ke().s[81]++,n.graphMaxX=e.graphMaxX,ke().s[82]++,n.moveLegend(e.legendPosition),ke().s[83]++,n.addItems((0,c.Z)(e.items))})),ke().s[84]++,t.state="start";case 18:case"end":return n.stop()}}),n)})))()}}},Ie=Se,Te=(n(3534),(0,G.Z)(Ie,a,s,!1,null,"ad4f4ac4",null)),Me=Te.exports},5803:function(e,t,n){"use strict";n.r(t);var i=n(3467),a=n.n(i),s=n(8715),o=n.n(s),l=o()(a());l.push([e.id,".uplot.side-legend{display:flex;width:auto}.uplot.side-legend .u-wrap{flex:none}.uplot.side-legend .u-legend{text-align:left;margin-left:0;width:220px}.uplot.side-legend .u-legend,.uplot.side-legend .u-legend td,.uplot.side-legend .u-legend th,.uplot.side-legend .u-legend tr{display:revert}.uplot.left-legend .u-legend{order:-1}.uplot.top-legend{display:flex;flex-direction:column}.uplot.top-legend .u-legend{order:-1}",""]),t["default"]=l},1288:function(e,t,n){"use strict";n.r(t);var i=n(3467),a=n.n(i),s=n(8715),o=n.n(s),l=o()(a());l.push([e.id,"#chart[data-v-380bc4e2]{background-color:var(--v-tertiary-darken2)}#chart[data-v-380bc4e2] .u-select{background-color:hsla(0,0%,100%,.07)}",""]),t["default"]=l},403:function(e,t,n){"use strict";n.r(t);var i=n(3467),a=n.n(i),s=n(8715),o=n.n(s),l=o()(a());l.push([e.id,".v-badge__badge{height:auto;padding:0}",""]),t["default"]=l},73:function(e,t,n){"use strict";n.r(t);var i=n(3467),a=n.n(i),s=n(8715),o=n.n(s),l=o()(a());l.push([e.id,".v-list[data-v-6b1b57d9] .v-label{margin-left:5px}.v-list-item__icon[data-v-6b1b57d9]{margin-right:15px!important}.v-list-item__title[data-v-6b1b57d9]{color:#fff}",""]),t["default"]=l},1948:function(e,t,n){"use strict";n.r(t);var i=n(3467),a=n.n(i),s=n(8715),o=n.n(s),l=o()(a());l.push([e.id,".v-navigation-drawer[data-v-ad4f4ac4]{z-index:2}.theme--dark.v-navigation-drawer[data-v-ad4f4ac4]{background-color:var(--v-primary-darken2)}.grid[data-v-ad4f4ac4]{position:relative}.item[data-v-ad4f4ac4]{position:absolute;z-index:1}.item.muuri-item-dragging[data-v-ad4f4ac4]{z-index:3}.item.muuri-item-releasing[data-v-ad4f4ac4]{z-index:2}.item.muuri-item-hidden[data-v-ad4f4ac4]{z-index:0}.item-content[data-v-ad4f4ac4]{position:relative;cursor:pointer;border-radius:6px;margin:5px}.pulse[data-v-ad4f4ac4]{-webkit-animation:pulse-ad4f4ac4 1s infinite;animation:pulse-ad4f4ac4 1s infinite}@-webkit-keyframes pulse-ad4f4ac4{0%{opacity:1}50%{opacity:.5}}@keyframes pulse-ad4f4ac4{0%{opacity:1}50%{opacity:.5}}",""]),t["default"]=l},654:function(e,t,n){var i=n(5803);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(3514).Z;a("c25edaf4",i,!0,{sourceMap:!1,shadowMode:!1})},8862:function(e,t,n){var i=n(1288);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(3514).Z;a("9dfb7adc",i,!0,{sourceMap:!1,shadowMode:!1})},7537:function(e,t,n){var i=n(403);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(3514).Z;a("219e9380",i,!0,{sourceMap:!1,shadowMode:!1})},4387:function(e,t,n){var i=n(73);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(3514).Z;a("45b2ead8",i,!0,{sourceMap:!1,shadowMode:!1})},3534:function(e,t,n){var i=n(1948);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(3514).Z;a("b1413ad6",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
2
|
-
//# sourceMappingURL=569.js.map
|