openc3-cosmos-tool-dataextractor 6.10.2 → 6.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/ArrayWidget-Bc-Awsbn-725121c6cf8f316888ed.js +2 -0
  3. data/tools/dataextractor/{ArrayplotWidget-DDEd-jRJ-84ba295930b81d4eb221.js → ArrayplotWidget-B9UGCr4--10bc9bda6d6218d666b9.js} +1 -1
  4. data/tools/dataextractor/BarColumn-ClLBRGll-fb02389b391b435091f1.js +1 -0
  5. data/tools/dataextractor/BlockWidget-CoQp-LZM-272c36deb40927f0cf99.js +2 -0
  6. data/tools/dataextractor/ButtonWidget-CTTwpFec-a45fcc1ebc4a0838d11d.js +2 -0
  7. data/tools/dataextractor/CanvasWidget-jFarbJ3t-3e04e3d0affd81c321d2.js +1 -0
  8. data/tools/dataextractor/{CanvasdotWidget--awMOWyz-3268ed3b5e57c7ca818d.js → CanvasdotWidget-BoyUcwiB-8e204fc12b1ca57b323f.js} +1 -1
  9. data/tools/dataextractor/CanvasimageWidget-DmyCSnuQ-f0bb0c1bc8ece5718733.js +1 -0
  10. data/tools/dataextractor/CanvasimagevalueWidget-CmbngMqv-ad858edad0b3552ad29d.js +1 -0
  11. data/tools/dataextractor/{CanvaslabelWidget-DoMplTTO-c59605de499dffd59345.js → CanvaslabelWidget-D8NzLKqi-a1cc6151409c4f4ef644.js} +1 -1
  12. data/tools/dataextractor/CanvaslabelvalueWidget-DOybGI9D-b4661f20261ff535e72b.js +1 -0
  13. data/tools/dataextractor/{CanvaslineWidget-D7W1TIxm-999c1564db4810f07c54.js → CanvaslineWidget-D2NEei7j-e9037dd519b731eab390.js} +1 -1
  14. data/tools/dataextractor/CanvaslinevalueWidget-Ctvv9owf-78ae8d0818475e5dab9e.js +1 -0
  15. data/tools/dataextractor/CheckbuttonWidget-CQeR0BMF-71221f9d684eae42d734.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-4N-MagvN-26319eb531aa923f37b0.js +1 -0
  17. data/tools/dataextractor/DataExtractor-49686590098f6223d96c.js +11 -0
  18. data/tools/dataextractor/DateWidget-rYTjwUdb-be2b822f1c0563c1199d.js +1 -0
  19. data/tools/dataextractor/DetailsDialog-p_vutijL-22b1ca4ac94462632604.js +1 -0
  20. data/tools/dataextractor/DynamicWidget-DEHWYr8i-bb10f0f211e0d6007cd1.js +1 -0
  21. data/tools/dataextractor/FilechecksumWidget-gcmXxJHl-51155f38449272edae15.js +1 -0
  22. data/tools/dataextractor/FiledisplayWidget-CqM549A4-dde94b2c031fa0116e4b.js +1 -0
  23. data/tools/dataextractor/FormatvalueWidget-BEwH0C7S-933bd49fee7450067242.js +1 -0
  24. data/tools/dataextractor/Graph-CbjlChwf-3f9aea310eebb71b56e5.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-BpkPpAbd-f051d1e664ed931ea4b2.js → GraphWidget-CjxnC0Dc-5286b6102a372059f83e.js} +1 -1
  26. data/tools/dataextractor/HorizontalWidget-Dt8bkM3k-6ab4d8e94d239065253a.js +1 -0
  27. data/tools/dataextractor/{HorizontalboxWidget-CTomf_Iy-6bad35d71df5161bb1f2.js → HorizontalboxWidget-CdAZ5Sa6-8011b01076138200ebce.js} +1 -1
  28. data/tools/dataextractor/HorizontallineWidget-CXZJTeU2-670c042553f9e2ec7238.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-DK7rbULe-3a893df2232a44c3a3ba.js → IframeWidget-CrcWiAVE-daa6303242c6802e6dc7.js} +1 -1
  30. data/tools/dataextractor/{ImageLoader-C9rN_pSY-ea1316dd0a3366aa0eb9.js → ImageLoader-DPqax8yu-8be4961c4ee3b55be3a2.js} +1 -1
  31. data/tools/dataextractor/ImageviewerWidget-CTEl6iPg-2eabaaf03bd19fc18098.js +1 -0
  32. data/tools/dataextractor/{LabelWidget-D71FfOSw-2236774228b5f5147e34.js → LabelWidget-CPqKGMx0-fa9f8d26b895e6f7f328.js} +1 -1
  33. data/tools/dataextractor/LabelledWidget-BHYzRMFd-6a04cbb0f4f91d7d6b99.js +1 -0
  34. data/tools/dataextractor/LabelprogressbarWidget-D9deeUo7-1d7a9973a162882a55ff.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-7mYre3CP-5592ea3a9f1fc86cc7cb.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget-NLsD60n4-f61de31e67979784b8cc.js +1 -0
  37. data/tools/dataextractor/LabelvaluedescWidget-DXROG4Gs-24e058937e6a113f246c.js +1 -0
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-DqVqHF4W-6ca44e7ccc0c75be52b1.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-BK6_31pC-978b968d0cfc86d19d48.js +1 -0
  40. data/tools/dataextractor/LabelvaluerangebarWidget-DR7C8gqw-df75eab4d60fdc1510a4.js +1 -0
  41. data/tools/dataextractor/Layout-B_Hgw3gd-efe811f3fe21a793ecc7.js +1 -0
  42. data/tools/dataextractor/LedWidget-CiAVs2tj-5cf1cbd43ddb51760d69.js +1 -0
  43. data/tools/dataextractor/LimitsBar-_UQG-M6e-e79bee025393a20cb921.js +1 -0
  44. data/tools/dataextractor/LimitsbarWidget-CIwcOhC8-49d2573d54ccb8358690.js +1 -0
  45. data/tools/dataextractor/LimitscolorWidget-CGPfJwvT-e2a54a8441c7e7e559f3.js +1 -0
  46. data/tools/dataextractor/{LimitscolumnWidget-CjBy-CCI-da3d3299dd370fd29ad2.js → LimitscolumnWidget-Bj_UPEC8-7498dda54149ed0b939d.js} +1 -1
  47. data/tools/dataextractor/LinegraphWidget-DccnHbWa-e3c43191d6d2d331893f.js +1 -0
  48. data/tools/dataextractor/MatrixbycolumnsWidget-U_NZ6aW--daf7faacbd6a239d2e64.js +1 -0
  49. data/tools/dataextractor/ProgressbarWidget-D4JtVzyk-2d40df70c7d96d536450.js +1 -0
  50. data/tools/dataextractor/RadiobuttonWidget-BUaW7pRx-9c3e622297fb6fe927c0.js +1 -0
  51. data/tools/dataextractor/RadiogroupWidget-NIv4CaUQ-f5e48617b4d692b52115.js +1 -0
  52. data/tools/dataextractor/RangebarWidget-1-CsFpcl-922edd7787bc653c0894.js +1 -0
  53. data/tools/dataextractor/RollupWidget-ChasTJYP-e459eb112d1cdb953f75.js +1 -0
  54. data/tools/dataextractor/ScrollwindowWidget-Y2J758y6-a1840fe72ef9472e7701.js +1 -0
  55. data/tools/dataextractor/SignalWidget-DFhHDicI-ecaf75f863a425f0029e.js +1 -0
  56. data/tools/dataextractor/SpacerWidget-D4KojaGb-b2be42972c8500719d8e.js +1 -0
  57. data/tools/dataextractor/SparklineWidget-DMHFzw8L-91b0a3c0ce8dd5ec82e3.js +1 -0
  58. data/tools/dataextractor/TabbookWidget-NVLYMdFG-412a422f8fc3efa49b1b.js +1 -0
  59. data/tools/dataextractor/TargetPacketItemChooser-D5h9Octy-dbed8f533322159c1cbf.js +1 -0
  60. data/tools/dataextractor/TextboxWidget-CrMYPQIF-a441611dd9de6e35d12f.js +1 -0
  61. data/tools/dataextractor/TextfieldWidget-DMBQwtnb-bd7a31892a735faf3b79.js +1 -0
  62. data/tools/dataextractor/{TimeWidget-Dy8zpkC6-460c2358c078e49902d8.js → TimeWidget-CWLJZ2bt-64225f9d27bc3a516f23.js} +1 -1
  63. data/tools/dataextractor/TitleWidget-V1FGI8l3-ecf255e12fafcf11eb5d.js +1 -0
  64. data/tools/dataextractor/{VWidget-CBmUpKSV-8813886a1679fe6a0d79.js → VWidget-rAFU-0vj-a2aaac1a8c481b8f7c9a.js} +1 -1
  65. data/tools/dataextractor/ValueWidget-BI3uXmda-36fc637dd4e48d44fbe5.js +1 -0
  66. data/tools/dataextractor/ValuelimitsbarWidget-BGSJLpw4-ee2d9a6912e7863e8f9b.js +1 -0
  67. data/tools/dataextractor/ValuelimitscolumnWidget-CaNjHy4v-e43086a7f4293273a0c6.js +1 -0
  68. data/tools/dataextractor/ValuerangebarWidget-Do40-aaL-65d077ea4fc05701798c.js +1 -0
  69. data/tools/dataextractor/VerticalWidget-DZqghqIm-61e7a7bbc01859ca7088.js +1 -0
  70. data/tools/dataextractor/VerticalboxWidget-CQ__4FcS-80386c538d1cb5139942.js +1 -0
  71. data/tools/dataextractor/Widget-6-Nvewdp-7627de70dadaabe97688.js +1 -0
  72. data/tools/dataextractor/{main-651b12795c7d3f57ff0a.js → main-9cd385edc6f249dcc77f.js} +19 -19
  73. data/tools/dataextractor/main.js +1 -1
  74. metadata +72 -69
  75. data/tools/dataextractor/ArrayWidget-CR7Wpw3N-4ca5ba9c1472d172e34a.js +0 -2
  76. data/tools/dataextractor/BarColumn-XWs-3Cwb-21c0dd0f2e2d81d838b0.js +0 -1
  77. data/tools/dataextractor/BlockWidget-CfFgdNSv-ee2e545e318e822ff830.js +0 -2
  78. data/tools/dataextractor/ButtonWidget-BaSvtElA-3008cfe38f3e1a6ab70b.js +0 -2
  79. data/tools/dataextractor/CanvasWidget-DcwDi5Zk-1cf153daec27a9f780f5.js +0 -1
  80. data/tools/dataextractor/CanvasimageWidget-YP1pCtvb-a7453f79095a733809a0.js +0 -1
  81. data/tools/dataextractor/CanvasimagevalueWidget-CjVHb2uj-6e19551a3cc4a7768c5b.js +0 -1
  82. data/tools/dataextractor/CanvaslabelvalueWidget-Dyo_ogHn-73e1670a20f61242cb4e.js +0 -1
  83. data/tools/dataextractor/CanvaslinevalueWidget-BOZyJuLE-42a886e387bc417d66ca.js +0 -1
  84. data/tools/dataextractor/CheckbuttonWidget-B1E4BC6v-e83eda227dc11668601e.js +0 -1
  85. data/tools/dataextractor/ComboboxWidget-BExUBH57-f47c695c6ce53ea803eb.js +0 -1
  86. data/tools/dataextractor/DataExtractor-8d5c32776754cd6abd96.js +0 -11
  87. data/tools/dataextractor/DateWidget-_ZmPsi2l-88b7ef356d7d81c22a8f.js +0 -1
  88. data/tools/dataextractor/DetailsDialog-Bq7SS7bc-370ad81c0b8d58b6beb7.js +0 -1
  89. data/tools/dataextractor/DynamicWidget-DHL7pbgW-36375999f9512b7571a7.js +0 -1
  90. data/tools/dataextractor/FormatvalueWidget-4C0vrL2i-ab3a65a41c507c38a659.js +0 -1
  91. data/tools/dataextractor/Graph-B7KPo9Ul-7b306a369c80cfe4bf4a.js +0 -1
  92. data/tools/dataextractor/HorizontalWidget-DbEQYjFC-9203fa237c0cd1418248.js +0 -1
  93. data/tools/dataextractor/HorizontallineWidget-B7xx7ofY-97ef865d308d570e2c6f.js +0 -1
  94. data/tools/dataextractor/ImageviewerWidget-6d6Kl3W_-18ad718f4811f20f2ec9.js +0 -1
  95. data/tools/dataextractor/LabelledWidget-D2ir5kVU-46ddb5413fb17e9ba985.js +0 -1
  96. data/tools/dataextractor/LabelprogressbarWidget-C4_YbROz-2979f0fd13dea6e9c7e9.js +0 -1
  97. data/tools/dataextractor/LabelsparklineWidget-CdZ_pM2B-ccb839cc3227c8bb6bb9.js +0 -1
  98. data/tools/dataextractor/LabelvalueWidget-BS0EPY5h-b2d50ca8ebebfb8070d3.js +0 -1
  99. data/tools/dataextractor/LabelvaluedescWidget-Cpr8_Voq-9d3e714591f1790a792c.js +0 -1
  100. data/tools/dataextractor/LabelvaluelimitsbarWidget-DTcYbEQS-295e194a657a0f792e3f.js +0 -1
  101. data/tools/dataextractor/LabelvaluelimitscolumnWidget-D0ltQ9Ta-6d0ff30ab65fd16d3a56.js +0 -1
  102. data/tools/dataextractor/LabelvaluerangebarWidget-O8IHjvHs-9ee2ac49fa08bf5b2af9.js +0 -1
  103. data/tools/dataextractor/Layout-DW5yNlp7-a04881cc025866ca3e70.js +0 -1
  104. data/tools/dataextractor/LedWidget-DUvJ2v8k-9e2485196914e23d2538.js +0 -1
  105. data/tools/dataextractor/LimitsbarWidget-BehZv0-k-9abf0cdf88d8d5f1d1bd.js +0 -1
  106. data/tools/dataextractor/LimitscolorWidget-FXT0ZPPH-bbf2593ac2985c9d1166.js +0 -1
  107. data/tools/dataextractor/LinegraphWidget-lmu_tFKd-91801ed0807817616018.js +0 -1
  108. data/tools/dataextractor/MatrixbycolumnsWidget-CCF7rCkV-b873a6e1dc0653093d1a.js +0 -1
  109. data/tools/dataextractor/ProgressbarWidget-B5WN658S-bc544e73206a78e9249f.js +0 -1
  110. data/tools/dataextractor/RadiobuttonWidget-B_3nys46-1e702e9e29fb04e173ec.js +0 -1
  111. data/tools/dataextractor/RadiogroupWidget-BiMIL9li-590f65e75e2b8fe44af7.js +0 -1
  112. data/tools/dataextractor/RangebarWidget-Dn0GASdi-efd25afb6da2563deeec.js +0 -1
  113. data/tools/dataextractor/RollupWidget-b62qcG5K-539ab49117bf974594cd.js +0 -1
  114. data/tools/dataextractor/ScrollwindowWidget-Dn29gs-U-e981a64d1dfbe059e752.js +0 -1
  115. data/tools/dataextractor/SignalWidget-CLi6qask-f6fc60a0e6946a35b4c6.js +0 -1
  116. data/tools/dataextractor/SpacerWidget-BCA3gdap-cc56baed1188df1d3dc2.js +0 -1
  117. data/tools/dataextractor/SparklineWidget-D8mb4zLt-9e4d79986e2c57d73440.js +0 -1
  118. data/tools/dataextractor/TabbookWidget-Bkt4g02d-d85a179566dd6f6d41d3.js +0 -1
  119. data/tools/dataextractor/TargetPacketItemChooser-DGcXvdTX-422956920d910f64a05d.js +0 -1
  120. data/tools/dataextractor/TextboxWidget-CR05wO-t-63d354dae7933e1986ff.js +0 -1
  121. data/tools/dataextractor/TextfieldWidget-Be_Pz2bF-97c806c745df649fb2d8.js +0 -1
  122. data/tools/dataextractor/TitleWidget-BcmxUDzM-826f8fd6658fe3903950.js +0 -1
  123. data/tools/dataextractor/ValueWidget-BxWrHkYY-2278104ac60275e9299f.js +0 -1
  124. data/tools/dataextractor/ValuelimitsbarWidget-BdY02gqc-fdcf83e59254f5d0a837.js +0 -1
  125. data/tools/dataextractor/ValuelimitscolumnWidget-CuJ6rqtC-f0d3097b2117bee025dc.js +0 -1
  126. data/tools/dataextractor/ValuerangebarWidget-C5rolGDi-62d3e5e4d8774813037e.js +0 -1
  127. data/tools/dataextractor/VerticalWidget-DsnEzKZ2-697f969e98054b0a76c1.js +0 -1
  128. data/tools/dataextractor/VerticalboxWidget-CzDgveBl-40ee69dcb7bd81c4b4c5.js +0 -1
  129. data/tools/dataextractor/Widget-VCl8Ts8s-95d14cdc312d1d87d6e4.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33179beac31032fd16b0a23d0dc9df2f6b7d5a7bfb68f07701cd092c520f934e
