openc3-tool-dataviewer 5.0.7 → 5.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/plugin.txt +1 -0
- data/tools/dataviewer/js/271.js +2 -0
- data/tools/dataviewer/js/271.js.map +1 -0
- data/tools/dataviewer/js/570.js +12 -0
- data/tools/dataviewer/js/570.js.map +1 -0
- data/tools/dataviewer/js/app.js +1 -1
- data/tools/dataviewer/js/app.js.map +1 -1
- metadata +6 -6
- data/tools/dataviewer/js/575.js +0 -2
- data/tools/dataviewer/js/575.js.map +0 -1
- data/tools/dataviewer/js/94.js +0 -12
- data/tools/dataviewer/js/94.js.map +0 -1
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3-tool-dataviewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.8
|
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-08-
|
12
|
+
date: 2022-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: " This plugin adds the OpenC3 Data Viewer tool\n"
|
15
15
|
email:
|
@@ -24,10 +24,10 @@ files:
|
|
24
24
|
- Rakefile
|
25
25
|
- plugin.txt
|
26
26
|
- tools/dataviewer/index.html
|
27
|
-
- tools/dataviewer/js/
|
28
|
-
- tools/dataviewer/js/
|
29
|
-
- tools/dataviewer/js/
|
30
|
-
- tools/dataviewer/js/
|
27
|
+
- tools/dataviewer/js/271.js
|
28
|
+
- tools/dataviewer/js/271.js.map
|
29
|
+
- tools/dataviewer/js/570.js
|
30
|
+
- tools/dataviewer/js/570.js.map
|
31
31
|
- tools/dataviewer/js/app.js
|
32
32
|
- tools/dataviewer/js/app.js.map
|
33
33
|
homepage: https://github.com/OpenC3/openc3
|
data/tools/dataviewer/js/575.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
(self["webpackChunk_openc3_tool_dataviewer"]=self["webpackChunk_openc3_tool_dataviewer"]||[]).push([[575],{8575:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ce}});var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("top-bar",{attrs:{menus:e.menus,title:e.title}}),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Start Date",type:"date",rules:[e.rules.required],"data-test":"start-date"},model:{value:e.startDate,callback:function(n){e.startDate=n},expression:"startDate"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"Start Time",type:"time",step:"1",rules:[e.rules.required],"data-test":"start-time"},model:{value:e.startTime,callback:function(n){e.startTime=n},expression:"startTime"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"End Date",type:"date",rules:e.endTime?[e.rules.required]:[],"data-test":"end-date"},model:{value:e.endDate,callback:function(n){e.endDate=n},expression:"endDate"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"End Time",type:"time",step:"1",rules:e.endDate?[e.rules.required]:[],"data-test":"end-time"},model:{value:e.endTime,callback:function(n){e.endTime=n},expression:"endTime"}})],1),t("v-col",{staticClass:"pt-4",attrs:{cols:"auto"}},[e.running?t("v-btn",{attrs:{color:"red",width:"100","data-test":"stop-button"},on:{click:e.stop}},[e._v(" Stop ")]):t("v-btn",{attrs:{disabled:!e.canStart,color:"green",width:"100","data-test":"start-button"},on:{click:e.start}},[e._v(" Start ")])],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.warning||e.error||e.connectionFailure,expression:"warning || error || connectionFailure"}],staticClass:"mb-3"},[t("v-alert",{attrs:{type:"warning",dismissible:""},model:{value:e.warning,callback:function(n){e.warning=n},expression:"warning"}},[e._v(" "+e._s(e.warningText)+" ")]),t("v-alert",{attrs:{type:"error",dismissible:""},model:{value:e.error,callback:function(n){e.error=n},expression:"error"}},[e._v(" "+e._s(e.errorText)+" ")]),t("v-alert",{attrs:{type:"error"},model:{value:e.connectionFailure,callback:function(n){e.connectionFailure=n},expression:"connectionFailure"}},[e._v(" OpenC3 backend connection failed. ")])],1),t("v-card",[t("v-tabs",{ref:"tabs",model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},[e._l(e.config.tabs,(function(n,i){return t("v-tab",{key:i,attrs:{"data-test":"tab"},on:{contextmenu:function(n){return e.tabMenu(n,i)}}},[e._v(" "+e._s(n.name)+" ")])})),t("v-btn",{staticClass:"mt-2 ml-2",attrs:{icon:"","data-test":"new-tab"},on:{click:e.addTab}},[t("v-icon",[e._v("mdi-tab-plus")])],1)],2),t("v-tabs-items",{model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},e._l(e.config.tabs,(function(n,i){return t("v-tab-item",{key:i,attrs:{eager:""}},[e._l(n.packets,(function(n,l){return t("v-card",{key:i+"-"+l,attrs:{flat:""}},[t("v-divider"),t("v-card-title",{staticClass:"pa-3"},[t("span",{domProps:{textContent:e._s(e.packetTitle(n))}}),t("v-spacer"),t("v-btn",{attrs:{icon:"","data-test":"delete-packet"},on:{click:function(){return e.deleteComponent(i,l)}}},[t("v-icon",{attrs:{color:"red"}},[e._v("mdi-delete")])],1)],1),"DumpComponent"===n.component?t("dump-component",{directives:[{name:"show",rawName:"v-show",value:e.receivedPackets[e.topicKey(n)],expression:"receivedPackets[topicKey(packet)]"}],ref:e.topicKey(n)+"-display",refInFor:!0,attrs:{config:n.config},on:{"config-change":function(e){return n.config=e}}}):t("v-card-text",[t("v-alert",{attrs:{type:"error"}},[e._v(" Component missing: "),t("span",{staticClass:"text-component-missing-name"},[e._v(" "+e._s(n.component)+" ")])])],1),e.receivedPackets[e.topicKey(n)]?e._e():t("v-card-text",[e._v(" No data! Make sure to hit the START button! ")])],1)})),n.packets.length?e._e():t("v-card",[t("v-card-title",[e._v(" This tab is empty ")]),t("v-card-text",[e._v(" Click the button below to add packets. Right click on the tab name above to rename or delete this tab. ")])],1),t("v-btn",{attrs:{block:"","data-test":"new-packet"},on:{click:function(){return e.openComponentDialog(i)}}},[t("v-icon",{staticClass:"mr-2"},[e._v("$astro-add-large")]),e._v(" Click here to add a packet ")],1)],2)})),1),e.config.tabs.length?e._e():t("v-card",[t("v-card-title",[e._v("You're not viewing any packets")]),t("v-card-text",[e._v("Click the new tab icon to start.")])],1)],1),e.openConfig?t("open-config-dialog",{attrs:{tool:e.toolName},on:{success:function(n){return e.openConfiguration(n)}},model:{value:e.openConfig,callback:function(n){e.openConfig=n},expression:"openConfig"}}):e._e(),e.saveConfig?t("save-config-dialog",{attrs:{tool:e.toolName},on:{success:function(n){return e.saveConfiguration(n)}},model:{value:e.saveConfig,callback:function(n){e.saveConfig=n},expression:"saveConfig"}}):e._e(),t("v-dialog",{attrs:{width:"600"},model:{value:e.tabNameDialog,callback:function(n){e.tabNameDialog=n},expression:"tabNameDialog"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" DataViewer: Rename Tab")]),t("v-spacer")],1),t("v-card-text",[t("v-text-field",{attrs:{label:"Tab name","data-test":"rename-tab-input"},model:{value:e.newTabName,callback:function(n){e.newTabName=n},expression:"newTabName"}})],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-rename"},on:{click:e.cancelTabRename}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"rename",disabled:!e.newTabName},on:{click:e.renameTab}},[e._v(" Rename ")])],1)],1)],1),t("v-menu",{attrs:{"position-x":e.tabMenuX,"position-y":e.tabMenuY,absolute:"","offset-y":""},model:{value:e.showTabMenu,callback:function(n){e.showTabMenu=n},expression:"showTabMenu"}},[t("v-list",[t("v-list-item",{attrs:{"data-test":"context-menu-rename"}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:e.openTabNameDialog}},[e._v(" Rename ")])],1),t("v-list-item",{attrs:{"data-test":"context-menu-delete"}},[t("v-list-item-title",{staticStyle:{cursor:"pointer"},on:{click:e.deleteTab}},[e._v(" Delete ")])],1)],1)],1),t("add-component-dialog",{on:{add:e.addComponent,cancel:e.cancelAddComponent},model:{value:e.showAddComponentDialog,callback:function(n){e.showAddComponentDialog=n},expression:"showAddComponentDialog"}})],1)},l=[],o=t(6625),a=t(5627),c=t(8378),s=(t(4870),t(3985),t(8188),t(8178),t(3108),t(1939),t(4769),t(3450),t(6710),t(9805),t(5881)),r=t(8816),u=t(578),m=t(7105),d=t(6455),A=t(1901),p=(t(1372),t(1245),t(7950),t(3675),t(4898),t(5825),t(7170),t(8857),t(8329),t(6279),t(427),t(1159),t(2516),t(4349),t(5273),t(6729),t(1801),t(574),t(5787),t(9271),t(3160),t(5688),t(3157),t(1700),t(315),t(556),t(9224),t(6297),t(8882),t(7233),t(8673),t(5734),t(8233),t(9644)),f=t.n(p),h=t(4091),v=new h["default"],C=f().create({baseURL:location.origin,timeout:6e4,params:{}});C.interceptors.response.use((function(e){return e}),(function(e){if(e.response){if(401===e.response.status)delete localStorage.openc3Token,OpenC3Auth.login(location.href);else{var n,t,i,l,o,a,c,s,r,u;if(localStorage.axiosIgnoreResponse===e.response.status.toString())return Promise.reject(e);var m="HTTP ".concat(e.response.status," - ");if(null!==(n=e.response)&&void 0!==n&&n.statusText&&(m+="".concat(e.response.statusText," ")),null!==(t=e.response)&&void 0!==t&&null!==(i=t.config)&&void 0!==i&&i.data&&(m+="".concat(e.response.config.data," ")),null!==(l=e.response)&&void 0!==l&&null!==(o=l.data)&&void 0!==o&&o.message)m+="".concat(e.response.data.message);else if(null!==(a=e.response)&&void 0!==a&&null!==(c=a.data)&&void 0!==c&&c.exception)m+="".concat(e.response.data.exception);else if(null!==(s=e.response)&&void 0!==s&&null!==(r=s.data)&&void 0!==r&&null!==(u=r.error)&&void 0!==u&&u.message)e.response.data.error.class&&(m+="".concat(e.response.data.error.class," ")),m+="".concat(e.response.data.error.message);else{var d;m+="".concat(null===(d=e.response)||void 0===d?void 0:d.data)}v.$notify.serious({title:"Network error",body:m})}throw e}throw e}));var g=C,b=function(){function e(){(0,m.Z)(this,e),(0,A.Z)(this,"id",1)}return(0,d.Z)(e,[{key:"exec",value:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n,t){var i,l,a,c=arguments;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=c.length>2&&void 0!==c[2]?c[2]:{},e.prev=1,e.next=4,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](1),OpenC3Auth.login();case 9:return this.id=this.id+1,e.prev=10,i["scope"]=localStorage.scope,e.next=14,g.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"}});case 14:return l=e.sent,e.abrupt("return",l.data.result);case 18:throw e.prev=18,e.t1=e["catch"](10),a=new Error,e.t1.response?(a.name=e.t1.response.data.error.data.class,a.message=e.t1.response.data.error.data.message):e.t1.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",a;case 23:case"end":return e.stop()}}),e,this,[[1,6],[10,18]])})));function n(n,t){return e.apply(this,arguments)}return n}()},{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:"connect_interface",value:function(e){return 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,n,t){return this.exec("get_item",[e,n,t])}},{key:"get_parameter",value:function(e,n,t){return this.exec("get_parameter",[e,n,t])}},{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_oldest_logfile",value:function(){return this.exec("get_oldest_logfile",[])}},{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,n){return this.exec("get_telemetry",[e,n])}},{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,a.Z)((0,o.Z)().mark((function e(n,t,i){var l,a,c,s;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_packet",[n,t],{type:i});case 2:if(l=e.sent,null!=l)for(a=l.length,c=null,s=0;s<a;s++)c=this.decode_openc3_type(l[s][1]),null!==c&&(l[s][1]=c);return e.abrupt("return",l);case 5:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{key:"get_packet_derived_items",value:function(e,n){return this.exec("get_packet_derived_items",[e,n])}},{key:"get_tlm_buffer",value:function(e,n){return this.exec("get_tlm_buffer",[e,n])}},{key:"get_tlm_values",value:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n){var t,i,l,a;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_values",[n]);case 2:for(t=e.sent,i=t[0].length,l=null,a=0;a<i;a++)l=this.decode_openc3_type(t[0][a]),null!==l&&(t[0][a]=l);return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}()},{key:"get_limits",value:function(e,n,t){return this.exec("get_limits",[e,n,t])}},{key:"tlm",value:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n,t,i){var l,a;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("tlm",[n,t,i]);case 2:return l=e.sent,a=this.decode_openc3_type(l),null!==a&&(0,r.Z)("data"),e.abrupt("return",l);case 6:case"end":return e.stop()}}),e,this)})));function n(n,t,i){return e.apply(this,arguments)}return n}()},{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,n){return this.exec("get_command",[e,n])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,n,t,i])}},{key:"get_cmd_buffer",value:function(e,n){return this.exec("get_cmd_buffer",[e,n])}},{key:"_cmd",value:function(e,n,t,i){var l=null;for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(l=this.encode_openc3_type(i[o]),null!==l&&(i[o]=l));return this.exec(e,[n,t,i])}},{key:"get_cmd_hazardous",value:function(e,n,t){return void 0===n?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,n,t)}},{key:"cmd",value:function(e,n,t){return void 0===n?this.exec("cmd",e):this._cmd("cmd",e,n,t)}},{key:"cmd_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,n,t)}},{key:"cmd_raw",value:function(e,n,t){return void 0===n?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,n,t)}},{key:"cmd_raw_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,n,t)}},{key:"cmd_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,n,t)}},{key:"cmd_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,n,t)}},{key:"cmd_raw_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,n,t)}},{key:"cmd_raw_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,n,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,n){return this.exec("send_raw",[e,n])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,n){return this.exec("load_config",[e,n])}},{key:"save_config",value:function(e,n,t){return this.exec("save_config",[e,n,t])}},{key:"delete_config",value:function(e,n){return this.exec("delete_config",[e,n])}},{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,n){return this.exec("save_setting",[e,n])}},{key:"hashString",value:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n){var t,i,l;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return t=(new TextEncoder).encode(n),e.next=4,crypto.subtle.digest("SHA-256",t);case 4:return i=e.sent,l=new Uint8Array(i),e.abrupt("return",Array.from(l).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function n(n){return e.apply(this,arguments)}return n}()}]),e}(),k=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(n){return n.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(n){e.search=n},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,n){return n.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(n){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(n){return n.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)},y=[],_=(t(4908),t(4083),{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,n=-1;(new b).list_configs(this.tool).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},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 n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.selectedItem.config===e.config&&(n.selectedItem=null),n.configs.splice(n.configs.indexOf(e),1),(new b).delete_config(n.tool,e.config)})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}}),w=_,T=t(3287),x=(0,T.Z)(w,k,y,!1,null,"db42aa32",null),N=x.exports,S=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:"600"},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(n){return n.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(n){e.search=n},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,n){return n.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(n){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(n){e.configName=n},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(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" Ok ")])],1)],1)])],1)])],1)},D=[],P={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,n=-1;(new b).list_configs(this.tool).then((function(t){e.configs=t.map((function(e){return n+=1,{configId:n,config:e}}))})).catch((function(n){e.$emit("warning","Failed to connect to OpenC3. ".concat(n))}))},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 n=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(e.config),{okText:"Delete",cancelText:"Cancel"}).then((function(t){n.configName===e.config&&(n.selectedItem=null,n.configName=""),n.configs.splice(n.configs.indexOf(e.config),1),(new b).delete_config(n.tool,e.config)})).catch((function(t){t&&n.$emit("warning","Failed to delete config ".concat(e.config," Error: ").concat(t))}))}}},O=P,I=(0,T.Z)(O,S,D,!1,null,null,null),M=I.exports,R=function(){var e=this,n=e.$createElement,t=e._self._c||n;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(n){e.selectedTargetName=n},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(n){e.selectedPacketName=n},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(n){return e.itemNameChanged(n)}},model:{value:e.selectedItemName,callback:function(n){e.selectedItemName=n},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":""}},[t("v-col",{attrs:{cols:e.colSize}},[e._v("Description: "+e._s(e.description))])],1)],1)},E=[],$=(t(9529),t(4115),t(634),t(9228),{props:{allowAll:{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,n,t;return{targetNames:[],packetNames:[],itemNames:[],selectedTargetName:null===(e=this.initialTargetName)||void 0===e?void 0:e.toUpperCase(),selectedPacketName:null===(n=this.initialPacketName)||void 0===n?void 0:n.toUpperCase(),selectedItemName:null===(t=this.initialItemName)||void 0===t?void 0:t.toUpperCase(),description:"",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 b,this.api.get_target_list().then((function(n){e.targetNames=n.map((function(e){return{label:e,value:e}})),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,n){this.updatePackets(),this.itemNames=[]},reduced:function(e,n){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");this.internalDisabled=!0;var n="tlm"===this.mode?"get_all_telemetry_names":"get_all_command_names";this.api[n](this.selectedTargetName).then((function(n){e.packetNames=n.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(n){return n.value===e.selectedPacketName}));e.chooseItem&&e.updateItems(),e.internalDisabled=!1}))},updateItems:function(){var e=this;if("ALL"!==this.selectedPacketName){this.internalDisabled=!0;var n="tlm"===this.mode?"get_telemetry":"get_command";this.api[n](this.selectedTargetName,this.selectedPacketName).then((function(n){e.itemNames=n.items.map((function(n){return"DECOM"===e.reduced?[{label:n.name,value:n.name,description:n.description}]:e.makeReducedItems(n)})).reduce((function(e,n){return e.concat(n)}),[]),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 n=!e.array_size&&!e.states;return n&&["UINT","INT","FLOAT"].includes(e.data_type)?["MIN","MAX","AVG","STDDEV"].map((function(n){return{label:"".concat(e.name,"_").concat(n),value:"".concat(e.name,"_").concat(n),description:"".concat(n," ").concat(e.description)}})):[]},targetNameChanged:function(e){this.selectedTargetName=e,this.selectedPacketName="",this.selectedItemName="",this.updatePackets()},packetNameChanged:function(e){var n=this;if("ALL"===e)this.itemsDisabled=!0,this.internalDisabled=!1;else{this.itemsDisabled=!1;var t=this.packetNames.find((function(n){return e===n.value}));this.selectedPacketName=t.value;var i="tlm"===this.mode?"get_telemetry":"get_command";this.api[i](this.selectedTargetName,this.selectedPacketName).then((function(e){n.description=e.description}))}this.chooseItem?(this.selectedItemName="",this.updateItems()):this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,reduced:this.reduced})},itemNameChanged:function(e){var n=this.itemNames.find((function(n){return e===n.value}));this.selectedItemName=n.value,this.description=n.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(n){if(n!==e.ALL){var t="tlm"===e.mode?"get_telemetry":"get_command";e.api[t](e.selectedTargetName,n.value).then((function(t){t.items.forEach((function(t){e.$emit("click",{targetName:e.selectedTargetName,packetName:n.value,itemName:t["name"],reduced:e.reduced})}))}))}}))},allPacketItems:function(){var e=this;this.itemNames.forEach((function(n){n!==e.ALL&&e.$emit("click",{targetName:e.selectedTargetName,packetName:e.selectedPacketName,itemName:n.value,reduced:e.reduced})}))}}}),L=$,F=(0,T.Z)(L,R,E,!1,null,null,null),U=F.exports,Z=t(3492);Z.ConnectionMonitor.staleThreshold=60;var V=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,m.Z)(this,e),this._cable=Z.createConsumer(n)}return(0,d.Z)(e,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(e,n){var t=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){return t._cable.subscriptions.create((0,c.Z)({channel:e,scope:n,token:localStorage.openc3Token},l),i)}))}}]),e}(),j=function(){var e=this,n=e.$createElement,t=e._self._c||n;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 l=i.on,o=i.attrs;return[t("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT(e.title+" "+n.label)}},"v-btn",o,!1),l),[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,l){return[i.divider?t("v-divider"):t("v-list-item",{key:l,attrs:{disabled:i.disabled,"data-test":e.formatDT(e.title+" "+n.label+" "+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(n){e.checked=n},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)])},B=[],W=(t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}}}),H=W,z=(t(5741),(0,T.Z)(H,j,B,!1,null,"3237297b",null)),K=z.exports,Y=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-container",{staticClass:"pt-0"},[t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{staticClass:"pt-0 mt-0",attrs:{label:"Search","append-icon":"mdi-magnify","single-line":"","hide-details":""},model:{value:e.filterText,callback:function(n){e.filterText=n},expression:"filterText"}})],1)],1),t("v-row",[t("v-col",[t("v-slider",{attrs:{"prepend-icon":"mdi-step-backward","append-icon":"mdi-step-forward",min:1-e.history.length,max:0,"hide-details":""},on:{mousedown:e.pause,"click:prepend":e.stepBackward,"click:append":e.stepForward},model:{value:e.pauseOffset,callback:function(n){e.pauseOffset=n},expression:"pauseOffset"}})],1)],1),t("v-row",{attrs:{dense:"","no-gutters":""}},[t("v-col",[t("div",{staticClass:"text-area-container"},[t("v-textarea",{ref:"textarea",attrs:{value:e.displayText,"auto-grow":1===e.receivedCount,readonly:"",solo:"",flat:"","hide-details":"","data-test":"dump-component-text-area"}}),t("div",{staticClass:"floating-buttons"},[t("v-menu",{attrs:{"close-on-content-click":!1,"min-width":900,"nudge-left":910},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,l=n.attrs;return[t("v-btn",e._g(e._b({staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-open-settings"}},"v-btn",l,!1),i),[t("v-icon",[e._v("$astro-settings")])],1)]}}])},[t("v-card",[t("v-card-title",{attrs:{"data-test":"display-settings-card"}},[e._v(" Display settings ")]),t("v-card-text",[t("v-row",{attrs:{"no-gutters":""}},["RAW"===e.mode?t("v-col",[t("v-radio-group",{attrs:{label:"Display format"},model:{value:e.currentConfig.format,callback:function(n){e.$set(e.currentConfig,"format",n)},expression:"currentConfig.format"}},[t("v-radio",{attrs:{label:"Hex",value:"hex","data-test":"dump-component-settings-format-hex"}}),t("v-radio",{attrs:{label:"ASCII",value:"ascii","data-test":"dump-component-settings-format-ascii"}})],1)],1):e._e(),t("v-col",[t("v-radio-group",{attrs:{label:"Print newest packets to the"},model:{value:e.currentConfig.newestAtTop,callback:function(n){e.$set(e.currentConfig,"newestAtTop",n)},expression:"currentConfig.newestAtTop"}},[t("v-radio",{attrs:{label:"Top",value:"","data-test":"dump-component-settings-newest-top"}}),t("v-radio",{attrs:{label:"Bottom",value:!1,"data-test":"dump-component-settings-newest-bottom"}})],1)],1),t("v-col",["RAW"===e.mode?t("v-switch",{attrs:{label:"Show line address","data-test":"dump-component-settings-show-address"},model:{value:e.currentConfig.showLineAddress,callback:function(n){e.$set(e.currentConfig,"showLineAddress",n)},expression:"currentConfig.showLineAddress"}}):e._e(),t("v-switch",{attrs:{label:"Show timestamp","data-test":"dump-component-settings-show-timestamp"},model:{value:e.currentConfig.showTimestamp,callback:function(n){e.$set(e.currentConfig,"showTimestamp",n)},expression:"currentConfig.showTimestamp"}})],1),t("v-col",["RAW"===e.mode?t("v-text-field",{attrs:{label:"Bytes per line",type:"number",min:"1","data-test":"dump-component-settings-num-bytes"},on:{change:e.validateBytesPerLine},model:{value:e.currentConfig.bytesPerLine,callback:function(n){e.$set(e.currentConfig,"bytesPerLine",n)},expression:"currentConfig.bytesPerLine"}}):e._e(),t("v-text-field",{attrs:{label:"Packets to show",type:"number",hint:"Maximum: "+this.history.length,"persistent-hint":"",min:1,max:this.history.length,"data-test":"dump-component-settings-num-packets"},on:{change:e.validatePacketsToShow},model:{value:e.currentConfig.packetsToShow,callback:function(n){e.$set(e.currentConfig,"packetsToShow",n)},expression:"currentConfig.packetsToShow"}})],1)],1)],1)],1)],1),t("v-btn",{staticClass:"ml-2",attrs:{color:"secondary",fab:"",small:"","data-test":"dump-component-download"},on:{click:e.download}},[t("v-icon",[e._v("mdi-file-download")])],1),t("v-btn",{staticClass:"ml-2",class:{pulse:e.paused},attrs:{color:"primary",fab:"","data-test":"dump-component-play-pause"},on:{click:e.togglePlayPause}},[e.paused?t("v-icon",{attrs:{large:""}},[e._v("mdi-play")]):t("v-icon",{attrs:{large:""}},[e._v("mdi-pause")])],1)],1)],1)])],1)],1)},q=[],G=t(5060),X=(t(4707),t(1497),t(5640),t(1871),t(2501),t(5342),t(1235),t(6886),t(4121),t(523),t(6635)),J=t.n(X);function Q(){var e="/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/Component.js",n="6fd2811518d1600ee20f48ebc464fb78e867ddf5",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/Component.js",statementMap:{0:{start:{line:27,column:4},end:{line:30,column:5}},1:{start:{line:34,column:6},end:{line:38,column:17}},2:{start:{line:45,column:8},end:{line:45,column:40}},3:{start:{line:50,column:4},end:{line:54,column:5}},4:{start:{line:51,column:6},end:{line:53,column:7}},5:{start:{line:60,column:6},end:{line:60,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:26,column:8},end:{line:26,column:9}},loc:{start:{line:26,column:20},end:{line:31,column:3}},line:26},1:{name:"(anonymous_1)",decl:{start:{line:33,column:10},end:{line:33,column:11}},loc:{start:{line:33,column:22},end:{line:39,column:5}},line:33},2:{name:"(anonymous_2)",decl:{start:{line:44,column:15},end:{line:44,column:16}},loc:{start:{line:44,column:30},end:{line:46,column:7}},line:44},3:{name:"(anonymous_3)",decl:{start:{line:49,column:11},end:{line:49,column:12}},loc:{start:{line:49,column:23},end:{line:55,column:3}},line:49},4:{name:"(anonymous_4)",decl:{start:{line:57,column:13},end:{line:57,column:14}},loc:{start:{line:57,column:29},end:{line:61,column:5}},line:57}},branchMap:{0:{loc:{start:{line:34,column:13},end:{line:38,column:17}},type:"cond-expr",locations:[{start:{line:37,column:10},end:{line:37,column:15}},{start:{line:38,column:10},end:{line:38,column:17}}],line:34},1:{loc:{start:{line:34,column:13},end:{line:36,column:40}},type:"binary-expr",locations:[{start:{line:34,column:13},end:{line:34,column:30}},{start:{line:35,column:8},end:{line:35,column:36}},{start:{line:36,column:8},end:{line:36,column:40}}],line:34},2:{loc:{start:{line:50,column:4},end:{line:54,column:5}},type:"if",locations:[{start:{line:50,column:4},end:{line:54,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:50}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0,0],2:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6fd2811518d1600ee20f48ebc464fb78e867ddf5"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return Q=function(){return a},a}Q();var ee={props:{config:{type:Object}},data:function(){return Q().f[0]++,Q().s[0]++,{currentConfig:{},lastReceived:null}},computed:{mode:function(){return Q().f[1]++,Q().s[1]++,Q().b[1][0]++,this.lastReceived&&(Q().b[1][1]++,this.lastReceived.length>0)&&(Q().b[1][2]++,"buffer"in this.lastReceived[0])?(Q().b[0][0]++,"RAW"):(Q().b[0][1]++,"DECOM")}},watch:{currentConfig:{deep:!0,handler:function(e){Q().f[2]++,Q().s[2]++,this.$emit("config-change",e)}}},created:function(){Q().f[3]++,Q().s[3]++,this.config?(Q().b[2][0]++,Q().s[4]++,this.currentConfig=(0,c.Z)({},this.config)):Q().b[2][1]++},methods:{receive:function(e){Q().f[4]++,Q().s[5]++,this.lastReceived=e}}};function ne(){var e="/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",n="cbda850b17bd324e8ee58c0acaf34ca1c9f20bb0",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/DumpComponent.vue",statementMap:{0:{start:{line:193,column:25},end:{line:193,column:28}},1:{start:{line:198,column:4},end:{line:210,column:5}},2:{start:{line:216,column:6},end:{line:216,column:171}},3:{start:{line:219,column:6},end:{line:219,column:104}},4:{start:{line:224,column:6},end:{line:247,column:8}},5:{start:{line:225,column:8},end:{line:225,column:28}},6:{start:{line:226,column:22},end:{line:229,column:9}},7:{start:{line:230,column:8},end:{line:232,column:9}},8:{start:{line:231,column:10},end:{line:231,column:46}},9:{start:{line:233,column:8},end:{line:233,column:73}},10:{start:{line:234,column:8},end:{line:234,column:51}},11:{start:{line:235,column:8},end:{line:246,column:9}},12:{start:{line:236,column:29},end:{line:236,column:62}},13:{start:{line:237,column:10},end:{line:245,column:11}},14:{start:{line:238,column:12},end:{line:244,column:13}},15:{start:{line:239,column:14},end:{line:239,column:43}},16:{start:{line:240,column:19},end:{line:244,column:13}},17:{start:{line:241,column:14},end:{line:241,column:71}},18:{start:{line:243,column:14},end:{line:243,column:53}},19:{start:{line:248,column:6},end:{line:248,column:28}},20:{start:{line:249,column:6},end:{line:251,column:7}},21:{start:{line:250,column:8},end:{line:250,column:35}},22:{start:{line:254,column:6},end:{line:260,column:7}},23:{start:{line:255,column:8},end:{line:255,column:43}},24:{start:{line:256,column:8},end:{line:256,column:49}},25:{start:{line:258,column:8},end:{line:258,column:28}},26:{start:{line:259,column:8},end:{line:259,column:33}},27:{start:{line:263,column:6},end:{line:263,column:31}},28:{start:{line:266,column:6},end:{line:266,column:31}},29:{start:{line:270,column:26},end:{line:277,column:5}},30:{start:{line:278,column:4},end:{line:281,column:5}},31:{start:{line:284,column:4},end:{line:284,column:75}},32:{start:{line:289,column:6},end:{line:300,column:7}},33:{start:{line:290,column:8},end:{line:293,column:9}},34:{start:{line:295,column:8},end:{line:299,column:9}},35:{start:{line:305,column:8},end:{line:305,column:60}},36:{start:{line:306,column:6},end:{line:309,column:8}},37:{start:{line:307,column:8},end:{line:308,column:58}},38:{start:{line:312,column:20},end:{line:312,column:67}},39:{start:{line:314,column:25},end:{line:314,column:74}},40:{start:{line:315,column:6},end:{line:320,column:35}},41:{start:{line:316,column:28},end:{line:316,column:34}},42:{start:{line:321,column:6},end:{line:325,column:7}},43:{start:{line:323,column:31},end:{line:323,column:77}},44:{start:{line:324,column:8},end:{line:324,column:50}},45:{start:{line:327,column:18},end:{line:327,column:63}},46:{start:{line:328,column:6},end:{line:328,column:35}},47:{start:{line:329,column:6},end:{line:331,column:7}},48:{start:{line:330,column:8},end:{line:330,column:35}},49:{start:{line:332,column:6},end:{line:332,column:45}},50:{start:{line:335,column:6},end:{line:335,column:71}},51:{start:{line:338,column:17},end:{line:338,column:19}},52:{start:{line:339,column:6},end:{line:350,column:7}},53:{start:{line:340,column:29},end:{line:340,column:50}},54:{start:{line:341,column:32},end:{line:341,column:64}},55:{start:{line:342,column:29},end:{line:342,column:65}},56:{start:{line:344,column:24},end:{line:344,column:72}},57:{start:{line:345,column:8},end:{line:345,column:63}},58:{start:{line:346,column:8},end:{line:346,column:57}},59:{start:{line:348,column:8},end:{line:348,column:69}},60:{start:{line:349,column:8},end:{line:349,column:36}},61:{start:{line:351,column:6},end:{line:382,column:7}},62:{start:{line:353,column:8},end:{line:376,column:21}},63:{start:{line:356,column:30},end:{line:356,column:32}},64:{start:{line:357,column:12},end:{line:365,column:13}},65:{start:{line:358,column:14},end:{line:360,column:15}},66:{start:{line:359,column:16},end:{line:359,column:79}},67:{start:{line:362,column:14},end:{line:364,column:15}},68:{start:{line:363,column:16},end:{line:363,column:64}},69:{start:{line:366,column:23},end:{line:366,column:44}},70:{start:{line:368,column:12},end:{line:373,column:13}},71:{start:{line:369,column:30},end:{line:371,column:33}},72:{start:{line:372,column:14},end:{line:372,column:42}},73:{start:{line:374,column:12},end:{line:374,column:23}},74:{start:{line:378,column:8},end:{line:381,column:21}},75:{start:{line:379,column:28},end:{line:379,column:42}},76:{start:{line:380,column:25},end:{line:380,column:51}},77:{start:{line:383,column:6},end:{line:383,column:35}},78:{start:{line:384,column:6},end:{line:384,column:17}},79:{start:{line:387,column:6},end:{line:389,column:7}},80:{start:{line:388,column:8},end:{line:388,column:43}},81:{start:{line:392,column:6},end:{line:396,column:7}},82:{start:{line:393,column:8},end:{line:393,column:62}},83:{start:{line:394,column:13},end:{line:396,column:7}},84:{start:{line:395,column:8},end:{line:395,column:44}},85:{start:{line:399,column:19},end:{line:401,column:8}},86:{start:{line:403,column:19},end:{line:403,column:46}},87:{start:{line:404,column:16},end:{line:404,column:41}},88:{start:{line:405,column:6},end:{line:405,column:21}},89:{start:{line:406,column:6},end:{line:409,column:7}},90:{start:{line:410,column:6},end:{line:410,column:18}},91:{start:{line:411,column:6},end:{line:411,column:37}},92:{start:{line:414,column:6},end:{line:414,column:24}},93:{start:{line:417,column:6},end:{line:417,column:32}},94:{start:{line:420,column:6},end:{line:420,column:18}},95:{start:{line:421,column:6},end:{line:421,column:24}},96:{start:{line:424,column:6},end:{line:424,column:18}},97:{start:{line:425,column:6},end:{line:425,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:197,column:8},end:{line:197,column:9}},loc:{start:{line:197,column:20},end:{line:211,column:3}},line:197},1:{name:"(anonymous_1)",decl:{start:{line:215,column:24},end:{line:215,column:25}},loc:{start:{line:215,column:36},end:{line:217,column:5}},line:215},2:{name:"(anonymous_2)",decl:{start:{line:218,column:26},end:{line:218,column:27}},loc:{start:{line:218,column:38},end:{line:220,column:5}},line:218},3:{name:"(anonymous_3)",decl:{start:{line:223,column:18},end:{line:223,column:19}},loc:{start:{line:223,column:34},end:{line:252,column:5}},line:223},4:{name:"(anonymous_4)",decl:{start:{line:224,column:19},end:{line:224,column:20}},loc:{start:{line:224,column:31},end:{line:247,column:7}},line:224},5:{name:"(anonymous_5)",decl:{start:{line:253,column:12},end:{line:253,column:13}},loc:{start:{line:253,column:27},end:{line:261,column:5}},line:253},6:{name:"(anonymous_6)",decl:{start:{line:262,column:24},end:{line:262,column:25}},loc:{start:{line:262,column:36},end:{line:264,column:5}},line:262},7:{name:"(anonymous_7)",decl:{start:{line:265,column:37},end:{line:265,column:38}},loc:{start:{line:265,column:49},end:{line:267,column:5}},line:265},8:{name:"(anonymous_8)",decl:{start:{line:269,column:11},end:{line:269,column:12}},loc:{start:{line:269,column:23},end:{line:282,column:3}},line:269},9:{name:"(anonymous_9)",decl:{start:{line:283,column:11},end:{line:283,column:12}},loc:{start:{line:283,column:23},end:{line:285,column:3}},line:283},10:{name:"(anonymous_10)",decl:{start:{line:287,column:21},end:{line:287,column:22}},loc:{start:{line:287,column:33},end:{line:301,column:5}},line:287},11:{name:"(anonymous_11)",decl:{start:{line:302,column:26},end:{line:302,column:27}},loc:{start:{line:302,column:38},end:{line:310,column:5}},line:302},12:{name:"(anonymous_12)",decl:{start:{line:306,column:21},end:{line:306,column:22}},loc:{start:{line:306,column:27},end:{line:309,column:7}},line:306},13:{name:"(anonymous_13)",decl:{start:{line:311,column:24},end:{line:311,column:25}},loc:{start:{line:311,column:36},end:{line:333,column:5}},line:311},14:{name:"(anonymous_14)",decl:{start:{line:316,column:16},end:{line:316,column:17}},loc:{start:{line:316,column:28},end:{line:316,column:34}},line:316},15:{name:"(anonymous_15)",decl:{start:{line:334,column:19},end:{line:334,column:20}},loc:{start:{line:334,column:35},end:{line:336,column:5}},line:334},16:{name:"(anonymous_16)",decl:{start:{line:337,column:25},end:{line:337,column:26}},loc:{start:{line:337,column:43},end:{line:385,column:5}},line:337},17:{name:"(anonymous_17)",decl:{start:{line:354,column:15},end:{line:354,column:16}},loc:{start:{line:354,column:37},end:{line:375,column:11}},line:354},18:{name:"(anonymous_18)",decl:{start:{line:358,column:42},end:{line:358,column:43}},loc:{start:{line:359,column:16},end:{line:359,column:79}},line:359},19:{name:"(anonymous_19)",decl:{start:{line:362,column:42},end:{line:362,column:43}},loc:{start:{line:363,column:16},end:{line:363,column:64}},line:363},20:{name:"(anonymous_20)",decl:{start:{line:379,column:18},end:{line:379,column:19}},loc:{start:{line:379,column:28},end:{line:379,column:42}},line:379},21:{name:"(anonymous_21)",decl:{start:{line:380,column:15},end:{line:380,column:16}},loc:{start:{line:380,column:25},end:{line:380,column:51}},line:380},22:{name:"(anonymous_22)",decl:{start:{line:386,column:26},end:{line:386,column:27}},loc:{start:{line:386,column:38},end:{line:390,column:5}},line:386},23:{name:"(anonymous_23)",decl:{start:{line:391,column:27},end:{line:391,column:28}},loc:{start:{line:391,column:39},end:{line:397,column:5}},line:391},24:{name:"(anonymous_24)",decl:{start:{line:398,column:14},end:{line:398,column:15}},loc:{start:{line:398,column:26},end:{line:412,column:5}},line:398},25:{name:"(anonymous_25)",decl:{start:{line:413,column:11},end:{line:413,column:12}},loc:{start:{line:413,column:23},end:{line:415,column:5}},line:413},26:{name:"(anonymous_26)",decl:{start:{line:416,column:21},end:{line:416,column:22}},loc:{start:{line:416,column:33},end:{line:418,column:5}},line:416},27:{name:"(anonymous_27)",decl:{start:{line:419,column:18},end:{line:419,column:19}},loc:{start:{line:419,column:30},end:{line:422,column:5}},line:419},28:{name:"(anonymous_28)",decl:{start:{line:423,column:17},end:{line:423,column:18}},loc:{start:{line:423,column:29},end:{line:426,column:5}},line:423}},branchMap:{0:{loc:{start:{line:230,column:8},end:{line:232,column:9}},type:"if",locations:[{start:{line:230,column:8},end:{line:232,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:230},1:{loc:{start:{line:235,column:8},end:{line:246,column:9}},type:"if",locations:[{start:{line:235,column:8},end:{line:246,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:235},2:{loc:{start:{line:237,column:10},end:{line:245,column:11}},type:"if",locations:[{start:{line:237,column:10},end:{line:245,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:237},3:{loc:{start:{line:238,column:12},end:{line:244,column:13}},type:"if",locations:[{start:{line:238,column:12},end:{line:244,column:13}},{start:{line:240,column:19},end:{line:244,column:13}}],line:238},4:{loc:{start:{line:240,column:19},end:{line:244,column:13}},type:"if",locations:[{start:{line:240,column:19},end:{line:244,column:13}},{start:{line:242,column:19},end:{line:244,column:13}}],line:240},5:{loc:{start:{line:249,column:6},end:{line:251,column:7}},type:"if",locations:[{start:{line:249,column:6},end:{line:251,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:249},6:{loc:{start:{line:249,column:10},end:{line:249,column:57}},type:"binary-expr",locations:[{start:{line:249,column:10},end:{line:249,column:22}},{start:{line:249,column:26},end:{line:249,column:57}}],line:249},7:{loc:{start:{line:254,column:6},end:{line:260,column:7}},type:"if",locations:[{start:{line:254,column:6},end:{line:260,column:7}},{start:{line:257,column:13},end:{line:260,column:7}}],line:254},8:{loc:{start:{line:289,column:6},end:{line:300,column:7}},type:"if",locations:[{start:{line:289,column:6},end:{line:300,column:7}},{start:{line:294,column:13},end:{line:300,column:7}}],line:289},9:{loc:{start:{line:312,column:20},end:{line:312,column:67}},type:"cond-expr",locations:[{start:{line:312,column:34},end:{line:312,column:52}},{start:{line:312,column:55},end:{line:312,column:67}}],line:312},10:{loc:{start:{line:314,column:25},end:{line:314,column:74}},type:"cond-expr",locations:[{start:{line:314,column:39},end:{line:314,column:52}},{start:{line:314,column:55},end:{line:314,column:74}}],line:314},11:{loc:{start:{line:321,column:6},end:{line:325,column:7}},type:"if",locations:[{start:{line:321,column:6},end:{line:325,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:321},12:{loc:{start:{line:329,column:6},end:{line:331,column:7}},type:"if",locations:[{start:{line:329,column:6},end:{line:331,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:329},13:{loc:{start:{line:339,column:6},end:{line:350,column:7}},type:"if",locations:[{start:{line:339,column:6},end:{line:350,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:339},14:{loc:{start:{line:351,column:6},end:{line:382,column:7}},type:"if",locations:[{start:{line:351,column:6},end:{line:382,column:7}},{start:{line:377,column:13},end:{line:382,column:7}}],line:351},15:{loc:{start:{line:357,column:12},end:{line:365,column:13}},type:"if",locations:[{start:{line:357,column:12},end:{line:365,column:13}},{start:{line:361,column:19},end:{line:365,column:13}}],line:357},16:{loc:{start:{line:368,column:12},end:{line:373,column:13}},type:"if",locations:[{start:{line:368,column:12},end:{line:373,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:368},17:{loc:{start:{line:387,column:6},end:{line:389,column:7}},type:"if",locations:[{start:{line:387,column:6},end:{line:389,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:387},18:{loc:{start:{line:392,column:6},end:{line:396,column:7}},type:"if",locations:[{start:{line:392,column:6},end:{line:396,column:7}},{start:{line:394,column:13},end:{line:396,column:7}}],line:392},19:{loc:{start:{line:394,column:13},end:{line:396,column:7}},type:"if",locations:[{start:{line:394,column:13},end:{line:396,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:394}},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,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97: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},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0]},inputSourceMap:{version:3,sources:["DumpComponent.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA;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",file:"DumpComponent.vue",sourceRoot:"src/tools/DataViewer",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--\x3e\n\n<template>\n <v-container class="pt-0">\n <v-row dense>\n <v-col>\n <v-text-field\n v-model="filterText"\n class="pt-0 mt-0"\n label="Search"\n append-icon="mdi-magnify"\n single-line\n hide-details\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <v-slider\n v-model="pauseOffset"\n v-on:mousedown="pause"\n @click:prepend="stepBackward"\n @click:append="stepForward"\n prepend-icon="mdi-step-backward"\n append-icon="mdi-step-forward"\n :min="1 - history.length"\n :max="0"\n hide-details\n />\n </v-col>\n </v-row>\n <v-row dense no-gutters>\n <v-col>\n <div class="text-area-container">\n <v-textarea\n ref="textarea"\n :value="displayText"\n :auto-grow="receivedCount === 1"\n readonly\n solo\n flat\n hide-details\n data-test="dump-component-text-area"\n />\n <div class="floating-buttons">\n <v-menu\n :close-on-content-click="false"\n :min-width="900"\n :nudge-left="910"\n >\n <template v-slot:activator="{ on, attrs }">\n <v-btn\n class="ml-2"\n color="secondary"\n v-bind="attrs"\n v-on="on"\n fab\n small\n data-test="dump-component-open-settings"\n >\n <v-icon>$astro-settings</v-icon>\n </v-btn>\n </template>\n <v-card>\n <v-card-title data-test="display-settings-card">\n Display settings\n </v-card-title>\n <v-card-text>\n <v-row no-gutters>\n <v-col v-if="mode === \'RAW\'">\n <v-radio-group\n v-model="currentConfig.format"\n label="Display format"\n >\n <v-radio\n label="Hex"\n value="hex"\n data-test="dump-component-settings-format-hex"\n />\n <v-radio\n label="ASCII"\n value="ascii"\n data-test="dump-component-settings-format-ascii"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-radio-group\n v-model="currentConfig.newestAtTop"\n label="Print newest packets to the"\n >\n <v-radio\n label="Top"\n value\n data-test="dump-component-settings-newest-top"\n />\n <v-radio\n label="Bottom"\n :value="false"\n data-test="dump-component-settings-newest-bottom"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-switch\n v-if="mode === \'RAW\'"\n v-model="currentConfig.showLineAddress"\n label="Show line address"\n data-test="dump-component-settings-show-address"\n />\n <v-switch\n v-model="currentConfig.showTimestamp"\n label="Show timestamp"\n data-test="dump-component-settings-show-timestamp"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-if="mode === \'RAW\'"\n v-model="currentConfig.bytesPerLine"\n label="Bytes per line"\n type="number"\n min="1"\n v-on:change="validateBytesPerLine"\n data-test="dump-component-settings-num-bytes"\n />\n <v-text-field\n v-model="currentConfig.packetsToShow"\n label="Packets to show"\n type="number"\n :hint="`Maximum: ${this.history.length}`"\n persistent-hint\n :min="1"\n :max="this.history.length"\n v-on:change="validatePacketsToShow"\n data-test="dump-component-settings-num-packets"\n />\n </v-col>\n </v-row>\n </v-card-text>\n </v-card>\n </v-menu>\n <v-btn\n class="ml-2"\n v-on:click="download"\n color="secondary"\n fab\n small\n data-test="dump-component-download"\n >\n <v-icon>mdi-file-download</v-icon>\n </v-btn>\n <v-btn\n class="ml-2"\n :class="{ pulse: paused }"\n v-on:click="togglePlayPause"\n color="primary"\n fab\n data-test="dump-component-play-pause"\n >\n <v-icon large v-if="paused">mdi-play</v-icon>\n <v-icon large v-else>mdi-pause</v-icon>\n </v-btn>\n </div>\n </div>\n </v-col>\n </v-row>\n </v-container>\n</template>\n\n<script>\nimport _ from \'lodash\'\nimport { format } from \'date-fns\'\nimport Component from \'./Component\'\n\nconst HISTORY_MAX_SIZE = 100 // TODO: put in config, or make the component learn it based on packet size, or something?\n\nexport default {\n mixins: [Component],\n data: function () {\n return {\n history: new Array(HISTORY_MAX_SIZE),\n historyPointer: -1, // index of the newest packet in history\n receivedCount: 0,\n filterText: \'\',\n paused: false,\n pausedAt: 0,\n pauseOffset: 0,\n pausedHistory: [],\n textarea: null,\n displayText: null,\n packetSize: 0,\n }\n },\n computed: {\n // These are just here to trigger their respective watch functions above\n // There\'s a better solution to this in Vue 3 v3.vuejs.org/api/computed-watch-api.html#watching-multiple-sources\n allInstantSettings: function () {\n return `${this.currentConfig.format}|${this.currentConfig.showLineAddress}|${this.currentConfig.showTimestamp}|${this.currentConfig.newestAtTop}|${this.pauseOffset}`\n },\n allDebouncedSettings: function () {\n return `${this.currentConfig.bytesPerLine}|${this.currentConfig.packetsToShow}|${this.filterText}`\n },\n },\n watch: {\n lastReceived: function (data) {\n data.forEach((packet) => {\n delete packet.packet\n let decoded = {\n ...packet,\n receivedCount: ++this.receivedCount,\n }\n if (\'buffer\' in packet) {\n decoded.buffer = atob(packet.buffer)\n }\n this.historyPointer = ++this.historyPointer % this.history.length\n this.history[this.historyPointer] = decoded\n if (!this.paused) {\n const packetText = this.calculatePacketText(decoded)\n if (this.matchesSearch(packetText)) {\n if (!this.displayText) {\n this.displayText = packetText\n } else if (this.currentConfig.newestAtTop) {\n this.displayText = `${packetText}\\n\\n${this.displayText}`\n } else {\n this.displayText += `\\n\\n${packetText}`\n }\n }\n }\n })\n this.trimDisplayText()\n if (!this.paused && !this.currentConfig.newestAtTop) {\n this.updateScrollPosition()\n }\n },\n paused: function (val) {\n if (val) {\n this.pausedAt = this.historyPointer\n this.pausedHistory = this.history.slice()\n } else {\n this.pauseOffset = 0\n this.rebuildDisplayText()\n }\n },\n allInstantSettings: function () {\n this.rebuildDisplayText()\n },\n allDebouncedSettings: _.debounce(function () {\n this.rebuildDisplayText()\n }, 300),\n },\n created: function () {\n const defaultConfig = {\n format: \'hex\',\n showLineAddress: true,\n showTimestamp: true,\n bytesPerLine: 16,\n packetsToShow: 1,\n newestAtTop: false,\n }\n this.currentConfig = {\n ...defaultConfig, // In case anything isn\'t defined in this.config\n ...this.currentConfig,\n }\n },\n mounted: function () {\n this.textarea = this.$refs.textarea.$el.querySelectorAll(\'textarea\')[0]\n },\n methods: {\n trimDisplayText: function () {\n // Could make this more robust by counting lines instead, but that\'s slower\n if (this.currentConfig.newestAtTop) {\n this.displayText = this.displayText.substring(\n 0,\n this.packetSize * this.currentConfig.packetsToShow\n )\n } else {\n this.displayText = this.displayText.substring(\n this.displayText.length -\n (this.packetSize + 2) * this.currentConfig.packetsToShow +\n 2\n )\n }\n },\n updateScrollPosition: function () {\n // Alternatively, only set if it\'s at the bottom already?\n const currentScrollOffset =\n this.textarea.scrollTop - this.textarea.scrollHeight\n this.$nextTick(() => {\n this.textarea.scrollTop =\n this.textarea.scrollHeight + currentScrollOffset\n })\n },\n rebuildDisplayText: function () {\n let packets = this.paused ? this.pausedHistory : this.history\n // Order packets chronologically and filter out the ones that aren\'t needed\n const breakpoint = this.paused ? this.pausedAt : this.historyPointer\n packets = packets\n .filter((packet) => packet) // in case history hasn\'t been filled yet\n .slice(breakpoint + 1)\n .concat(packets.slice(0, breakpoint + 1))\n .map(this.calculatePacketText) // convert to display text\n .filter(this.matchesSearch)\n if (this.paused) {\n // Remove any that are after the slider (offset)\n const sliderPosition = Math.max(packets.length + this.pauseOffset, 1) // Always show at least one\n packets = packets.slice(0, sliderPosition)\n }\n // Take however many are supposed to be shown\n const end = Math.max(this.currentConfig.packetsToShow, 1) // Always show at least one\n packets = packets.slice(-end)\n if (this.currentConfig.newestAtTop) {\n packets = packets.reverse()\n }\n this.displayText = packets.join(\'\\n\\n\')\n },\n matchesSearch: function (text) {\n return text.toLowerCase().includes(this.filterText.toLowerCase())\n },\n calculatePacketText: function (packet) {\n let text = \'\'\n if (this.currentConfig.showTimestamp) {\n const milliseconds = packet.time / 1000000\n const receivedSeconds = (milliseconds / 1000).toFixed(7)\n const receivedDate = new Date(milliseconds).toISOString()\n // const receivedCt = packet.receivedCount.toString().padEnd(20, \' \') // Padding fixes issue where opening asterisks would get deleted by trimDisplayText\n let timestamp = \'********************************************\\n\'\n timestamp += `* Received seconds: ${receivedSeconds}\\n`\n timestamp += `* Received time: ${receivedDate}\\n`\n // timestamp += `* Received count: ${receivedCt}\\n`\n timestamp += \'********************************************\\n\'\n text = `${timestamp}${text}`\n }\n if (\'buffer\' in packet) {\n // Split its buffer into lines of the selected length\n text += _.chunk([...packet.buffer], this.currentConfig.bytesPerLine)\n .map((lineBytes, index) => {\n // Map each line into ASCII or hex values\n let mappedBytes = []\n if (this.currentConfig.format === \'ascii\') {\n mappedBytes = lineBytes.map((byte) =>\n byte.replace(/\\n/, \'\\\\n\').replace(/\\r/, \'\\\\r\').padStart(2, \' \')\n )\n } else {\n mappedBytes = lineBytes.map((byte) =>\n byte.charCodeAt(0).toString(16).padStart(2, \'0\')\n )\n }\n let line = mappedBytes.join(\' \')\n // Prepend the line address if needed\n if (this.currentConfig.showLineAddress) {\n const address = (index * this.currentConfig.bytesPerLine)\n .toString(16)\n .padStart(8, \'0\')\n line = `${address}: ${line}`\n }\n return line\n })\n .join(\'\\n\') // end of one line\n } else {\n text += Object.keys(packet)\n .filter((item) => item != \'time\')\n .map((item) => `${item}: ${packet[item]}`)\n .join(\'\\n\')\n }\n this.packetSize = text.length // Set this every time in case it changes with rebuildDisplayText\n return text\n },\n validateBytesPerLine: function () {\n if (this.currentConfig.bytesPerLine < 1) {\n this.currentConfig.bytesPerLine = 1\n }\n },\n validatePacketsToShow: function () {\n if (this.currentConfig.packetsToShow > this.history.length) {\n this.currentConfig.packetsToShow = this.history.length\n } else if (this.currentConfig.packetsToShow < 1) {\n this.currentConfig.packetsToShow = 1\n }\n },\n download: function () {\n const blob = new Blob([this.displayText], {\n type: \'text/plain\',\n })\n // Make a link and then \'click\' on it to start the download\n const link = document.createElement(\'a\')\n let url = URL.createObjectURL(blob)\n link.href = url\n link.setAttribute(\n \'download\',\n `${format(new Date(), \'yyyy_MM_dd_HH_mm_ss\')}.txt`\n )\n link.click()\n window.URL.revokeObjectURL(url)\n },\n pause: function () {\n this.paused = true\n },\n togglePlayPause: function () {\n this.paused = !this.paused\n },\n stepBackward: function () {\n this.pause()\n this.pauseOffset--\n },\n stepForward: function () {\n this.pause()\n this.pauseOffset++\n },\n },\n}\n<\/script>\n\n<style lang="scss" scoped>\n.text-area-container {\n position: relative;\n\n .v-textarea {\n font-family: \'Courier New\', Courier, monospace;\n }\n\n .floating-buttons {\n position: absolute;\n top: 12px;\n right: 24px;\n }\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:"cbda850b17bd324e8ee58c0acaf34ca1c9f20bb0"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return ne=function(){return a},a}ne();var te=(ne().s[0]++,100),ie={mixins:[ee],data:function(){return ne().f[0]++,ne().s[1]++,{history:new Array(te),historyPointer:-1,receivedCount:0,filterText:"",paused:!1,pausedAt:0,pauseOffset:0,pausedHistory:[],textarea:null,displayText:null,packetSize:0}},computed:{allInstantSettings:function(){return ne().f[1]++,ne().s[2]++,"".concat(this.currentConfig.format,"|").concat(this.currentConfig.showLineAddress,"|").concat(this.currentConfig.showTimestamp,"|").concat(this.currentConfig.newestAtTop,"|").concat(this.pauseOffset)},allDebouncedSettings:function(){return ne().f[2]++,ne().s[3]++,"".concat(this.currentConfig.bytesPerLine,"|").concat(this.currentConfig.packetsToShow,"|").concat(this.filterText)}},watch:{lastReceived:function(e){var n=this;ne().f[3]++,ne().s[4]++,e.forEach((function(e){ne().f[4]++,ne().s[5]++,delete e.packet;var t=(ne().s[6]++,(0,c.Z)((0,c.Z)({},e),{},{receivedCount:++n.receivedCount}));if(ne().s[7]++,"buffer"in e?(ne().b[0][0]++,ne().s[8]++,t.buffer=atob(e.buffer)):ne().b[0][1]++,ne().s[9]++,n.historyPointer=++n.historyPointer%n.history.length,ne().s[10]++,n.history[n.historyPointer]=t,ne().s[11]++,n.paused)ne().b[1][1]++;else{ne().b[1][0]++;var i=(ne().s[12]++,n.calculatePacketText(t));ne().s[13]++,n.matchesSearch(i)?(ne().b[2][0]++,ne().s[14]++,n.displayText?(ne().b[3][1]++,ne().s[16]++,n.currentConfig.newestAtTop?(ne().b[4][0]++,ne().s[17]++,n.displayText="".concat(i,"\n\n").concat(n.displayText)):(ne().b[4][1]++,ne().s[18]++,n.displayText+="\n\n".concat(i))):(ne().b[3][0]++,ne().s[15]++,n.displayText=i)):ne().b[2][1]++}})),ne().s[19]++,this.trimDisplayText(),ne().s[20]++,ne().b[6][0]++,this.paused||(ne().b[6][1]++,this.currentConfig.newestAtTop)?ne().b[5][1]++:(ne().b[5][0]++,ne().s[21]++,this.updateScrollPosition())},paused:function(e){ne().f[5]++,ne().s[22]++,e?(ne().b[7][0]++,ne().s[23]++,this.pausedAt=this.historyPointer,ne().s[24]++,this.pausedHistory=this.history.slice()):(ne().b[7][1]++,ne().s[25]++,this.pauseOffset=0,ne().s[26]++,this.rebuildDisplayText())},allInstantSettings:function(){ne().f[6]++,ne().s[27]++,this.rebuildDisplayText()},allDebouncedSettings:J().debounce((function(){ne().f[7]++,ne().s[28]++,this.rebuildDisplayText()}),300)},created:function(){ne().f[8]++;var e=(ne().s[29]++,{format:"hex",showLineAddress:!0,showTimestamp:!0,bytesPerLine:16,packetsToShow:1,newestAtTop:!1});ne().s[30]++,this.currentConfig=(0,c.Z)((0,c.Z)({},e),this.currentConfig)},mounted:function(){ne().f[9]++,ne().s[31]++,this.textarea=this.$refs.textarea.$el.querySelectorAll("textarea")[0]},methods:{trimDisplayText:function(){ne().f[10]++,ne().s[32]++,this.currentConfig.newestAtTop?(ne().b[8][0]++,ne().s[33]++,this.displayText=this.displayText.substring(0,this.packetSize*this.currentConfig.packetsToShow)):(ne().b[8][1]++,ne().s[34]++,this.displayText=this.displayText.substring(this.displayText.length-(this.packetSize+2)*this.currentConfig.packetsToShow+2))},updateScrollPosition:function(){var e=this;ne().f[11]++;var n=(ne().s[35]++,this.textarea.scrollTop-this.textarea.scrollHeight);ne().s[36]++,this.$nextTick((function(){ne().f[12]++,ne().s[37]++,e.textarea.scrollTop=e.textarea.scrollHeight+n}))},rebuildDisplayText:function(){ne().f[13]++;var e=(ne().s[38]++,this.paused?(ne().b[9][0]++,this.pausedHistory):(ne().b[9][1]++,this.history)),n=(ne().s[39]++,this.paused?(ne().b[10][0]++,this.pausedAt):(ne().b[10][1]++,this.historyPointer));if(ne().s[40]++,e=e.filter((function(e){return ne().f[14]++,ne().s[41]++,e})).slice(n+1).concat(e.slice(0,n+1)).map(this.calculatePacketText).filter(this.matchesSearch),ne().s[42]++,this.paused){ne().b[11][0]++;var t=(ne().s[43]++,Math.max(e.length+this.pauseOffset,1));ne().s[44]++,e=e.slice(0,t)}else ne().b[11][1]++;var i=(ne().s[45]++,Math.max(this.currentConfig.packetsToShow,1));ne().s[46]++,e=e.slice(-i),ne().s[47]++,this.currentConfig.newestAtTop?(ne().b[12][0]++,ne().s[48]++,e=e.reverse()):ne().b[12][1]++,ne().s[49]++,this.displayText=e.join("\n\n")},matchesSearch:function(e){return ne().f[15]++,ne().s[50]++,e.toLowerCase().includes(this.filterText.toLowerCase())},calculatePacketText:function(e){var n=this;ne().f[16]++;var t=(ne().s[51]++,"");if(ne().s[52]++,this.currentConfig.showTimestamp){ne().b[13][0]++;var i=(ne().s[53]++,e.time/1e6),l=(ne().s[54]++,(i/1e3).toFixed(7)),o=(ne().s[55]++,new Date(i).toISOString()),a=(ne().s[56]++,"********************************************\n");ne().s[57]++,a+="* Received seconds: ".concat(l,"\n"),ne().s[58]++,a+="* Received time: ".concat(o,"\n"),ne().s[59]++,a+="********************************************\n",ne().s[60]++,t="".concat(a).concat(t)}else ne().b[13][1]++;return ne().s[61]++,"buffer"in e?(ne().b[14][0]++,ne().s[62]++,t+=J().chunk((0,G.Z)(e.buffer),this.currentConfig.bytesPerLine).map((function(e,t){ne().f[17]++;var i=(ne().s[63]++,[]);ne().s[64]++,"ascii"===n.currentConfig.format?(ne().b[15][0]++,ne().s[65]++,i=e.map((function(e){return ne().f[18]++,ne().s[66]++,e.replace(/\n/,"\\n").replace(/\r/,"\\r").padStart(2," ")}))):(ne().b[15][1]++,ne().s[67]++,i=e.map((function(e){return ne().f[19]++,ne().s[68]++,e.charCodeAt(0).toString(16).padStart(2,"0")})));var l=(ne().s[69]++,i.join(" "));if(ne().s[70]++,n.currentConfig.showLineAddress){ne().b[16][0]++;var o=(ne().s[71]++,(t*n.currentConfig.bytesPerLine).toString(16).padStart(8,"0"));ne().s[72]++,l="".concat(o,": ").concat(l)}else ne().b[16][1]++;return ne().s[73]++,l})).join("\n")):(ne().b[14][1]++,ne().s[74]++,t+=Object.keys(e).filter((function(e){return ne().f[20]++,ne().s[75]++,"time"!=e})).map((function(n){return ne().f[21]++,ne().s[76]++,"".concat(n,": ").concat(e[n])})).join("\n")),ne().s[77]++,this.packetSize=t.length,ne().s[78]++,t},validateBytesPerLine:function(){ne().f[22]++,ne().s[79]++,this.currentConfig.bytesPerLine<1?(ne().b[17][0]++,ne().s[80]++,this.currentConfig.bytesPerLine=1):ne().b[17][1]++},validatePacketsToShow:function(){ne().f[23]++,ne().s[81]++,this.currentConfig.packetsToShow>this.history.length?(ne().b[18][0]++,ne().s[82]++,this.currentConfig.packetsToShow=this.history.length):(ne().b[18][1]++,ne().s[83]++,this.currentConfig.packetsToShow<1?(ne().b[19][0]++,ne().s[84]++,this.currentConfig.packetsToShow=1):ne().b[19][1]++)},download:function(){ne().f[24]++;var e=(ne().s[85]++,new Blob([this.displayText],{type:"text/plain"})),n=(ne().s[86]++,document.createElement("a")),t=(ne().s[87]++,URL.createObjectURL(e));ne().s[88]++,n.href=t,ne().s[89]++,n.setAttribute("download","".concat((0,s.Z)(new Date,"yyyy_MM_dd_HH_mm_ss"),".txt")),ne().s[90]++,n.click(),ne().s[91]++,window.URL.revokeObjectURL(t)},pause:function(){ne().f[25]++,ne().s[92]++,this.paused=!0},togglePlayPause:function(){ne().f[26]++,ne().s[93]++,this.paused=!this.paused},stepBackward:function(){ne().f[27]++,ne().s[94]++,this.pause(),ne().s[95]++,this.pauseOffset--},stepForward:function(){ne().f[28]++,ne().s[96]++,this.pause(),ne().s[97]++,this.pauseOffset++}}},le=ie,oe=(t(858),(0,T.Z)(le,Y,q,!1,null,"9b447e3c",null)),ae=oe.exports,ce=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" DataViewer: Add A Packet ")]),t("v-spacer")],1),t("v-card-text",[t("v-row",[t("v-col",{staticClass:"my-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:e.newPacketCmdOrTlm,callback:function(n){e.newPacketCmdOrTlm=n},expression:"newPacketCmdOrTlm"}},[t("v-radio",{attrs:{label:"Command",value:"cmd","data-test":"command-packet-radio"}}),t("v-radio",{attrs:{label:"Telemetry",value:"tlm","data-test":"telemetry-packet-radio"}})],1)],1)],1),t("v-row",[t("v-col",[t("target-packet-item-chooser",{attrs:{mode:e.newPacketCmdOrTlm,unknown:""},on:{"on-set":e.packetSelected}})],1)],1),t("v-row",[t("v-col",[t("v-radio-group",{attrs:{row:"","hide-details":""},model:{value:e.newPacketMode,callback:function(n){e.newPacketMode=n},expression:"newPacketMode"}},[t("v-radio",{attrs:{label:"Raw",value:"RAW","data-test":"new-packet-raw-radio"}}),t("v-radio",{attrs:{label:"Decom",value:"DECOM",disabled:e.disableRadioOptions,"data-test":"new-packet-decom-radio"}})],1)],1),t("v-col",["DECOM"===e.newPacketMode?t("v-select",{attrs:{"hide-details":"",label:"Value Type","data-test":"add-packet-value-type",items:e.valueTypes},model:{value:e.newPacketValueType,callback:function(n){e.newPacketValueType=n},expression:"newPacketValueType"}}):e._e()],1)],1)],1),t("v-card-actions",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"cancel-packet-button"},on:{click:e.cancelAddComponent}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"add-packet-button",disabled:!e.newPacket},on:{click:e.addComponent}},[e._v(" Add ")])],1)],1)],1)],1)},se=[];function re(){var e="/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",n="d8348efa3fe2d9469504755c49f915235baed4af",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/AddComponentDialog.vue",statementMap:{0:{start:{line:125,column:4},end:{line:131,column:5}},1:{start:{line:135,column:6},end:{line:137,column:7}},2:{start:{line:136,column:8},end:{line:136,column:50}},3:{start:{line:138,column:6},end:{line:138,column:18}},4:{start:{line:142,column:8},end:{line:142,column:25}},5:{start:{line:145,column:8},end:{line:145,column:34}},6:{start:{line:153,column:8},end:{line:153,column:29}},7:{start:{line:159,column:6},end:{line:163,column:7}},8:{start:{line:164,column:6},end:{line:166,column:7}},9:{start:{line:165,column:8},end:{line:165,column:34}},10:{start:{line:169,column:6},end:{line:175,column:8}},11:{start:{line:178,column:6},end:{line:178,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:124,column:2},end:{line:124,column:3}},loc:{start:{line:124,column:9},end:{line:132,column:3}},line:124},1:{name:"(anonymous_1)",decl:{start:{line:134,column:25},end:{line:134,column:26}},loc:{start:{line:134,column:37},end:{line:139,column:5}},line:134},2:{name:"(anonymous_2)",decl:{start:{line:141,column:6},end:{line:141,column:7}},loc:{start:{line:141,column:12},end:{line:143,column:7}},line:141},3:{name:"(anonymous_3)",decl:{start:{line:144,column:6},end:{line:144,column:7}},loc:{start:{line:144,column:17},end:{line:146,column:7}},line:144},4:{name:"(anonymous_4)",decl:{start:{line:152,column:15},end:{line:152,column:16}},loc:{start:{line:152,column:27},end:{line:154,column:7}},line:152},5:{name:"(anonymous_5)",decl:{start:{line:158,column:20},end:{line:158,column:21}},loc:{start:{line:158,column:37},end:{line:167,column:5}},line:158},6:{name:"(anonymous_6)",decl:{start:{line:168,column:18},end:{line:168,column:19}},loc:{start:{line:168,column:35},end:{line:176,column:5}},line:168},7:{name:"(anonymous_7)",decl:{start:{line:177,column:24},end:{line:177,column:25}},loc:{start:{line:177,column:36},end:{line:179,column:5}},line:177}},branchMap:{0:{loc:{start:{line:135,column:6},end:{line:137,column:7}},type:"if",locations:[{start:{line:135,column:6},end:{line:137,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:135},1:{loc:{start:{line:164,column:6},end:{line:166,column:7}},type:"if",locations:[{start:{line:164,column:6},end:{line:166,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:164}},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},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["AddComponentDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA;;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",file:"AddComponentDialog.vue",sourceRoot:"src/tools/DataViewer",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 addstopums 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--\x3e\n\n<template>\n <div>\n \x3c!-- Dialog for adding a new component to a tab --\x3e\n <v-dialog v-model="show" width="600">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span> DataViewer: Add A Packet </span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <v-row>\n <v-col class="my-2">\n <v-radio-group\n v-model="newPacketCmdOrTlm"\n row\n hide-details\n class="mt-0"\n >\n <v-radio\n label="Command"\n value="cmd"\n data-test="command-packet-radio"\n />\n <v-radio\n label="Telemetry"\n value="tlm"\n data-test="telemetry-packet-radio"\n />\n </v-radio-group>\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <target-packet-item-chooser\n :mode="newPacketCmdOrTlm"\n unknown\n @on-set="packetSelected"\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <v-radio-group v-model="newPacketMode" row hide-details>\n <v-radio\n label="Raw"\n value="RAW"\n data-test="new-packet-raw-radio"\n />\n <v-radio\n label="Decom"\n value="DECOM"\n :disabled="disableRadioOptions"\n data-test="new-packet-decom-radio"\n />\n </v-radio-group>\n </v-col>\n <v-col>\n <v-select\n v-if="newPacketMode === \'DECOM\'"\n v-model="newPacketValueType"\n hide-details\n label="Value Type"\n data-test="add-packet-value-type"\n :items="valueTypes"\n />\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions>\n <v-spacer />\n <v-btn\n outlined\n class="mx-2"\n data-test="cancel-packet-button"\n @click="cancelAddComponent"\n >\n Cancel\n </v-btn>\n <v-btn\n color="primary"\n class="mx-2"\n data-test="add-packet-button"\n :disabled="!newPacket"\n @click="addComponent"\n >\n Add\n </v-btn>\n </v-card-actions>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport TargetPacketItemChooser from \'@openc3/tool-common/src/components/TargetPacketItemChooser\'\n\nexport default {\n components: {\n TargetPacketItemChooser,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n newPacket: null,\n newPacketCmdOrTlm: \'tlm\',\n newPacketMode: \'RAW\',\n valueTypes: [\'CONVERTED\', \'RAW\', \'FORMATTED\', \'WITH_UNITS\'],\n newPacketValueType: \'WITH_UNITS\',\n }\n },\n computed: {\n disableRadioOptions: function () {\n if (this.newPacket) {\n return this.newPacket.packet === \'UNKNOWN\'\n }\n return false\n },\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 watch: {\n newPacketCmdOrTlm: {\n immediate: true,\n handler: function () {\n this.newPacket = null\n },\n },\n },\n methods: {\n packetSelected: function (event) {\n this.newPacket = {\n target: event.targetName,\n packet: event.packetName,\n cmdOrTlm: this.newPacketCmdOrTlm,\n }\n if (event.packetName == \'UNKNOWN\') {\n this.newPacketMode = \'RAW\'\n }\n },\n addComponent: function (event) {\n this.$emit(\'add\', {\n ...this.newPacket,\n component: \'DumpComponent\',\n config: {},\n mode: this.newPacketMode,\n valueType: this.newPacketValueType,\n })\n },\n cancelAddComponent: function () {\n this.$emit(\'cancel\', {})\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d8348efa3fe2d9469504755c49f915235baed4af"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return re=function(){return a},a}re();var ue={components:{TargetPacketItemChooser:U},props:{value:Boolean},data:function(){return re().f[0]++,re().s[0]++,{newPacket:null,newPacketCmdOrTlm:"tlm",newPacketMode:"RAW",valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],newPacketValueType:"WITH_UNITS"}},computed:{disableRadioOptions:function(){return re().f[1]++,re().s[1]++,this.newPacket?(re().b[0][0]++,re().s[2]++,"UNKNOWN"===this.newPacket.packet):(re().b[0][1]++,re().s[3]++,!1)},show:{get:function(){return re().f[2]++,re().s[4]++,this.value},set:function(e){re().f[3]++,re().s[5]++,this.$emit("input",e)}}},watch:{newPacketCmdOrTlm:{immediate:!0,handler:function(){re().f[4]++,re().s[6]++,this.newPacket=null}}},methods:{packetSelected:function(e){re().f[5]++,re().s[7]++,this.newPacket={target:e.targetName,packet:e.packetName,cmdOrTlm:this.newPacketCmdOrTlm},re().s[8]++,"UNKNOWN"==e.packetName?(re().b[1][0]++,re().s[9]++,this.newPacketMode="RAW"):re().b[1][1]++},addComponent:function(e){re().f[6]++,re().s[10]++,this.$emit("add",(0,c.Z)((0,c.Z)({},this.newPacket),{},{component:"DumpComponent",config:{},mode:this.newPacketMode,valueType:this.newPacketValueType}))},cancelAddComponent:function(){re().f[7]++,re().s[11]++,this.$emit("cancel",{})}}},me=ue,de=(0,T.Z)(me,ce,se,!1,null,null,null),Ae=de.exports;function pe(){var e="/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",n="6b426cf94a2474f9b098a1e609ee649318c6c233",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-tool-dataviewer/src/tools/DataViewer/DataViewer.vue",statementMap:{0:{start:{line:270,column:4},end:{line:325,column:5}},1:{start:{line:283,column:29},end:{line:283,column:50}},2:{start:{line:297,column:16},end:{line:297,column:38}},3:{start:{line:304,column:16},end:{line:304,column:38}},4:{start:{line:329,column:6},end:{line:335,column:7}},5:{start:{line:338,column:6},end:{line:340,column:8}},6:{start:{line:339,column:8},end:{line:339,column:26}},7:{start:{line:345,column:6},end:{line:345,column:23}},8:{start:{line:349,column:4},end:{line:349,column:30}},9:{start:{line:350,column:4},end:{line:350,column:20}},10:{start:{line:353,column:27},end:{line:353,column:66}},11:{start:{line:354,column:4},end:{line:356,column:5}},12:{start:{line:355,column:6},end:{line:355,column:44}},13:{start:{line:359,column:4},end:{line:361,column:5}},14:{start:{line:360,column:6},end:{line:360,column:37}},15:{start:{line:362,column:4},end:{line:362,column:27}},16:{start:{line:366,column:6},end:{line:366,column:67}},17:{start:{line:369,column:6},end:{line:369,column:53}},18:{start:{line:369,column:27},end:{line:369,column:53}},19:{start:{line:373,column:6},end:{line:377,column:7}},20:{start:{line:374,column:8},end:{line:374,column:62}},21:{start:{line:375,column:8},end:{line:375,column:27}},22:{start:{line:376,column:8},end:{line:376,column:14}},23:{start:{line:379,column:6},end:{line:383,column:7}},24:{start:{line:380,column:8},end:{line:380,column:71}},25:{start:{line:381,column:8},end:{line:381,column:27}},26:{start:{line:382,column:8},end:{line:382,column:14}},27:{start:{line:385,column:6},end:{line:393,column:7}},28:{start:{line:386,column:8},end:{line:391,column:24}},29:{start:{line:392,column:8},end:{line:392,column:27}},30:{start:{line:394,column:6},end:{line:394,column:25}},31:{start:{line:395,column:6},end:{line:395,column:37}},32:{start:{line:398,column:6},end:{line:398,column:26}},33:{start:{line:399,column:6},end:{line:399,column:42}},34:{start:{line:402,column:6},end:{line:424,column:10}},35:{start:{line:404,column:30},end:{line:404,column:49}},36:{start:{line:406,column:12},end:{line:406,column:32}},37:{start:{line:407,column:12},end:{line:407,column:42}},38:{start:{line:410,column:12},end:{line:410,column:23}},39:{start:{line:411,column:12},end:{line:411,column:33}},40:{start:{line:412,column:12},end:{line:412,column:72}},41:{start:{line:413,column:12},end:{line:413,column:31}},42:{start:{line:414,column:12},end:{line:414,column:41}},43:{start:{line:417,column:12},end:{line:417,column:68}},44:{start:{line:418,column:12},end:{line:418,column:31}},45:{start:{line:422,column:10},end:{line:422,column:42}},46:{start:{line:423,column:10},end:{line:423,column:59}},47:{start:{line:423,column:28},end:{line:423,column:59}},48:{start:{line:427,column:6},end:{line:427,column:42}},49:{start:{line:429,column:25},end:{line:436,column:12}},50:{start:{line:430,column:8},end:{line:434,column:9}},51:{start:{line:431,column:10},end:{line:431,column:42}},52:{start:{line:433,column:10},end:{line:433,column:40}},53:{start:{line:435,column:8},end:{line:435,column:21}},54:{start:{line:437,column:6},end:{line:447,column:8}},55:{start:{line:438,column:8},end:{line:446,column:10}},56:{start:{line:439,column:10},end:{line:445,column:12}},57:{start:{line:450,column:6},end:{line:450,column:42}},58:{start:{line:451,column:6},end:{line:454,column:8}},59:{start:{line:457,column:6},end:{line:461,column:7}},60:{start:{line:458,column:8},end:{line:458,column:43}},61:{start:{line:459,column:8},end:{line:459,column:25}},62:{start:{line:460,column:8},end:{line:460,column:14}},63:{start:{line:462,column:21},end:{line:462,column:42}},64:{start:{line:463,column:6},end:{line:466,column:7}},65:{start:{line:464,column:8},end:{line:464,column:19}},66:{start:{line:465,column:8},end:{line:465,column:14}},67:{start:{line:467,column:29},end:{line:474,column:12}},68:{start:{line:468,column:8},end:{line:472,column:9}},69:{start:{line:469,column:10},end:{line:469,column:44}},70:{start:{line:471,column:10},end:{line:471,column:42}},71:{start:{line:473,column:8},end:{line:473,column:21}},72:{start:{line:475,column:6},end:{line:480,column:8}},73:{start:{line:476,column:8},end:{line:478,column:10}},74:{start:{line:477,column:10},end:{line:477,column:55}},75:{start:{line:479,column:8},end:{line:479,column:47}},76:{start:{line:481,column:6},end:{line:481,column:56}},77:{start:{line:484,column:16},end:{line:484,column:27}},78:{start:{line:485,column:6},end:{line:489,column:7}},79:{start:{line:486,column:8},end:{line:486,column:62}},80:{start:{line:488,column:8},end:{line:488,column:63}},81:{start:{line:490,column:6},end:{line:490,column:51}},82:{start:{line:491,column:6},end:{line:491,column:65}},83:{start:{line:491,column:35},end:{line:491,column:65}},84:{start:{line:492,column:6},end:{line:492,column:16}},85:{start:{line:495,column:23},end:{line:495,column:52}},86:{start:{line:496,column:16},end:{line:496,column:65}},87:{start:{line:497,column:6},end:{line:497,column:65}},88:{start:{line:497,column:35},end:{line:497,column:65}},89:{start:{line:498,column:6},end:{line:498,column:16}},90:{start:{line:501,column:6},end:{line:501,column:52}},91:{start:{line:502,column:6},end:{line:502,column:65}},92:{start:{line:502,column:29},end:{line:502,column:65}},93:{start:{line:503,column:6},end:{line:503,column:31}},94:{start:{line:504,column:21},end:{line:504,column:68}},95:{start:{line:505,column:6},end:{line:507,column:7}},96:{start:{line:506,column:8},end:{line:506,column:42}},97:{start:{line:508,column:6},end:{line:508,column:76}},98:{start:{line:508,column:45},end:{line:508,column:76}},99:{start:{line:511,column:6},end:{line:511,column:52}},100:{start:{line:512,column:6},end:{line:512,column:76}},101:{start:{line:515,column:6},end:{line:519,column:8}},102:{start:{line:520,column:6},end:{line:520,column:28}},103:{start:{line:523,column:6},end:{line:523,column:32}},104:{start:{line:524,column:6},end:{line:524,column:26}},105:{start:{line:527,column:6},end:{line:527,column:28}},106:{start:{line:528,column:6},end:{line:528,column:28}},107:{start:{line:529,column:6},end:{line:529,column:30}},108:{start:{line:530,column:6},end:{line:530,column:35}},109:{start:{line:531,column:6},end:{line:531,column:35}},110:{start:{line:532,column:6},end:{line:534,column:8}},111:{start:{line:533,column:8},end:{line:533,column:31}},112:{start:{line:537,column:6},end:{line:537,column:61}},113:{start:{line:538,column:6},end:{line:538,column:31}},114:{start:{line:541,column:6},end:{line:541,column:61}},115:{start:{line:542,column:6},end:{line:542,column:32}},116:{start:{line:545,column:6},end:{line:545,column:48}},117:{start:{line:548,column:6},end:{line:548,column:28}},118:{start:{line:549,column:6},end:{line:549,column:40}},119:{start:{line:552,column:6},end:{line:556,column:7}},120:{start:{line:559,column:6},end:{line:559,column:58}},121:{start:{line:560,column:6},end:{line:562,column:7}},122:{start:{line:561,column:8},end:{line:561,column:46}},123:{start:{line:563,column:6},end:{line:563,column:31}},124:{start:{line:566,column:6},end:{line:566,column:41}},125:{start:{line:569,column:21},end:{line:569,column:68}},126:{start:{line:570,column:6},end:{line:570,column:63}},127:{start:{line:571,column:6},end:{line:571,column:50}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:269,column:2},end:{line:269,column:3}},loc:{start:{line:269,column:9},end:{line:326,column:3}},line:269},1:{name:"(anonymous_1)",decl:{start:{line:283,column:18},end:{line:283,column:19}},loc:{start:{line:283,column:29},end:{line:283,column:50}},line:283},2:{name:"(anonymous_2)",decl:{start:{line:296,column:23},end:{line:296,column:24}},loc:{start:{line:296,column:29},end:{line:298,column:15}},line:296},3:{name:"(anonymous_3)",decl:{start:{line:303,column:23},end:{line:303,column:24}},loc:{start:{line:303,column:29},end:{line:305,column:15}},line:303},4:{name:"(anonymous_4)",decl:{start:{line:328,column:18},end:{line:328,column:19}},loc:{start:{line:328,column:30},end:{line:336,column:5}},line:328},5:{name:"(anonymous_5)",decl:{start:{line:337,column:16},end:{line:337,column:17}},loc:{start:{line:337,column:28},end:{line:341,column:5}},line:337},6:{name:"(anonymous_6)",decl:{start:{line:338,column:38},end:{line:338,column:39}},loc:{start:{line:338,column:47},end:{line:340,column:7}},line:338},7:{name:"(anonymous_7)",decl:{start:{line:344,column:26},end:{line:344,column:27}},loc:{start:{line:344,column:38},end:{line:346,column:5}},line:344},8:{name:"(anonymous_8)",decl:{start:{line:348,column:2},end:{line:348,column:3}},loc:{start:{line:348,column:12},end:{line:351,column:3}},line:348},9:{name:"(anonymous_9)",decl:{start:{line:352,column:11},end:{line:352,column:12}},loc:{start:{line:352,column:23},end:{line:357,column:3}},line:352},10:{name:"(anonymous_10)",decl:{start:{line:358,column:13},end:{line:358,column:14}},loc:{start:{line:358,column:25},end:{line:363,column:3}},line:358},11:{name:"(anonymous_11)",decl:{start:{line:365,column:17},end:{line:365,column:18}},loc:{start:{line:365,column:35},end:{line:367,column:5}},line:365},12:{name:"(anonymous_12)",decl:{start:{line:368,column:16},end:{line:368,column:17}},loc:{start:{line:368,column:28},end:{line:370,column:5}},line:368},13:{name:"(anonymous_13)",decl:{start:{line:371,column:11},end:{line:371,column:12}},loc:{start:{line:371,column:23},end:{line:396,column:5}},line:371},14:{name:"(anonymous_14)",decl:{start:{line:397,column:10},end:{line:397,column:11}},loc:{start:{line:397,column:22},end:{line:400,column:5}},line:397},15:{name:"(anonymous_15)",decl:{start:{line:401,column:15},end:{line:401,column:16}},loc:{start:{line:401,column:27},end:{line:425,column:5}},line:401},16:{name:"(anonymous_16)",decl:{start:{line:404,column:20},end:{line:404,column:21}},loc:{start:{line:404,column:30},end:{line:404,column:49}},line:404},17:{name:"(anonymous_17)",decl:{start:{line:405,column:21},end:{line:405,column:22}},loc:{start:{line:405,column:27},end:{line:408,column:11}},line:405},18:{name:"(anonymous_18)",decl:{start:{line:409,column:24},end:{line:409,column:25}},loc:{start:{line:409,column:30},end:{line:415,column:11}},line:409},19:{name:"(anonymous_19)",decl:{start:{line:416,column:20},end:{line:416,column:21}},loc:{start:{line:416,column:26},end:{line:419,column:11}},line:416},20:{name:"(anonymous_20)",decl:{start:{line:421,column:14},end:{line:421,column:15}},loc:{start:{line:421,column:32},end:{line:424,column:9}},line:421},21:{name:"(anonymous_21)",decl:{start:{line:426,column:30},end:{line:426,column:31}},loc:{start:{line:426,column:49},end:{line:448,column:5}},line:426},22:{name:"(anonymous_22)",decl:{start:{line:429,column:40},end:{line:429,column:41}},loc:{start:{line:429,column:60},end:{line:436,column:7}},line:429},23:{name:"(anonymous_23)",decl:{start:{line:437,column:65},end:{line:437,column:66}},loc:{start:{line:437,column:71},end:{line:447,column:7}},line:437},24:{name:"(anonymous_24)",decl:{start:{line:438,column:40},end:{line:438,column:41}},loc:{start:{line:438,column:50},end:{line:446,column:9}},line:438},25:{name:"(anonymous_25)",decl:{start:{line:449,column:35},end:{line:449,column:36}},loc:{start:{line:449,column:54},end:{line:455,column:5}},line:449},26:{name:"(anonymous_26)",decl:{start:{line:456,column:14},end:{line:456,column:15}},loc:{start:{line:456,column:35},end:{line:482,column:5}},line:456},27:{name:"(anonymous_27)",decl:{start:{line:467,column:43},end:{line:467,column:44}},loc:{start:{line:467,column:63},end:{line:474,column:7}},line:467},28:{name:"(anonymous_28)",decl:{start:{line:475,column:42},end:{line:475,column:43}},loc:{start:{line:475,column:58},end:{line:480,column:7}},line:475},29:{name:"(anonymous_29)",decl:{start:{line:476,column:52},end:{line:476,column:53}},loc:{start:{line:476,column:67},end:{line:478,column:9}},line:476},30:{name:"(anonymous_30)",decl:{start:{line:483,column:14},end:{line:483,column:15}},loc:{start:{line:483,column:32},end:{line:493,column:5}},line:483},31:{name:"(anonymous_31)",decl:{start:{line:494,column:21},end:{line:494,column:22}},loc:{start:{line:494,column:39},end:{line:499,column:5}},line:494},32:{name:"(anonymous_32)",decl:{start:{line:500,column:23},end:{line:500,column:24}},loc:{start:{line:500,column:45},end:{line:509,column:5}},line:500},33:{name:"(anonymous_33)",decl:{start:{line:510,column:23},end:{line:510,column:24}},loc:{start:{line:510,column:39},end:{line:513,column:5}},line:510},34:{name:"(anonymous_34)",decl:{start:{line:514,column:12},end:{line:514,column:13}},loc:{start:{line:514,column:24},end:{line:521,column:5}},line:514},35:{name:"(anonymous_35)",decl:{start:{line:522,column:21},end:{line:522,column:22}},loc:{start:{line:522,column:33},end:{line:525,column:5}},line:522},36:{name:"(anonymous_36)",decl:{start:{line:526,column:13},end:{line:526,column:14}},loc:{start:{line:526,column:37},end:{line:535,column:5}},line:526},37:{name:"(anonymous_37)",decl:{start:{line:532,column:21},end:{line:532,column:22}},loc:{start:{line:532,column:27},end:{line:534,column:7}},line:532},38:{name:"(anonymous_38)",decl:{start:{line:536,column:23},end:{line:536,column:24}},loc:{start:{line:536,column:35},end:{line:539,column:5}},line:536},39:{name:"(anonymous_39)",decl:{start:{line:540,column:15},end:{line:540,column:16}},loc:{start:{line:540,column:27},end:{line:543,column:5}},line:540},40:{name:"(anonymous_40)",decl:{start:{line:544,column:15},end:{line:544,column:16}},loc:{start:{line:544,column:27},end:{line:546,column:5}},line:544},41:{name:"(anonymous_41)",decl:{start:{line:547,column:25},end:{line:547,column:26}},loc:{start:{line:547,column:42},end:{line:550,column:5}},line:547},42:{name:"(anonymous_42)",decl:{start:{line:551,column:20},end:{line:551,column:21}},loc:{start:{line:551,column:37},end:{line:557,column:5}},line:551},43:{name:"(anonymous_43)",decl:{start:{line:558,column:18},end:{line:558,column:19}},loc:{start:{line:558,column:35},end:{line:564,column:5}},line:558},44:{name:"(anonymous_44)",decl:{start:{line:565,column:24},end:{line:565,column:25}},loc:{start:{line:565,column:41},end:{line:567,column:5}},line:565},45:{name:"(anonymous_45)",decl:{start:{line:568,column:21},end:{line:568,column:22}},loc:{start:{line:568,column:54},end:{line:572,column:5}},line:568}},branchMap:{0:{loc:{start:{line:283,column:29},end:{line:283,column:50}},type:"binary-expr",locations:[{start:{line:283,column:29},end:{line:283,column:36}},{start:{line:283,column:40},end:{line:283,column:50}}],line:283},1:{loc:{start:{line:332,column:18},end:{line:334,column:16}},type:"cond-expr",locations:[{start:{line:333,column:12},end:{line:333,column:77}},{start:{line:334,column:12},end:{line:334,column:16}}],line:332},2:{loc:{start:{line:354,column:4},end:{line:356,column:5}},type:"if",locations:[{start:{line:354,column:4},end:{line:356,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:354},3:{loc:{start:{line:359,column:4},end:{line:361,column:5}},type:"if",locations:[{start:{line:359,column:4},end:{line:361,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:359},4:{loc:{start:{line:369,column:6},end:{line:369,column:53}},type:"if",locations:[{start:{line:369,column:6},end:{line:369,column:53}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:369},5:{loc:{start:{line:373,column:6},end:{line:377,column:7}},type:"if",locations:[{start:{line:373,column:6},end:{line:377,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:373},6:{loc:{start:{line:379,column:6},end:{line:383,column:7}},type:"if",locations:[{start:{line:379,column:6},end:{line:383,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:379},7:{loc:{start:{line:385,column:6},end:{line:393,column:7}},type:"if",locations:[{start:{line:385,column:6},end:{line:393,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:385},8:{loc:{start:{line:423,column:10},end:{line:423,column:59}},type:"if",locations:[{start:{line:423,column:10},end:{line:423,column:59}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:423},9:{loc:{start:{line:427,column:16},end:{line:427,column:42}},type:"binary-expr",locations:[{start:{line:427,column:16},end:{line:427,column:23}},{start:{line:427,column:27},end:{line:427,column:42}}],line:427},10:{loc:{start:{line:430,column:8},end:{line:434,column:9}},type:"if",locations:[{start:{line:430,column:8},end:{line:434,column:9}},{start:{line:432,column:15},end:{line:434,column:9}}],line:430},11:{loc:{start:{line:450,column:16},end:{line:450,column:42}},type:"binary-expr",locations:[{start:{line:450,column:16},end:{line:450,column:23}},{start:{line:450,column:27},end:{line:450,column:42}}],line:450},12:{loc:{start:{line:457,column:6},end:{line:461,column:7}},type:"if",locations:[{start:{line:457,column:6},end:{line:461,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:457},13:{loc:{start:{line:463,column:6},end:{line:466,column:7}},type:"if",locations:[{start:{line:463,column:6},end:{line:466,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:463},14:{loc:{start:{line:468,column:8},end:{line:472,column:9}},type:"if",locations:[{start:{line:468,column:8},end:{line:472,column:9}},{start:{line:470,column:15},end:{line:472,column:9}}],line:468},15:{loc:{start:{line:485,column:6},end:{line:489,column:7}},type:"if",locations:[{start:{line:485,column:6},end:{line:489,column:7}},{start:{line:487,column:13},end:{line:489,column:7}}],line:485},16:{loc:{start:{line:486,column:15},end:{line:486,column:62}},type:"cond-expr",locations:[{start:{line:486,column:41},end:{line:486,column:48}},{start:{line:486,column:51},end:{line:486,column:62}}],line:486},17:{loc:{start:{line:488,column:15},end:{line:488,column:63}},type:"cond-expr",locations:[{start:{line:488,column:41},end:{line:488,column:51}},{start:{line:488,column:54},end:{line:488,column:63}}],line:488},18:{loc:{start:{line:491,column:6},end:{line:491,column:65}},type:"if",locations:[{start:{line:491,column:6},end:{line:491,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:491},19:{loc:{start:{line:497,column:6},end:{line:497,column:65}},type:"if",locations:[{start:{line:497,column:6},end:{line:497,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:497},20:{loc:{start:{line:502,column:6},end:{line:502,column:65}},type:"if",locations:[{start:{line:502,column:6},end:{line:502,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:502},21:{loc:{start:{line:505,column:6},end:{line:507,column:7}},type:"if",locations:[{start:{line:505,column:6},end:{line:507,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:505},22:{loc:{start:{line:508,column:6},end:{line:508,column:76}},type:"if",locations:[{start:{line:508,column:6},end:{line:508,column:76}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:508},23:{loc:{start:{line:508,column:10},end:{line:508,column:43}},type:"binary-expr",locations:[{start:{line:508,column:10},end:{line:508,column:27}},{start:{line:508,column:31},end:{line:508,column:43}}],line:508},24:{loc:{start:{line:560,column:6},end:{line:562,column:7}},type:"if",locations:[{start:{line:560,column:6},end:{line:562,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:560}},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,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127: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,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0]},inputSourceMap:{version:3,sources:["DataViewer.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;AACA;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:"DataViewer.vue",sourceRoot:"src/tools/DataViewer",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--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <v-row dense>\n <v-col>\n <v-text-field\n v-model="startDate"\n label="Start Date"\n type="date"\n :rules="[rules.required]"\n data-test="start-date"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="startTime"\n label="Start Time"\n type="time"\n step="1"\n :rules="[rules.required]"\n data-test="start-time"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="endDate"\n label="End Date"\n type="date"\n :rules="endTime ? [rules.required] : []"\n data-test="end-date"\n />\n </v-col>\n <v-col>\n <v-text-field\n v-model="endTime"\n label="End Time"\n type="time"\n step="1"\n :rules="endDate ? [rules.required] : []"\n data-test="end-time"\n />\n </v-col>\n <v-col cols="auto" class="pt-4">\n <v-btn\n v-if="running"\n color="red"\n width="100"\n data-test="stop-button"\n @click="stop"\n >\n Stop\n </v-btn>\n <v-btn\n v-else\n :disabled="!canStart"\n color="green"\n width="100"\n data-test="start-button"\n @click="start"\n >\n Start\n </v-btn>\n </v-col>\n </v-row>\n <div class="mb-3" v-show="warning || error || connectionFailure">\n <v-alert type="warning" v-model="warning" dismissible>\n {{ warningText }}\n </v-alert>\n <v-alert type="error" v-model="error" dismissible>\n {{ errorText }}\n </v-alert>\n <v-alert type="error" v-model="connectionFailure">\n OpenC3 backend connection failed.\n </v-alert>\n </div>\n <v-card>\n <v-tabs ref="tabs" v-model="curTab">\n <v-tab\n v-for="(tab, index) in config.tabs"\n :key="index"\n @contextmenu="(event) => tabMenu(event, index)"\n data-test="tab"\n >\n {{ tab.name }}\n </v-tab>\n <v-btn class="mt-2 ml-2" @click="addTab" icon data-test="new-tab">\n <v-icon>mdi-tab-plus</v-icon>\n </v-btn>\n </v-tabs>\n <v-tabs-items v-model="curTab">\n <v-tab-item v-for="(tab, index) in config.tabs" :key="index" eager>\n <v-card\n v-for="(packet, packetIndex) in tab.packets"\n :key="`${index}-${packetIndex}`"\n flat\n >\n <v-divider />\n <v-card-title class="pa-3">\n <span v-text="packetTitle(packet)" />\n <v-spacer />\n <v-btn\n @click="() => deleteComponent(index, packetIndex)"\n icon\n data-test="delete-packet"\n >\n <v-icon color="red">mdi-delete</v-icon>\n </v-btn>\n </v-card-title>\n <dump-component\n v-if="packet.component === \'DumpComponent\'"\n v-show="receivedPackets[topicKey(packet)]"\n :ref="`${topicKey(packet)}-display`"\n :config="packet.config"\n @config-change="(newConfig) => (packet.config = newConfig)"\n />\n <v-card-text v-else>\n <v-alert type="error">\n Component missing:\n <span class="text-component-missing-name">\n {{ packet.component }}\n </span>\n </v-alert>\n </v-card-text>\n <v-card-text v-if="!receivedPackets[topicKey(packet)]">\n No data! Make sure to hit the START button!\n </v-card-text>\n </v-card>\n <v-card v-if="!tab.packets.length">\n <v-card-title> This tab is empty </v-card-title>\n <v-card-text>\n Click the button below to add packets. Right click on the tab name\n above to rename or delete this tab.\n </v-card-text>\n </v-card>\n <v-btn\n block\n @click="() => openComponentDialog(index)"\n data-test="new-packet"\n >\n <v-icon class="mr-2">$astro-add-large</v-icon>\n Click here to add a packet\n </v-btn>\n </v-tab-item>\n </v-tabs-items>\n <v-card v-if="!config.tabs.length">\n <v-card-title>You\'re not viewing any packets</v-card-title>\n <v-card-text>Click the new tab icon to start.</v-card-text>\n </v-card>\n </v-card>\n \x3c!-- Dialogs for opening and saving configs --\x3e\n <open-config-dialog\n v-if="openConfig"\n v-model="openConfig"\n :tool="toolName"\n @success="openConfiguration($event)"\n />\n <save-config-dialog\n v-if="saveConfig"\n v-model="saveConfig"\n :tool="toolName"\n @success="saveConfiguration($event)"\n />\n \x3c!-- Dialog for renaming a new tab --\x3e\n <v-dialog v-model="tabNameDialog" width="600">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span> DataViewer: Rename Tab</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <v-text-field\n v-model="newTabName"\n label="Tab name"\n data-test="rename-tab-input"\n />\n </v-card-text>\n <v-card-actions>\n <v-spacer />\n <v-btn\n outlined\n class="mx-2"\n data-test="cancel-rename"\n @click="cancelTabRename"\n >\n Cancel\n </v-btn>\n <v-btn\n color="primary"\n class="mx-2"\n data-test="rename"\n :disabled="!newTabName"\n @click="renameTab"\n >\n Rename\n </v-btn>\n </v-card-actions>\n </v-card>\n </v-dialog>\n \x3c!-- Menu for right clicking on a tab --\x3e\n <v-menu\n v-model="showTabMenu"\n :position-x="tabMenuX"\n :position-y="tabMenuY"\n absolute\n offset-y\n >\n <v-list>\n <v-list-item data-test="context-menu-rename">\n <v-list-item-title style="cursor: pointer" @click="openTabNameDialog">\n Rename\n </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="context-menu-delete">\n <v-list-item-title style="cursor: pointer" @click="deleteTab">\n Delete\n </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n \x3c!-- Dialog for adding a new component to a tab --\x3e\n <add-component-dialog\n v-model="showAddComponentDialog"\n @add="addComponent"\n @cancel="cancelAddComponent"\n />\n </div>\n</template>\n\n<script>\nimport { format, isValid, parse } from \'date-fns\'\nimport { OpenC3Api } from \'@openc3/tool-common/src/services/openc3-api\'\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 Cable from \'@openc3/tool-common/src/services/cable.js\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\n\nimport DumpComponent from \'@/tools/DataViewer/DumpComponent\'\nimport AddComponentDialog from \'@/tools/DataViewer/AddComponentDialog\'\n\nexport default {\n components: {\n AddComponentDialog,\n OpenConfigDialog,\n SaveConfigDialog,\n DumpComponent,\n TopBar,\n },\n data() {\n return {\n title: \'Data Viewer\',\n toolName: \'data-viewer\',\n openConfig: false,\n saveConfig: false,\n api: null,\n cable: new Cable(),\n subscription: null,\n startDate: format(new Date(), \'yyyy-MM-dd\'),\n startTime: format(new Date(), \'HH:mm:ss\'),\n endDate: \'\',\n endTime: \'\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n canStart: false,\n running: false,\n curTab: null,\n receivedPackets: {},\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Open Configuration\',\n icon: \'mdi-folder-open\',\n command: () => {\n this.openConfig = true\n },\n },\n {\n label: \'Save Configuration\',\n icon: \'mdi-content-save\',\n command: () => {\n this.saveConfig = true\n },\n },\n ],\n },\n ],\n warning: false,\n warningText: \'\',\n error: false,\n errorText: \'\',\n connectionFailure: false,\n config: {\n tabs: [],\n },\n tabNameDialog: false,\n newTabName: \'\',\n showTabMenu: false,\n tabMenuX: 0,\n tabMenuY: 0,\n activeTab: 0,\n showAddComponentDialog: false,\n }\n },\n computed: {\n startEndTime: function () {\n return {\n start_time:\n new Date(this.startDate + \' \' + this.startTime).getTime() * 1_000_000,\n end_time: this.endDate\n ? new Date(this.endDate + \' \' + this.endTime).getTime() * 1_000_000\n : null,\n }\n },\n allPackets: function () {\n return this.config.tabs.flatMap((tab) => {\n return tab.packets\n })\n },\n },\n watch: {\n \'config.tabs.length\': function () {\n this.resizeTabs()\n },\n },\n created() {\n this.api = new OpenC3Api()\n this.subscribe()\n },\n mounted: function () {\n const previousConfig = localStorage[\'lastconfig__data_viewer\']\n if (previousConfig) {\n this.openConfiguration(previousConfig)\n }\n },\n destroyed: function () {\n if (this.subscription) {\n this.subscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n packetTitle: function (packet) {\n return `${packet.target} ${packet.packet} [ ${packet.mode} ]`\n },\n resizeTabs: function () {\n if (this.$refs.tabs) this.$refs.tabs.onResize()\n },\n start: function () {\n // Check for a future start time\n if (new Date(this.startDate + \' \' + this.startTime) > Date.now()) {\n this.warningText = \'Start date/time is in the future!\'\n this.warning = true\n return\n }\n // Check for an empty time period\n if (this.startEndTime.start_time === this.startEndTime.end_time) {\n this.warningText = \'Start date/time is equal to end date/time!\'\n this.warning = true\n return\n }\n // Check for a future End Time\n if (new Date(this.endDate + \' \' + this.endTime) > Date.now()) {\n this.warningText =\n \'Note: End date/time is greater than current date/time. Data will continue to stream in real-time until \' +\n this.endDate +\n \' \' +\n this.endTime +\n \' is reached.\'\n this.warning = true\n }\n this.running = true\n this.addPacketsToSubscription()\n },\n stop: function () {\n this.running = false\n this.removePacketsFromSubscription()\n },\n subscribe: function () {\n this.cable\n .createSubscription(\'StreamingChannel\', localStorage.scope, {\n received: (data) => this.received(data),\n connected: () => {\n this.canStart = true\n this.connectionFailure = false\n },\n disconnected: () => {\n this.stop()\n this.canStart = false\n this.warningText = \'OpenC3 backend connection disconnected.\'\n this.warning = true\n this.connectionFailure = true\n },\n rejected: () => {\n this.warningText = \'OpenC3 backend connection rejected.\'\n this.warning = true\n },\n })\n .then((subscription) => {\n this.subscription = subscription\n if (this.running) this.addPacketsToSubscription()\n })\n },\n addPacketsToSubscription: function (packets) {\n packets = packets || this.allPackets\n // Group by mode\n const modeGroups = packets.reduce((groups, packet) => {\n if (groups[packet.mode]) {\n groups[packet.mode].push(packet)\n } else {\n groups[packet.mode] = [packet]\n }\n return groups\n }, {})\n OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(() => {\n Object.keys(modeGroups).forEach((mode) => {\n this.subscription.perform(\'add\', {\n scope: localStorage.scope,\n token: localStorage.openc3Token,\n packets: modeGroups[mode].map(this.subscriptionKey),\n mode: mode,\n ...this.startEndTime,\n })\n })\n })\n },\n removePacketsFromSubscription: function (packets) {\n packets = packets || this.allPackets\n this.subscription.perform(\'remove\', {\n scope: localStorage.scope,\n packets: packets.map(this.subscriptionKey),\n })\n },\n received: function (json_data) {\n if (json_data[\'error\']) {\n this.errorText = json_data[\'error\']\n this.error = true\n return\n }\n const parsed = JSON.parse(json_data)\n if (!parsed.length) {\n this.stop()\n return\n }\n const groupedPackets = parsed.reduce((groups, packet) => {\n if (groups[packet.packet]) {\n groups[packet.packet].push(packet)\n } else {\n groups[packet.packet] = [packet]\n }\n return groups\n }, {})\n Object.keys(groupedPackets).forEach((packetName) => {\n this.$refs[`${packetName}-display`].forEach((component) => {\n component.receive(groupedPackets[packetName])\n })\n this.receivedPackets[packetName] = true\n })\n this.receivedPackets = { ...this.receivedPackets }\n },\n topicKey: function (packet) {\n let key = \'DEFAULT__\'\n if (packet.cmdOrTlm === \'tlm\') {\n key += packet.mode === \'DECOM\' ? \'DECOM\' : \'TELEMETRY\'\n } else {\n key += packet.mode === \'DECOM\' ? \'DECOMCMD\' : \'COMMAND\'\n }\n key += `__${packet.target}__${packet.packet}`\n if (packet.mode === \'DECOM\') key += `__${packet.valueType}`\n return key\n },\n subscriptionKey: function (packet) {\n const cmdOrTlm = packet.cmdOrTlm.toUpperCase()\n let key = `${cmdOrTlm}__${packet.target}__${packet.packet}`\n if (packet.mode === \'DECOM\') key += `__${packet.valueType}`\n return key\n },\n openConfiguration: async function (name) {\n localStorage[\'lastconfig__data_viewer\'] = name\n if (this.subscription) this.removePacketsFromSubscription()\n this.receivedPackets = {}\n let response = await this.api.load_config(this.toolName, name)\n if (response) {\n this.config = JSON.parse(response)\n }\n if (this.subscription && this.running) this.addPacketsToSubscription()\n },\n saveConfiguration: function (name) {\n localStorage[\'lastconfig__data_viewer\'] = name\n this.api.save_config(this.toolName, name, JSON.stringify(this.config))\n },\n addTab: function () {\n this.config.tabs.push({\n // name: this.newTabName,\n name: \'New Tab\',\n packets: [],\n })\n this.cancelTabRename()\n },\n cancelTabRename: function () {\n this.tabNameDialog = false\n this.newTabName = \'\'\n },\n tabMenu: function (event, index) {\n this.activeTab = index\n event.preventDefault()\n this.showTabMenu = false\n this.tabMenuX = event.clientX\n this.tabMenuY = event.clientY\n this.$nextTick(() => {\n this.showTabMenu = true\n })\n },\n openTabNameDialog: function () {\n this.newTabName = this.config.tabs[this.activeTab].name\n this.tabNameDialog = true\n },\n renameTab: function () {\n this.config.tabs[this.activeTab].name = this.newTabName\n this.tabNameDialog = false\n },\n deleteTab: function () {\n this.config.tabs.splice(this.activeTab, 1)\n },\n openComponentDialog: function (index) {\n this.activeTab = index\n this.showAddComponentDialog = true\n },\n packetSelected: function (event) {\n this.newPacket = {\n target: event.targetName,\n packet: event.packetName,\n cmdOrTlm: this.newPacketCmdOrTlm,\n }\n },\n addComponent: function (event) {\n this.config.tabs[this.activeTab].packets.push(event)\n if (this.running) {\n this.addPacketsToSubscription([event])\n }\n this.cancelAddComponent()\n },\n cancelAddComponent: function (event) {\n this.showAddComponentDialog = false\n },\n deleteComponent: function (tabIndex, packetIndex) {\n const packet = this.config.tabs[tabIndex].packets[packetIndex]\n this.config.tabs[tabIndex].packets.splice(packetIndex, 1)\n this.removePacketsFromSubscription([packet])\n },\n },\n}\n<\/script>\n\n<style scoped>\n.text-component-missing-name {\n font-family: \'Courier New\', Courier, monospace;\n}\n\n.v-tabs-items {\n overflow: visible;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6b426cf94a2474f9b098a1e609ee649318c6c233"},o=t[i]||(t[i]={});o[e]&&o[e].hash===n||(o[e]=l);var a=o[e];return pe=function(){return a},a}pe();var fe={components:{AddComponentDialog:Ae,OpenConfigDialog:N,SaveConfigDialog:M,DumpComponent:ae,TopBar:K},data:function(){var e=this;return pe().f[0]++,pe().s[0]++,{title:"Data Viewer",toolName:"data-viewer",openConfig:!1,saveConfig:!1,api:null,cable:new V,subscription:null,startDate:(0,s.Z)(new Date,"yyyy-MM-dd"),startTime:(0,s.Z)(new Date,"HH:mm:ss"),endDate:"",endTime:"",rules:{required:function(e){return pe().f[1]++,pe().s[1]++,pe().b[0][0]++,!!e||(pe().b[0][1]++,"Required")}},canStart:!1,running:!1,curTab:null,receivedPackets:{},menus:[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:function(){pe().f[2]++,pe().s[2]++,e.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:function(){pe().f[3]++,pe().s[3]++,e.saveConfig=!0}}]}],warning:!1,warningText:"",error:!1,errorText:"",connectionFailure:!1,config:{tabs:[]},tabNameDialog:!1,newTabName:"",showTabMenu:!1,tabMenuX:0,tabMenuY:0,activeTab:0,showAddComponentDialog:!1}},computed:{startEndTime:function(){return pe().f[4]++,pe().s[4]++,{start_time:1e6*new Date(this.startDate+" "+this.startTime).getTime(),end_time:this.endDate?(pe().b[1][0]++,1e6*new Date(this.endDate+" "+this.endTime).getTime()):(pe().b[1][1]++,null)}},allPackets:function(){return pe().f[5]++,pe().s[5]++,this.config.tabs.flatMap((function(e){return pe().f[6]++,pe().s[6]++,e.packets}))}},watch:{"config.tabs.length":function(){pe().f[7]++,pe().s[7]++,this.resizeTabs()}},created:function(){pe().f[8]++,pe().s[8]++,this.api=new b,pe().s[9]++,this.subscribe()},mounted:function(){pe().f[9]++;var e=(pe().s[10]++,localStorage["lastconfig__data_viewer"]);pe().s[11]++,e?(pe().b[2][0]++,pe().s[12]++,this.openConfiguration(e)):pe().b[2][1]++},destroyed:function(){pe().f[10]++,pe().s[13]++,this.subscription?(pe().b[3][0]++,pe().s[14]++,this.subscription.unsubscribe()):pe().b[3][1]++,pe().s[15]++,this.cable.disconnect()},methods:{packetTitle:function(e){return pe().f[11]++,pe().s[16]++,"".concat(e.target," ").concat(e.packet," [ ").concat(e.mode," ]")},resizeTabs:function(){pe().f[12]++,pe().s[17]++,this.$refs.tabs?(pe().b[4][0]++,pe().s[18]++,this.$refs.tabs.onResize()):pe().b[4][1]++},start:function(){return pe().f[13]++,pe().s[19]++,new Date(this.startDate+" "+this.startTime)>Date.now()?(pe().b[5][0]++,pe().s[20]++,this.warningText="Start date/time is in the future!",pe().s[21]++,this.warning=!0,void pe().s[22]++):(pe().b[5][1]++,pe().s[23]++,this.startEndTime.start_time===this.startEndTime.end_time?(pe().b[6][0]++,pe().s[24]++,this.warningText="Start date/time is equal to end date/time!",pe().s[25]++,this.warning=!0,void pe().s[26]++):(pe().b[6][1]++,pe().s[27]++,new Date(this.endDate+" "+this.endTime)>Date.now()?(pe().b[7][0]++,pe().s[28]++,this.warningText="Note: End date/time is greater than current date/time. Data will continue to stream in real-time until "+this.endDate+" "+this.endTime+" is reached.",pe().s[29]++,this.warning=!0):pe().b[7][1]++,pe().s[30]++,this.running=!0,pe().s[31]++,void this.addPacketsToSubscription()))},stop:function(){pe().f[14]++,pe().s[32]++,this.running=!1,pe().s[33]++,this.removePacketsFromSubscription()},subscribe:function(){var e=this;pe().f[15]++,pe().s[34]++,this.cable.createSubscription("StreamingChannel",localStorage.scope,{received:function(n){return pe().f[16]++,pe().s[35]++,e.received(n)},connected:function(){pe().f[17]++,pe().s[36]++,e.canStart=!0,pe().s[37]++,e.connectionFailure=!1},disconnected:function(){pe().f[18]++,pe().s[38]++,e.stop(),pe().s[39]++,e.canStart=!1,pe().s[40]++,e.warningText="OpenC3 backend connection disconnected.",pe().s[41]++,e.warning=!0,pe().s[42]++,e.connectionFailure=!0},rejected:function(){pe().f[19]++,pe().s[43]++,e.warningText="OpenC3 backend connection rejected.",pe().s[44]++,e.warning=!0}}).then((function(n){pe().f[20]++,pe().s[45]++,e.subscription=n,pe().s[46]++,e.running?(pe().b[8][0]++,pe().s[47]++,e.addPacketsToSubscription()):pe().b[8][1]++}))},addPacketsToSubscription:function(e){var n=this;pe().f[21]++,pe().s[48]++,pe().b[9][0]++,e=e||(pe().b[9][1]++,this.allPackets);var t=(pe().s[49]++,e.reduce((function(e,n){return pe().f[22]++,pe().s[50]++,e[n.mode]?(pe().b[10][0]++,pe().s[51]++,e[n.mode].push(n)):(pe().b[10][1]++,pe().s[52]++,e[n.mode]=[n]),pe().s[53]++,e}),{}));pe().s[54]++,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){pe().f[23]++,pe().s[55]++,Object.keys(t).forEach((function(e){pe().f[24]++,pe().s[56]++,n.subscription.perform("add",(0,c.Z)({scope:localStorage.scope,token:localStorage.openc3Token,packets:t[e].map(n.subscriptionKey),mode:e},n.startEndTime))}))}))},removePacketsFromSubscription:function(e){pe().f[25]++,pe().s[57]++,pe().b[11][0]++,e=e||(pe().b[11][1]++,this.allPackets),pe().s[58]++,this.subscription.perform("remove",{scope:localStorage.scope,packets:e.map(this.subscriptionKey)})},received:function(e){var n=this;if(pe().f[26]++,pe().s[59]++,e["error"])return pe().b[12][0]++,pe().s[60]++,this.errorText=e["error"],pe().s[61]++,this.error=!0,void pe().s[62]++;pe().b[12][1]++;var t=(pe().s[63]++,JSON.parse(e));if(pe().s[64]++,!t.length)return pe().b[13][0]++,pe().s[65]++,this.stop(),void pe().s[66]++;pe().b[13][1]++;var i=(pe().s[67]++,t.reduce((function(e,n){return pe().f[27]++,pe().s[68]++,e[n.packet]?(pe().b[14][0]++,pe().s[69]++,e[n.packet].push(n)):(pe().b[14][1]++,pe().s[70]++,e[n.packet]=[n]),pe().s[71]++,e}),{}));pe().s[72]++,Object.keys(i).forEach((function(e){pe().f[28]++,pe().s[73]++,n.$refs["".concat(e,"-display")].forEach((function(n){pe().f[29]++,pe().s[74]++,n.receive(i[e])})),pe().s[75]++,n.receivedPackets[e]=!0})),pe().s[76]++,this.receivedPackets=(0,c.Z)({},this.receivedPackets)},topicKey:function(e){pe().f[30]++;var n=(pe().s[77]++,"DEFAULT__");return pe().s[78]++,"tlm"===e.cmdOrTlm?(pe().b[15][0]++,pe().s[79]++,n+="DECOM"===e.mode?(pe().b[16][0]++,"DECOM"):(pe().b[16][1]++,"TELEMETRY")):(pe().b[15][1]++,pe().s[80]++,n+="DECOM"===e.mode?(pe().b[17][0]++,"DECOMCMD"):(pe().b[17][1]++,"COMMAND")),pe().s[81]++,n+="__".concat(e.target,"__").concat(e.packet),pe().s[82]++,"DECOM"===e.mode?(pe().b[18][0]++,pe().s[83]++,n+="__".concat(e.valueType)):pe().b[18][1]++,pe().s[84]++,n},subscriptionKey:function(e){pe().f[31]++;var n=(pe().s[85]++,e.cmdOrTlm.toUpperCase()),t=(pe().s[86]++,"".concat(n,"__").concat(e.target,"__").concat(e.packet));return pe().s[87]++,"DECOM"===e.mode?(pe().b[19][0]++,pe().s[88]++,t+="__".concat(e.valueType)):pe().b[19][1]++,pe().s[89]++,t},openConfiguration:function(){var e=(0,a.Z)((0,o.Z)().mark((function e(n){var t;return(0,o.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return pe().f[32]++,pe().s[90]++,localStorage["lastconfig__data_viewer"]=n,pe().s[91]++,this.subscription?(pe().b[20][0]++,pe().s[92]++,this.removePacketsFromSubscription()):pe().b[20][1]++,pe().s[93]++,this.receivedPackets={},pe().s[94]++,e.next=10,this.api.load_config(this.toolName,n);case 10:t=e.sent,pe().s[95]++,t?(pe().b[21][0]++,pe().s[96]++,this.config=JSON.parse(t)):pe().b[21][1]++,pe().s[97]++,pe().b[23][0]++,this.subscription&&(pe().b[23][1]++,this.running)?(pe().b[22][0]++,pe().s[98]++,this.addPacketsToSubscription()):pe().b[22][1]++;case 15:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}(),saveConfiguration:function(e){pe().f[33]++,pe().s[99]++,localStorage["lastconfig__data_viewer"]=e,pe().s[100]++,this.api.save_config(this.toolName,e,JSON.stringify(this.config))},addTab:function(){pe().f[34]++,pe().s[101]++,this.config.tabs.push({name:"New Tab",packets:[]}),pe().s[102]++,this.cancelTabRename()},cancelTabRename:function(){pe().f[35]++,pe().s[103]++,this.tabNameDialog=!1,pe().s[104]++,this.newTabName=""},tabMenu:function(e,n){var t=this;pe().f[36]++,pe().s[105]++,this.activeTab=n,pe().s[106]++,e.preventDefault(),pe().s[107]++,this.showTabMenu=!1,pe().s[108]++,this.tabMenuX=e.clientX,pe().s[109]++,this.tabMenuY=e.clientY,pe().s[110]++,this.$nextTick((function(){pe().f[37]++,pe().s[111]++,t.showTabMenu=!0}))},openTabNameDialog:function(){pe().f[38]++,pe().s[112]++,this.newTabName=this.config.tabs[this.activeTab].name,pe().s[113]++,this.tabNameDialog=!0},renameTab:function(){pe().f[39]++,pe().s[114]++,this.config.tabs[this.activeTab].name=this.newTabName,pe().s[115]++,this.tabNameDialog=!1},deleteTab:function(){pe().f[40]++,pe().s[116]++,this.config.tabs.splice(this.activeTab,1)},openComponentDialog:function(e){pe().f[41]++,pe().s[117]++,this.activeTab=e,pe().s[118]++,this.showAddComponentDialog=!0},packetSelected:function(e){pe().f[42]++,pe().s[119]++,this.newPacket={target:e.targetName,packet:e.packetName,cmdOrTlm:this.newPacketCmdOrTlm}},addComponent:function(e){pe().f[43]++,pe().s[120]++,this.config.tabs[this.activeTab].packets.push(e),pe().s[121]++,this.running?(pe().b[24][0]++,pe().s[122]++,this.addPacketsToSubscription([e])):pe().b[24][1]++,pe().s[123]++,this.cancelAddComponent()},cancelAddComponent:function(e){pe().f[44]++,pe().s[124]++,this.showAddComponentDialog=!1},deleteComponent:function(e,n){pe().f[45]++;var t=(pe().s[125]++,this.config.tabs[e].packets[n]);pe().s[126]++,this.config.tabs[e].packets.splice(n,1),pe().s[127]++,this.removePacketsFromSubscription([t])}}},he=fe,ve=(t(4367),(0,T.Z)(he,i,l,!1,null,"49740cd6",null)),Ce=ve.exports},7764:function(e,n,t){"use strict";t.r(n);var i=t(3467),l=t.n(i),o=t(8715),a=t.n(o),c=a()(l());c.push([e.id,".v-list[data-v-3237297b] .v-label{margin-left:5px}.v-list-item__icon[data-v-3237297b]{margin-right:15px!important}.v-list-item__title[data-v-3237297b]{color:#fff}",""]),n["default"]=c},6605:function(e,n,t){"use strict";t.r(n);var i=t(3467),l=t.n(i),o=t(8715),a=t.n(o),c=a()(l());c.push([e.id,".text-component-missing-name[data-v-49740cd6]{font-family:Courier New,Courier,monospace}.v-tabs-items[data-v-49740cd6]{overflow:visible}",""]),n["default"]=c},2930:function(e,n,t){"use strict";t.r(n);var i=t(3467),l=t.n(i),o=t(8715),a=t.n(o),c=a()(l());c.push([e.id,".text-area-container[data-v-9b447e3c]{position:relative}.text-area-container .v-textarea[data-v-9b447e3c]{font-family:Courier New,Courier,monospace}.text-area-container .floating-buttons[data-v-9b447e3c]{position:absolute;top:12px;right:24px}.pulse[data-v-9b447e3c]{-webkit-animation:pulse-data-v-9b447e3c 1s infinite;animation:pulse-data-v-9b447e3c 1s infinite}@-webkit-keyframes pulse-data-v-9b447e3c{0%{opacity:1}50%{opacity:.5}}@keyframes pulse-data-v-9b447e3c{0%{opacity:1}50%{opacity:.5}}",""]),n["default"]=c},5741:function(e,n,t){var i=t(7764);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("9f637652",i,!0,{sourceMap:!1,shadowMode:!1})},4367:function(e,n,t){var i=t(6605);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("757bd447",i,!0,{sourceMap:!1,shadowMode:!1})},858:function(e,n,t){var i=t(2930);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var l=t(3514).Z;l("27beebac",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
2
|
-
//# sourceMappingURL=575.js.map
|