4
- data.tar.gz: dfa37c5dce1cb7dda99e8bed95e8183d5312aad33108c308abb97c6054643a01
3
+ metadata.gz: 5d0cc17de2c67d66c4706e82e773d88e84436ba3a4a50b743e9176094c79d5ea
4
+ data.tar.gz: 2aed057b989f7da047110a5b08fd4c7ff6729109ccacea409547ecad3fd7cf1a
5
5
  SHA512:
6
- metadata.gz: cced00401cfdcfd25455d6658c43f80d42365b2d9f96f0269c31a9e6b78de2d0e515c90bfcd65d8d081533bbae08d218ece5cc8e23bd0e51e8721f2341f56daa
7
- data.tar.gz: 61703f2e71963337be4db7c34a3c75d1c6611ef2d06611706a12762ae47d8c9ab81875768466435796e31cbacd0217dafa4c9846931ed435377c68e22eb1ea54
6
+ metadata.gz: 1a52c90c49aac20a66a254a94b99f34270c1b7ea16d809b9fa3c1268a7bd2df952bbebd9d8eae8393cfd0f8e1c7a4faffe7023ab52d429a2cf65ef7564915d23
7
+ data.tar.gz: 0f264d4ee278a22a1a4b807352c0729193391f92d7e54214d350b9f71990ab06bd35daeedac9c5b0b2d780a77a06e69f91e33ff01da436ce0cebb46875f08b84
@@ -0,0 +1,2 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","vue","./DetailsDialog-p_vutijL-22b1ca4ac94462632604.js","single-spa","./VWidget-rAFU-0vj-a2aaac1a8c481b8f7c9a.js","vue-router","vuex","vuetify","./LimitsBar-_UQG-M6e-e79bee025393a20cb921.js","./Widget-6-Nvewdp-7627de70dadaabe97688.js"],function(_,E){"use strict";var h,a,c,u,i,d,p,l,g,v,f,w,y,x,C,V;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,v=t.renderList,f=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.q},null,t=>{V=t.h},null,null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},mixins:[V],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
2
+ `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},B={class:"array-widget-container"};function S(e,r,s,k,D,o){const m=a("v-textarea"),j=a("v-list-item-title"),M=a("v-list-item"),z=a("v-list"),L=a("v-menu"),N=a("details-dialog");return u(),c("div",B,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(L,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(z,null,{default:l(()=>[(u(!0),c(g,null,v(e.contextMenuOptions,(n,A)=>(u(),f(M,{key:A,onClick:w(n.action,["stop"])},{default:l(()=>[i(j,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(N,{modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const R=_("default",h(t,[["render",S],["__scopeId","data-v-69b65cde"]]))}}});
@@ -1 +1 @@
1
- System.register(["./main-651b12795c7d3f57ff0a.js","./GraphWidget-BpkPpAbd-f051d1e664ed931ea4b2.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-VCl8Ts8s-95d14cdc312d1d87d6e4.js"],function(m,k){"use strict";var c,l,d,h,u,p;return{setters:[s=>{c=s.d,l=s.f,d=s.P},s=>{h=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[h],data:function(){return{items:[],indexes:{},data:[[]],cable:new d,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const w=m("default",c(s,[["render",g]]))}}});
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","./GraphWidget-CjxnC0Dc-5286b6102a372059f83e.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-6-Nvewdp-7627de70dadaabe97688.js"],function(m,w){"use strict";var c,l,d,h,u,p;return{setters:[s=>{c=s.d,l=s.f,d=s.P},s=>{h=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[h],data:function(){return{items:[],indexes:{},data:[[]],cable:new d,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const x=m("default",c(s,[["render",g]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","./main-9cd385edc6f249dcc77f.js"],function(a,n){"use strict";var h,r;return{setters:[e=>{h=e.o},e=>{r=e.B}],execute:function(){const e=a("u",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new r,this.parameters[2].includes("[[")&&(this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]")),this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let l=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(l=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const s=parseInt((t-l)/this.scale);return s>100?100:s<0?0:s}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
@@ -0,0 +1,2 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","vue","./DetailsDialog-p_vutijL-22b1ca4ac94462632604.js","single-spa","./VWidget-rAFU-0vj-a2aaac1a8c481b8f7c9a.js","vue-router","vuex","vuetify","./LimitsBar-_UQG-M6e-e79bee025393a20cb921.js","./Widget-6-Nvewdp-7627de70dadaabe97688.js"],function(D,N){"use strict";var c,a,m,h,s,p,g,o,w,f,v,y,x,k,C,V;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,k=e.toDisplayString},e=>{C=e.q},null,e=>{V=e.h},null,null,null,null,null],execute:function(){const e={components:{DetailsDialog:C},mixins:[V],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let S=" ",_=`
2
+ `,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const u of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,u),i+=1,i%d===0?(i=0,r+=_):i%this.bytesPerWord===0&&(r+=S)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,S,_,i,l){const d=a("v-textarea"),u=a("v-list-item-title"),j=a("v-list-item"),B=a("v-list"),F=a("v-menu"),P=a("details-dialog");return h(),m("div",M,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(F,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(B,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,b)=>(h(),v(j,{key:b,onClick:y(n.action,["stop"])},{default:o(()=>[s(u,null,{default:o(()=>[x(k(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(P,{modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const z=D("default",c(e,[["render",W],["__scopeId","data-v-454d6ab5"]]))}}});
@@ -0,0 +1,2 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","vue","single-spa","./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,w,FA,BA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,w=e.w,FA=e.F,BA=e.B},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(e,t){e?(FA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?FA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await FA.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();w.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await FA.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await w.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await w.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,p,a,r){const n=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),v=resolveComponent("v-container"),V=resolveComponent("v-card-text"),u=resolveComponent("v-card"),y=resolveComponent("v-dialog");return openBlock(),createBlock(y,{modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(V,null,{default:withCtx(()=>[createVNode(v,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:r.disableButtons,"data-test":"reject",onClick:withModifiers(r.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve",onClick:withModifiers(r.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(S,[["render",E],["__scopeId","data-v-0b6637f7"]]),_sfc_main={components:{CriticalCmdDialog:N},mixins:[o],data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new BA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
2
+ `).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});FA.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,p,a,r){const n=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),v=resolveComponent("v-dialog"),V=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(v,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{variant:"outlined",onClick:r.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary mx-1",onClick:r.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(V,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Layout-B_Hgw3gd-efe811f3fe21a793ecc7.js","vue","./main-9cd385edc6f249dcc77f.js","./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue-router","single-spa","vuex","vuetify"],function(d,w){"use strict";var i,s,n,a,l,c,u,g,o;return{setters:[e=>{i=e.u},e=>{s=e.createElementBlock,n=e.openBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,g=e.mergeProps},e=>{o=e.d},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},p=["width","height"];function h(r,k,y,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),g({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,p)}const f=d("default",o(e,[["render",h],["__scopeId","data-v-16dc7bf8"]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-VCl8Ts8s-95d14cdc312d1d87d6e4.js","vue","./main-651b12795c7d3f57ff0a.js","vue-router","single-spa","vuex","vuetify"],function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,d,v){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))}}});
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,p,f,d,v){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","./ImageLoader-DPqax8yu-8be4961c4ee3b55be3a2.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.o},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[i,n],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,N,r){return t.imageUrl?(l(),s("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","./ImageLoader-DPqax8yu-8be4961c4ee3b55be3a2.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,o,g,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,o=t.createCommentVNode,g=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,$,a){return n(),l("g",null,[(n(!0),l(g,null,p(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):o("",!0)])}const N=v("default",f(t,[["render",k]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-VCl8Ts8s-95d14cdc312d1d87d6e4.js","vue","./main-651b12795c7d3f57ff0a.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,y,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,d,x,v,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(u,d){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,c,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const p=u("default",n(e,[["render",m]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-VCl8Ts8s-95d14cdc312d1d87d6e4.js","vue","./main-651b12795c7d3f57ff0a.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,a,c;return{setters:[e=>{l=e.o},e=>{s=e.createElementBlock,n=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,d,k,x,m){return n(),s("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,a,c;return{setters:[e=>{l=e.o},e=>{n=e.createElementBlock,s=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,d,k,x,m){return s(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(u,h){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:function(){const t={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function d(e,a,o,v,y,c){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(c.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",d]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(c,p){"use strict";var t,a,n,o,s,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,o=e.openBlock,s=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,k,y,l,b){const m=a("v-checkbox");return o(),n(m,{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),"hide-details":"",density:"compact",label:l.label,style:s(d.computedStyle)},null,8,["modelValue","label","style"])}const h=c("default",r(e,[["render",i]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,o,r,u;return{setters:[e=>{l=e.o},e=>{n=e.resolveComponent,s=e.createBlock,o=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,k){const d=n("v-select");return o(),s(d,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:r(m.computedStyle)},null,8,["modelValue","items","style"])}const y=i("default",u(e,[["render",c]]))}}});
@@ -0,0 +1,11 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","vue","./TargetPacketItemChooser-D5h9Octy-dbed8f533322159c1cbf.js","vue-router","single-spa","vuex","vuetify"],function(Ps,Ii){"use strict";var pt,gt,bt,yt,_t,wt,C,L,P,vt,f,g,Te,Z,ee,ae,fe,St,F,Be,He,le,ze,Tt,We,Et;return{setters:[x=>{pt=x.d,gt=x._,bt=x.p,yt=x.R,_t=x.a,wt=x.g},x=>{C=x.resolveComponent,L=x.createBlock,P=x.openBlock,vt=x.Teleport,f=x.createVNode,g=x.withCtx,Te=x.createElementVNode,Z=x.toDisplayString,ee=x.createElementBlock,ae=x.Fragment,fe=x.renderList,St=x.ref,F=x.createTextVNode,Be=x.mergeProps,He=x.createSlots,le=x.createCommentVNode,ze=x.normalizeStyle,Tt=x.withModifiers,We=x.withKeys},x=>{Et=x.R},null,null,null,null],execute:function(){var x=document.createElement("style");x.textContent=`.title-font[data-v-69333456]{font-size:1.125rem}.v-progress-linear__determinate[data-v-69333456]{transition:none!important}
2
+ /*$vite$:1*/`,document.head.appendChild(x);const Is={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,n=St(!1);function r(){n.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=C("v-icon"),c=C("v-btn"),d=C("v-divider"),b=C("v-list-item-title"),_=C("v-list-item"),m=C("v-list"),p=C("v-menu"),h=C("v-radio"),E=C("v-list-item-action"),O=C("v-radio-group"),T=C("v-checkbox");return P(),L(p,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=y=>n.value=y),"close-on-content-click":!1},{activator:g(({props:y})=>[f(c,Be(y,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:g(()=>[f(l,{class:"menu-button-icon"},{default:g(()=>[...a[1]||(a[1]=[F(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[f(m,null,{default:g(()=>[(P(!0),ee(ae,null,fe(t.menu.items,(y,k)=>(P(),ee(ae,null,[y.divider?(P(),L(d,{key:k+"-divider"})):y.subMenu&&y.subMenu.length>0?(P(),ee("div",{key:k+"-submenu"},[(P(),L(p,{key:k,"open-on-hover":"",location:"right"},{activator:g(({props:R})=>[(P(),L(_,Be({ref_for:!0},R,{key:k,disabled:y.disabled}),He({append:g(()=>[f(l,null,{default:g(()=>[...a[2]||(a[2]=[F(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!y.radio&&!y.checkbox?(P(),L(b,{key:0,style:ze("cursor: pointer;"+(y.disabled?"opacity: 0.2":""))},{default:g(()=>[F(Z(y.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[y.icon?{name:"prepend",fn:g(()=>[f(l,{disabled:y.disabled},{default:g(()=>[F(Z(y.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[f(m,null,{default:g(()=>[(P(!0),ee(ae,null,fe(y.subMenu,(R,j)=>(P(),L(_,{key:j,"prepend-icon":R.icon,onClick:U=>s("submenu-click",R)},{default:g(()=>[f(b,null,{default:g(()=>[F(Z(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):y.radioGroup?(P(),L(O,{key:k+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":y.value,"onUpdate:modelValue":y.command},{default:g(()=>[(P(!0),ee(ae,null,fe(y.choices,(R,j)=>(P(),L(_,{key:j+"-choice"},{default:g(()=>[f(E,{class:"list-action"},{default:g(()=>[f(h,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(P(),L(_,{key:k+"-list",disabled:y.disabled,"data-test":o(`${t.title} ${t.menu.label} ${y.label}`),onClick:()=>{y.command(y),y.checkbox||r()}},He({default:g(()=>[y.checkbox?(P(),L(E,{key:0,class:"list-action"},{default:g(()=>[f(T,{modelValue:y.checked,"onUpdate:modelValue":R=>y.checked=R,label:y.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):le("",!0),!y.radio&&!y.checkbox?(P(),L(b,{key:1,style:ze("cursor: pointer;"+(y.disabled?"opacity: 0.2":""))},{default:g(()=>[F(Z(y.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[y.icon?{name:"prepend",fn:g(()=>[f(l,{icon:y.icon,disabled:y.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Ds={components:{TopBarMenu:Is},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},Ns={class:"app-title mr-2"};function js(t,e,s,n,r,o){const i=C("v-col"),a=C("v-row"),l=C("TopBarMenu");return P(),L(vt,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:g(()=>[f(i,{"align-self":"end"},{default:g(()=>[Te("span",Ns,Z(s.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(P(!0),ee(ae,null,fe(s.menus,(c,d)=>(P(),L(l,{key:d+"-top-menu",ref_for:!0,ref:"topmenu",menu:c,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const Us=pt(Ds,[["render",js],["__scopeId","data-v-b6581c4c"]]);var Ls=Object.defineProperty,Ms=(t,e,s)=>e in t?Ls(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ee=(t,e,s)=>Ms(t,typeof e!="symbol"?e+"":e,s);function Ct(t,e){return function(){return t.apply(e,arguments)}}const{toString:Fs}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:Ce,toStringTag:xt}=Symbol,xe=(t=>e=>{const s=Fs.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),W=t=>(t=t.toLowerCase(),e=>xe(e)===t),Oe=t=>e=>typeof e===t,{isArray:ce}=Array,ue=Oe("undefined");function me(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ot=W("ArrayBuffer");function Vs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ot(t.buffer),e}const qs=Oe("string"),V=Oe("function"),kt=Oe("number"),pe=t=>t!==null&&typeof t=="object",$s=t=>t===!0||t===!1,ke=t=>{if(xe(t)!=="object")return!1;const e=Je(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(xt in t)&&!(Ce in t)},Bs=t=>{if(!pe(t)||me(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Hs=W("Date"),zs=W("File"),Ws=W("Blob"),Js=W("FileList"),Ks=t=>pe(t)&&V(t.pipe),Zs=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=xe(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},Gs=W("URLSearchParams"),[Xs,Ys,Qs,en]=["ReadableStream","Request","Response","Headers"].map(W),tn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ge(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),ce(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{if(me(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function Rt(t,e){if(me(t))return null;e=e.toLowerCase();const s=Object.keys(t);let n=s.length,r;for(;n-- >0;)if(r=s[n],e===r.toLowerCase())return r;return null}const se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,At=t=>!ue(t)&&t!==se;function Ke(){const{caseless:t,skipUndefined:e}=At(this)&&this||{},s={},n=(r,o)=>{const i=t&&Rt(s,o)||o;ke(s[i])&&ke(r)?s[i]=Ke(s[i],r):ke(r)?s[i]=Ke({},r):ce(r)?s[i]=r.slice():(!e||!ue(r))&&(s[i]=r)};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ge(arguments[r],n);return s}const sn=(t,e,s,{allOwnKeys:n}={})=>(ge(e,(r,o)=>{s&&V(r)?t[o]=Ct(r,s):t[o]=r},{allOwnKeys:n}),t),nn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),rn=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},on=(t,e,s,n)=>{let r,o,i;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)i=r[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&Je(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},an=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const n=t.indexOf(e,s);return n!==-1&&n===s},ln=t=>{if(!t)return null;if(ce(t))return t;let e=t.length;if(!kt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},cn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Je(Uint8Array)),un=(t,e)=>{const s=(t&&t[Ce]).call(t);let n;for(;(n=s.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},dn=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},hn=W("HTMLFormElement"),fn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),Pt=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),mn=W("RegExp"),It=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};ge(s,(r,o)=>{let i;(i=e(r,o,t))!==!1&&(n[o]=i||r)}),Object.defineProperties(t,n)},pn=t=>{It(t,(e,s)=>{if(V(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=t[s];if(V(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},gn=(t,e)=>{const s={},n=r=>{r.forEach(o=>{s[o]=!0})};return ce(t)?n(t):n(String(t).split(e)),s},bn=()=>{},yn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function _n(t){return!!(t&&V(t.append)&&t[xt]==="FormData"&&t[Ce])}const wn=t=>{const e=new Array(10),s=(n,r)=>{if(pe(n)){if(e.indexOf(n)>=0)return;if(me(n))return n;if(!("toJSON"in n)){e[r]=n;const o=ce(n)?[]:{};return ge(n,(i,a)=>{const l=s(i,r+1);!ue(l)&&(o[a]=l)}),e[r]=void 0,o}}return n};return s(t,0)},vn=W("AsyncFunction"),Sn=t=>t&&(pe(t)||V(t))&&V(t.then)&&V(t.catch),Dt=((t,e)=>t?setImmediate:e?((s,n)=>(se.addEventListener("message",({source:r,data:o})=>{r===se&&o===s&&n.length&&n.shift()()},!1),r=>{n.push(r),se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",V(se.postMessage)),Tn=typeof queueMicrotask<"u"?queueMicrotask.bind(se):typeof process<"u"&&process.nextTick||Dt,En=t=>t!=null&&V(t[Ce]),u={isArray:ce,isArrayBuffer:Ot,isBuffer:me,isFormData:Zs,isArrayBufferView:Vs,isString:qs,isNumber:kt,isBoolean:$s,isObject:pe,isPlainObject:ke,isEmptyObject:Bs,isReadableStream:Xs,isRequest:Ys,isResponse:Qs,isHeaders:en,isUndefined:ue,isDate:Hs,isFile:zs,isBlob:Ws,isRegExp:mn,isFunction:V,isStream:Ks,isURLSearchParams:Gs,isTypedArray:cn,isFileList:Js,forEach:ge,merge:Ke,extend:sn,trim:tn,stripBOM:nn,inherits:rn,toFlatObject:on,kindOf:xe,kindOfTest:W,endsWith:an,toArray:ln,forEachEntry:un,matchAll:dn,isHTMLForm:hn,hasOwnProperty:Pt,hasOwnProp:Pt,reduceDescriptors:It,freezeMethods:pn,toObjectSet:gn,toCamelCase:fn,noop:bn,toFiniteNumber:yn,findKey:Rt,global:se,isContextDefined:At,isSpecCompliantForm:_n,toJSONObject:wn,isAsyncFn:vn,isThenable:Sn,setImmediate:Dt,asap:Tn,isIterable:En};function S(t,e,s,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),s&&(this.config=s),n&&(this.request=n),r&&(this.response=r,this.status=r.status?r.status:null)}u.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const Nt=S.prototype,jt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{jt[t]={value:t}}),Object.defineProperties(S,jt),Object.defineProperty(Nt,"isAxiosError",{value:!0}),S.from=(t,e,s,n,r,o)=>{const i=Object.create(Nt);u.toFlatObject(t,i,function(c){return c!==Error.prototype},c=>c!=="isAxiosError");const a=t&&t.message?t.message:"Error",l=e==null&&t?t.code:e;return S.call(i,a,l,s,n,r),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",o&&Object.assign(i,o),i};const Cn=null;function Ze(t){return u.isPlainObject(t)||u.isArray(t)}function Ut(t){return u.endsWith(t,"[]")?t.slice(0,-2):t}function Lt(t,e,s){return t?t.concat(e).map(function(n,r){return n=Ut(n),!s&&r?"["+n+"]":n}).join(s?".":""):e}function xn(t){return u.isArray(t)&&!t.some(Ze)}const On=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(t,e,s){if(!u.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=u.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!u.isUndefined(p[m])});const n=s.metaTokens,r=s.visitor||c,o=s.dots,i=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(r))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(u.isDate(m))return m.toISOString();if(u.isBoolean(m))return m.toString();if(!a&&u.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(m)||u.isTypedArray(m)?a&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,p,h){let E=m;if(m&&!h&&typeof m=="object"){if(u.endsWith(p,"{}"))p=n?p:p.slice(0,-2),m=JSON.stringify(m);else if(u.isArray(m)&&xn(m)||(u.isFileList(m)||u.endsWith(p,"[]"))&&(E=u.toArray(m)))return p=Ut(p),E.forEach(function(O,T){!(u.isUndefined(O)||O===null)&&e.append(i===!0?Lt([p],T,o):i===null?p:p+"[]",l(O))}),!1}return Ze(m)?!0:(e.append(Lt(h,p,o),l(m)),!1)}const d=[],b=Object.assign(On,{defaultVisitor:c,convertValue:l,isVisitable:Ze});function _(m,p){if(!u.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),u.forEach(m,function(h,E){(!(u.isUndefined(h)||h===null)&&r.call(e,h,u.isString(E)?E.trim():E,p,b))===!0&&_(h,p?p.concat(E):[E])}),d.pop()}}if(!u.isObject(t))throw new TypeError("data must be an object");return _(t),e}function Mt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Ge(t,e){this._pairs=[],t&&Re(t,this,e)}const Ft=Ge.prototype;Ft.append=function(t,e){this._pairs.push([t,e])},Ft.toString=function(t){const e=t?function(s){return t.call(this,s,Mt)}:Mt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function kn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vt(t,e,s){if(!e)return t;const n=s&&s.encode||kn;u.isFunction(s)&&(s={serialize:s});const r=s&&s.serialize;let o;if(r?o=r(e,s):o=u.isURLSearchParams(e)?e.toString():new Ge(e,s).toString(n),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class qt{constructor(){this.handlers=[]}use(e,s,n){return this.handlers.push({fulfilled:e,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){u.forEach(this.handlers,function(s){s!==null&&e(s)})}}const $t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rn=typeof URLSearchParams<"u"?URLSearchParams:Ge,An=typeof FormData<"u"?FormData:null,Pn=typeof Blob<"u"?Blob:null,In={isBrowser:!0,classes:{URLSearchParams:Rn,FormData:An,Blob:Pn},protocols:["http","https","file","blob","url","data"]},Xe=typeof window<"u"&&typeof document<"u",Ye=typeof navigator=="object"&&navigator||void 0,Dn=Xe&&(!Ye||["ReactNative","NativeScript","NS"].indexOf(Ye.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jn=Xe&&window.location.href||"http://localhost",Un=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:Dn,hasStandardBrowserWebWorkerEnv:Nn,navigator:Ye,origin:jn},Symbol.toStringTag,{value:"Module"})),M={...Un,...In};function Ln(t,e){return Re(t,new M.classes.URLSearchParams,{visitor:function(s,n,r,o){return M.isNode&&u.isBuffer(s)?(this.append(n,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Mn(t){return u.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Fn(t){const e={},s=Object.keys(t);let n;const r=s.length;let o;for(n=0;n<r;n++)o=s[n],e[o]=t[o];return e}function Bt(t){function e(s,n,r,o){let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=s.length;return i=!i&&u.isArray(r)?r.length:i,l?(u.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):((!r[i]||!u.isObject(r[i]))&&(r[i]=[]),e(s,n,r[i],o)&&u.isArray(r[i])&&(r[i]=Fn(r[i])),!a)}if(u.isFormData(t)&&u.isFunction(t.entries)){const s={};return u.forEachEntry(t,(n,r)=>{e(Mn(n),r,s,0)}),s}return null}function Vn(t,e,s){if(u.isString(t))try{return(e||JSON.parse)(t),u.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(t)}const be={transitional:$t,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",n=s.indexOf("application/json")>-1,r=u.isObject(t);if(r&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return n?JSON.stringify(Bt(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ln(t,this.formSerializer).toString();if((o=u.isFileList(t))||s.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Re(o?{"files[]":t}:t,i&&new i,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),Vn(t)):t}],transformResponse:[function(t){const e=this.transitional||be.transitional,s=e&&e.forcedJSONParsing,n=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(s&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(o){if(r)throw o.name==="SyntaxError"?S.from(o,S.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],t=>{be.headers[t]={}});const qn=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$n=t=>{const e={};let s,n,r;return t&&t.split(`
3
+ `).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!s||e[s]&&qn[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e},Ht=Symbol("internals");function ye(t){return t&&String(t).trim().toLowerCase()}function Ae(t){return t===!1||t==null?t:u.isArray(t)?t.map(Ae):String(t)}function Bn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(t);)e[n[1]]=n[2];return e}const Hn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qe(t,e,s,n,r){if(u.isFunction(n))return n.call(this,e,s);if(r&&(e=s),!!u.isString(e)){if(u.isString(n))return e.indexOf(n)!==-1;if(u.isRegExp(n))return n.test(e)}}function zn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function Wn(t,e){const s=u.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{value:function(r,o,i){return this[n].call(this,e,r,o,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,e,s){const n=this;function r(i,a,l){const c=ye(a);if(!c)throw new Error("header name must be a non-empty string");const d=u.findKey(n,c);(!d||n[d]===void 0||l===!0||l===void 0&&n[d]!==!1)&&(n[d||a]=Ae(i))}const o=(i,a)=>u.forEach(i,(l,c)=>r(l,c,a));if(u.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(u.isString(t)&&(t=t.trim())&&!Hn(t))o($n(t),e);else if(u.isObject(t)&&u.isIterable(t)){let i={},a,l;for(const c of t){if(!u.isArray(c))throw TypeError("Object iterator must return a key-value pair");i[l=c[0]]=(a=i[l])?u.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}o(i,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=ye(t),t){const s=u.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return Bn(n);if(u.isFunction(e))return e.call(this,n,s);if(u.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ye(t),t){const s=u.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||Qe(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(o){if(o=ye(o),o){const i=u.findKey(s,o);i&&(!e||Qe(s,s[i],i,e))&&(delete s[i],n=!0)}}return u.isArray(t)?t.forEach(r):r(t),n}clear(t){const e=Object.keys(this);let s=e.length,n=!1;for(;s--;){const r=e[s];(!t||Qe(this,this[r],r,t,!0))&&(delete this[r],n=!0)}return n}normalize(t){const e=this,s={};return u.forEach(this,(n,r)=>{const o=u.findKey(s,r);if(o){e[o]=Ae(n),delete e[r];return}const i=t?zn(r):String(r).trim();i!==r&&delete e[r],e[i]=Ae(n),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return u.forEach(this,(s,n)=>{s!=null&&s!==!1&&(e[n]=t&&u.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(n=>s.set(n)),s}static accessor(t){const e=(this[Ht]=this[Ht]={accessors:{}}).accessors,s=this.prototype;function n(r){const o=ye(r);e[o]||(Wn(s,r),e[o]=!0)}return u.isArray(t)?t.forEach(n):n(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(q.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}}),u.freezeMethods(q);function et(t,e){const s=this||be,n=e||s,r=q.from(n.headers);let o=n.data;return u.forEach(t,function(i){o=i.call(s,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function zt(t){return!!(t&&t.__CANCEL__)}function de(t,e,s){S.call(this,t??"canceled",S.ERR_CANCELED,e,s),this.name="CanceledError"}u.inherits(de,S,{__CANCEL__:!0});function Wt(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new S("Request failed with status code "+s.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Jn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Kn(t,e){t=t||10;const s=new Array(t),n=new Array(t);let r=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),c=n[o];i||(i=l),s[r]=a,n[r]=l;let d=o,b=0;for(;d!==r;)b+=s[d++],d=d%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),l-i<e)return;const _=c&&l-c;return _?Math.round(b*1e3/_):void 0}}function Zn(t,e){let s=0,n=1e3/e,r,o;const i=(a,l=Date.now())=>{s=l,r=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const l=Date.now(),c=l-s;c>=n?i(a,l):(r=a,o||(o=setTimeout(()=>{o=null,i(r)},n-c)))},()=>r&&i(r)]}const Pe=(t,e,s=3)=>{let n=0;const r=Kn(50,250);return Zn(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-n,c=r(l),d=i<=a;n=i;const b={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&d?(a-i)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},s)},Jt=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},Kt=t=>(...e)=>u.asap(()=>t(...e)),Gn=M.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,M.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Xn=M.hasStandardBrowserEnv?{write(t,e,s,n,r,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];u.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),u.isString(n)&&a.push(`path=${n}`),u.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),u.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Yn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Qn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Zt(t,e,s){let n=!Yn(e);return t&&(n||s==!1)?Qn(t,e):e}const Gt=t=>t instanceof q?{...t}:t;function ne(t,e){e=e||{};const s={};function n(c,d,b,_){return u.isPlainObject(c)&&u.isPlainObject(d)?u.merge.call({caseless:_},c,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function r(c,d,b,_){if(u.isUndefined(d)){if(!u.isUndefined(c))return n(void 0,c,b,_)}else return n(c,d,b,_)}function o(c,d){if(!u.isUndefined(d))return n(void 0,d)}function i(c,d){if(u.isUndefined(d)){if(!u.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function a(c,d,b){if(b in e)return n(c,d);if(b in t)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,d,b)=>r(Gt(c),Gt(d),b,!0)};return u.forEach(Object.keys({...t,...e}),function(c){const d=l[c]||r,b=d(t[c],e[c],c);u.isUndefined(b)&&d!==a||(s[c]=b)}),s}const Xt=t=>{const e=ne({},t);let{data:s,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=q.from(i),e.url=Vt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),u.isFormData(s)){if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(u.isFunction(s.getHeaders)){const l=s.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,b])=>{c.includes(d.toLowerCase())&&i.set(d,b)})}}if(M.hasStandardBrowserEnv&&(n&&u.isFunction(n)&&(n=n(e)),n||n!==!1&&Gn(e.url))){const l=r&&o&&Xn.read(o);l&&i.set(r,l)}return e},er=typeof XMLHttpRequest<"u",tr=er&&function(t){return new Promise(function(e,s){const n=Xt(t);let r=n.data;const o=q.from(n.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=n,c,d,b,_,m;function p(){_&&_(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let h=new XMLHttpRequest;h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout;function E(){if(!h)return;const T=q.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),y={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:T,config:t,request:h};Wt(function(k){e(k),p()},function(k){s(k),p()},y),h=null}"onloadend"in h?h.onloadend=E:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(E)},h.onabort=function(){h&&(s(new S("Request aborted",S.ECONNABORTED,t,h)),h=null)},h.onerror=function(T){const y=T&&T.message?T.message:"Network Error",k=new S(y,S.ERR_NETWORK,t,h);k.event=T||null,s(k),h=null},h.ontimeout=function(){let T=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const y=n.transitional||$t;n.timeoutErrorMessage&&(T=n.timeoutErrorMessage),s(new S(T,y.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,h)),h=null},r===void 0&&o.setContentType(null),"setRequestHeader"in h&&u.forEach(o.toJSON(),function(T,y){h.setRequestHeader(y,T)}),u.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),i&&i!=="json"&&(h.responseType=n.responseType),l&&([b,m]=Pe(l,!0),h.addEventListener("progress",b)),a&&h.upload&&([d,_]=Pe(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",_)),(n.cancelToken||n.signal)&&(c=T=>{h&&(s(!T||T.type?new de(null,t,h):T),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const O=Jn(n.url);if(O&&M.protocols.indexOf(O)===-1){s(new S("Unsupported protocol "+O+":",S.ERR_BAD_REQUEST,t));return}h.send(r||null)})},sr=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let n=new AbortController,r;const o=function(c){if(!r){r=!0,a();const d=c instanceof Error?c:this.reason;n.abort(d instanceof S?d:new de(d instanceof Error?d.message:d))}};let i=e&&setTimeout(()=>{i=null,o(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>u.asap(a),l}},nr=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let n=0,r;for(;n<s;)r=n+e,yield t.slice(n,r),n=r},rr=async function*(t,e){for await(const s of ir(t))yield*nr(s,e)},ir=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:n}=await e.read();if(s)break;yield n}}finally{await e.cancel()}},Yt=(t,e,s,n)=>{const r=rr(t,e);let o=0,i,a=l=>{i||(i=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await r.next();if(c){a(),l.close();return}let b=d.byteLength;if(s){let _=o+=b;s(_)}l.enqueue(new Uint8Array(d))}catch(c){throw a(c),c}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Qt=64*1024,{isFunction:Ie}=u,or=(({Request:t,Response:e})=>({Request:t,Response:e}))(u.global),{ReadableStream:es,TextEncoder:ts}=u.global,ss=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ar=t=>{t=u.merge.call({skipUndefined:!0},or,t);const{fetch:e,Request:s,Response:n}=t,r=e?Ie(e):typeof fetch=="function",o=Ie(s),i=Ie(n);if(!r)return!1;const a=r&&Ie(es),l=r&&(typeof ts=="function"?(p=>h=>p.encode(h))(new ts):async p=>new Uint8Array(await new s(p).arrayBuffer())),c=o&&a&&ss(()=>{let p=!1;const h=new s(M.origin,{body:new es,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!h}),d=i&&a&&ss(()=>u.isReadableStream(new n("").body)),b={stream:d&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!b[p]&&(b[p]=(h,E)=>{let O=h&&h[p];if(O)return O.call(h);throw new S(`Response type '${p}' is not supported`,S.ERR_NOT_SUPPORT,E)})});const _=async p=>{if(p==null)return 0;if(u.isBlob(p))return p.size;if(u.isSpecCompliantForm(p))return(await new s(M.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(u.isArrayBufferView(p)||u.isArrayBuffer(p))return p.byteLength;if(u.isURLSearchParams(p)&&(p=p+""),u.isString(p))return(await l(p)).byteLength},m=async(p,h)=>u.toFiniteNumber(p.getContentLength())??_(h);return async p=>{let{url:h,method:E,data:O,signal:T,cancelToken:y,timeout:k,onDownloadProgress:R,onUploadProgress:j,responseType:U,headers:X,withCredentials:$="same-origin",fetchOptions:te}=Xt(p),w=e||fetch;U=U?(U+"").toLowerCase():"text";let I=sr([T,y&&y.toAbortSignal()],k),K=null;const B=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let qe;try{if(j&&c&&E!=="get"&&E!=="head"&&(qe=await m(X,O))!==0){let H=new s(h,{method:"POST",body:O,duplex:"half"}),Q;if(u.isFormData(O)&&(Q=H.headers.get("content-type"))&&X.setContentType(Q),H.body){const[mt,$e]=Jt(qe,Pe(Kt(j)));O=Yt(H.body,Qt,mt,$e)}}u.isString($)||($=$?"include":"omit");const N=o&&"credentials"in s.prototype,v={...te,signal:I,method:E.toUpperCase(),headers:X.normalize().toJSON(),body:O,duplex:"half",credentials:N?$:void 0};K=o&&new s(h,v);let A=await(o?w(K,te):w(h,v));const z=d&&(U==="stream"||U==="response");if(d&&(R||z&&B)){const H={};["status","statusText","headers"].forEach(Rs=>{H[Rs]=A[Rs]});const Q=u.toFiniteNumber(A.headers.get("content-length")),[mt,$e]=R&&Jt(Q,Pe(Kt(R),!0))||[];A=new n(Yt(A.body,Qt,mt,()=>{$e&&$e(),B&&B()}),H)}U=U||"text";let Y=await b[u.findKey(b,U)||"text"](A,p);return!z&&B&&B(),await new Promise((H,Q)=>{Wt(H,Q,{data:Y,headers:q.from(A.headers),status:A.status,statusText:A.statusText,config:p,request:K})})}catch(N){throw B&&B(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,p,K),{cause:N.cause||N}):S.from(N,N&&N.code,p,K)}}},lr=new Map,ns=t=>{let e=t&&t.env||{};const{fetch:s,Request:n,Response:r}=e,o=[n,r,s];let i=o.length,a=i,l,c,d=lr;for(;a--;)l=o[a],c=d.get(l),c===void 0&&d.set(l,c=a?new Map:ar(e)),d=c;return c};ns();const tt={http:Cn,xhr:tr,fetch:{get:ns}};u.forEach(tt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rs=t=>`- ${t}`,cr=t=>u.isFunction(t)||t===null||t===!1;function ur(t,e){t=u.isArray(t)?t:[t];const{length:s}=t;let n,r;const o={};for(let i=0;i<s;i++){n=t[i];let a;if(r=n,!cr(n)&&(r=tt[(a=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${a}'`);if(r&&(u.isFunction(r)||(r=r.get(e))))break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
5
+ `+i.map(rs).join(`
6
+ `):" "+rs(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const is={getAdapter:ur,adapters:tt};function st(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new de(null,t)}function os(t){return st(t),t.headers=q.from(t.headers),t.data=et.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),is.getAdapter(t.adapter||be.adapter,t)(t).then(function(e){return st(t),e.data=et.call(t,t.transformResponse,e),e.headers=q.from(e.headers),e},function(e){return zt(e)||(st(t),e&&e.response&&(e.response.data=et.call(t,t.transformResponse,e.response),e.response.headers=q.from(e.response.headers))),Promise.reject(e)})}const as="1.13.2",De={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{De[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const ls={};De.transitional=function(t,e,s){function n(r,o){return"[Axios v"+as+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,i)=>{if(t===!1)throw new S(n(o," has been removed"+(e?" in "+e:"")),S.ERR_DEPRECATED);return e&&!ls[o]&&(ls[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,i):!0}},De.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function dr(t,e,s){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const o=n[r],i=e[o];if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new S("option "+o+" must be "+l,S.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new S("Unknown option "+o,S.ERR_BAD_OPTION)}}const Ne={assertOptions:dr,validators:De},G=Ne.validators;let re=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qt,response:new qt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const r=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
7
+ `+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ne(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&Ne.assertOptions(s,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),n!=null&&(u.isFunction(n)?e.paramsSerializer={serialize:n}:Ne.assertOptions(n,{encode:G.function,serialize:G.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ne.assertOptions(e,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&u.merge(r.common,r[e.method]);r&&u.forEach(["delete","get","head","post","put","patch","common"],m=>{delete r[m]}),e.headers=q.concat(o,r);const i=[];let a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(a=a&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,b;if(!a){const m=[os.bind(this),void 0];for(m.unshift(...i),m.push(...l),b=m.length,c=Promise.resolve(e);d<b;)c=c.then(m[d++],m[d++]);return c}b=i.length;let _=e;for(;d<b;){const m=i[d++],p=i[d++];try{_=m(_)}catch(h){p.call(this,h);break}}try{c=os.call(this,_)}catch(m){return Promise.reject(m)}for(d=0,b=l.length;d<b;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=ne(this.defaults,t);const e=Zt(t.baseURL,t.url,t.allowAbsoluteUrls);return Vt(e,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){re.prototype[t]=function(e,s){return this.request(ne(s||{},{method:t,url:e,data:(s||{}).data}))}}),u.forEach(["post","put","patch"],function(t){function e(s){return function(n,r,o){return this.request(ne(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)});let hr=class As{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const n=this;this.promise.then(r=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](r);n._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(a=>{n.subscribe(a),o=a}).then(r);return i.cancel=function(){n.unsubscribe(o)},i},e(function(r,o,i){n.reason||(n.reason=new de(r,o,i),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=n=>{e.abort(n)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new As(function(s){e=s}),cancel:e}}};function fr(t){return function(e){return t.apply(null,e)}}function mr(t){return u.isObject(t)&&t.isAxiosError===!0}const nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nt).forEach(([t,e])=>{nt[e]=t});function cs(t){const e=new re(t),s=Ct(re.prototype.request,e);return u.extend(s,re.prototype,e,{allOwnKeys:!0}),u.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return cs(ne(t,n))},s}const D=cs(be);D.Axios=re,D.CanceledError=de,D.CancelToken=hr,D.isCancel=zt,D.VERSION=as,D.toFormData=Re,D.AxiosError=S,D.Cancel=D.CanceledError,D.all=function(t){return Promise.all(t)},D.spread=fr,D.isAxiosError=mr,D.mergeConfig=ne,D.AxiosHeaders=q,D.formToJSON=t=>Bt(u.isHTMLForm(t)?new FormData(t):t),D.getAdapter=is.getAdapter,D.HttpStatusCode=nt,D.default=D;const{Axios:Di,AxiosError:Ni,CanceledError:ji,isCancel:Ui,CancelToken:Li,VERSION:Mi,all:Fi,Cancel:Vi,isAxiosError:qi,spread:$i,toFormData:Bi,AxiosHeaders:Hi,HttpStatusCode:zi,formToJSON:Wi,getAdapter:Ji,mergeConfig:Ki}=D,rt=D.create({baseURL:location.origin,timeout:6e4,params:{}});rt.interceptors.response.use(t=>t,t=>{var e,s,n,r,o,i,a,l,c,d,b;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(p){p&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let _=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(_+=`${t.response.statusText} `),(n=(s=t.response)==null?void 0:s.config)!=null&&n.data&&(_+=`${t.response.config.data} `),(o=(r=t.response)==null?void 0:r.data)!=null&&o.message?_+=`${t.response.data.message}`:(a=(i=t.response)==null?void 0:i.data)!=null&&a.exception?_+=`${t.response.data.exception}`:(d=(c=(l=t.response)==null?void 0:l.data)==null?void 0:c.error)!=null&&d.message?(t.response.data.error.class&&(_+=`${t.response.data.error.class} `),_+=`${t.response.data.error.message}`):_+=`${(b=t.response)==null?void 0:b.data}`;const{$cosmosNotify:m}=window;throw m&&m.serious({title:"Network error",body:_}),t}else throw t});const je=async function(t,e,{data:s,params:n={},headers:r,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}r.Authorization=localStorage.openc3Token}return r.manual=!0,!i&&!n.scope&&(n.scope=window.openc3Scope),rt({method:t,url:e,data:s,params:n,headers:r,onUploadProgress:a})},it={Accept:"application/json"},us={...it,"Content-Type":"application/json"},pr={get:function(t,{params:e,headers:s=it,noScope:n,noAuth:r,onUploadProgress:o}={}){return je("get",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:n=us,noScope:r,noAuth:o,onUploadProgress:i}={}){return je("put",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:n=us,noScope:r,noAuth:o,onUploadProgress:i}={}){return je("post",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=it,noScope:n,noAuth:r,onUploadProgress:o}={}){return je("delete",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})}};let Ue=()=>({emit(t,...e){for(let s=this.events[t]||[],n=0,r=s.length;n<r;n++)s[n](...e)},events:{},on(t,e){var s;return((s=this.events)[t]||(s[t]=[])).push(e),()=>{var n;this.events[t]=(n=this.events[t])==null?void 0:n.filter(r=>e!==r)}}});class _e extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class ot extends _e{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class gr extends _e{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class J extends _e{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class br extends J{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function ds(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class yr{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:e,info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:n,info:r})=>(s[n]=r,s),{})}}const ie=Symbol("state");class hs{constructor(e={}){this.emitter=Ue(),this.params=Object.freeze(e),this.presence=new yr(this),this.initialConnect=!0,this[ie]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ds({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ie]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ie]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ie]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ie]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ie]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ie]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let n=this.receiver?this.receiver.logger:null;n&&n.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let n=[()=>delete this._pendingSubscribe];n.push(this.on("connect",()=>{n.forEach(r=>r()),e()})),n.push(this.on("close",r=>{n.forEach(o=>o()),s(r||new _e("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class _r{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(n=>n[e](s[0])):this.channels.forEach(n=>n[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,n={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(n),1),s(n)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(n),r&&await r.promise,this.gvl&&await this.gvl.acquire(n,e),n.acquired=!0,n}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class wr{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class vr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new wr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:n}){let r=this._subscriptions[e]=new _r(e);return r.remoteId=this._localToRemote[e],r.subscriber=s,r.unsubscriber=n,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let n=this.get(e);n&&(n.remoteId=s)}}class Sr{constructor(e={}){this.subscriptions=new vr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let n=s.remoteId;n&&delete this._remoteToLocal[n],this.subscriptions.remove(e)}transmit(e,s,n){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,s,n]);return}let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>{i.receive(s,n)})}notify(e,s,n){let r=this._remoteToLocal[e];if(!r)return;let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>i.emit(s,n))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let n of this._pendingMessages)n[0]===e?this.transmit(n[0],n[1],n[2]):s.push(n);this._pendingMessages=s}}const fs={debug:0,info:1,warn:2,error:3};class ms{constructor(e){this.level=e||"warn"}log(e,s,n){fs[e]<fs[this.level]||this.writeLogEntry(e,s,n)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class we extends ms{writeLogEntry(){}}class Tr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Er=0;class ps{constructor(e={}){let{logger:s}=e;this.logger=s||new we,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let n={channel:e};s&&Object.assign(n,s);let r=ds(n);if(this.pendingUnsubscriptions[r]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,r),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let l=++Er;this.pendingSubscriptions[r]={resolve:i,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(l,r,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${n}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,n))},n)}maybeExpireSubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(delete this.pendingSubscriptions[s],r.reject(new gr(`Haven't received subscription ack in ${n*2}ms for ${s}`)))},n)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,n){return s==="$whisper"?this.whisper(e,n):(n||(n={}),n.action=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(n)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new J(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[n];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:n}),this.unsubscribe(n);return}return delete this.pendingSubscriptions[n],a.resolve(n)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[n];return a?(delete this.pendingSubscriptions[n],a.reject(new ot)):this.logger.error("subscription not found",{type:s,identifier:n})}if(r)return{identifier:n,message:r};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const gs=()=>Date.now()/1e3|0;class Cr extends ps{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=gs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=gs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",n);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",n);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=r.type;if(o==="info"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.resolve(r))}else if(o==="error"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:n,message:r}}if(r){let o=this.trackStreamPosition(n,e.stream_id,e.epoch,e.offset);return{identifier:n,message:r,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,n){switch(s){case"$presence:join":return this.join(e,n);case"$presence:leave":return this.leave(e,n);case"$presence:info":return this.presence(e,n)}return super.perform(e,s,n)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),n=this.historyRequestFor(e);n&&(s.history=n,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(s.presence=r),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},n=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let o=this.streamsPositions[r];o&&(n=!0,s[r]=o)}if(!(!n&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,n,r){if(!(!s||!n))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:n,offset:r},{stream:s,epoch:n,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((n,r)=>{this.pendingPresence[e]={resolve:n,reject:r},this.cable.send({command:"presence",identifier:e,data:s})})}}class xr extends _e{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class at extends hs{constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Ee(at,"identifier","__ghost__");const Or="$pubsub";class lt extends hs{async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}Ee(lt,"identifier",Or);const oe=Symbol("state");let kr=class{constructor({transport:t,protocol:e,encoder:s,logger:n,lazy:r,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Ue(),this.transport=t,this.encoder=s,this.logger=n||new we,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Sr(o||{}),this[oe]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,r===!1&&this.connect().catch(()=>{})}get state(){return this[oe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[oe]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[oe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new J("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[oe]="connected",this.hub.subscriptions.all().forEach(n=>{t&&n.remoteId&&t.includes(n.remoteId)?n.notify("restored"):(n.notify("disconnected",new J("recovery_failed")),this._resubscribe(n))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new J(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[oe]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof J?t:new J(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[oe]="closed";let s=e||new J("cable_closed");this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:n,identifier:r,message:o,meta:i}=s;n?this.hub.notify(r,n,o):this.hub.transmit(r,o,i)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new lt({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new lt({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,n;return typeof t=="string"&&(n=t,t=at),s=n?new t(n,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:n=>this._subscribe(n,t.channelId,t.params),unsubscribe:n=>this._unsubscribe(n)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let n=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n});return}this.logger.debug("acquiring subscribe lock",{identifier:n});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:n}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:n}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),r.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:n}),t.notify("connected"),r.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(n,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof ot&&this.logger.warn("rejected",o),i instanceof J){this.logger.debug("disconnected during subscription; will retry on connect",o),r.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(n)}r.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let n=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:n}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(n),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof J?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:r}):this.logger.error("unsubscribe failed",{id:e,error:r}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(n){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:n});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new xr;let n=this.hub.subscriptions.get(t);if(!n)throw Error(`Subscription not found: ${t}`);if(await n.pending("subscribed"),n.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=n.remoteId,o={id:r,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(r,e,s);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...n)=>{s(),e(...n)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(n=>n()),t()})),s.push(this.on("close",n=>{s.forEach(r=>r()),e(n)})),s.push(this.on("disconnect",n=>{s.forEach(r=>r()),e(n)}))}),this._pendingConnect)}};const Rr={maxMissingPings:2,maxReconnectAttempts:1/0},he=()=>Date.now(),bs=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:n,maxInterval:r}=e;return s=s||2,n===void 0&&(n=.5),o=>{let i=t*s**o,a=i*s,l=i+(a-i)*Math.random(),c=2*(Math.random()-.5)*n;return l=l*(1+c),r&&r<l&&(l=r),l}};let ys=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Rr,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new we,this.state="pending_connect",this.attempts=0,this.disconnectedAt=he()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=he(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=he(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=he(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=he()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=he()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new br))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class Ar{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Ue(),this.unbind=[],this.logger=s.logger||new we}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(n){this.logger.debug(`Failed to connect via ${s.displayName()}: ${n.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(n=>{n.setParam(e,s)})}setToken(e,s){this.transports.forEach(n=>{n.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Pr{constructor(e,s={}){this.url=e;let n=s.websocketImplementation;if(n)this.Impl=n;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ue();let{format:r,subprotocol:o,authStrategy:i}=s;this.format=r||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,n)=>{let r=[];r.push(this.once("open",()=>{r.forEach(o=>o()),s()})),r.push(this.once("close",()=>{r.forEach(o=>o()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let n=new URL(this.url);n.searchParams.set(e,s);let r=`${n.protocol}//${n.host}${n.pathname}?${n.searchParams}`;this.setURL(r)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let n=`x-${s}`.toLowerCase();n=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===n)||n,this.connectionOptions.headers[n]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const _s={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ir(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},_s,e);let{protocol:s,websocketImplementation:n,websocketFormat:r,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:c,transport:d,encoder:b,lazy:_,monitor:m,pingInterval:p,reconnectStrategy:h,maxMissingPings:E,maxReconnectAttempts:O,subprotocol:T,tokenRefresher:y,historyTimestamp:k,protocolOptions:R,concurrentSubscribes:j,performFailures:U,transportConfigurator:X,auth:$}=e;if(c=c||new we(l),typeof s=="string"){T=T||s;let I=s.substring(0,s.lastIndexOf("-")),K=s.substring(s.lastIndexOf("-")+1);if(R=R||{},I==="actioncable-v1")s=new ps({logger:c,...R});else if(I==="actioncable-v1-ext")s=new Cr({logger:c,historyTimestamp:k,...R});else throw Error(`Protocol is not supported yet: ${s}`);if(K==="json")b=b||new Tr,r=r||"text";else if(K==="msgpack"){if(r="binary",!b)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(K==="protobuf"){if(r=r||"binary",!b)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Pr(t,{websocketImplementation:n,websocketOptions:o,subprotocol:T,authStrategy:i,format:r}),a&&(d=new Ar([d,...a],{logger:c})),$&&$.token&&d.setToken($.token,$.param||"jid"),h=h||bs(p),m!==!1&&(m=m||new ys({pingInterval:p,reconnectStrategy:h,maxMissingPings:E,maxReconnectAttempts:O,logger:c}));let te={concurrentSubscribes:j},w=new kr({protocol:s,transport:d,encoder:b,logger:c,lazy:_,hubOptions:te,performFailures:U,transportConfigurator:X});return m&&(m.watch(w),w.monitor=m),y&&Dr(w,async()=>{try{await y(d)}catch(I){return c.error("Failed to refresh authentication token: "+I),!1}return w.connect().catch(()=>{}),!0}),w}function Dr(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async n=>{if(n){if(s){t.logger.warn("Token auto-refresh is disabled",n);return}n.reason==="token_expired"&&(s=!0,await e())}})}class Nr{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class jr extends at{constructor(e,s,n){super(e,s),this.subscription=new Nr(this),Object.assign(this.subscription,n),this.on("connect",({reconnect:r})=>this.subscription.notify("connected",{reconnected:r})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",r=>this.subscription.notify("received",r)),this.on("close",r=>{r&&r instanceof ot?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Ur{constructor(e){this.cable=e}create(e,s){let n,r;typeof e=="object"?(n=e.channel,delete e.channel,r=e):(n=e,r={});let o=new jr(n,r,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Lr{constructor(e){this.cable=e,this.subscriptions=new Ur(e)}}class Mr extends ms{writeLogEntry(e,s,n){n?console[e](s,n):console[e](s)}}class Fr extends ys{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},n=()=>this.disconnect(new J("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",n,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",n,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Vr=["cable","action-cable"],qr="/cable",Le=(t,e)=>{for(let s of Vr){let n=t.head.querySelector(`meta[name='${s}-${e}']`);if(n)return n.getAttribute("content")}},ws=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,$r=()=>{if(typeof document<"u"&&document.head){let t=Le(document,"url");if(t)return ws(t)}return ws(qr)},Br=()=>{if(typeof document<"u"&&document.head){let t=Le(document,"history-timestamp");if(t)return t|0}},Hr=()=>{if(typeof document<"u"&&document.head)return Le(document,"token")},zr=()=>{if(typeof document<"u"&&document.head)return Le(document,"token-param")};function Wr(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||$r(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Br());let s=Hr();if(s){let c=zr();e.auth=Object.assign({token:s,param:c},e.auth||{})}e=Object.assign({},_s,e);let{logLevel:n,logger:r,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return r=e.logger=e.logger||new Mr(n),i=e.reconnectStrategy=e.reconnectStrategy||bs(o),e.monitor!==!1&&(e.monitor=e.monitor||new Fr({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:r})),Ir(t,e)}function Jr(t,e){let s=Wr(t,e);return new Lr(s)}class Kr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,n={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){let i=this._url+"?scope="+encodeURIComponent(s)+"&authorization="+encodeURIComponent(localStorage.openc3Token);i=new URL(i,document.baseURI).href,this._cable=Jr(i)}return this._cable.subscriptions.create({channel:e,...r},n)})}recordPing(){}}function ve(t){return Zr.test(t)}const Zr=/^-?[0-9]+$/;function vs(t){return Gr.test(t)}const Gr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ss(t,e){if(ve(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),n=String(s);if(t===n)return!0;const r=Ts(t),o=Ts(n);return!!(r===o||(e==null?void 0:e.approx)===!0&&!ve(t)&&o.length>=14&&r.startsWith(o.substring(0,14)))}let Se=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function Xr(t){if(Ss(t,{approx:!1}))return;if(ve(t))return Se.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Se.underflow:Se.truncate_float:Se.overflow}function Ts(t){const{start:e,end:s}=Yr(t),n=t.substring(e,s),r=n.indexOf(".");return r===-1?n:n.substring(0,r)+n.substring(r+1)}function Yr(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class Qr{constructor(e){if(Ee(this,"isLosslessNumber",!0),!vs(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Xr(this.value);if(e===void 0||e===Se.truncate_float)return Number.parseFloat(this.value);if(ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function ei(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function ti(t){return new Qr(t)}function si(t,e){return ct({"":t},"",t,e)}function ct(t,e,s,n){return Array.isArray(s)?n.call(t,e,ri(s,n)):s&&typeof s=="object"&&!ei(s)?n.call(t,e,ni(s,n)):n.call(t,e,s)}function ni(t,e){for(const s of Object.keys(t)){const n=ct(t,s,t[s],e);n!==void 0?t[s]=n:delete t[s]}return t}function ri(t,e){for(let s=0;s<t.length;s++)t[s]=ct(t,String(s),t[s],e);return t}function ii(t,e,s){const n=typeof s=="function"?{parseNumber:s}:s,r=(n==null?void 0:n.parseNumber)??ti,o=(n==null?void 0:n.onDuplicateKey)??U;let i=0;const a=d();return O(a),y(),e?si(a,e):a;function l(){if(t.charCodeAt(i)===di){i++,_();const v={};let A=!0;for(;i<t.length&&t.charCodeAt(i)!==Cs;){A?A=!1:(h(),_());const z=i,Y=m();if(Y===void 0){j();return}_(),E();const H=d();if(H===void 0){I();return}if(Object.prototype.hasOwnProperty.call(v,Y)&&!ut(H,v[Y])){const Q=o({key:Y,position:z+1,oldValue:v[Y],newValue:H});Q!==void 0&&(v[Y]=Q)}else v[Y]=H}return t.charCodeAt(i)!==Cs&&X(),i++,v}}function c(){if(t.charCodeAt(i)===hi){i++,_();const v=[];let A=!0;for(;i<t.length&&t.charCodeAt(i)!==xs;){A?A=!1:h();const z=d();T(z),v.push(z)}return t.charCodeAt(i)!==xs&&$(),i++,v}}function d(){_();const v=m()??p()??l()??c()??b("true",!0)??b("false",!1)??b("null",null);return _(),v}function b(v,A){if(t.slice(i,i+v.length)===v)return i+=v.length,A}function _(){for(;oi(t.charCodeAt(i));)i++}function m(){if(t.charCodeAt(i)===dt){i++;let v="";for(;i<t.length&&t.charCodeAt(i)!==dt;){if(t.charCodeAt(i)===ui){const A=t[i+1],z=ci[A];z!==void 0?(v+=z,i++):A==="u"?Me(t.charCodeAt(i+2))&&Me(t.charCodeAt(i+3))&&Me(t.charCodeAt(i+4))&&Me(t.charCodeAt(i+5))?(v+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):K(i):w(i)}else li(t.charCodeAt(i))?v+=t[i]:te(t[i]);i++}return R(),i++,v}}function p(){const v=i;if(t.charCodeAt(i)===Os&&(i++,k(v)),t.charCodeAt(i)===ht)i++;else if(ai(t.charCodeAt(i)))for(i++;Fe(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===wi)for(i++,k(v);Fe(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Ci||t.charCodeAt(i)===Ei)for(i++,(t.charCodeAt(i)===Os||t.charCodeAt(i)===bi)&&i++,k(v);Fe(t.charCodeAt(i));)i++;if(i>v)return r(t.slice(v,i))}function h(){if(t.charCodeAt(i)!==_i)throw new SyntaxError(`Comma ',' expected after value ${N()}`);i++}function E(){if(t.charCodeAt(i)!==vi)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);i++}function O(v){if(v===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function T(v){if(v===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function y(){if(i<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function k(v){if(!Fe(t.charCodeAt(i))){const A=t.slice(v,i);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${N()}`)}}function R(){if(t.charCodeAt(i)!==dt)throw new SyntaxError(`End of string '"' expected ${N()}`)}function j(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function U(v){let{key:A,position:z}=v;throw new SyntaxError(`Duplicate key '${A}' encountered at position ${z}`)}function X(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function $(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function te(v){throw new SyntaxError(`Invalid character '${v}' ${B()}`)}function w(v){const A=t.slice(v,v+2);throw new SyntaxError(`Invalid escape character '${A}' ${B()}`)}function I(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function K(v){const A=t.slice(v,v+6);throw new SyntaxError(`Invalid unicode character '${A}' ${B()}`)}function B(){return`at position ${i}`}function qe(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function N(){return`${qe()} ${B()}`}}function oi(t){return t===fi||t===mi||t===pi||t===gi}function Me(t){return t>=ht&&t<=ft||t>=Si&&t<=xi||t>=Ti&&t<=Oi}function Fe(t){return t>=ht&&t<=ft}function ai(t){return t>=yi&&t<=ft}function li(t){return t>=32&&t<=1114111}function ut(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,n)=>ut(s,e[n])):Es(t)&&Es(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>ut(t[s],e[s])):!1}function Es(t){return typeof t=="object"&&t!==null}const ci={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
8
+ `,r:"\r",t:" "},ui=92,di=123,Cs=125,hi=91,xs=93,fi=32,mi=10,pi=9,gi=13,dt=34,bi=43,Os=45,ht=48,yi=49,ft=57,_i=44,wi=46,vi=58,Si=65,Ti=97,Ei=69,Ci=101,xi=70,Oi=102;function ks(t,e,s,n){return r(t);function r(l,c){if(Array.isArray(n)){const d=n.find(b=>b.test(l));if(d){const b=d.stringify(l);if(typeof b!="string"||!vs(b))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);return b}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return o(l);if(l&&typeof l=="object")return i(l)}function o(l,c){if(l.length===0)return"[]";let d="[";for(let b=0;b<l.length;b++){const _=l[b];typeof _<"u"&&typeof _!="function"?d+=r(_):d+="null",b<l.length-1&&(d+=",")}return d+="]",d}function i(l,c){if(typeof l.toJSON=="function")return ks(l.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(l);if(d.length===0)return"{}";let b=!0,_="{";for(const m of d){const p=l[m];if(a(m,p)){b?b=!1:_+=",";const h=JSON.stringify(m);_+=`${h}:`,_+=r(p)}}return _+="}",_}function a(l,c){return typeof c<"u"&&typeof c!="function"&&typeof c!="symbol"}}function ki(t){return ve(t)&&!Ss(t)?BigInt(t):parseFloat(t)}class Ri{constructor(){Ee(this,"id",1)}async exec(e,s,n={},r={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return n.scope=window.openc3Scope,r.manual=!0,(await rt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:n},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:o,transformRequest:[(i,a)=>ks(i)],transformResponse:[i=>ii(i,void 0,ki)]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(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}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s,n,r,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_interface(e,s,n,r){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:n,tlm_only:r})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...n){return this.exec("interface_cmd",[e,s,...n])}interface_target_enable(e,s,n=!1,r=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:n,tlm_only:r})}interface_target_disable(e,s,n=!1,r=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:n,tlm_only:r})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,n,r,o){return this.exec("map_target_to_router",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_router(e,s,n,r){return this.exec("unmap_target_from_router",[e,s],{cmd_only:n,tlm_only:r})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,n=!1,r=!1){return this.exec("router_target_enable",[e,s],{cmd_only:n,tlm_only:r})}router_target_disable(e,s,n=!1,r=!1){return this.exec("router_target_disable",[e,s],{cmd_only:n,tlm_only:r})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,n){return this.exec("get_item",[e,s,n])}get_param(e,s,n){return this.exec("get_param",[e,s,n])}get_parameter(e,s,n){return this.exec("get_param",[e,s,n])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,n,r=30){const o=await this.exec("get_tlm_packet",[e,s],{type:n,stale_time:r});if(o!=null){let i=o.length,a=null;for(let l=0;l<i;l++)a=this.decode_openc3_type(o[l][1]),a!==null&&(o[l][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,n=null,r=null,o=null){let i={stale_time:s};n!==null&&(i.cache_timeout=n),r!==null&&(i.start_time=r.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let l=a.length,c=null;for(let d=0;d<l;d++)c=this.decode_openc3_type(a[d][0]),c!==null&&(a[d][0]=c)}return a}get_limits(e,s,n){return this.exec("get_limits",[e,s,n])}async tlm(e,s,n,r="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(n===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else o=await this.exec("tlm",[e,s,n],{type:r});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,n=null,r="CONVERTED"){await this.exec("inject_tlm",[e,s,n],{type:r})}set_tlm(e,s,n,r){return this.exec("set_tlm",[e,s,n],{type:r})}override_tlm(e,s,n,r){return this.exec("override_tlm",[e,s,n],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,n,r){return this.exec("normalize_tlm",[e,s,n],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,n,r="CONVERTED"){return this.exec("get_cmd_value",[e,s,n,r])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,n,r,o,i={}){let a=null;for(let l in r)Object.prototype.hasOwnProperty.call(r,l)&&(a=this.encode_openc3_type(r[l]),a!==null&&(r[l]=a));return this.exec(e,[s,n,r],i,o)}get_cmd_hazardous(e,s,n,r={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,s,n,r)}cmd(e,s,n,r={},o={}){return s===void 0?this.exec("cmd",e,o,r):this._cmd("cmd",e,s,n,r,o)}cmd_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,r):this._cmd("cmd_no_range_check",e,s,n,r,o)}cmd_raw(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw",e,o,r):this._cmd("cmd_raw",e,s,n,r,o)}cmd_raw_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,r):this._cmd("cmd_raw_no_range_check",e,s,n,r,o)}cmd_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,r):this._cmd("cmd_no_hazardous_check",e,s,n,r,o)}cmd_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,r):this._cmd("cmd_no_checks",e,s,n,r,o)}cmd_raw_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,r):this._cmd("cmd_raw_no_hazardous_check",e,s,n,r,o)}cmd_raw_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,r):this._cmd("cmd_raw_no_checks",e,s,n,r,o)}build_cmd(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}build_command(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,n){return this.exec("save_config",[e,s,n])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,n){return this.exec("enable_limits",[e,s,n])}disable_limits(e,s,n){return this.exec("disable_limits",[e,s,n])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",s),r=new Uint8Array(n);return Array.from(r).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let Ve=[];const Ai={components:{OpenConfigDialog:wt,SaveConfigDialog:_t,TargetPacketItemChooser:Et,TopBar:Us},mixins:[bt,yt],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new Kr,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new Ri,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await pr.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
9
+ continue to stream in real-time until
10
+ ${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Ve=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let n=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(n=n+"__"+e.reducedType);let r=String(s);this.keyMap[r]=n,t.push([n,r])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let r of t){let o=Object.keys(r);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")).length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("__extra"),this.buildHeaders([...e]),Ve.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[s,n,r,o,i,a,l]=e.split("__");let c=i;this.columnMode==="full"&&(c=r+" "+o+" "+i),s&&s!=="DECOM"&&(c=c+" {"+s+"}"),a&&a!=="CONVERTED"&&(c=c+" ("+a+")"),l&&(c=c+" ["+l+"]"),this.columnHeaders.push(c)})},createFile:async function(){var m,p;let t=Ve.flat(),e=this.columnHeaders,s=this.columnMap,n=[];this.resetPerFileVars();let r="";this.matlabHeader&&(r+="% "),r+=e.join(this.delimiter),n.push(r),await this.yieldToMain(),t.sort((h,E)=>h.__time-E.__time),await this.yieldToMain();let o=[],i=[],a=null,l=0;for(let h of t){let E=!1;this.fillDown&&a?i=[...a]:i=[];let O="";if(Object.keys(h).forEach(T=>{if(T.slice(0,2)==="__")return;O=T;let y=s[T];if(typeof h[T]=="object")if(h[T]===null)i[y]="";else if(Array.isArray(h[T]))i[y]='"['+h[T]+']"';else{let k=h[T].raw;if(Array.isArray(k)){let R="0x";k.forEach(j=>{R+=j.toString(16).padStart(2,"0").toUpperCase()}),i[y]=R}else i[y]="'"+k+"'"}else i[y]=h[T];this.uniqueOnly&&o[y]!==i[y]&&(E=!0),o[y]=i[y]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||E){if(this.columnMode==="normal"){O=this.keyMap[O];const[T,y,k,R,j,U,X]=O.split("__");i[0]=new Date(h.__time/1e6).toISOString(),i[1]=k,i[2]=R,this.hasCommands&&(i[3]=((m=h.__extra)==null?void 0:m.username)||"",this.enterprise&&(i[4]=((p=h.__extra)==null?void 0:p.approver)||""))}n.push(i.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let c=".csv",d="text/csv";this.delimiter===" "&&(c=".txt",d="text/tab-separated-values"),await this.yieldToMain();const b=new Blob([n.join(`
11
+ `)],{type:d});await this.yieldToMain();const _=document.createElement("a");_.href=URL.createObjectURL(b),_.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+c),_.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Ve.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function Pi(t,e,s,n,r,o){const i=C("top-bar"),a=C("v-text-field"),l=C("v-col"),c=C("v-row"),d=C("v-radio"),b=C("v-radio-group"),_=C("target-packet-item-chooser"),m=C("v-container"),p=C("v-progress-circular"),h=C("v-spacer"),E=C("v-btn"),O=C("v-toolbar"),T=C("v-card-title"),y=C("v-select"),k=C("v-card-text"),R=C("v-card-actions"),j=C("v-card"),U=C("v-dialog"),X=C("v-data-table"),$=C("open-config-dialog"),te=C("save-config-dialog");return P(),ee("div",null,[f(i,{menus:o.menus,title:r.title},null,8,["menus","title"]),f(j,null,{default:g(()=>[f(m,null,{default:g(()=>[f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=w=>r.startDate=w),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=w=>r.startTime=w),label:"Start Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=w=>r.endDate=w),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=w=>r.endTime=w),label:"End Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(c,{"no-gutters":""},{default:g(()=>[f(l,null,{default:g(()=>[f(b,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=w=>r.cmdOrTlm=w),inline:"","hide-details":"",class:"mt-0"},{default:g(()=>[f(d,{label:"Command",value:"cmd","data-test":"cmd-radio"}),f(d,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(_,{"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"",onAddItem:e[5]||(e[5]=w=>o.addItem(w))},null,8,["mode"])]),_:1})]),_:1})]),_:1}),f(O,{class:"pl-3"},{default:g(()=>[f(p,{"model-value":r.progress},null,8,["model-value"]),F("   Processed: "+Z(r.totalPacketsReceived)+" packets, "+Z(r.totalItemsReceived)+" items ",1),f(h),f(E,{class:"bg-primary",disabled:r.items.length<1,onClick:o.processItems},{default:g(()=>[F(Z(r.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(h),f(E,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=w=>r.editAll=!0)},null,8,["disabled"]),f(E,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),f(j,{width:"100%"},{default:g(()=>[f(T,null,{default:g(()=>[e[18]||(e[18]=F(" Items ",-1)),f(h),f(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=w=>r.search=w),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f(X,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=w=>r.itemsPerPage=w),headers:r.headers,items:r.items,search:r.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":g(({item:w})=>[f(E,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Tt(I=>w.edit=!0,["stop"])},null,8,["onClick"]),f(U,{modelValue:w.edit,"onUpdate:modelValue":I=>w.edit=I,"max-width":"600",persistent:"",onKeydown:We(I=>w.edit=!1,["esc"])},{default:g(()=>[f(j,null,{default:g(()=>[f(O,{height:"24"},{default:g(()=>[f(h),e[19]||(e[19]=Te("span",null," DataExtractor: Edit Item Mode ",-1)),f(h)]),_:1}),f(k,null,{default:g(()=>[f(c,{class:"mt-3 title-font"},{default:g(()=>[f(l,null,{default:g(()=>[F(Z(o.getItemLabel(w)),1)]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:w.mode,"onUpdate:modelValue":I=>w.mode=I,"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:w.valueType,"onUpdate:modelValue":I=>w.valueType=I,"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:w.reducedType,"onUpdate:modelValue":I=>w.reducedType=I,"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),f(R,{class:"px-2"},{default:g(()=>[f(h),f(E,{variant:"flat",onClick:I=>w.edit=!1},{default:g(()=>[...e[20]||(e[20]=[F(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":g(({item:w})=>[f(E,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:I=>o.deleteItem(w)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(U,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=w=>r.editAll=w),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=We(w=>r.editAll=!1,["esc"]))},{default:g(()=>[f(j,null,{default:g(()=>[f(O,{height:"24"},{default:g(()=>[f(h),e[21]||(e[21]=Te("span",null," DataExtractor: Edit All Items",-1)),f(h)]),_:1}),f(k,null,{default:g(()=>[f(c,{class:"mt-3"},{default:g(()=>[f(l,null,{default:g(()=>[...e[22]||(e[22]=[F(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=w=>r.allItemMode=w),"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=w=>r.allItemValueType=w),"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=w=>r.allItemReducedType=w),"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),f(R,{class:"px-2"},{default:g(()=>[f(h),f(E,{variant:"outlined",onClick:e[12]||(e[12]=w=>r.editAll=!1)},{default:g(()=>[...e[23]||(e[23]=[F(" Cancel ",-1)])]),_:1}),f(E,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=w=>o.editAllItems())},{default:g(()=>[...e[24]||(e[24]=[F(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(P(),L($,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=w=>r.openConfig=w),"config-key":r.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0),r.saveConfig?(P(),L(te,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=w=>r.saveConfig=w),"config-key":r.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0)])}const Zi=Ps("default",gt(Ai,[["render",Pi],["__scopeId","data-v-69333456"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","./main-9cd385edc6f249dcc77f.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,v){"use strict";var l,a,n,r,s,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.createBlock,u=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,f,y,t,b){const h=r("v-text-field");return u(),s(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:o(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const V=d("default",a(e,[["render",c]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","./LimitsBar-_UQG-M6e-e79bee025393a20cb921.js","vue"],function(S,M){"use strict";var k,L,C,h,o,u,e,t,w,s,d,g,p,N,V;return{setters:[c=>{k=c.d,L=c.B},c=>{C=c.x},c=>{h=c.resolveComponent,o=c.createBlock,u=c.openBlock,e=c.withCtx,t=c.createVNode,w=c.createElementVNode,s=c.createTextVNode,d=c.toDisplayString,g=c.createCommentVNode,p=c.createElementBlock,N=c.Fragment,V=c.renderList}],execute:function(){const c={components:{LimitsBar:C},props:{type:{default:"tlm",validator:function(r){return["cmd","tlm"].indexOf(r)!==-1}},targetName:{type:String,default:null},packetName:{type:String,default:null},itemName:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue"],data(){return{details:Object,available:null,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}}},watch:{modelValue:function(r,a){r?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.available&&this.details&&this.api.get_tlm_values(this.available).then(_=>{for(let y of _){let i=null;if(y[0].json_class==="String"&&y[0].raw!==void 0?i=y[0].raw:this.details.data_type==="BLOCK"&&(i=y[0]),i!==null){i=i.slice(0,parseInt(this.details.bit_size)/8);let b=!1;i.length>64&&(b=!0),y[0]=Array.from(i.slice(0,64),function(v){return v===" "?"20":("0"+(v&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),b&&(y[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.unitsValue=_[3][0]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new L},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(r){let a=!1;return r.limits.DEFAULT&&(a=!0),r.states&&Object.getOwnPropertyNames(r.states).forEach(_=>{r.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?this.api.get_tlm_available([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`,`${this.targetName}__${this.packetName}__${this.itemName}__WITH_UNITS`]).then(r=>{r&&r.length>0&&(this.available=r),this.api.get_item(this.targetName,this.packetName,this.itemName).then(a=>{this.details=a,this.hasLimits(a)||(this.details.limits=null)})}):this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(r=>{this.details=r})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(r){return r.hasOwnProperty("green_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high+" GL/"+r.green_low+" GH/"+r.green_high:r.hasOwnProperty("red_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high:r}}},B={key:5},$={key:7},x={class:"limits-text"},E={key:9};function U(r,a,_,y,i,b){const v=h("v-spacer"),D=h("v-toolbar"),T=h("v-card-title"),I=h("v-card-subtitle"),l=h("v-col"),n=h("v-row"),O=h("v-switch"),R=h("LimitsBar"),j=h("v-container"),z=h("v-card-text"),A=h("v-card"),F=h("v-dialog");return u(),o(F,{modelValue:b.show,"onUpdate:modelValue":a[1]||(a[1]=m=>b.show=m),width:"700"},{default:e(()=>[t(A,null,{default:e(()=>[t(D,{height:24},{default:e(()=>[t(v),a[2]||(a[2]=w("span",null," Details ",-1)),t(v)]),_:1}),t(T,null,{default:e(()=>[s(d(_.targetName)+" "+d(_.packetName)+" "+d(_.itemName),1)]),_:1}),t(I,null,{default:e(()=>[s(d(i.details.description),1)]),_:1}),t(z,null,{default:e(()=>[t(j,{fluid:""},{default:e(()=>[_.type==="tlm"?(u(),o(n,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):g("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.rawValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.convertedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.formattedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("With Units Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.unitsValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_offset),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(u(),o(n,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.array_size),1)]),_:1})]),_:1})):g("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(u(),o(n,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.minimum),1)]),_:1})]),_:1})):g("",!0),_.type==="cmd"?(u(),o(n,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.maximum),1)]),_:1})]),_:1})):g("",!0),_.type==="cmd"?(u(),o(n,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.default),1)]),_:1})]),_:1})):g("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.format_string),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[16]||(a[16]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(u(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.read_conversion.class)+" ",1),a[17]||(a[17]=w("br",null,null,-1)),s(" Params: "+d(i.details.read_conversion.params),1)]),_:1})):(u(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[18]||(a[18]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(u(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.write_conversion.class)+" ",1),a[19]||(a[19]=w("br",null,null,-1)),s(" Params: "+d(i.details.write_conversion.params),1)]),_:1})):(u(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.id_value),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units_full),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(u(),p("div",B,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(N,null,V(i.details.states,(m,f)=>(u(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(m.value),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),o(n,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[25]||(a[25]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[26]||(a[26]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(u(),p("div",$,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(N,null,V(i.details.limits,(m,f)=>(u(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),f==="enabled"?(u(),o(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Enabled",-1)])]),_:1})):g("",!0),f==="enabled"?(u(),o(O,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=H=>i.details.limits.enabled=H),b.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):g("",!0),f!=="enabled"?(u(),o(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024)):g("",!0),f!=="enabled"?(u(),o(l,{key:3},{default:e(()=>[w("div",x,d(b.formatLimit(m)),1),m.red_low!==void 0?(u(),o(R,{key:0,"red-low":m.red_low,"yellow-low":m.yellow_low,"yellow-high":m.yellow_high,"red-high":m.red_high,"green-low":m.green_low,"green-high":m.green_high,value:i.convertedValue,width:300,height:22},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","value"])):g("",!0)]),_:2},1024)):g("",!0)]),_:2},1024))),128))])):(u(),o(n,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[29]||(a[29]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[30]||(a[30]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(u(),p("div",E,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(N,null,V(i.details.meta,(m,f)=>(u(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(m.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),o(n,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[32]||(a[32]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[33]||(a[33]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const P=S("q",k(c,[["render",U],["__scopeId","data-v-7d957b35"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["vue","./main-9cd385edc6f249dcc77f.js","vue-router","single-spa","vuex","vuetify"],function(a,p){"use strict";var t,n,r,o,i,s;return{setters:[e=>{t=e.createBlock,n=e.openBlock,r=e.resolveDynamicComponent,o=e.normalizeProps,i=e.guardReactiveProps},e=>{s=e.d},null,null,null,null],execute:function(){const e={props:{name:{type:String,default:null}},data(){return{widgetType:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch{throw new Error(`Unknown widget: ${this.name}`)}}};function l(u,d,g,w,c,y){return n(),t(r(c.widgetType),o(i({...u.$props,...u.$attrs})),null,16)}const m=a("default",s(e,[["render",l]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","vue-router","single-spa","vuex","vuetify"],function(S,j){"use strict";var C,g,x,a,y,u,v,l,o,d,i,p,w,f,E,k,b;return{setters:[t=>{C=t.d,g=t.F},t=>{x=t.o},t=>{a=t.resolveComponent,y=t.createBlock,u=t.openBlock,v=t.normalizeStyle,l=t.withCtx,o=t.createVNode,d=t.createElementVNode,i=t.toDisplayString,p=t.createElementBlock,w=t.createCommentVNode,f=t.Fragment,E=t.renderList,k=t.createTextVNode,b=t.normalizeClass},null,null,null,null],execute:function(){const t={mixins:[x],data(){return{files:[],loading:!1}},computed:{match(){if(this.files.some(s=>s.error))return!1;if(this.files.some(s=>!s.checksum))return null;const e=this.files[0].checksum;return this.files.every(s=>s.checksum===e)},matchStatus(){return{null:{icon:"$info",color:"grey",text:"Comparing..."},true:{icon:"$success",color:"success",text:"Checksums Match"},false:{icon:"$error",color:"error",text:this.files.some(e=>e.error)?"Error loading file(s)":"Checksums Do Not Match"}}[this.match]}},created(){this.files=this.parameters.filter(e=>e).map(e=>({path:e,checksum:null,error:null,copied:!1}))},mounted(){this.files.length&&this.fetchChecksums()},methods:{getDisplayText(e){return e.error?`Error: ${e.error}`:e.checksum?e.checksum:this.loading?"Loading...":"Not loaded"},async computeChecksum(e){const s=new TextEncoder().encode(e),m=await crypto.subtle.digest("SHA-256",s);return Array.from(new Uint8Array(m)).map(n=>n.toString(16).padStart(2,"0")).join("")},async fetchFile(e){var s;const m=window.openc3Scope||"DEFAULT";let n=`${m}/targets_modified/${e}`,r=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(n)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);if((!r||r.status===404)&&(n=`${m}/targets/${e}`,r=await g.get(`/openc3-api/storage/download_file/${encodeURIComponent(n)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),(s=r==null?void 0:r.data)!=null&&s.contents)return atob(r.data.contents);throw new Error("File not found")},async copyChecksum(e){if(e.checksum)try{await navigator.clipboard.writeText(e.checksum),e.copied=!0,setTimeout(()=>e.copied=!1,2e3)}catch(s){console.error("Failed to copy checksum:",s)}},async fetchChecksums(){this.loading=!0,this.files.forEach(e=>{e.checksum=null,e.error=null}),(await Promise.all(this.files.map(e=>this.fetchFile(e.path).then(s=>this.computeChecksum(s)).catch(s=>({error:s.message||"File not found"}))))).forEach((e,s)=>{e!=null&&e.error?this.files[s].error=e.error:this.files[s].checksum=e}),this.loading=!1}}},$={class:"text-caption text-medium-emphasis font-weight-regular"},T={class:"text-caption text-medium-emphasis mb-2"},V={class:"ml-1 text-high-emphasis"},z={class:"flex-grow-1 overflow-wrap-anywhere"};function B(e,s,m,n,r,h){const D=a("v-spacer"),F=a("v-btn"),U=a("v-card-title"),N=a("v-divider"),I=a("v-sheet"),A=a("v-chip"),L=a("v-card-text"),O=a("v-card");return u(),y(O,{style:v(e.computedStyle),"min-width":"400"},{default:l(()=>[o(U,{class:"d-flex align-center pa-2"},{default:l(()=>[d("span",$,i(r.files.length===1?"File Checksum":"File Checksum Comparison"),1),o(D),o(F,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:r.loading,onClick:h.fetchChecksums},null,8,["loading","onClick"])]),_:1}),o(N),o(L,{class:"pa-3"},{default:l(()=>[(u(!0),p(f,null,E(r.files,(c,_)=>(u(),p(f,{key:_},[d("div",T,[k(i(r.files.length===1?"File:":`File ${_+1}:`)+" ",1),d("span",V,i(c.path),1)]),o(I,{class:b([c.error?"text-error":"","d-flex align-center ga-2 px-2 py-1 mb-3 rounded text-caption"]),style:{"background-color":"rgba(128, 128, 128, 0.2)"}},{default:l(()=>[d("span",z,i(h.getDisplayText(c)),1),o(F,{icon:c.copied?"$success":"mdi-content-copy",color:c.copied?"success":void 0,disabled:!c.checksum,size:"x-small",variant:"plain",density:"compact",onClick:P=>h.copyChecksum(c)},null,8,["icon","color","disabled","onClick"])]),_:2},1032,["class"])],64))),128)),r.files.length>1?(u(),p(f,{key:0},[o(N,{class:"mb-3"}),o(A,{color:h.matchStatus.color,size:"small",variant:"tonal",label:"","prepend-icon":h.matchStatus.icon},{default:l(()=>[k(i(h.matchStatus.text),1)]),_:1},8,["color","prepend-icon"])],64)):w("",!0)]),_:1})]),_:1},8,["style"])}const K=S("default",C(t,[["render",B],["__scopeId","data-v-7cb83af3"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./main-9cd385edc6f249dcc77f.js","./Widget-6-Nvewdp-7627de70dadaabe97688.js","vue","vue-router","single-spa","vuex","vuetify"],function(y,F){"use strict";var c,l,p,f,i,u,g,d,a,o,h,m;return{setters:[t=>{c=t.d,l=t.F,p=t.b},t=>{f=t.o},t=>{i=t.resolveComponent,u=t.createBlock,g=t.openBlock,d=t.normalizeStyle,a=t.withCtx,o=t.createVNode,h=t.createElementVNode,m=t.toDisplayString},null,null,null,null],execute:function(){const t={mixins:[f],data(){return{filePath:"",fileContent:"Loading...",loading:!1,width:600,height:300,editor:null}},computed:{contentStyle(){return{width:this.width+"px",height:this.height+"px"}},aceMode(){var s;const e=(s=this.filePath.split(".").pop())==null?void 0:s.toLowerCase();return{json:"ace/mode/json",rb:"ace/mode/ruby",py:"ace/mode/python",txt:"ace/mode/text"}[e]||"ace/mode/text"}},created(){this.parameters[0]&&(this.filePath=this.parameters[0]),this.parameters[1]&&(this.width=parseInt(this.parameters[1])),this.parameters[2]&&(this.height=parseInt(this.parameters[2]))},mounted(){this.editor=p.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.setReadOnly(!0),this.editor.setShowPrintMargin(!1),this.editor.setHighlightActiveLine(!1),this.editor.renderer.setShowGutter(!1),this.editor.renderer.setScrollMargin(8,8,0,0),this.editor.renderer.setPadding(8),this.editor.setValue(this.fileContent,-1),this.filePath&&this.fetchFile()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{updateEditor(){this.editor&&(this.editor.session.setMode(this.aceMode),this.editor.setValue(this.fileContent,-1))},async fetchFile(){var s;if(!this.filePath){this.fileContent='Error: No file path specified. Usage: FILEDISPLAY "TARGET/path/to/file.txt"',this.updateEditor();return}this.loading=!0;try{const e=window.openc3Scope||"DEFAULT";let n=`${e}/targets_modified/${this.filePath}`,r=await l.get(`/openc3-api/storage/download_file/${encodeURIComponent(n)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"},headers:{"Ignore-Errors":"404,500"}}).catch(()=>null);(!r||r.status===404)&&(n=`${e}/targets/${this.filePath}`,r=await l.get(`/openc3-api/storage/download_file/${encodeURIComponent(n)}`,{params:{bucket:"OPENC3_CONFIG_BUCKET"}})),(s=r==null?void 0:r.data)!=null&&s.contents?this.fileContent=atob(r.data.contents):this.fileContent="Error: Could not load file"}catch(e){this.fileContent=`Error: ${e.message||e}`}finally{this.loading=!1,this.updateEditor()}}}},w={class:"text-caption text-medium-emphasis font-weight-regular"};function x(s,e,n,r,v,C){const E=i("v-spacer"),P=i("v-btn"),S=i("v-card-title"),N=i("v-divider"),_=i("v-card-text"),b=i("v-card");return g(),u(b,{style:d(s.computedStyle)},{default:a(()=>[o(S,{class:"d-flex align-center pa-2"},{default:a(()=>[h("span",w,m(v.filePath),1),o(E),o(P,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:v.loading,onClick:C.fetchFile},null,8,["loading","onClick"])]),_:1}),o(N),o(_,{class:"pa-0"},{default:a(()=>[h("div",{ref:"editor",style:d(C.contentStyle)},null,4)]),_:1})]),_:1},8,["style"])}const I=y("default",c(t,[["render",x]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-6-Nvewdp-7627de70dadaabe97688.js","./ValueWidget-BI3uXmda-36fc637dd4e48d44fbe5.js","vue","./main-9cd385edc6f249dcc77f.js","./DetailsDialog-p_vutijL-22b1ca4ac94462632604.js","./LimitsBar-_UQG-M6e-e79bee025393a20cb921.js","single-spa","./VWidget-rAFU-0vj-a2aaac1a8c481b8f7c9a.js","vue-router","vuex","vuetify"],function(m,f){"use strict";var r,s,n,a,l,i,o,u,c;return{setters:[e=>{r=e.o},e=>{s=e.default},e=>{n=e.resolveComponent,a=e.createElementBlock,l=e.openBlock,i=e.normalizeStyle,o=e.createVNode,u=e.mergeProps},e=>{c=e.d},null,null,null,null,null,null,null],execute:function(){const p={components:{ValueWidget:s},mixins:[r],computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(parseInt(this.parameters[5])+4,"ch",16)}};function g(t,j,y,B,V,d){const v=n("value-widget");return l(),a("div",{ref:"container",class:"d-flex flex-row",style:i(t.computedStyle)},[o(v,u(t.$attrs,{parameters:d.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const h=m("default",c(p,[["render",g]]))}}});