@openc3/vue-common 7.0.0-rc3 → 7.0.1

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 (434) hide show
  1. package/dist/{ArrayWidget-B2-n1K3r.cjs → ArrayWidget-BHjh3qLF.cjs} +2 -2
  2. package/dist/{ArrayWidget-B2-n1K3r.cjs.map → ArrayWidget-BHjh3qLF.cjs.map} +1 -1
  3. package/dist/{ArrayWidget-dQWDMMrn.js → ArrayWidget-Dh6zDiC7.js} +6 -6
  4. package/dist/{ArrayWidget-dQWDMMrn.js.map → ArrayWidget-Dh6zDiC7.js.map} +1 -1
  5. package/dist/{ArrayplotWidget-BmBcPGUR.cjs → ArrayplotWidget-BHD-TGQO.cjs} +2 -2
  6. package/dist/{ArrayplotWidget-BmBcPGUR.cjs.map → ArrayplotWidget-BHD-TGQO.cjs.map} +1 -1
  7. package/dist/{ArrayplotWidget-DCnbK37q.js → ArrayplotWidget-CSc_TqNm.js} +6 -6
  8. package/dist/{ArrayplotWidget-DCnbK37q.js.map → ArrayplotWidget-CSc_TqNm.js.map} +1 -1
  9. package/dist/{BarColumn-DmOxuCa9.js → BarColumn-DmjMnw5l.js} +3 -3
  10. package/dist/{BarColumn-DmOxuCa9.js.map → BarColumn-DmjMnw5l.js.map} +1 -1
  11. package/dist/{BarColumn-CkecDAzn.cjs → BarColumn-Ym4P8YHC.cjs} +2 -2
  12. package/dist/{BarColumn-CkecDAzn.cjs.map → BarColumn-Ym4P8YHC.cjs.map} +1 -1
  13. package/dist/{BlockWidget-UejKxAxY.js → BlockWidget-BdR_HCVc.js} +6 -6
  14. package/dist/{BlockWidget-UejKxAxY.js.map → BlockWidget-BdR_HCVc.js.map} +1 -1
  15. package/dist/{BlockWidget-BZXHLTJt.cjs → BlockWidget-Bi1PfS1k.cjs} +2 -2
  16. package/dist/{BlockWidget-BZXHLTJt.cjs.map → BlockWidget-Bi1PfS1k.cjs.map} +1 -1
  17. package/dist/{ButtonWidget-CzRyY1N5.cjs → ButtonWidget-70hNWuEy.cjs} +2 -2
  18. package/dist/{ButtonWidget-CzRyY1N5.cjs.map → ButtonWidget-70hNWuEy.cjs.map} +1 -1
  19. package/dist/{ButtonWidget-DtAkhzCN.js → ButtonWidget-DZ4VCNWU.js} +6 -6
  20. package/dist/{ButtonWidget-DtAkhzCN.js.map → ButtonWidget-DZ4VCNWU.js.map} +1 -1
  21. package/dist/{CanvasWidget-cQqNxspP.cjs → CanvasWidget-DTEx-DpZ.cjs} +2 -2
  22. package/dist/{CanvasWidget-cQqNxspP.cjs.map → CanvasWidget-DTEx-DpZ.cjs.map} +1 -1
  23. package/dist/{CanvasWidget-YXQ8TLqA.js → CanvasWidget-DuXOo3jG.js} +4 -4
  24. package/dist/{CanvasWidget-YXQ8TLqA.js.map → CanvasWidget-DuXOo3jG.js.map} +1 -1
  25. package/dist/{CanvasdotWidget-BbmhHQV_.js → CanvasdotWidget-WoLpxI1u.js} +5 -5
  26. package/dist/{CanvasdotWidget-BbmhHQV_.js.map → CanvasdotWidget-WoLpxI1u.js.map} +1 -1
  27. package/dist/{CanvasdotWidget-CMIw-ga4.cjs → CanvasdotWidget-bbOquK8B.cjs} +2 -2
  28. package/dist/{CanvasdotWidget-CMIw-ga4.cjs.map → CanvasdotWidget-bbOquK8B.cjs.map} +1 -1
  29. package/dist/{CanvasimageWidget-DXxtYjGG.cjs → CanvasimageWidget-D2EqsK7w.cjs} +2 -2
  30. package/dist/{CanvasimageWidget-DXxtYjGG.cjs.map → CanvasimageWidget-D2EqsK7w.cjs.map} +1 -1
  31. package/dist/{CanvasimageWidget-CJf5NYEj.js → CanvasimageWidget-tWpK5rsv.js} +8 -8
  32. package/dist/{CanvasimageWidget-CJf5NYEj.js.map → CanvasimageWidget-tWpK5rsv.js.map} +1 -1
  33. package/dist/{CanvasimagevalueWidget-D86eJXbs.js → CanvasimagevalueWidget-BVzJYz3l.js} +9 -9
  34. package/dist/{CanvasimagevalueWidget-D86eJXbs.js.map → CanvasimagevalueWidget-BVzJYz3l.js.map} +1 -1
  35. package/dist/{CanvasimagevalueWidget-VPKlJrxM.cjs → CanvasimagevalueWidget-By_DiQ75.cjs} +2 -2
  36. package/dist/{CanvasimagevalueWidget-VPKlJrxM.cjs.map → CanvasimagevalueWidget-By_DiQ75.cjs.map} +1 -1
  37. package/dist/{CanvaslabelWidget-TkrVd-Dg.js → CanvaslabelWidget-CDFf8Vll.js} +5 -5
  38. package/dist/{CanvaslabelWidget-TkrVd-Dg.js.map → CanvaslabelWidget-CDFf8Vll.js.map} +1 -1
  39. package/dist/{CanvaslabelWidget-BgGRS0NS.cjs → CanvaslabelWidget-DiPxyXoX.cjs} +2 -2
  40. package/dist/{CanvaslabelWidget-BgGRS0NS.cjs.map → CanvaslabelWidget-DiPxyXoX.cjs.map} +1 -1
  41. package/dist/{CanvaslabelvalueWidget-W2QzOkQw.cjs → CanvaslabelvalueWidget-Cw5CCQTi.cjs} +2 -2
  42. package/dist/{CanvaslabelvalueWidget-W2QzOkQw.cjs.map → CanvaslabelvalueWidget-Cw5CCQTi.cjs.map} +1 -1
  43. package/dist/{CanvaslabelvalueWidget-BwsIN_MT.js → CanvaslabelvalueWidget-DzJKD6qs.js} +5 -5
  44. package/dist/{CanvaslabelvalueWidget-BwsIN_MT.js.map → CanvaslabelvalueWidget-DzJKD6qs.js.map} +1 -1
  45. package/dist/{CanvaslineWidget-yT7FUWs8.cjs → CanvaslineWidget-BECtKTPL.cjs} +2 -2
  46. package/dist/{CanvaslineWidget-yT7FUWs8.cjs.map → CanvaslineWidget-BECtKTPL.cjs.map} +1 -1
  47. package/dist/{CanvaslineWidget-BjBvF-vY.js → CanvaslineWidget-BttTXCZq.js} +5 -5
  48. package/dist/{CanvaslineWidget-BjBvF-vY.js.map → CanvaslineWidget-BttTXCZq.js.map} +1 -1
  49. package/dist/{CanvaslinevalueWidget-Dj4tsTBp.cjs → CanvaslinevalueWidget-5duJ98qu.cjs} +2 -2
  50. package/dist/{CanvaslinevalueWidget-Dj4tsTBp.cjs.map → CanvaslinevalueWidget-5duJ98qu.cjs.map} +1 -1
  51. package/dist/{CanvaslinevalueWidget-krBLp9yB.js → CanvaslinevalueWidget-i6G0JfnZ.js} +5 -5
  52. package/dist/{CanvaslinevalueWidget-krBLp9yB.js.map → CanvaslinevalueWidget-i6G0JfnZ.js.map} +1 -1
  53. package/dist/{CheckbuttonWidget-IMrIK9q4.js → CheckbuttonWidget-18jtf7sh.js} +5 -5
  54. package/dist/{CheckbuttonWidget-IMrIK9q4.js.map → CheckbuttonWidget-18jtf7sh.js.map} +1 -1
  55. package/dist/{CheckbuttonWidget-CT28NPNo.cjs → CheckbuttonWidget-CTMObPhX.cjs} +2 -2
  56. package/dist/{CheckbuttonWidget-CT28NPNo.cjs.map → CheckbuttonWidget-CTMObPhX.cjs.map} +1 -1
  57. package/dist/{ClassificationBanners-DiIkXqna.js → ClassificationBanners-BmnQODLn.js} +2 -2
  58. package/dist/{ClassificationBanners-DiIkXqna.js.map → ClassificationBanners-BmnQODLn.js.map} +1 -1
  59. package/dist/{ClassificationBanners-DC__VXBX.cjs → ClassificationBanners-DjGCuH-4.cjs} +2 -2
  60. package/dist/{ClassificationBanners-DC__VXBX.cjs.map → ClassificationBanners-DjGCuH-4.cjs.map} +1 -1
  61. package/dist/{ComboboxWidget-C9Zlc2Hy.js → ComboboxWidget-BjaVFbD4.js} +5 -5
  62. package/dist/{ComboboxWidget-C9Zlc2Hy.js.map → ComboboxWidget-BjaVFbD4.js.map} +1 -1
  63. package/dist/{ComboboxWidget-hFBSBFwy.cjs → ComboboxWidget-Cc0Acq9q.cjs} +2 -2
  64. package/dist/{ComboboxWidget-hFBSBFwy.cjs.map → ComboboxWidget-Cc0Acq9q.cjs.map} +1 -1
  65. package/dist/{CriticalCmdDialog-Cp-ykpQb.js → CriticalCmdDialog-CO-nvphS.js} +8 -8
  66. package/dist/{CriticalCmdDialog-Cp-ykpQb.js.map → CriticalCmdDialog-CO-nvphS.js.map} +1 -1
  67. package/dist/{CriticalCmdDialog-CCaStsM-.cjs → CriticalCmdDialog-eytxCQto.cjs} +2 -2
  68. package/dist/{CriticalCmdDialog-CCaStsM-.cjs.map → CriticalCmdDialog-eytxCQto.cjs.map} +1 -1
  69. package/dist/{CustomIcon-Cg3jCA_l.js → CustomIcon-DTR361si.js} +4 -4
  70. package/dist/{CustomIcon-Cg3jCA_l.js.map → CustomIcon-DTR361si.js.map} +1 -1
  71. package/dist/{DateWidget-C_QpCTxN.cjs → DateWidget-Cle8FY8Q.cjs} +2 -2
  72. package/dist/{DateWidget-C_QpCTxN.cjs.map → DateWidget-Cle8FY8Q.cjs.map} +1 -1
  73. package/dist/{DateWidget-Y6WAFGGt.js → DateWidget-DkFAFlc8.js} +5 -5
  74. package/dist/{DateWidget-Y6WAFGGt.js.map → DateWidget-DkFAFlc8.js.map} +1 -1
  75. package/dist/{DetailsDialog-Bq9BPuoe.cjs → DetailsDialog-BcMaTfuQ.cjs} +2 -2
  76. package/dist/{DetailsDialog-Bq9BPuoe.cjs.map → DetailsDialog-BcMaTfuQ.cjs.map} +1 -1
  77. package/dist/{DetailsDialog-DznGAE6i.js → DetailsDialog-sqja4Lzq.js} +5 -5
  78. package/dist/{DetailsDialog-DznGAE6i.js.map → DetailsDialog-sqja4Lzq.js.map} +1 -1
  79. package/dist/{DynamicWidget-Bym87woV.js → DynamicWidget-BuSbQVhf.js} +4 -4
  80. package/dist/{DynamicWidget-Bym87woV.js.map → DynamicWidget-BuSbQVhf.js.map} +1 -1
  81. package/dist/{EventListDialog-CktWO2jn.js → EventListDialog-DjCQAwGl.js} +17 -14
  82. package/dist/EventListDialog-DjCQAwGl.js.map +1 -0
  83. package/dist/EventListDialog-EmC7YW60.cjs +2 -0
  84. package/dist/EventListDialog-EmC7YW60.cjs.map +1 -0
  85. package/dist/{FilechecksumWidget-BZdmiTbb.cjs → FilechecksumWidget-2ta-UvLp.cjs} +2 -2
  86. package/dist/{FilechecksumWidget-BZdmiTbb.cjs.map → FilechecksumWidget-2ta-UvLp.cjs.map} +1 -1
  87. package/dist/{FilechecksumWidget-VbLODmHh.js → FilechecksumWidget-DqJ_hvN4.js} +8 -8
  88. package/dist/{FilechecksumWidget-VbLODmHh.js.map → FilechecksumWidget-DqJ_hvN4.js.map} +1 -1
  89. package/dist/{FiledisplayWidget-BI7GAQ4d.cjs → FiledisplayWidget-BUKXIQir.cjs} +2 -2
  90. package/dist/{FiledisplayWidget-BI7GAQ4d.cjs.map → FiledisplayWidget-BUKXIQir.cjs.map} +1 -1
  91. package/dist/{FiledisplayWidget-kixqcLtx.js → FiledisplayWidget-CYznG_tf.js} +6 -6
  92. package/dist/{FiledisplayWidget-kixqcLtx.js.map → FiledisplayWidget-CYznG_tf.js.map} +1 -1
  93. package/dist/{FormatvalueWidget--djAS0BE.js → FormatvalueWidget-BnVu4YGx.js} +6 -6
  94. package/dist/{FormatvalueWidget--djAS0BE.js.map → FormatvalueWidget-BnVu4YGx.js.map} +1 -1
  95. package/dist/{FormatvalueWidget-I1y_kf9t.cjs → FormatvalueWidget-BpFXnA_U.cjs} +2 -2
  96. package/dist/{FormatvalueWidget-I1y_kf9t.cjs.map → FormatvalueWidget-BpFXnA_U.cjs.map} +1 -1
  97. package/dist/{Graph-GhpiUBKI.js → Graph-CUFzx8Ti.js} +289 -281
  98. package/dist/Graph-CUFzx8Ti.js.map +1 -0
  99. package/dist/Graph-qxF4224c.cjs +2 -0
  100. package/dist/Graph-qxF4224c.cjs.map +1 -0
  101. package/dist/{GraphWidget-Bzo-klWV.cjs → GraphWidget-BvCQHVxQ.cjs} +2 -2
  102. package/dist/{GraphWidget-Bzo-klWV.cjs.map → GraphWidget-BvCQHVxQ.cjs.map} +1 -1
  103. package/dist/{GraphWidget-8T08osON.js → GraphWidget-DO5XbOGy.js} +2 -2
  104. package/dist/{GraphWidget-8T08osON.js.map → GraphWidget-DO5XbOGy.js.map} +1 -1
  105. package/dist/{HorizontalWidget-CusI1RiA.js → HorizontalWidget-BA9PiP3d.js} +4 -4
  106. package/dist/{HorizontalWidget-CusI1RiA.js.map → HorizontalWidget-BA9PiP3d.js.map} +1 -1
  107. package/dist/{HorizontalWidget-CAf9I0CU.cjs → HorizontalWidget-BBQE-dP-.cjs} +2 -2
  108. package/dist/{HorizontalWidget-CAf9I0CU.cjs.map → HorizontalWidget-BBQE-dP-.cjs.map} +1 -1
  109. package/dist/{HorizontalboxWidget-D5fIhINf.js → HorizontalboxWidget-B-7HOqgl.js} +7 -7
  110. package/dist/{HorizontalboxWidget-D5fIhINf.js.map → HorizontalboxWidget-B-7HOqgl.js.map} +1 -1
  111. package/dist/{HorizontalboxWidget-B7E5GEPu.cjs → HorizontalboxWidget-CX7J8RdA.cjs} +2 -2
  112. package/dist/{HorizontalboxWidget-B7E5GEPu.cjs.map → HorizontalboxWidget-CX7J8RdA.cjs.map} +1 -1
  113. package/dist/HorizontallineWidget-D-o9MGo0.js +16 -0
  114. package/dist/{HorizontallineWidget-CnRlq7hi.js.map → HorizontallineWidget-D-o9MGo0.js.map} +1 -1
  115. package/dist/{HorizontallineWidget-DqLKGhdz.cjs → HorizontallineWidget-odTFoB8u.cjs} +2 -2
  116. package/dist/{HorizontallineWidget-DqLKGhdz.cjs.map → HorizontallineWidget-odTFoB8u.cjs.map} +1 -1
  117. package/dist/{IframeWidget-DtF44NYM.js → IframeWidget-BzOka-fX.js} +5 -5
  118. package/dist/{IframeWidget-DtF44NYM.js.map → IframeWidget-BzOka-fX.js.map} +1 -1
  119. package/dist/{IframeWidget-BMtv8io0.cjs → IframeWidget-cTHu_Rmp.cjs} +2 -2
  120. package/dist/{IframeWidget-BMtv8io0.cjs.map → IframeWidget-cTHu_Rmp.cjs.map} +1 -1
  121. package/dist/{ImageLoader-jcIDHdUq.cjs → ImageLoader-BTEOukIw.cjs} +2 -2
  122. package/dist/{ImageLoader-jcIDHdUq.cjs.map → ImageLoader-BTEOukIw.cjs.map} +1 -1
  123. package/dist/{ImageLoader-B5rGuJ_H.js → ImageLoader-CstmWFM4.js} +2 -2
  124. package/dist/{ImageLoader-B5rGuJ_H.js.map → ImageLoader-CstmWFM4.js.map} +1 -1
  125. package/dist/{ImageviewerWidget-Ciu80vaC.js → ImageviewerWidget-BA9uOM1q.js} +5 -5
  126. package/dist/{ImageviewerWidget-Ciu80vaC.js.map → ImageviewerWidget-BA9uOM1q.js.map} +1 -1
  127. package/dist/{ImageviewerWidget-ox5FNYVP.cjs → ImageviewerWidget-CLAFwmaB.cjs} +2 -2
  128. package/dist/{ImageviewerWidget-ox5FNYVP.cjs.map → ImageviewerWidget-CLAFwmaB.cjs.map} +1 -1
  129. package/dist/{InterfacesTab-C14LErLZ.js → InterfacesTab-C3mDLkGC.js} +9 -9
  130. package/dist/{InterfacesTab-C14LErLZ.js.map → InterfacesTab-C3mDLkGC.js.map} +1 -1
  131. package/dist/{InterfacesTab-CUM5GGWs.cjs → InterfacesTab-CM0CGFVS.cjs} +2 -2
  132. package/dist/{InterfacesTab-CUM5GGWs.cjs.map → InterfacesTab-CM0CGFVS.cjs.map} +1 -1
  133. package/dist/{LabelWidget-B9J1Whh0.cjs → LabelWidget-CMmVq1mx.cjs} +2 -2
  134. package/dist/{LabelWidget-B9J1Whh0.cjs.map → LabelWidget-CMmVq1mx.cjs.map} +1 -1
  135. package/dist/{LabelWidget-78VnL1xc.js → LabelWidget-Da2howZF.js} +5 -5
  136. package/dist/{LabelWidget-78VnL1xc.js.map → LabelWidget-Da2howZF.js.map} +1 -1
  137. package/dist/{LabelledWidget-Cx2PI85E.js → LabelledWidget-BH8y3OXT.js} +7 -7
  138. package/dist/{LabelledWidget-Cx2PI85E.js.map → LabelledWidget-BH8y3OXT.js.map} +1 -1
  139. package/dist/{LabelledWidget-BMtqUP-E.cjs → LabelledWidget-CAqH0oWs.cjs} +2 -2
  140. package/dist/{LabelledWidget-BMtqUP-E.cjs.map → LabelledWidget-CAqH0oWs.cjs.map} +1 -1
  141. package/dist/{LabelprogressbarWidget-eC7VC7lY.js → LabelprogressbarWidget-Brl24F4c.js} +7 -7
  142. package/dist/{LabelprogressbarWidget-eC7VC7lY.js.map → LabelprogressbarWidget-Brl24F4c.js.map} +1 -1
  143. package/dist/{LabelprogressbarWidget-Ce3PRzaA.cjs → LabelprogressbarWidget-BxLGmW9T.cjs} +2 -2
  144. package/dist/{LabelprogressbarWidget-Ce3PRzaA.cjs.map → LabelprogressbarWidget-BxLGmW9T.cjs.map} +1 -1
  145. package/dist/{LabelsparklineWidget-DuCA67yl.cjs → LabelsparklineWidget-BUXOpBeB.cjs} +2 -2
  146. package/dist/{LabelsparklineWidget-DuCA67yl.cjs.map → LabelsparklineWidget-BUXOpBeB.cjs.map} +1 -1
  147. package/dist/{LabelsparklineWidget-CP5rD4ob.js → LabelsparklineWidget-D22MB7-4.js} +7 -7
  148. package/dist/{LabelsparklineWidget-CP5rD4ob.js.map → LabelsparklineWidget-D22MB7-4.js.map} +1 -1
  149. package/dist/{LabelvalueWidget-PM8DFnDm.js → LabelvalueWidget-_1JPbK-K.js} +7 -7
  150. package/dist/{LabelvalueWidget-PM8DFnDm.js.map → LabelvalueWidget-_1JPbK-K.js.map} +1 -1
  151. package/dist/{LabelvalueWidget-DxEvAoHT.cjs → LabelvalueWidget-bYqqgIGE.cjs} +2 -2
  152. package/dist/{LabelvalueWidget-DxEvAoHT.cjs.map → LabelvalueWidget-bYqqgIGE.cjs.map} +1 -1
  153. package/dist/{LabelvaluedescWidget-Dy3_fdkx.cjs → LabelvaluedescWidget-B2dFZoDE.cjs} +2 -2
  154. package/dist/{LabelvaluedescWidget-Dy3_fdkx.cjs.map → LabelvaluedescWidget-B2dFZoDE.cjs.map} +1 -1
  155. package/dist/{LabelvaluedescWidget-C8OmKnu-.js → LabelvaluedescWidget-BgduSJJb.js} +8 -8
  156. package/dist/{LabelvaluedescWidget-C8OmKnu-.js.map → LabelvaluedescWidget-BgduSJJb.js.map} +1 -1
  157. package/dist/{LabelvaluelimitsbarWidget-DWvSVvXl.cjs → LabelvaluelimitsbarWidget-BGag8V6k.cjs} +2 -2
  158. package/dist/{LabelvaluelimitsbarWidget-DWvSVvXl.cjs.map → LabelvaluelimitsbarWidget-BGag8V6k.cjs.map} +1 -1
  159. package/dist/{LabelvaluelimitsbarWidget-DIsTQqkO.js → LabelvaluelimitsbarWidget-C9PlEhWo.js} +7 -7
  160. package/dist/{LabelvaluelimitsbarWidget-DIsTQqkO.js.map → LabelvaluelimitsbarWidget-C9PlEhWo.js.map} +1 -1
  161. package/dist/{LabelvaluelimitscolumnWidget-ld556rRi.js → LabelvaluelimitscolumnWidget-Cay6AhoZ.js} +8 -8
  162. package/dist/{LabelvaluelimitscolumnWidget-ld556rRi.js.map → LabelvaluelimitscolumnWidget-Cay6AhoZ.js.map} +1 -1
  163. package/dist/{LabelvaluelimitscolumnWidget-CyPuEz7E.cjs → LabelvaluelimitscolumnWidget-SHVJIgGJ.cjs} +2 -2
  164. package/dist/{LabelvaluelimitscolumnWidget-CyPuEz7E.cjs.map → LabelvaluelimitscolumnWidget-SHVJIgGJ.cjs.map} +1 -1
  165. package/dist/{LabelvaluerangebarWidget-DdqgjjUc.cjs → LabelvaluerangebarWidget-Dbibpimv.cjs} +2 -2
  166. package/dist/{LabelvaluerangebarWidget-DdqgjjUc.cjs.map → LabelvaluerangebarWidget-Dbibpimv.cjs.map} +1 -1
  167. package/dist/{LabelvaluerangebarWidget-nCeoujui.js → LabelvaluerangebarWidget-s_8IgY-C.js} +7 -7
  168. package/dist/{LabelvaluerangebarWidget-nCeoujui.js.map → LabelvaluerangebarWidget-s_8IgY-C.js.map} +1 -1
  169. package/dist/{Layout-BcytiBn4.js → Layout-D7RGn0Fe.js} +2 -2
  170. package/dist/{Layout-BcytiBn4.js.map → Layout-D7RGn0Fe.js.map} +1 -1
  171. package/dist/{Layout-JCk8r88e.cjs → Layout-DwWEea79.cjs} +2 -2
  172. package/dist/{Layout-JCk8r88e.cjs.map → Layout-DwWEea79.cjs.map} +1 -1
  173. package/dist/{LedWidget-BEP-sFTh.cjs → LedWidget-BaiKDozd.cjs} +2 -2
  174. package/dist/{LedWidget-BEP-sFTh.cjs.map → LedWidget-BaiKDozd.cjs.map} +1 -1
  175. package/dist/{LedWidget-3pWKnZsD.js → LedWidget-DgMtvsiv.js} +6 -6
  176. package/dist/{LedWidget-3pWKnZsD.js.map → LedWidget-DgMtvsiv.js.map} +1 -1
  177. package/dist/{LimitsBar-BJ_cERjE.cjs → LimitsBar-BFM38vQL.cjs} +2 -2
  178. package/dist/{LimitsBar-BJ_cERjE.cjs.map → LimitsBar-BFM38vQL.cjs.map} +1 -1
  179. package/dist/{LimitsBar-DCco6Rwp.js → LimitsBar-CcOaAw0C.js} +7 -7
  180. package/dist/{LimitsBar-DCco6Rwp.js.map → LimitsBar-CcOaAw0C.js.map} +1 -1
  181. package/dist/{LimitsbarWidget-DiAnkXID.cjs → LimitsbarWidget-ConP3qI5.cjs} +2 -2
  182. package/dist/{LimitsbarWidget-DiAnkXID.cjs.map → LimitsbarWidget-ConP3qI5.cjs.map} +1 -1
  183. package/dist/{LimitsbarWidget-_BMzxWBm.js → LimitsbarWidget-DpmJn1Lo.js} +7 -7
  184. package/dist/{LimitsbarWidget-_BMzxWBm.js.map → LimitsbarWidget-DpmJn1Lo.js.map} +1 -1
  185. package/dist/{LimitscolorWidget-C2gZyqtI.js → LimitscolorWidget-BMXiEaDm.js} +20 -20
  186. package/dist/{LimitscolorWidget-C2gZyqtI.js.map → LimitscolorWidget-BMXiEaDm.js.map} +1 -1
  187. package/dist/{LimitscolorWidget-ByfzIE_O.cjs → LimitscolorWidget-veWQ4NXl.cjs} +2 -2
  188. package/dist/{LimitscolorWidget-ByfzIE_O.cjs.map → LimitscolorWidget-veWQ4NXl.cjs.map} +1 -1
  189. package/dist/{LimitscolumnWidget-CZwcXbLS.cjs → LimitscolumnWidget-CJABAor8.cjs} +2 -2
  190. package/dist/{LimitscolumnWidget-CZwcXbLS.cjs.map → LimitscolumnWidget-CJABAor8.cjs.map} +1 -1
  191. package/dist/{LimitscolumnWidget-Cv-6FXU3.js → LimitscolumnWidget-ufFMz6R-.js} +5 -5
  192. package/dist/{LimitscolumnWidget-Cv-6FXU3.js.map → LimitscolumnWidget-ufFMz6R-.js.map} +1 -1
  193. package/dist/{LinegraphWidget-so5ohfWF.cjs → LinegraphWidget-3E8L5CvM.cjs} +2 -2
  194. package/dist/{LinegraphWidget-so5ohfWF.cjs.map → LinegraphWidget-3E8L5CvM.cjs.map} +1 -1
  195. package/dist/{LinegraphWidget-BahyhwSt.js → LinegraphWidget-BC2wVOny.js} +7 -7
  196. package/dist/{LinegraphWidget-BahyhwSt.js.map → LinegraphWidget-BC2wVOny.js.map} +1 -1
  197. package/dist/{MatrixbycolumnsWidget-Dma8IsO-.cjs → MatrixbycolumnsWidget-DICgiNQo.cjs} +2 -2
  198. package/dist/{MatrixbycolumnsWidget-Dma8IsO-.cjs.map → MatrixbycolumnsWidget-DICgiNQo.cjs.map} +1 -1
  199. package/dist/{MatrixbycolumnsWidget-B1Hy9but.js → MatrixbycolumnsWidget-DfUAeBnO.js} +5 -5
  200. package/dist/{MatrixbycolumnsWidget-B1Hy9but.js.map → MatrixbycolumnsWidget-DfUAeBnO.js.map} +1 -1
  201. package/dist/{MicroservicesTab-BSXNA_Si.js → MicroservicesTab-B0SZVty3.js} +67 -62
  202. package/dist/MicroservicesTab-B0SZVty3.js.map +1 -0
  203. package/dist/MicroservicesTab-snXJDoYq.cjs +4 -0
  204. package/dist/MicroservicesTab-snXJDoYq.cjs.map +1 -0
  205. package/dist/{OpenC3TimePicker-LN9R7V31.js → OpenC3TimePicker-DpkbfbgC.js} +5 -5
  206. package/dist/{OpenC3TimePicker-LN9R7V31.js.map → OpenC3TimePicker-DpkbfbgC.js.map} +1 -1
  207. package/dist/{OpenC3TimePicker-BHX9fnlR.cjs → OpenC3TimePicker-Yl1jVi7p.cjs} +2 -2
  208. package/dist/{OpenC3TimePicker-BHX9fnlR.cjs.map → OpenC3TimePicker-Yl1jVi7p.cjs.map} +1 -1
  209. package/dist/{Openc3Screen-CJOTF-lu.cjs → Openc3Screen-D1RLlBgQ.cjs} +5 -5
  210. package/dist/Openc3Screen-D1RLlBgQ.cjs.map +1 -0
  211. package/dist/{Openc3Screen-BP7Ho9XC.js → Openc3Screen-DbUvz-3B.js} +254 -254
  212. package/dist/Openc3Screen-DbUvz-3B.js.map +1 -0
  213. package/dist/{OutputDialog-Dx5mkq19.cjs → OutputDialog-ChPCaQAE.cjs} +2 -2
  214. package/dist/{OutputDialog-Dx5mkq19.cjs.map → OutputDialog-ChPCaQAE.cjs.map} +1 -1
  215. package/dist/{OutputDialog-JdAxzpPD.js → OutputDialog-Ds-GdGyI.js} +5 -5
  216. package/dist/{OutputDialog-JdAxzpPD.js.map → OutputDialog-Ds-GdGyI.js.map} +1 -1
  217. package/dist/PackagesTab-BgQsbXRo.cjs +2 -0
  218. package/dist/PackagesTab-BgQsbXRo.cjs.map +1 -0
  219. package/dist/{PackagesTab-ByfVH001.js → PackagesTab-CWplBp_I.js} +70 -66
  220. package/dist/PackagesTab-CWplBp_I.js.map +1 -0
  221. package/dist/{PluginsTab-D7zpmf8s.js → PluginsTab-BiiL622n.js} +486 -448
  222. package/dist/PluginsTab-BiiL622n.js.map +1 -0
  223. package/dist/PluginsTab-RgIMk-F7.cjs +6 -0
  224. package/dist/PluginsTab-RgIMk-F7.cjs.map +1 -0
  225. package/dist/{ProgressbarWidget-mAVHKeok.js → ProgressbarWidget-D3ndYnq_.js} +5 -5
  226. package/dist/{ProgressbarWidget-mAVHKeok.js.map → ProgressbarWidget-D3ndYnq_.js.map} +1 -1
  227. package/dist/{ProgressbarWidget-BINuoD9p.cjs → ProgressbarWidget-DludJVUf.cjs} +2 -2
  228. package/dist/{ProgressbarWidget-BINuoD9p.cjs.map → ProgressbarWidget-DludJVUf.cjs.map} +1 -1
  229. package/dist/{RadiobuttonWidget-CL3QjTnZ.js → RadiobuttonWidget-CP0S9nWW.js} +5 -5
  230. package/dist/{RadiobuttonWidget-CL3QjTnZ.js.map → RadiobuttonWidget-CP0S9nWW.js.map} +1 -1
  231. package/dist/{RadiobuttonWidget-DDmgt0su.cjs → RadiobuttonWidget-DX4h94p1.cjs} +2 -2
  232. package/dist/{RadiobuttonWidget-DDmgt0su.cjs.map → RadiobuttonWidget-DX4h94p1.cjs.map} +1 -1
  233. package/dist/{RadiogroupWidget-RUwgtUTC.js → RadiogroupWidget-BXHfA21T.js} +4 -4
  234. package/dist/{RadiogroupWidget-RUwgtUTC.js.map → RadiogroupWidget-BXHfA21T.js.map} +1 -1
  235. package/dist/{RadiogroupWidget-q7h1v-ko.cjs → RadiogroupWidget-NqjBNUH6.cjs} +2 -2
  236. package/dist/{RadiogroupWidget-q7h1v-ko.cjs.map → RadiogroupWidget-NqjBNUH6.cjs.map} +1 -1
  237. package/dist/{RangebarWidget-CfDsKLZc.js → RangebarWidget-Bv2DqkPo.js} +5 -5
  238. package/dist/{RangebarWidget-CfDsKLZc.js.map → RangebarWidget-Bv2DqkPo.js.map} +1 -1
  239. package/dist/{RangebarWidget-BbPMpwMs.cjs → RangebarWidget-CRq2zpvw.cjs} +2 -2
  240. package/dist/{RangebarWidget-BbPMpwMs.cjs.map → RangebarWidget-CRq2zpvw.cjs.map} +1 -1
  241. package/dist/{RedisTab-YrX-5A3T.js → RedisTab-7TbOXFA_.js} +9 -9
  242. package/dist/{RedisTab-YrX-5A3T.js.map → RedisTab-7TbOXFA_.js.map} +1 -1
  243. package/dist/{RedisTab-dZE6KvLS.cjs → RedisTab-DpWPY1P0.cjs} +2 -2
  244. package/dist/{RedisTab-dZE6KvLS.cjs.map → RedisTab-DpWPY1P0.cjs.map} +1 -1
  245. package/dist/{RollupWidget-BmgRFIOo.cjs → RollupWidget-B7_Q_boi.cjs} +2 -2
  246. package/dist/{RollupWidget-BmgRFIOo.cjs.map → RollupWidget-B7_Q_boi.cjs.map} +1 -1
  247. package/dist/{RollupWidget-DCMoQUeJ.js → RollupWidget-o_huYU0x.js} +5 -5
  248. package/dist/{RollupWidget-DCMoQUeJ.js.map → RollupWidget-o_huYU0x.js.map} +1 -1
  249. package/dist/{RoutersTab-C6vejQrw.cjs → RoutersTab-CAbnSGHy.cjs} +2 -2
  250. package/dist/{RoutersTab-C6vejQrw.cjs.map → RoutersTab-CAbnSGHy.cjs.map} +1 -1
  251. package/dist/{RoutersTab-MA9KW_gu.js → RoutersTab-DN17iBBi.js} +9 -9
  252. package/dist/{RoutersTab-MA9KW_gu.js.map → RoutersTab-DN17iBBi.js.map} +1 -1
  253. package/dist/{ScriptChooser-Cm_HEyBf.cjs → ScriptChooser-CggwstfT.cjs} +2 -2
  254. package/dist/{ScriptChooser-Cm_HEyBf.cjs.map → ScriptChooser-CggwstfT.cjs.map} +1 -1
  255. package/dist/{ScriptChooser-DGbs03IW.js → ScriptChooser-CzzUJ1Zj.js} +6 -6
  256. package/dist/{ScriptChooser-DGbs03IW.js.map → ScriptChooser-CzzUJ1Zj.js.map} +1 -1
  257. package/dist/{ScrollwindowWidget-DarXe7-1.js → ScrollwindowWidget-DdjaML6D.js} +4 -4
  258. package/dist/{ScrollwindowWidget-DarXe7-1.js.map → ScrollwindowWidget-DdjaML6D.js.map} +1 -1
  259. package/dist/{ScrollwindowWidget-BbASNNcM.cjs → ScrollwindowWidget-kS5QjP-v.cjs} +2 -2
  260. package/dist/{ScrollwindowWidget-BbASNNcM.cjs.map → ScrollwindowWidget-kS5QjP-v.cjs.map} +1 -1
  261. package/dist/{SecretsTab-DwE3KJNI.cjs → SecretsTab-Cn6-o85L.cjs} +2 -2
  262. package/dist/{SecretsTab-DwE3KJNI.cjs.map → SecretsTab-Cn6-o85L.cjs.map} +1 -1
  263. package/dist/{SecretsTab-DTaPAHv3.js → SecretsTab-Cu3sx2OA.js} +4 -4
  264. package/dist/{SecretsTab-DTaPAHv3.js.map → SecretsTab-Cu3sx2OA.js.map} +1 -1
  265. package/dist/{SettingsTab-BhT5sui9.js → SettingsTab-B_vvSLvt.js} +6 -6
  266. package/dist/{SettingsTab-BhT5sui9.js.map → SettingsTab-B_vvSLvt.js.map} +1 -1
  267. package/dist/{SettingsTab-o9tfAuE4.cjs → SettingsTab-C6zIL2D6.cjs} +2 -2
  268. package/dist/{SettingsTab-o9tfAuE4.cjs.map → SettingsTab-C6zIL2D6.cjs.map} +1 -1
  269. package/dist/{SignalWidget-CO3UaFok.cjs → SignalWidget-BagcB92r.cjs} +2 -2
  270. package/dist/{SignalWidget-CO3UaFok.cjs.map → SignalWidget-BagcB92r.cjs.map} +1 -1
  271. package/dist/{SignalWidget-C-iEC5KL.js → SignalWidget-Dd54y28I.js} +5 -5
  272. package/dist/{SignalWidget-C-iEC5KL.js.map → SignalWidget-Dd54y28I.js.map} +1 -1
  273. package/dist/{SimpleTextDialog-B9ZurpdS.cjs → SimpleTextDialog-BJ50TbWh.cjs} +2 -2
  274. package/dist/{SimpleTextDialog-B9ZurpdS.cjs.map → SimpleTextDialog-BJ50TbWh.cjs.map} +1 -1
  275. package/dist/{SimpleTextDialog-Bqh3eT2B.js → SimpleTextDialog-DZv9n_kJ.js} +5 -5
  276. package/dist/{SimpleTextDialog-Bqh3eT2B.js.map → SimpleTextDialog-DZv9n_kJ.js.map} +1 -1
  277. package/dist/{SpacerWidget-CQh-LB4u.cjs → SpacerWidget-DWjBns9r.cjs} +2 -2
  278. package/dist/{SpacerWidget-CQh-LB4u.cjs.map → SpacerWidget-DWjBns9r.cjs.map} +1 -1
  279. package/dist/{SpacerWidget-FHxUhs1G.js → SpacerWidget-GPFYtIG1.js} +5 -5
  280. package/dist/{SpacerWidget-FHxUhs1G.js.map → SpacerWidget-GPFYtIG1.js.map} +1 -1
  281. package/dist/{SparklineWidget-ClT5Umm2.js → SparklineWidget-f11nrlLS.js} +7 -7
  282. package/dist/{SparklineWidget-ClT5Umm2.js.map → SparklineWidget-f11nrlLS.js.map} +1 -1
  283. package/dist/{SparklineWidget-BsMIozYC.cjs → SparklineWidget-xdPgolp3.cjs} +2 -2
  284. package/dist/{SparklineWidget-BsMIozYC.cjs.map → SparklineWidget-xdPgolp3.cjs.map} +1 -1
  285. package/dist/{TabbookWidget-So-oaWd4.cjs → TabbookWidget-CUIYWHRH.cjs} +2 -2
  286. package/dist/{TabbookWidget-So-oaWd4.cjs.map → TabbookWidget-CUIYWHRH.cjs.map} +1 -1
  287. package/dist/{TabbookWidget-D-b0v0oo.js → TabbookWidget-DeaC27yC.js} +4 -4
  288. package/dist/{TabbookWidget-D-b0v0oo.js.map → TabbookWidget-DeaC27yC.js.map} +1 -1
  289. package/dist/{TargetPacketItemChooser-DD7JgCD9.js → TargetPacketItemChooser-BoBqvs3T.js} +23 -23
  290. package/dist/TargetPacketItemChooser-BoBqvs3T.js.map +1 -0
  291. package/dist/TargetPacketItemChooser-C0Z90rss.cjs +2 -0
  292. package/dist/TargetPacketItemChooser-C0Z90rss.cjs.map +1 -0
  293. package/dist/{TargetsTab-BD0JGvAl.cjs → TargetsTab-BMcWjrZ_.cjs} +2 -2
  294. package/dist/{TargetsTab-BD0JGvAl.cjs.map → TargetsTab-BMcWjrZ_.cjs.map} +1 -1
  295. package/dist/{TargetsTab-hTLe_rba.js → TargetsTab-CjVaBN9O.js} +11 -11
  296. package/dist/{TargetsTab-hTLe_rba.js.map → TargetsTab-CjVaBN9O.js.map} +1 -1
  297. package/dist/{TextBoxDialog-BRwZOtzT.js → TextBoxDialog-R6GC8pMa.js} +4 -4
  298. package/dist/{TextBoxDialog-BRwZOtzT.js.map → TextBoxDialog-R6GC8pMa.js.map} +1 -1
  299. package/dist/{TextboxWidget-CF4iq315.cjs → TextboxWidget-CXA9rR02.cjs} +2 -2
  300. package/dist/{TextboxWidget-CF4iq315.cjs.map → TextboxWidget-CXA9rR02.cjs.map} +1 -1
  301. package/dist/{TextboxWidget-WM3eFUR_.js → TextboxWidget-tL41zWUX.js} +6 -6
  302. package/dist/{TextboxWidget-WM3eFUR_.js.map → TextboxWidget-tL41zWUX.js.map} +1 -1
  303. package/dist/{TextfieldWidget-D9BINKRU.cjs → TextfieldWidget-D-H2fOZG.cjs} +2 -2
  304. package/dist/{TextfieldWidget-D9BINKRU.cjs.map → TextfieldWidget-D-H2fOZG.cjs.map} +1 -1
  305. package/dist/{TextfieldWidget-lfc1Vg51.js → TextfieldWidget-D1qj14Qi.js} +5 -5
  306. package/dist/{TextfieldWidget-lfc1Vg51.js.map → TextfieldWidget-D1qj14Qi.js.map} +1 -1
  307. package/dist/{TimeWidget-CgtJbnnC.cjs → TimeWidget-CGk8Ze_I.cjs} +2 -2
  308. package/dist/{TimeWidget-CgtJbnnC.cjs.map → TimeWidget-CGk8Ze_I.cjs.map} +1 -1
  309. package/dist/{TimeWidget-B13aIVqG.js → TimeWidget-CSVGNong.js} +6 -6
  310. package/dist/{TimeWidget-B13aIVqG.js.map → TimeWidget-CSVGNong.js.map} +1 -1
  311. package/dist/{TitleWidget-CTAMgzU4.js → TitleWidget-CLx-tuYT.js} +5 -5
  312. package/dist/{TitleWidget-CTAMgzU4.js.map → TitleWidget-CLx-tuYT.js.map} +1 -1
  313. package/dist/{TitleWidget-BV2sDP_-.cjs → TitleWidget-ClhWhUf3.cjs} +2 -2
  314. package/dist/{TitleWidget-BV2sDP_-.cjs.map → TitleWidget-ClhWhUf3.cjs.map} +1 -1
  315. package/dist/{ToolsTab-DXK-L-kx.cjs → ToolsTab-DTHap-Nq.cjs} +2 -2
  316. package/dist/{ToolsTab-DXK-L-kx.cjs.map → ToolsTab-DTHap-Nq.cjs.map} +1 -1
  317. package/dist/{ToolsTab-CmhRtClS.js → ToolsTab-lBB_KhmA.js} +10 -10
  318. package/dist/{ToolsTab-CmhRtClS.js.map → ToolsTab-lBB_KhmA.js.map} +1 -1
  319. package/dist/{TopBar-D-lJHb6d.js → TopBar-C810rP_B.js} +4 -4
  320. package/dist/{TopBar-D-lJHb6d.js.map → TopBar-C810rP_B.js.map} +1 -1
  321. package/dist/{TopBar-BiE7GgIN.cjs → TopBar-Ctzx7o2k.cjs} +2 -2
  322. package/dist/{TopBar-BiE7GgIN.cjs.map → TopBar-Ctzx7o2k.cjs.map} +1 -1
  323. package/dist/TsdbTab-7F4mRKDo.js +125 -0
  324. package/dist/TsdbTab-7F4mRKDo.js.map +1 -0
  325. package/dist/TsdbTab-DVF6n9mq.cjs +2 -0
  326. package/dist/TsdbTab-DVF6n9mq.cjs.map +1 -0
  327. package/dist/{UpgradeToEnterpriseDialog-et3RrozN.js → UpgradeToEnterpriseDialog-D_S574Zb.js} +6 -6
  328. package/dist/{UpgradeToEnterpriseDialog-et3RrozN.js.map → UpgradeToEnterpriseDialog-D_S574Zb.js.map} +1 -1
  329. package/dist/{UpgradeToEnterpriseDialog-D1_viCAx.cjs → UpgradeToEnterpriseDialog-XJb6gVCY.cjs} +2 -2
  330. package/dist/{UpgradeToEnterpriseDialog-D1_viCAx.cjs.map → UpgradeToEnterpriseDialog-XJb6gVCY.cjs.map} +1 -1
  331. package/dist/{UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-D0cYHPwr.js → UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BJxLUZhh.js} +11973 -11975
  332. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-BJxLUZhh.js.map +1 -0
  333. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-eKtA_EtD.cjs +1485 -0
  334. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-eKtA_EtD.cjs.map +1 -0
  335. package/dist/{VWidget-0kkhOxhV.js → VWidget-CxnaMF0w.js} +3 -3
  336. package/dist/{VWidget-0kkhOxhV.js.map → VWidget-CxnaMF0w.js.map} +1 -1
  337. package/dist/{VWidget-Dkji3VZ0.cjs → VWidget-dEHSEvZx.cjs} +2 -2
  338. package/dist/{VWidget-Dkji3VZ0.cjs.map → VWidget-dEHSEvZx.cjs.map} +1 -1
  339. package/dist/{ValueWidget-BoQfnx8U.js → ValueWidget-BYgpXfDo.js} +6 -6
  340. package/dist/{ValueWidget-BoQfnx8U.js.map → ValueWidget-BYgpXfDo.js.map} +1 -1
  341. package/dist/{ValueWidget-mkXMZvdK.cjs → ValueWidget-Bws1qOEI.cjs} +2 -2
  342. package/dist/{ValueWidget-mkXMZvdK.cjs.map → ValueWidget-Bws1qOEI.cjs.map} +1 -1
  343. package/dist/{ValuelimitsbarWidget-B8IUYgYx.cjs → ValuelimitsbarWidget-BoZSJvuq.cjs} +2 -2
  344. package/dist/{ValuelimitsbarWidget-B8IUYgYx.cjs.map → ValuelimitsbarWidget-BoZSJvuq.cjs.map} +1 -1
  345. package/dist/{ValuelimitsbarWidget-ZfgwDNqX.js → ValuelimitsbarWidget-Dc9-VNZ3.js} +7 -7
  346. package/dist/{ValuelimitsbarWidget-ZfgwDNqX.js.map → ValuelimitsbarWidget-Dc9-VNZ3.js.map} +1 -1
  347. package/dist/{ValuelimitscolumnWidget-B3x9DknL.js → ValuelimitscolumnWidget-b7W8K3mR.js} +7 -7
  348. package/dist/{ValuelimitscolumnWidget-B3x9DknL.js.map → ValuelimitscolumnWidget-b7W8K3mR.js.map} +1 -1
  349. package/dist/{ValuelimitscolumnWidget-B7DigaiC.cjs → ValuelimitscolumnWidget-ta9i_tiy.cjs} +2 -2
  350. package/dist/{ValuelimitscolumnWidget-B7DigaiC.cjs.map → ValuelimitscolumnWidget-ta9i_tiy.cjs.map} +1 -1
  351. package/dist/{ValuerangebarWidget-40InNHft.js → ValuerangebarWidget-DmhczZQb.js} +7 -7
  352. package/dist/{ValuerangebarWidget-40InNHft.js.map → ValuerangebarWidget-DmhczZQb.js.map} +1 -1
  353. package/dist/{ValuerangebarWidget-DA4X0MuO.cjs → ValuerangebarWidget-Ips-beG6.cjs} +2 -2
  354. package/dist/{ValuerangebarWidget-DA4X0MuO.cjs.map → ValuerangebarWidget-Ips-beG6.cjs.map} +1 -1
  355. package/dist/{VerticalWidget-BiFa3xbs.cjs → VerticalWidget-BVt7QPjO.cjs} +2 -2
  356. package/dist/{VerticalWidget-BiFa3xbs.cjs.map → VerticalWidget-BVt7QPjO.cjs.map} +1 -1
  357. package/dist/{VerticalWidget-abr1X6L7.js → VerticalWidget-BvsVh0Ob.js} +4 -4
  358. package/dist/{VerticalWidget-abr1X6L7.js.map → VerticalWidget-BvsVh0Ob.js.map} +1 -1
  359. package/dist/{VerticalboxWidget-Cx30rcqe.cjs → VerticalboxWidget-CNoXT3YW.cjs} +2 -2
  360. package/dist/{VerticalboxWidget-Cx30rcqe.cjs.map → VerticalboxWidget-CNoXT3YW.cjs.map} +1 -1
  361. package/dist/{VerticalboxWidget-DsbB17o-.js → VerticalboxWidget-ClTCDCQN.js} +7 -7
  362. package/dist/{VerticalboxWidget-DsbB17o-.js.map → VerticalboxWidget-ClTCDCQN.js.map} +1 -1
  363. package/dist/{Widget-VL9FlMQp.cjs → Widget-CB_BtOFw.cjs} +2 -2
  364. package/dist/{Widget-VL9FlMQp.cjs.map → Widget-CB_BtOFw.cjs.map} +1 -1
  365. package/dist/{Widget-DksaxMdD.js → Widget-DRhVdCLP.js} +2 -2
  366. package/dist/{Widget-DksaxMdD.js.map → Widget-DRhVdCLP.js.map} +1 -1
  367. package/dist/components.cjs +1 -1
  368. package/dist/components.js +19 -19
  369. package/dist/icons.js +2 -2
  370. package/dist/{index-Qy49-kGB.cjs → index-3sXOEKCU.cjs} +4 -4
  371. package/dist/index-3sXOEKCU.cjs.map +1 -0
  372. package/dist/{index-DqKiZufS.cjs → index-B34azWgs.cjs} +4 -4
  373. package/dist/index-B34azWgs.cjs.map +1 -0
  374. package/dist/{index-C7Uj4U87.js → index-CJcL4_a4.js} +6 -6
  375. package/dist/index-CJcL4_a4.js.map +1 -0
  376. package/dist/{index-BRc4sKEF.js → index-GYAZJDxn.js} +75 -69
  377. package/dist/index-GYAZJDxn.js.map +1 -0
  378. package/dist/plugins.cjs +1 -1
  379. package/dist/plugins.cjs.map +1 -1
  380. package/dist/plugins.js +3 -3
  381. package/dist/plugins.js.map +1 -1
  382. package/dist/purify.es-4pyphLiB.cjs +3 -0
  383. package/dist/purify.es-4pyphLiB.cjs.map +1 -0
  384. package/dist/{purify.es-DcWaZU6I.js → purify.es-BPDBzHtc.js} +115 -115
  385. package/dist/purify.es-BPDBzHtc.js.map +1 -0
  386. package/dist/{settings-D3MxiRHY.cjs → settings-B0AhztTk.cjs} +2 -2
  387. package/dist/{settings-D3MxiRHY.cjs.map → settings-B0AhztTk.cjs.map} +1 -1
  388. package/dist/{settings-BDlsBCNk.js → settings-C2auUQwX.js} +2 -2
  389. package/dist/{settings-BDlsBCNk.js.map → settings-C2auUQwX.js.map} +1 -1
  390. package/dist/tools/admin.cjs +1 -1
  391. package/dist/tools/admin.js +1 -1
  392. package/dist/tools/base.cjs +1 -1
  393. package/dist/tools/base.js +9 -9
  394. package/dist/tools/calendar.cjs +1 -1
  395. package/dist/tools/calendar.js +1 -1
  396. package/dist/tools/scriptrunner.cjs +8 -8
  397. package/dist/tools/scriptrunner.cjs.map +1 -1
  398. package/dist/tools/scriptrunner.js +3185 -2986
  399. package/dist/tools/scriptrunner.js.map +1 -1
  400. package/dist/vue-common.css +1 -1
  401. package/dist/widgets.cjs +1 -1
  402. package/dist/widgets.js +65 -65
  403. package/package.json +10 -10
  404. package/dist/EventListDialog-CktWO2jn.js.map +0 -1
  405. package/dist/EventListDialog-EAGLDaHc.cjs +0 -2
  406. package/dist/EventListDialog-EAGLDaHc.cjs.map +0 -1
  407. package/dist/Graph-9_EZ9aQx.cjs +0 -2
  408. package/dist/Graph-9_EZ9aQx.cjs.map +0 -1
  409. package/dist/Graph-GhpiUBKI.js.map +0 -1
  410. package/dist/HorizontallineWidget-CnRlq7hi.js +0 -16
  411. package/dist/MicroservicesTab-ARGtrfOb.cjs +0 -4
  412. package/dist/MicroservicesTab-ARGtrfOb.cjs.map +0 -1
  413. package/dist/MicroservicesTab-BSXNA_Si.js.map +0 -1
  414. package/dist/Openc3Screen-BP7Ho9XC.js.map +0 -1
  415. package/dist/Openc3Screen-CJOTF-lu.cjs.map +0 -1
  416. package/dist/PackagesTab-ByfVH001.js.map +0 -1
  417. package/dist/PackagesTab-HPNAXhzf.cjs +0 -2
  418. package/dist/PackagesTab-HPNAXhzf.cjs.map +0 -1
  419. package/dist/PluginsTab-D7zpmf8s.js.map +0 -1
  420. package/dist/PluginsTab-DfmpvAYa.cjs +0 -6
  421. package/dist/PluginsTab-DfmpvAYa.cjs.map +0 -1
  422. package/dist/TargetPacketItemChooser-DD7JgCD9.js.map +0 -1
  423. package/dist/TargetPacketItemChooser-PqyXKRlT.cjs +0 -2
  424. package/dist/TargetPacketItemChooser-PqyXKRlT.cjs.map +0 -1
  425. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-D0cYHPwr.js.map +0 -1
  426. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs +0 -1485
  427. package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs.map +0 -1
  428. package/dist/index-BRc4sKEF.js.map +0 -1
  429. package/dist/index-C7Uj4U87.js.map +0 -1
  430. package/dist/index-DqKiZufS.cjs.map +0 -1
  431. package/dist/index-Qy49-kGB.cjs.map +0 -1
  432. package/dist/purify.es-B336bjAn.cjs +0 -3
  433. package/dist/purify.es-B336bjAn.cjs.map +0 -1
  434. package/dist/purify.es-DcWaZU6I.js.map +0 -1
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-DtL207xP.cjs"),e=require("vue"),z=require("../CustomIcon-8F08upeg.cjs"),ve=require("../timeFilters-CRNRsUsb.cjs");require("../store-CiS35N-w.cjs");require("single-spa");const me=require("../OutputDialog-Dx5mkq19.cjs"),$=require("../format-DOZQNf-X.cjs"),we=require("../index-DqKiZufS.cjs"),_e=require("../useContainerHeight-BEd4f2Lr.cjs"),J=require("../TopBar-BiE7GgIN.cjs"),pe=require("../ScriptChooser-Cm_HEyBf.cjs"),Ce=require("../fileIcon-BduOQcTc.cjs"),be=require("../CriticalCmdDialog-CCaStsM-.cjs"),L=require("../Openc3Screen-CJOTF-lu.cjs"),xe=require("../SimpleTextDialog-B9ZurpdS.cjs"),ke=require("../ClassificationBanners-DC__VXBX.cjs");require("../purify.es-B336bjAn.cjs");const Ve=require("../EventListDialog-EAGLDaHc.cjs"),ce=i=>{const t="(^|[{\\(\\s])",s="((\\s.+)|(\\(.+\\)))";return new RegExp(`${t}${i}${s}`)},ye=/\{/,Ne=/['"],\s?['"]/;class Se{constructor(){this.api=new V.yi,this.targets={},this.api.get_target_names().then(t=>{t.forEach(s=>{this.targets[s]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],L.getKeywords("cmd").then(t=>{this.cmdKeywordExpressions=t.data.map(ce)}),this.tlmKeywordExpressions=[],L.getKeywords("tlm").then(t=>{this.tlmKeywordExpressions=t.data.map(ce)})}async checkText(t){const{linesToCheck:s,linesToSkip:r}=t.split(`
2
- `).reduce((n,a,p)=>{if(a=a.trim(),a.match(/^#/))return n;const c=a.match(/^([^#'"]*(?:(?:"[^"]*"|'[^']*')[^#'"]*)*)(#.*)$/),g=c?c[1].trim():a,_=this.cmdKeywordExpressions.reduce((E,R)=>E||g.match(R),null),C=this.tlmKeywordExpressions.reduce((E,R)=>E||g.match(R),null);if(!_&&!C)return n;const x=(_||C)[2];if(!x)return n;const k=x.match(/[\(\s)]/);if(!k)return n;let S=x.substring(k.index+1).replace(/\)+.*$/,"");if(S.match(ye))return n.linesToSkip.push(p+1),n;const w=!!S.match(Ne);if(!w){const E=S.match(/^['"]/);if(E){const R=E[0],M=S.indexOf(R,1);M>0&&(S=S.substring(1,M))}}const T=S.split(w?",":" ");if(T.length<2)return n;const B={target:T[0],packet:T[1]};if(C)B.item=T[2];else{const E=T.slice(2);w?B.params=E.map(R=>R.split("=>")[0]):B.params=E.filter((R,M)=>M%2)}for(const E in B)typeof B[E]=="string"?B[E]=B[E].replace(/['"]/g,"").trim():B[E]=B[E].map(R=>R.replace(/['"]/g,"").trim());return n.linesToCheck.push({line:a,mnemonic:B,lineNumber:p+1}),n},{linesToCheck:[],linesToSkip:[]}),o=await this._checkLines(s);return{skipped:r.sort(),problems:o.sort((n,a)=>n.lineNumber-a.lineNumber)}}async _checkLines(t){const s=[],r=L.groupBy(t,o=>o.mnemonic.target);for(const o in r){if(!this.targets[o]){for(const a of r[o])s.push({...a,error:`Target "${o}" does not exist.`});continue}const n=L.groupBy(r[o],a=>a.mnemonic.packet);for(const a in n)for(const p of n[a]){const c=p.mnemonic.item?"tlm":"cmd";if(!this.targets[o][c]){const _=p.mnemonic.item?"get_all_tlm":"get_all_cmds",C=await this.api[_](o);this.targets[o][c]=C.reduce((v,x)=>(v[x.packet_name]=x.items.map(k=>k.name),v),{})}const g=this.targets[o][c][a];if(!g){s.push({...p,error:`${c==="tlm"?"Packet":"Command"} "${o} ${a}" does not exist.`});continue}if(p.mnemonic.item){if(!g.some(_=>_===p.mnemonic.item)){s.push({...p,error:`Item "${o} ${a} ${p.mnemonic.item}" does not exist.`});continue}}else for(const _ of p.mnemonic.params)if(!g.some(C=>C===_)){s.push({...p,error:`Command "${o} ${a}" param "${_}" does not exist.`});continue}}}return s}}const Ee={components:{OutputDialog:me.OutputDialog},mixins:[ve.TimeFilters],props:{tabId:{type:Number,default:null},curTab:{type:Number,default:null},connectInNewTab:Boolean},emits:["disconnect","close"],data(){return{api:null,timeZone:"local",activeTab:"completed",downloadScript:null,refreshTimer:null,runningSearch:"",runningScripts:[],runningTotal:0,runningLoading:!1,runningPage:1,runningItemsPerPage:10,runningHeaders:[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Stop",key:"stop",sortable:!1,filterable:!1}],completedSearch:"",completedScripts:[],completedTotal:0,completedLoading:!1,completedPage:1,completedItemsPerPage:10,completedHeaders:[{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Log",key:"log",sortable:!1,filterable:!1},{title:"Report",key:"report",sortable:!1,filterable:!1}],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:""}},watch:{activeTab(i){i==="running"?this.getRunningScripts():i==="completed"&&this.getCompletedScripts()}},created(){this.api=new V.yi,this.api.get_setting("time_zone").then(i=>{i&&(this.timeZone=i)}).catch(i=>{}),this.getRunningScripts(),this.getCompletedScripts(),this.refreshTimer=setInterval(()=>{this.activeTab==="running"&&this.getRunningScripts()},5e3)},beforeUnmount(){this.refreshTimer&&clearInterval(this.refreshTimer)},methods:{getRunningScripts:function(){this.runningLoading=!0;const i=(this.runningPage-1)*this.runningItemsPerPage;V.Fr.get(`/script-api/running-script?scope=DEFAULT&offset=${i}&limit=${this.runningItemsPerPage}`).then(t=>{const s=t.data.items||[],r=new Date;s.forEach(o=>{if(o.user_display=`${o.user_full_name} (${o.username})`,o.start_time){const n=new Date(o.start_time),a=r-n;if(o.start_time_formatted=this.formatDateTimeHMS(n,this.timeZone),a<0)o.duration="N/A";else if(a<1e3)o.duration="< 1s";else if(a<6e4)o.duration=`${Math.round(a/1e3)}s`;else if(a<36e5){const p=Math.floor(a/6e4),c=Math.round(a%6e4/1e3);o.duration=`${p}m ${c}s`}else{const p=Math.floor(a/36e5),c=Math.floor(a%36e5/6e4),g=Math.round(a%6e4/1e3);o.duration=`${p}h ${c}m ${g}s`}}else o.duration="N/A"}),this.runningScripts=s,this.runningTotal=t.data.total||s.length,this.runningLoading=!1}).catch(t=>{this.runningLoading=!1,this.$notify.caution({title:"Error Loading Running Scripts",body:t.message})})},updateRunningPage:function(i){this.runningPage=i,this.getRunningScripts()},updateRunningItemsPerPage:function(i){this.runningItemsPerPage=i,this.runningPage=1,this.getRunningScripts()},getCompletedScripts:function(){this.completedLoading=!0;const i=(this.completedPage-1)*this.completedItemsPerPage;V.Fr.get(`/script-api/completed-scripts?scope=DEFAULT&offset=${i}&limit=${this.completedItemsPerPage}`).then(t=>{const s=t.data.items||[];s.forEach(r=>{if(r.user_display=`${r.user_full_name} (${r.username})`,r.start_time&&r.end_time){const o=new Date(r.start_time),a=new Date(r.end_time)-o;if(r.start_time_formatted=this.formatDateTimeHMS(o,this.timeZone),a<0)r.duration="N/A";else if(a<1e3)r.duration="< 1s";else if(a<6e4)r.duration=`${Math.round(a/1e3)}s`;else if(a<36e5){const p=Math.floor(a/6e4),c=Math.round(a%6e4/1e3);r.duration=`${p}m ${c}s`}else{const p=Math.floor(a/36e5),c=Math.floor(a%36e5/6e4),g=Math.round(a%6e4/1e3);r.duration=`${p}h ${c}m ${g}s`}}else r.duration="N/A"}),this.completedScripts=s,this.completedTotal=t.data.total||s.length,this.completedLoading=!1}).catch(t=>{this.completedLoading=!1,this.$notify.caution({title:"Error Loading Completed Scripts",body:t.message})})},updateCompletedPage:function(i){this.completedPage=i,this.getCompletedScripts()},updateCompletedItemsPerPage:function(i){this.completedItemsPerPage=i,this.completedPage=1,this.getCompletedScripts()},showScript:function(i){this.dialogContent=JSON.stringify(i,null,2),this.dialogName="Script: "+i.name,this.dialogFilename="",this.showDialog=!0},connectScript:function(i){this.$emit("disconnect");const t={name:"ScriptRunner",params:{id:i.name}};if(this.connectInNewTab){let{href:s}=this.$router.resolve(t);window.open(s,"_blank")}else this.$router.push(t),this.$emit("close")},deleteScript:function(i){this.$dialog.confirm(`Are you sure you want to stop script: ${i.name} ${i.filename}?
3
- `,{okText:"Stop",cancelText:"Cancel"}).then(t=>V.Fr.post(`/script-api/running-script/${i.name}/delete`)).then(t=>{this.$notify.normal({body:`Stopped script: ${i.name} ${i.filename}`}),this.getRunningScripts()}).catch(t=>{t!==!0&&this.$notify.caution({body:`Failed to stop script: ${i.name} ${i.filename}`})})},viewScriptLog:function(i,t){let s=null;t==="report"?(this.dialogName="Report",s=i.report):(this.dialogName="Log",s=i.log),V.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(s)}?bucket=OPENC3_LOGS_BUCKET`).then(r=>{const o=s.split("/");this.dialogFilename=o[o.length-1],this.dialogContent=window.atob(r.data.contents),this.showDialog=!0})},downloadScriptLog:function(i,t,s="text"){let r=null;t==="report"?(this.dialogName="Report",r=i.report):(this.dialogName="Log",r=i.log),this.downloadScript=i,s==="ctrf"&&t==="report"?V.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(r)}?bucket=OPENC3_LOGS_BUCKET&format=ctrf`).then(o=>{const n=new Blob([window.atob(o.data.contents)],{type:"application/json"}),a=document.createElement("a");a.href=URL.createObjectURL(n),a.setAttribute("download",o.data.filename),a.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${r}`,body:`You may be able to download this log manually from the 'logs' bucket at ${r}`}),this.downloadScript=null}):V.Fr.get(`/openc3-api/storage/download/${encodeURIComponent(r)}?bucket=OPENC3_LOGS_BUCKET`).then(o=>{const n=r.split("/"),a=n[n.length-1],p=document.createElement("a");p.href=o.data.url,p.setAttribute("download",a),p.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${r}`,body:`You may be able to download this log manually from the 'logs' bucket at ${r}`}),this.downloadScript=null})}}},Te={key:0},Be={key:1};function Re(i,t,s,r,o,n){const a=e.resolveComponent("v-tab"),p=e.resolveComponent("v-tabs"),c=e.resolveComponent("v-spacer"),g=e.resolveComponent("v-btn"),_=e.resolveComponent("v-text-field"),C=e.resolveComponent("v-row"),v=e.resolveComponent("v-card-title"),x=e.resolveComponent("v-icon"),k=e.resolveComponent("v-data-table-server"),S=e.resolveComponent("v-window-item"),w=e.resolveComponent("v-list-item-title"),T=e.resolveComponent("v-list-item"),B=e.resolveComponent("v-list"),E=e.resolveComponent("v-menu"),R=e.resolveComponent("v-window"),M=e.resolveComponent("v-card"),H=e.resolveComponent("output-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(M,{flat:"",class:"tab-card"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:o.activeTab,"onUpdate:modelValue":t[0]||(t[0]=N=>o.activeTab=N),"bg-color":"var(--color-background-base-default)"},{default:e.withCtx(()=>[e.createVNode(a,{value:"running"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Running Scripts",-1)])]),_:1}),e.createVNode(a,{value:"completed"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("Completed Scripts",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(R,{modelValue:o.activeTab,"onUpdate:modelValue":t[3]||(t[3]=N=>o.activeTab=N)},{default:e.withCtx(()=>[e.createVNode(S,{value:"running"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(C,{dense:""},{default:e.withCtx(()=>[e.createVNode(c),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getRunningScripts},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{modelValue:o.runningSearch,"onUpdate:modelValue":t[1]||(t[1]=N=>o.runningSearch=N),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.runningHeaders,items:o.runningScripts,"items-length":o.runningTotal,loading:o.runningLoading,search:o.runningSearch,density:"compact","data-test":"running-scripts","items-per-page":o.runningItemsPerPage,page:o.runningPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateRunningPage,"onUpdate:itemsPerPage":n.updateRunningItemsPerPage},{"item.name":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:D=>n.showScript(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"])]),"item.connect":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",onClick:D=>n.connectScript(N)},{default:e.withCtx(()=>[t[10]||(t[10]=e.createElementVNode("span",null,"Connect",-1)),e.withDirectives(e.createVNode(x,{end:""},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" mdi-open-in-new ",-1)])]),_:1},512),[[e.vShow,s.connectInNewTab]])]),_:1},8,["onClick"])]),"item.stop":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",onClick:D=>n.deleteScript(N)},{default:e.withCtx(()=>[t[12]||(t[12]=e.createElementVNode("span",null,"Stop",-1)),e.createVNode(x,{end:""},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode(" mdi-close-circle-outline ",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1}),e.createVNode(S,{value:"completed"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(C,{dense:""},{default:e.withCtx(()=>[e.createVNode(c),e.createVNode(g,{class:"mr-3",color:"primary",onClick:n.getCompletedScripts},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Refresh",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{modelValue:o.completedSearch,"onUpdate:modelValue":t[2]||(t[2]=N=>o.completedSearch=N),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(k,{headers:o.completedHeaders,items:o.completedScripts,"items-length":o.completedTotal,loading:o.completedLoading,search:o.completedSearch,density:"compact","data-test":"completed-scripts","items-per-page":o.completedItemsPerPage,page:o.completedPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":n.updateCompletedPage,"onUpdate:itemsPerPage":n.updateCompletedItemsPerPage},{"item.name":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",onClick:D=>n.showScript(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"])]),"item.log":e.withCtx(({item:N})=>[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:D=>n.viewScriptLog(N,"log")},null,8,["onClick"]),e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===N.name,onClick:D=>n.downloadScriptLog(N,"log")},null,8,["disabled","loading","onClick"])]),"item.report":e.withCtx(({item:N})=>[N.report?(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:D=>n.viewScriptLog(N,"report")},null,8,["onClick"]),e.createVNode(E,null,{activator:e.withCtx(({props:D})=>[e.createVNode(g,e.mergeProps({color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:o.downloadScript,loading:o.downloadScript&&o.downloadScript.name===N.name},D),null,16,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(T,{onClick:D=>n.downloadScriptLog(N,"report","text")},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Download as Text",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(T,{onClick:D=>n.downloadScriptLog(N,"report","ctrf")},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode("Download as CTRF",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)])):(e.openBlock(),e.createElementBlock("div",Te,[...t[14]||(t[14]=[e.createElementVNode("span",null,"N/A",-1)])]))]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o.showDialog?(e.openBlock(),e.createBlock(H,{key:0,modelValue:o.showDialog,"onUpdate:modelValue":t[4]||(t[4]=N=>o.showDialog=N),content:o.dialogContent,type:"Script",name:o.dialogName,filename:o.dialogFilename,onSubmit:t[5]||(t[5]=N=>o.showDialog=!1)},null,8,["modelValue","content","name","filename"])):e.createCommentVNode("",!0)])}const he=z._export_sfc(Ee,[["render",Re]]),Oe={props:{modelValue:{type:Array,required:!0}},emits:["sort","update:modelValue"],data(){return{search:"",headers:[{title:"Message",value:"message",sortable:!1}],messageOrderOptions:["Newest on Top","Newest on Bottom"],messageOrder:"Newest on Top"}},computed:{messages:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},watch:{messageOrder:function(i,t){this.$emit("sort",i)}},methods:{messageClass(i){return i.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":i.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""},downloadLog(){const i=this.messages.map(r=>r.message).join(`
4
- `),t=new Blob([i],{type:"text/plain"}),s=document.createElement("a");s.href=URL.createObjectURL(t),s.setAttribute("download",$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),s.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(i=>{this.messages=[]}).catch(function(i){})}}};function Me(i,t,s,r,o,n){const a=e.resolveComponent("v-btn"),p=e.resolveComponent("v-spacer"),c=e.resolveComponent("v-select"),g=e.resolveComponent("v-text-field"),_=e.resolveComponent("v-card-title"),C=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),x=e.resolveComponent("v-card");return e.openBlock(),e.createBlock(x,{class:"d-flex flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(_,{class:"d-flex align-center"},{default:e.withCtx(()=>[e.createVNode(a,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:n.downloadLog},null,8,["onClick"]),t[2]||(t[2]=e.createTextVNode(" Script Messages ",-1)),e.createVNode(p),e.createVNode(c,{modelValue:o.messageOrder,"onUpdate:modelValue":t[0]||(t[0]=k=>o.messageOrder=k),density:"compact","hide-details":"",variant:"outlined",items:o.messageOrderOptions,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue","items"]),e.createVNode(p),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[1]||(t[1]=k=>o.search=k),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),e.createVNode(a,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:n.clearLog},null,8,["onClick"])]),_:1}),e.createVNode(v,{class:"overflow-auto"},{default:e.withCtx(()=>[e.createVNode(C,{id:"script-log-messages",headers:o.headers,items:n.messages,search:o.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":e.withCtx(({item:k})=>[e.createElementVNode("div",{class:e.normalizeClass(n.messageClass(k.message))},e.toDisplayString(k.message),3)]),_:1},8,["headers","items","search"])]),_:1})]),_:1})}const fe=z._export_sfc(Oe,[["render",Me]]),De={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(i,{emit:t}){const s=t,r=i,o=e.useSlots(),n=e.ref([]),a=e.computed(()=>n.value.reduce((l,u)=>(l[~~u.id]=u)&&l,{})),p=e.computed(()=>n.value.length),c=e.ref(null),g=e.ref(!1),_=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),C=e.ref({splitter:null,timeoutId:null}),v=e.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":_.value.dragging})),x=()=>{document.addEventListener("mousemove",w,{passive:!1}),document.addEventListener("mouseup",T),"ontouchstart"in window&&(document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",T))},k=()=>{document.removeEventListener("mousemove",w,{passive:!1}),document.removeEventListener("mouseup",T),"ontouchstart"in window&&(document.removeEventListener("touchmove",w,{passive:!1}),document.removeEventListener("touchend",T))},S=(l,u)=>{const f=l.target.closest(".splitpanes__splitter");if(f){const{left:m,top:h}=f.getBoundingClientRect(),{clientX:b,clientY:y}="ontouchstart"in window&&l.touches?l.touches[0]:l;_.value.cursorOffset=r.horizontal?y-h:b-m}x(),_.value.mouseDown=!0,_.value.activeSplitter=u},w=l=>{_.value.mouseDown&&(l.preventDefault(),_.value.dragging=!0,requestAnimationFrame(()=>{N(M(l)),I("resize",{event:l},!0)}))},T=l=>{_.value.dragging&&(window.getSelection().removeAllRanges(),I("resized",{event:l},!0)),_.value.mouseDown=!1,_.value.activeSplitter=null,setTimeout(()=>{_.value.dragging=!1,k()},100)},B=(l,u)=>{"ontouchstart"in window&&(l.preventDefault(),C.value.splitter===u?(clearTimeout(C.value.timeoutId),C.value.timeoutId=null,E(l,u),C.value.splitter=null):(C.value.splitter=u,C.value.timeoutId=setTimeout(()=>C.value.splitter=null,500))),_.value.dragging||I("splitter-click",{event:l,index:u},!0)},E=(l,u)=>{if(I("splitter-dblclick",{event:l,index:u},!0),r.maximizePanes){let f=0;n.value=n.value.map((m,h)=>(m.size=h===u?m.max:m.min,h!==u&&(f+=m.min),m)),n.value[u].size-=f,I("pane-maximize",{event:l,index:u,pane:n.value[u]}),I("resized",{event:l,index:u},!0)}},R=(l,u)=>{I("pane-click",{event:l,index:a.value[u].index,pane:a.value[u]})},M=l=>{const u=c.value.getBoundingClientRect(),{clientX:f,clientY:m}="ontouchstart"in window&&l.touches?l.touches[0]:l;return{x:f-(r.horizontal?0:_.value.cursorOffset)-u.left,y:m-(r.horizontal?_.value.cursorOffset:0)-u.top}},H=l=>{l=l[r.horizontal?"y":"x"];const u=c.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(l=u-l),l*100/u},N=l=>{const u=_.value.activeSplitter;let f={prevPanesSize:G(u),nextPanesSize:A(u),prevReachedMinPanes:0,nextReachedMinPanes:0};const m=0+(r.pushOtherPanes?0:f.prevPanesSize),h=100-(r.pushOtherPanes?0:f.nextPanesSize),b=Math.max(Math.min(H(l),h),m);let y=[u,u+1],O=n.value[y[0]]||null,U=n.value[y[1]]||null;const d=O.max<100&&b>=O.max+f.prevPanesSize,P=U.max<100&&b<=100-(U.max+A(u+1));if(d||P){d?(O.size=O.max,U.size=Math.max(100-O.max-f.prevPanesSize-f.nextPanesSize,0)):(O.size=Math.max(100-U.max-f.prevPanesSize-A(u+1),0),U.size=U.max);return}if(r.pushOtherPanes){const de=D(f,b);if(!de)return;({sums:f,panesToResize:y}=de),O=n.value[y[0]]||null,U=n.value[y[1]]||null}O!==null&&(O.size=Math.min(Math.max(b-f.prevPanesSize-f.prevReachedMinPanes,O.min),O.max)),U!==null&&(U.size=Math.min(Math.max(100-b-f.nextPanesSize-f.nextReachedMinPanes,U.min),U.max))},D=(l,u)=>{const f=_.value.activeSplitter,m=[f,f+1];return u<l.prevPanesSize+n.value[m[0]].min&&(m[0]=ee(f).index,l.prevReachedMinPanes=0,m[0]<f&&n.value.forEach((h,b)=>{b>m[0]&&b<=f&&(h.size=h.min,l.prevReachedMinPanes+=h.min)}),l.prevPanesSize=G(m[0]),m[0]===void 0)?(l.prevReachedMinPanes=0,n.value[0].size=n.value[0].min,n.value.forEach((h,b)=>{b>0&&b<=f&&(h.size=h.min,l.prevReachedMinPanes+=h.min)}),n.value[m[1]].size=100-l.prevReachedMinPanes-n.value[0].min-l.prevPanesSize-l.nextPanesSize,null):u>100-l.nextPanesSize-n.value[m[1]].min&&(m[1]=Z(f).index,l.nextReachedMinPanes=0,m[1]>f+1&&n.value.forEach((h,b)=>{b>f&&b<m[1]&&(h.size=h.min,l.nextReachedMinPanes+=h.min)}),l.nextPanesSize=A(m[1]-1),m[1]===void 0)?(l.nextReachedMinPanes=0,n.value.forEach((h,b)=>{b<p.value-1&&b>=f+1&&(h.size=h.min,l.nextReachedMinPanes+=h.min)}),n.value[m[0]].size=100-l.prevPanesSize-A(m[0]-1),null):{sums:l,panesToResize:m}},G=l=>n.value.reduce((u,f,m)=>u+(m<l?f.size:0),0),A=l=>n.value.reduce((u,f,m)=>u+(m>l+1?f.size:0),0),ee=l=>[...n.value].reverse().find(u=>u.index<l&&u.size>u.min)||{},Z=l=>n.value.find(u=>u.index>l+1&&u.size>u.min)||{},te=()=>{var l;const u=Array.from(((l=c.value)==null?void 0:l.children)||[]);for(const f of u){const m=f.classList.contains("splitpanes__pane"),h=f.classList.contains("splitpanes__splitter");!m&&!h&&(f.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},K=(l,u,f=!1)=>{const m=l-1,h=document.createElement("div");h.classList.add("splitpanes__splitter"),f||(h.onmousedown=b=>S(b,m),typeof window<"u"&&"ontouchstart"in window&&(h.ontouchstart=b=>S(b,m)),h.onclick=b=>B(b,m+1)),h.ondblclick=b=>E(b,m+1),u.parentNode.insertBefore(h,u)},X=l=>{l.onmousedown=void 0,l.onclick=void 0,l.ondblclick=void 0,l.remove()},q=()=>{var l;const u=Array.from(((l=c.value)==null?void 0:l.children)||[]);for(const m of u)m.className.includes("splitpanes__splitter")&&X(m);let f=0;for(const m of u)m.className.includes("splitpanes__pane")&&(!f&&r.firstSplitter?K(f,m,!0):f&&K(f,m),f++)},Q=({uid:l,...u})=>{const f=a.value[l];for(const[m,h]of Object.entries(u))f[m]=h},ie=l=>{var u;let f=-1;Array.from(((u=c.value)==null?void 0:u.children)||[]).some(m=>(m.className.includes("splitpanes__pane")&&f++,m.isSameNode(l.el))),n.value.splice(f,0,{...l,index:f}),n.value.forEach((m,h)=>m.index=h),g.value&&e.nextTick(()=>{q(),j({addedPane:n.value[f]}),I("pane-add",{pane:n.value[f]})})},oe=l=>{const u=n.value.findIndex(m=>m.id===l);n.value[u].el=null;const f=n.value.splice(u,1)[0];n.value.forEach((m,h)=>m.index=h),e.nextTick(()=>{q(),I("pane-remove",{pane:f}),j({removedPane:{...f}})})},j=(l={})=>{!l.addedPane&&!l.removedPane?se():n.value.some(u=>u.givenSize!==null||u.min||u.max<100)?re(l):ne(),g.value&&I("resized")},ne=()=>{const l=100/p.value;let u=0;const f=[],m=[];for(const h of n.value)h.size=Math.max(Math.min(l,h.max),h.min),u-=h.size,h.size>=h.max&&f.push(h.id),h.size<=h.min&&m.push(h.id);u>.1&&W(u,f,m)},se=()=>{let l=100;const u=[],f=[];let m=0;for(const b of n.value)l-=b.size,b.givenSize!==null&&m++,b.size>=b.max&&u.push(b.id),b.size<=b.min&&f.push(b.id);let h=100;if(l>.1){for(const b of n.value)b.givenSize===null&&(b.size=Math.max(Math.min(l/(p.value-m),b.max),b.min)),h-=b.size;h>.1&&W(h,u,f)}},re=({addedPane:l,removedPane:u}={})=>{let f=100/p.value,m=0;const h=[],b=[];(l?.givenSize??null)!==null&&(f=(100-l.givenSize)/(p.value-1));for(const y of n.value)m-=y.size,y.size>=y.max&&h.push(y.id),y.size<=y.min&&b.push(y.id);if(!(Math.abs(m)<.1)){for(const y of n.value)l?.givenSize!==null&&l?.id===y.id||(y.size=Math.max(Math.min(f,y.max),y.min)),m-=y.size,y.size>=y.max&&h.push(y.id),y.size<=y.min&&b.push(y.id);m>.1&&W(m,h,b)}},W=(l,u,f)=>{let m;l>0?m=l/(p.value-u.length):m=l/(p.value-f.length),n.value.forEach((h,b)=>{if(l>0&&!u.includes(h.id)){const y=Math.max(Math.min(h.size+m,h.max),h.min),O=y-h.size;l-=O,h.size=y}else if(!f.includes(h.id)){const y=Math.max(Math.min(h.size+m,h.max),h.min),O=y-h.size;l-=O,h.size=y}}),Math.abs(l)>.1&&e.nextTick(()=>{g.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},I=(l,u=void 0,f=!1)=>{const m=u?.index??_.value.activeSplitter??null;s(l,{...u,...m!==null&&{index:m},...f&&m!==null&&{prevPane:n.value[m-(r.firstSplitter?1:0)],nextPane:n.value[m+(r.firstSplitter?0:1)]},panes:n.value.map(h=>({min:h.min,max:h.max,size:h.size}))})};e.watch(()=>r.firstSplitter,()=>q()),e.onMounted(()=>{te(),q(),j(),I("ready"),g.value=!0}),e.onBeforeUnmount(()=>g.value=!1);const le=()=>{var l;return e.h("div",{ref:c,class:v.value},(l=o.default)==null?void 0:l.call(o))};return e.provide("panes",n),e.provide("indexedPanes",a),e.provide("horizontal",e.computed(()=>r.horizontal)),e.provide("requestUpdate",Q),e.provide("onPaneAdd",ie),e.provide("onPaneRemove",oe),e.provide("onPaneClick",R),(l,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le)))}},Ie={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(i){var t;const s=i,r=e.inject("requestUpdate"),o=e.inject("onPaneAdd"),n=e.inject("horizontal"),a=e.inject("onPaneRemove"),p=e.inject("onPaneClick"),c=(t=e.getCurrentInstance())==null?void 0:t.uid,g=e.inject("indexedPanes"),_=e.computed(()=>g.value[c]),C=e.ref(null),v=e.computed(()=>{const w=isNaN(s.size)||s.size===void 0?0:parseFloat(s.size);return Math.max(Math.min(w,k.value),x.value)}),x=e.computed(()=>{const w=parseFloat(s.minSize);return isNaN(w)?0:w}),k=e.computed(()=>{const w=parseFloat(s.maxSize);return isNaN(w)?100:w}),S=e.computed(()=>{var w;return`${n.value?"height":"width"}: ${(w=_.value)==null?void 0:w.size}%`});return e.watch(()=>v.value,w=>r({uid:c,size:w})),e.watch(()=>x.value,w=>r({uid:c,min:w})),e.watch(()=>k.value,w=>r({uid:c,max:w})),e.onMounted(()=>{o({id:c,el:C.value,min:x.value,max:k.value,givenSize:s.size===void 0?null:v.value,size:v.value})}),e.onBeforeUnmount(()=>a(c)),(w,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:C,class:"splitpanes__pane",onClick:T[0]||(T[0]=B=>e.unref(p)(B,w._.uid)),style:e.normalizeStyle(S.value)},[e.renderSlot(w.$slots,"default")],4))}},Ue={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:"",valid:!1,rules:[i=>!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[i=>!0])},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},Pe={class:"pa-2"},Fe={class:"question"};function ze(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-form"),x=e.resolveComponent("v-card"),k=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=S=>n.show=S),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(v,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=S=>o.valid=S),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null," User Input Required ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",Pe,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createElementVNode("div",Fe,e.toDisplayString(s.question),1),e.createVNode(c,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=S=>o.inputValue=S),autofocus:"","data-test":"ask-value-input",type:s.password?"password":"text",rules:o.rules},null,8,["modelValue","type","rules"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined","data-test":"ask-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Le=z._export_sfc(Ue,[["render",ze],["__scopeId","data-v-47105fc8"]]),Ae={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{inputValue:null,valid:null,rules:[i=>this.multiple?i.length!=0||"Required":!!i||"Required"]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},He={class:"pa-2"},qe={class:"text-h6"},Ge=["textContent"];function Ke(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-row"),g=e.resolveComponent("v-file-input"),_=e.resolveComponent("v-card-text"),C=e.resolveComponent("v-btn"),v=e.resolveComponent("v-card-actions"),x=e.resolveComponent("v-form"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),persistent:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(x,{modelValue:o.valid,"onUpdate:modelValue":t[1]||(t[1]=w=>o.valid=w),onSubmit:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null," File Dialog ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",He,[e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createElementVNode("span",qe,e.toDisplayString(s.title),1)]),_:1}),s.message?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(s.message)},null,8,Ge)]),_:1})):e.createCommentVNode("",!0),e.createVNode(c,{class:"my-1"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.inputValue,"onUpdate:modelValue":t[0]||(t[0]=w=>o.inputValue=w),label:"Choose File",rules:o.rules,autofocus:"","data-test":"file-input",accept:s.filter,"small-chips":"",multiple:s.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),e.createVNode(v,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(C,{variant:"outlined","data-test":"file-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(C,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!o.valid,onClick:e.withModifiers(n.submitHandler,["prevent"])},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue","onKeydown"])}const je=z._export_sfc(Ae,[["render",Ke],["__scopeId","data-v-c5884e8c"]]),We={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},methods:{}},Je=["textContent"],Ye={class:"pa-2"},Ze=["textContent"];function Xe(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-row"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),width:s.width},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(s.title)},null,8,Je),e.createVNode(a)]),_:1}),e.createElementVNode("div",Ye,[e.createVNode(g,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.text,(k,S)=>(e.openBlock(),e.createBlock(c,{key:S,"no-gutters":""},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(k)},null,8,Ze)]),_:2},1024))),128))]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const Qe=z._export_sfc(We,[["render",Xe]]),$e={components:{},props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},created:function(){this.api=new V.yi,this.getOverrides()},methods:{getOverrides:function(){this.api.get_overrides().then(i=>{this.overrides=i})},clearOverrides:function(){const i=[...new Map(this.overrides.map(t=>[`${t.target_name}__${t.packet_name}__${t.item_name}`,t])).values()];for(let t of i)this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,"ALL").then(s=>{this.overrides=[]})},deleteOverride:function(i){this.api.normalize_tlm(i.target_name,i.packet_name,i.item_name,i.value_type).then(t=>{let s=this.overrides.indexOf(i);this.overrides.splice(s,1)})}}},et={class:"pa-2"};function tt(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-btn"),g=e.resolveComponent("v-text-field"),_=e.resolveComponent("v-row"),C=e.resolveComponent("v-data-table"),v=e.resolveComponent("v-card-text"),x=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),width:"1000"},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[3]||(t[3]=e.createElementVNode("span",null,"Overrides",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",et,[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(_,{class:"ma-1"},{default:e.withCtx(()=>[e.createVNode(c,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:n.clearOverrides},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Clear All Overrides ",-1)])]),_:1},8,["onClick"]),e.createVNode(a),e.createVNode(g,{modelValue:o.search,"onUpdate:modelValue":t[0]||(t[0]=w=>o.search=w),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),e.createVNode(C,{headers:o.headers,items:o.overrides,search:o.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":e.withCtx(({item:w})=>[e.createVNode(c,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:T=>n.deleteOverride(w)},null,8,["onClick"])]),_:1},8,["headers","items","search"])]),_:1})]),e.createVNode(x,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(c,{variant:"flat","data-test":"overrides-dialog-ok",onClick:t[1]||(t[1]=w=>n.show=!n.show)},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const it=z._export_sfc($e,[["render",tt]]),ot={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{selectOkDisabled:!0,selectedItem:null}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}},layoutClass(){let i="px-2 d-flex align-start";return this.layout==="vertical"?`${i} flex-column prompt-buttons-vertical`:`${i} flex-row flex-wrap prompt-buttons-horizontal`}},methods:{submitWrapper:function(i){this.selectedItem=i,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},cancelHandler:function(){this.$emit("response","Cancel")}}},nt=["textContent"],st={class:"pa-2",style:{"max-height":"60vh",overflow:"auto"}},rt=["textContent"],lt=["textContent"],at={key:0},dt={key:1};function ct(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-card-subtitle"),g=e.resolveComponent("v-row"),_=e.resolveComponent("v-card-text"),C=e.resolveComponent("v-select"),v=e.resolveComponent("v-btn"),x=e.resolveComponent("v-card-actions"),k=e.resolveComponent("v-card"),S=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(S,{modelValue:n.show,"onUpdate:modelValue":t[2]||(t[2]=w=>n.show=w),persistent:"",scrollable:"",width:"600",onKeydown:e.withKeys(n.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),e.createElementVNode("span",{class:"text",textContent:e.toDisplayString(s.title)},null,8,nt),e.createVNode(a)]),_:1}),e.createElementVNode("div",st,[e.createVNode(_,{class:"text"},{default:e.withCtx(()=>[s.subtitle?(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.subtitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.message)},null,8,rt)]),_:1}),s.details?(e.openBlock(),e.createBlock(g,{key:1,class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(s.details)},null,8,lt)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),s.layout==="combo"?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(g,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:o.selectedItem,"onUpdate:modelValue":[t[0]||(t[0]=w=>o.selectedItem=w),t[1]||(t[1]=w=>o.selectOkDisabled=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:s.buttons,multiple:s.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),e.createVNode(x,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(v,{variant:"flat","data-test":"prompt-ok",disabled:o.selectOkDisabled,onClick:n.submitHandler},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})])):(e.openBlock(),e.createElementBlock("div",dt,[e.createVNode(x,{class:e.normalizeClass(n.layoutClass)},{default:e.withCtx(()=>[s.layout!=="vertical"?(e.openBlock(),e.createBlock(a,{key:0})):e.createCommentVNode("",!0),e.createVNode(v,{variant:"outlined","data-test":"prompt-cancel",onClick:n.cancelHandler},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.buttons,(w,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createVNode(v,{variant:"flat","data-test":`prompt-${w.text}`,onClick:B=>n.submitWrapper(w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue","onKeydown"])}const ut=z._export_sfc(ot,[["render",ct],["__scopeId","data-v-186e96ad"]]),mt={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},emits:["update:modelValue"],computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const i=new Blob([this.text],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),t.click()}}},pt={class:"pa-2"};function ht(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("v-textarea"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),scrollable:"",width:"800"},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[2]||(t[2]=e.createElementVNode("span",null," Script Results ",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",pt,[e.createVNode(g,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:e.withCtx(()=>[e.createVNode(c,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":s.text},null,8,["model-value"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined",onClick:n.downloadResults},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Download ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{ref:"okButton",variant:"flat",onClick:t[0]||(t[0]=k=>n.show=!n.show)},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ft=z._export_sfc(mt,[["render",ht]]),gt={components:{EnvironmentChooser:pe.EnvironmentChooser},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},emits:["update:modelValue","environment"],data(){return{selected:[]}},computed:{show:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted:function(){this.loadEnvironment()},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},vt={class:"pa-2"};function wt(i,t,s,r,o,n){const a=e.resolveComponent("v-spacer"),p=e.resolveComponent("v-toolbar"),c=e.resolveComponent("environment-chooser"),g=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),C=e.resolveComponent("v-card-actions"),v=e.resolveComponent("v-card"),x=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(x,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=k=>n.show=k),persistent:"",width:"600",onKeydown:e.withKeys(n.cancel,["esc"])},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{height:"24"},{default:e.withCtx(()=>[e.createVNode(a),t[2]||(t[2]=e.createElementVNode("span",null,"Script Environment Variables",-1)),e.createVNode(a)]),_:1}),e.createElementVNode("div",vt,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(c,{modelValue:o.selected,"onUpdate:modelValue":t[0]||(t[0]=k=>o.selected=k)},null,8,["modelValue"])]),_:1})]),e.createVNode(C,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(a),e.createVNode(_,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:n.cancel},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(_,{variant:"flat","data-test":"environment-dialog-save",disabled:!!i.inputError,onClick:n.updateEnvironment},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Save ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const _t=z._export_sfc(gt,[["render",wt]]),Ct={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},emits:["button","loaded"],data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(i=>({title:i.replace(/^(script_|test_)/,""),value:i}))}},watch:{suiteMap:{handler:function(i,t){this.updateSuiteMap()},deep:!0}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(i){!i||this.suiteMap[i]==null||(this.suite=i,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[i].groups),this.groupChanged(this.groups[0]))},groupChanged(i){!i||this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[i]==null||(this.group=i,this.script="",this.scripts=this.suiteMap[this.suite].groups[i].scripts,this.scriptChanged(this.scripts[0]))},scriptChanged(i){this.script=i}}},bt={id:"tr-container"};function xt(i,t,s,r,o,n){const a=e.resolveComponent("v-checkbox"),p=e.resolveComponent("v-tooltip"),c=e.resolveComponent("v-col"),g=e.resolveComponent("v-row"),_=e.resolveComponent("v-select"),C=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",bt,[e.createVNode(g,{"no-gutters":"",align:"center"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[0]||(t[0]=x=>o.options=x),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[16]||(t[16]=e.createElementVNode("span",null,[e.createTextVNode(" Checked pauses the script when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[1]||(t[1]=x=>o.options=x),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(n.checkedManualTooltip),1),t[17]||(t[17]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(n.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.suite,"onUpdate:modelValue":[t[2]||(t[2]=v=>o.suite=v),n.suiteChanged],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.suites,"data-test":"select-suite"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-suite",onClick:t[3]||(t[3]=v=>i.$emit("button",{method:"start",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:s.disableButtons||!n.setupSuiteEnabled||!o.userInfo.execute,onClick:t[4]||(t[4]=v=>i.$emit("button",{method:"setup",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary","data-test":"teardown-suite",disabled:s.disableButtons||!n.teardownSuiteEnabled||!o.userInfo.execute,onClick:t[5]||(t[5]=v=>i.$emit("button",{method:"teardown",suite:o.suite,options:o.options}))},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[6]||(t[6]=x=>o.options=x),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[21]||(t[21]=e.createElementVNode("span",null,[e.createTextVNode(" Checked allows the script to continue when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[7]||(t[7]=x=>o.options=x),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[22]||(t[22]=e.createElementVNode("span",null,[e.createTextVNode(" Checked continuously executes until explicitly stopped"),e.createElementVNode("br"),e.createTextVNode(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.group,"onUpdate:modelValue":[t[8]||(t[8]=v=>o.group=v),n.groupChanged],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:o.groups,"data-test":"select-group"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-group",onClick:t[9]||(t[9]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:s.disableButtons||!n.setupGroupEnabled||!o.userInfo.execute,onClick:t[10]||(t[10]=v=>i.$emit("button",{method:"setup",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary","data-test":"teardown-group",disabled:s.disableButtons||!n.teardownGroupEnabled||!o.userInfo.execute,onClick:t[11]||(t[11]=v=>i.$emit("button",{method:"teardown",suite:o.suite,group:o.group,options:o.options}))},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[12]||(t[12]=x=>o.options=x),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[t[26]||(t[26]=e.createElementVNode("span",null,[e.createTextVNode(" Checked stops additional script execution when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),e.createVNode(c,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(p,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:v})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(v)),[e.createVNode(a,{modelValue:o.options,"onUpdate:modelValue":t[13]||(t[13]=x=>o.options=x),disabled:!o.options.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:e.withCtx(()=>[t[27]||(t[27]=e.createElementVNode("span",null,[e.createTextVNode(" Checked breaks the loop option when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows the loop to run continuously"),e.createElementVNode("br"),e.createTextVNode(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(c,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(g,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(c,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.script,"onUpdate:modelValue":[t[14]||(t[14]=v=>o.script=v),n.scriptChanged],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:n.scriptNames,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),e.createVNode(c,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(C,{color:"primary",class:"mr-2",disabled:s.disableButtons||!o.userInfo.execute,"data-test":"start-script",onClick:t[15]||(t[15]=v=>i.$emit("button",{method:"start",suite:o.suite,group:o.group,script:o.script,options:o.options}))},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(C,{color:"primary",class:"mr-2 invisible"},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode(" Setup ",-1)])]),_:1}),e.createVNode(C,{color:"primary",class:"invisible"},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode(" Teardown ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const ge=z._export_sfc(Ct,[["render",xt],["__scopeId","data-v-70eb4a37"]]);class kt{#e;#t;#i;#o;#n;constructor(t,{pattern:s,text:r,type:o}){this.#e=`regexAnnotator-${Math.floor(Math.random()*1e7)}`,this.#t=t,this.#i=s,this.#o=r,this.#n=o}refresh=()=>{const t=this.#t.session;this.#a(t);const s={lines:t.doc.$lines,action:"insert",start:{row:0},end:{row:t.doc.$lines.length}};this.annotate(s,t)};annotate=(t,s)=>{if(t.lines.length>1)switch(t.action){case"insert":this.#r(s,t.start.row,t.lines.length-1);break;case"remove":this.#r(s,t.start.row+1,-t.lines.length+1);break}for(let r=t.start.row;r<=t.end.row;r++){let o=s.doc.$lines[r]?.match(this.#i)?.index;o!==void 0?(o!==0&&(o+=1),this.#l(s,{row:r,column:o,text:this.#o,type:this.#n,openc3Id:this.#e})):t.action==="remove"&&this.#s(s,r)}};#l=(t,s)=>{this.#s(t,s.row),t.setAnnotations([...t.getAnnotations(),s])};#s=(t,s)=>{t.setAnnotations(t.getAnnotations().filter(r=>r.openc3Id!==this.#e||r.row!==s))};#r=(t,s,r)=>{t.setAnnotations(t.getAnnotations().map(o=>(o.row>s&&(o.row+=r),o)))};#a=t=>{t.setAnnotations(t.getAnnotations().filter(s=>s.openc3Id!==this.#e))}}class Vt extends kt{constructor(t){const s="(^|[{\\s])",r="sleep",o="[\\(\\s]";super(t,{pattern:new RegExp(`${s}${r}${o}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const ue="__TEMP__",F="<Untitled>",ae="Start",yt="Go",Y="Pause",Nt="Retry",St={components:{FileOpenSaveDialog:L.FileOpenSaveDialog,Openc3Screen:L.Openc3Screen,EnvironmentDialog:L.EnvironmentDialog,Splitpanes:De,Pane:Ie,TopBar:J.TopBar,AskDialog:Le,FileDialog:je,InformationDialog:Qe,EventListDialog:Ve.EventListDialog,OverridesDialog:it,PromptDialog:ut,ResultsDialog:ft,ScriptEnvironmentDialog:_t,SimpleTextDialog:xe.SimpleTextDialog,SuiteRunner:ge,RunningScripts:he,ScriptLogMessages:fe,CriticalCmdDialog:be.CriticalCmdDialog,CommandEditor:pe.CommandEditor},mixins:[me.AceEditorModes,ke._sfc_main],beforeRouteUpdate:function(i,t,s){i.params.id?this.tryLoadRunningScript(i.params.id).then(s):s()},props:{inline:{type:Boolean,default:!1},body:{type:String,default:null},initialFilename:{type:String,default:null}},emits:["alert","script-id"],setup(){return{containerHeight:_e.useContainerHeight()}},data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:ae,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:Y,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:F,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,inlineTab:"script",maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new Se,showScripts:!1,showOverrides:!1,overridesCount:0,commandEditor:{show:!1,targetName:null,commandName:null,dialogError:null,cmdString:null,isEditing:!1,editLine:null},currentLineHasCommand:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1,editorBoxSize:50}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state==="completed_errors"?"completed":this.state},stateColorClass:function(){return this.state==="error"||this.state==="crashed"||this.state==="killed"?"script-state-red":this.state==="completed_errors"?"script-state-orange":this.state==="completed"?"script-state-green":""},fileList:function(){const i=Object.keys(this.files);return i.push(this.fullFilename),[...new Set(i)]},environmentModified:function(){return this.scriptEnvironment.env.length>0},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===F?F:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===F?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFileWithConfirm()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFileWithConfirm()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]}},watch:{isLocked:function(i){this.showEditingToast=i,this.suiteRunner||(this.startOrGoDisabled=i),this.readOnlyUser==!1&&i==!1&&!this.inline?this.editor.setReadOnly(i):this.editor.setReadOnly(!0)},fullFilename:function(i){this.filenameSelect=i,this.inline||(i===F?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=i)},readOnlyUser:function(i){this.editor&&(i?(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none"):(this.inline||this.editor.setReadOnly(!1),this.editor.renderer.$cursorLayer.element.style.display=null))},showOverrides:function(i,t){t&&!i&&this.updateOverridesCount()}},created:async function(){this.api=new V.yi,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(s=>{s&&(this.timeZone=s)}).catch(s=>{}),this.updateOverridesCount(),this.NEW_FILENAME=F;let i=OpenC3Auth.user(),t=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let s of t)s!="viewer"&&(s=="admin"||s=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):s=="runner"?this.executeUser=!0:await V.Fr.get(`/openc3-api/roles/${s}`).then(r=>{r.data!==null&&r.data.permissions!==void 0&&(r.data.permissions.some(o=>o.permission=="script_edit")&&(this.readOnlyUser=!1),r.data.permissions.some(o=>o.permission=="script_run")&&(this.executeUser=!0))}));if(this.inline||(localStorage.script_runner__userinfo=JSON.stringify({name:i.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser})),this.readOnlyUser==!0){this.alertType="info";let s=`User ${i.preferred_username} is read only`;this.executeUser&&(s+=" but can execute scripts"),this.alertText=s,this.showAlert=!0}V.Fr.get("/openc3-api/autocomplete/keywords/screen").then(s=>{this.screenKeywords=s.data}),this.inline&&(this.readOnly=!0)},mounted:async function(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const i=this.buildRubyMode(),t=this.buildPythonMode();this.rubyMode=new i,this.pythonMode=new t,J.AceEditorUtils.getDefaultScriptingLanguage()==="python"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new L.CmdCompleter,new L.TlmCompleter],this.editor.setHighlightActiveLine(!1),J.AceEditorUtils.applyVimModeIfEnabled(this.editor,{saveFn:this.saveFile}),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),(this.readOnlyUser||this.inline)&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const r=new Vt(this.editor);this.editor.session.on("change",(o,n)=>{r.annotate(o,n),this.updateBreakpoints(o,n)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),this.cable=new V.bi("/script-api/cable"),!this.inline&&localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(o=>({...o,command:async n=>{this.filename=n.label,await this.reloadFile()}}))),this.inline?this.body&&(this.editor.setValue(this.body),this.editor.clearSelection(),this.initialFilename&&(this.filename=this.initialFilename)):this.$route.query?.file?(this.filename=this.$route.query.file,await this.reloadFile()):this.$route.params?.id?await this.tryLoadRunningScript(this.$route.params.id):(this.scriptId=sessionStorage.getItem("script_runner__script_id"),this.scriptId?await this.tryLoadRunningScript(this.scriptId):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1))),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.scriptId&&!this.inline&&sessionStorage.setItem("script_runner__script_id",this.scriptId),this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},methods:{updateOverridesCount:function(){this.api.get_overrides().then(i=>{this.overridesCount=i.length})},toggleVimMode(){J.AceEditorUtils.toggleVimMode(this.editor)},openCommandEditor(){this.executeSelectionMenu=!1;const i=this.editor.getCursorPosition(),t=this.editor.session.getLine(i.row);if(this.currentLineHasCommand){const s=this.parseCommandFromLine(t);this.commandEditor.cmdString=s,this.commandEditor.isEditing=!0,this.commandEditor.editLine=i.row}else this.commandEditor.cmdString=null,this.commandEditor.isEditing=!1,this.commandEditor.editLine=null;this.commandEditor.show=!0,this.commandEditor.dialogError=null},insertCommand(i){let t="";try{t=this.$refs.commandEditor.getCmdString();let s=t.split(" ");this.commandEditor.targetName=s[0],this.commandEditor.commandName=s[1]}catch(s){this.commandEditor.dialogError=s.message||"Please fix command parameters";return}if(this.commandEditor.isEditing&&this.commandEditor.editLine!==null){const s=this.editor.session.getLine(this.commandEditor.editLine),r=s.match(/^\s*/)[0],o=s.match(/\s+#.*$/),n=o?o[0]:"",a=`${r}cmd("${t}")${n}`,p=this.Range;this.editor.session.replace(new p(this.commandEditor.editLine,0,this.commandEditor.editLine,s.length),a)}else{const s=this.editor.getCursorPosition();this.editor.session.insert(s,`cmd("${t}")
5
- `)}this.fileModified=!0,this.commandEditor.show=!1},closeCommandDialog:function(){this.commandEditor.show=!1},doResize(){this.editor.resize()},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){V.Fr.get("/openc3-api/metadata").then(i=>{this.inputMetadata.events=i.data.map(t=>({name:"Metadata",start:new Date(t.start*1e3),end:new Date(t.start*1e3),color:t.color,type:t.type,timed:!0,metadata:t})),this.inputMetadata.show=!0})},messageSortOrder(i){i==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):i==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(i){i=i.split("*")[0],this.editor.setValue(this.files[i].content),this.restoreBreakpoints(i),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[i].lineNo-1,0,this.files[i].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[i].lineNo)},tryLoadRunningScript:function(i){return V.Fr.get(`/script-api/running-script/${i}`).then(t=>{if(t.data){let s=t.data.state;s!=="completed"&&s!=="completed_errors"&&s!=="stopped"&&s!=="crashed"&&s!=="killed"?(this.filename=t.data.filename,this.tryLoadSuites(t),this.initScriptStart(),this.scriptStart(i)):(this.$notify.caution({title:`Script ${i} has already completed`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0)}else throw new Error(`Unable to load state for running script ${i}`)}).catch(t=>{this.$notify.caution({title:`Running Script ${i} not found`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0})},tryLoadSuites:function(i){i.data.suites&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(i.data.suites)),this.doResize()},showExecuteSelectionMenu:function(i){this.menuX=i.pageX,this.menuY=i.pageY;const t=this.editor.getCursorPosition(),s=this.editor.session.getLine(t.row);this.currentLineHasCommand=this.isCommandLine(s),this.executeSelectionMenu=!0},isCommandLine:function(i){const t=i.trim();return/^\s*cmd(_\w+)?\s*\(/.test(t)},parseCommandFromLine:function(i){const t=i.match(/cmd(_\w+)?\s*\(\s*["'](.+?)["']\s*\)/);return t?t[2]:null},runFromCursor:function(){const i=this.editor.getCursorPosition().row+1;this.scriptId?V.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,i]}}):this.start(null,null,i)},executeSelection:function(){const i=this.editor.getSelectionRange();let t=i.start.row+1,s=i.end.row+1;i.end.column===0&&(s-=1),this.scriptId?V.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,t,s]}}):this.start(null,null,t,s)},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(i){if(!this.scriptId){const t=i.getDocumentPosition().row;i.editor.session.getBreakpoints(t,0)[t]?i.editor.session.clearBreakpoint(t):i.editor.session.setBreakpoint(t)}},updateBreakpoints:function(i,t){if(i.lines.length<=1)return;const s=this.getBreakpointRows(t).filter(n=>i.start.column===0&&n===i.start.row||n>i.start.row);let r=[],o=0;switch(i.action){case"insert":o=i.lines.length-1,s.reverse();break;case"remove":o=-i.lines.length+1,r=[...Array(i.lines.length).keys()].map(n=>n+i.start.row);break}s.forEach(n=>{t.clearBreakpoint(n),r.includes(n)||t.setBreakpoint(n+o)})},getBreakpointRows:function(i=this.editor.session){return i.getBreakpoints().map((t,s)=>t&&s).filter(Number.isInteger)},restoreBreakpoints:function(i){this.clearBreakpoints(),this.breakpoints[i]?.forEach(t=>{this.editor.session.setBreakpoint(t)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(i=>V.Fr.delete("/script-api/breakpoints/delete/all")).then(i=>{this.clearBreakpoints()})},suiteRunnerButton(i){this.startOrGoButton===ae?this.start(i,"suiteRunner"):this.go(i,"suiteRunner")},async keydown(i){this.scriptId||this.editor.getReadOnly()===!0||(i.metaKey||i.ctrlKey)&&i.keyCode===83&&(i.shiftKey?(i.preventDefault(),this.saveAs()):(i.preventDefault(),await this.saveFile()))},onChange(i){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){let i=this.filename;this.filename!==F&&(i.endsWith(".rb")||i.endsWith(".py")||V.Fr.post(`/script-api/scripts/${this.filename}/mnemonics`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{let s="";s+=`<strong>${t.data.title}</strong><br/><br/>`,s+=JSON.parse(t.data.description),this.$dialog.alert(s.trim(),{html:!0})})),this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:t,problems:s})=>{let r="";if(s.length){const o=s.map(n=>`${n.lineNumber}: ${n.error}`).join("<br/>");r+=`<strong>The following lines have problems:</strong><br/>${o}<br/><br/>`}t.length&&(r+="<strong>Mnemonics with string interpolation were not checked.</strong>"),r===""&&(r="<strong>Everything looks good!</strong>"),this.$dialog.alert(r.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=yt,this.editor.setReadOnly(!0)},scriptStart(i){this.$emit("script-id",i),this.scriptId=i,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:t=>this.received(t)},{id:this.scriptId}).then(t=>{this.subscription=t})},async scriptComplete(){this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&!this.inline&&this.editor.setReadOnly(!1),this.scriptId=null,sessionStorage.removeItem("script_runner__script_id"),this.disableSuiteButtons=!1,this.startOrGoButton=ae,this.pauseOrRetryButton=Y,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.updateOverridesCount()},environmentHandler:function(i){this.scriptEnvironment.env=i},startHandler:function(){this.start()},async start(i=null,t=null,s=null,r=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let o=this.filename;this.filename===F&&(o=this.tempFilename);let n=`/script-api/scripts/${o}/run`;this.showDisconnect&&(n+="/disconnect");let a=this.scriptEnvironment.env;this.enableStackTraces&&(a=a.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let p={environment:a};t&&(p.suiteRunner=i),s!==null&&(p.line_no=s),r!==null&&(p.end_line_no=r),V.Fr.post(n,{data:p}).then(c=>{this.scriptStart(c.data)}).catch(c=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),V.Fr.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===Y?V.Fr.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=Y,V.Fr.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){V.Fr.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){V.Fr.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(i){i.filename&&i.filename!==this.currentFilename&&(this.files[i.filename]?(this.currentFilename=i.filename,this.editor.setValue(this.files[i.filename].content),this.restoreBreakpoints(i.filename),this.editor.clearSelection()):(this.files[i.filename]={content:"",lineNo:0},V.Fr.get(`/script-api/scripts/${i.filename}`).then(s=>{this.files[i.filename]={content:s.data.contents,lineNo:0},this.breakpoints[i.filename]=s.data.breakpoints,this.restoreBreakpoints(i.filename),this.currentFilename=null}).catch(s=>{this.files[i.filename]=null}))),this.state=i.state;const t=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=Y,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(i.line_no-1,0,i.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(i.line_no),this.files[i.filename].lineNo=i.line_no;break;case"error":this.pauseOrRetryButton=Nt;case"spawning":case"init":case"paused":case"waiting":case"breakpoint":if(this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,Object.keys(t).filter(r=>t[r].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let r=i.line_no>0?i.line_no:1;this.editor.session.addMarker(new this.Range(r-1,0,r-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(r),i.filename&&(this.files[i.filename].lineNo=r)}break;case"completed":case"completed_errors":case"stopped":case"crashed":case"killed":this.removeAllMarkers();break}},processReceived(){let i=0;for(let t of this.receivedEvents){i+=1;let s=0;switch(t.type){case"file":this.files[t.filename]={content:t.text,lineNo:0},this.breakpoints[t.filename]=t.breakpoints,this.currentFilename===t.filename&&this.restoreBreakpoints(t.filename);break;case"line":this.processLine(t);break;case"output":let r=t.line;r==null?r="":typeof r=="object"?r=JSON.stringify(r):r=String(r);for(const p of r.split(`
6
- `))p&&(this.messagesNewestOnTop?this.messages.unshift({message:p}):this.messages.push({message:p}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(t);break;case"report":this.results.text=t.report,this.results.show=!0;break;case"complete":t.report&&(this.results.text=t.report,this.results.show=!0),this.removeAllMarkers(),this.scriptComplete();break;case"step":this.showDebug=!0;break;case"screen":let o=!1,n={};for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){n=screen,o=!0;break}s+=1}n.target=t.target_name,n.screen=t.screen_name,n.definition=t.definition,t.x?n.left=t.x:n.left=0,t.y?n.top=t.y:n.top=0,n.count=this.updateCounter++,o?this.screens[s]=n:(n.id=this.idCounter++,this.screens[this.screens.length]=n);break;case"clearscreen":for(screen of this.screens){if(screen.target==t.target_name&&screen.screen==t.screen_name){this.screens.splice(s,1);break}s+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const a=document.createElement("a");a.href=window.location.origin+t.url,a.setAttribute("download",t.filename),a.click();break;case"opentab":window.open(t.url,"_blank");break}}this.receivedEvents.splice(0,i)},received(i){this.cable.recordPing(),this.receivedEvents.push(i)},promptDialogCallback(i){this.prompt.show=!1,V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:i,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(i){if(i.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1,this.file.show=!1;return}switch(this.activePromptId=i.prompt_id,this.prompt.method=i.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,i.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=i.args[0],i.args[1]&&i.args[1]!==!0&&i.args[1]!==!1?this.ask.default=i.args[1].toString():i.args[1]===!0&&(this.ask.answerRequired=!1),i.args[2]===!0&&(this.ask.password=!0),this.ask.callback=t=>{this.ask.show=!1,this.ask.password?V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,password:t,prompt_id:this.activePromptId}}):V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${i.args[0]} ${i.args[1]} is Hazardous. `,i.args[2]&&(this.prompt.message+=i.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=i.args[0],this.criticalCmdString=i.args[5],this.criticalCmdUser=i.args[1],this.displayCriticalCmd=!0;break;case"prompt":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),i.kwargs&&i.kwargs.multiple&&(this.prompt.multiple=!0),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({title:t,value:t})}),this.prompt.layout="combo",this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":i.kwargs&&i.kwargs.informative&&(this.prompt.subtitle=i.kwargs.informative),i.kwargs&&i.kwargs.details&&(this.prompt.details=i.kwargs.details),this.prompt.message=i.args[0],i.args.slice(1).forEach(t=>{this.prompt.buttons.push({text:t,value:t})}),i.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=i.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=t=>{this.inputMetadata.show=!1,V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:i.method,answer:t,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_file_dialog":case"open_files_dialog":this.file.title=i.args[0],this.file.message=i.args[1],i.kwargs&&i.kwargs.filter&&(this.file.filter=i.kwargs.filter),i.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(i){let t="Cancel",s=[];i!="Cancel"&&(t=[],i.forEach(r=>{t.push(r.name),s.push(V.Fr.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${r.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(o=>{s.push(we.axios({...o.data,data:r}))}))})),Promise.all(s).then(r=>{V.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:t,prompt_id:this.activePromptId}}),this.file.show=!1})},setError(i){this.alertType="error",this.alertText=`Error: ${i}`,this.showAlert=!0},async confirmUnsavedChanges(){return this.fileModified==="*"?await this.$dialog.confirm("You have unsaved changes. Are you sure you want to continue?",{okText:"Continue",cancelText:"Cancel"}):!0},async newFileWithConfirm(){await this.confirmUnsavedChanges()&&this.newFile()},newFile(){this.unlockFile(),this.filename=F,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.inline||(this.$router.replace({name:"ScriptRunner"}).catch(i=>{}),document.title="Script Runner"),this.doResize()},async newRubyTestSuite(){await this.confirmUnsavedChanges()&&(this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ye=require("vue-router"),T=require("../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_c790a82f_lang-eKtA_EtD.cjs"),Ne=require("../timeFilters-CRNRsUsb.cjs");require("../store-CiS35N-w.cjs");const ie=require("../CustomIcon-8F08upeg.cjs");require("single-spa");const ve=require("../OutputDialog-ChPCaQAE.cjs"),ce=require("../format-DOZQNf-X.cjs"),Se=require("../index-B34azWgs.cjs"),Ee=require("../useContainerHeight-BEd4f2Lr.cjs"),ae=require("../TopBar-Ctzx7o2k.cjs"),ge=require("../ScriptChooser-CggwstfT.cjs"),Be=require("../fileIcon-BduOQcTc.cjs"),Te=require("../CriticalCmdDialog-eytxCQto.cjs"),Z=require("../Openc3Screen-D1RLlBgQ.cjs"),Me=require("../SimpleTextDialog-BJ50TbWh.cjs"),Oe=require("../ClassificationBanners-DjGCuH-4.cjs");require("../purify.es-4pyphLiB.cjs");const Re=require("../EventListDialog-EmC7YW60.cjs"),he=t=>{const o="(^|[{\\(\\s])",s="((\\s.+)|(\\(.+\\)))";return new RegExp(`${o}${t}${s}`)},De=/\{/,Fe=/['"],\s?['"]/;class Ue{constructor(){this.api=new T.yi,this.targets={},this.api.get_target_names().then(o=>{o.forEach(s=>{this.targets[s]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],Z.getKeywords("cmd").then(o=>{this.cmdKeywordExpressions=o.data.map(he)}),this.tlmKeywordExpressions=[],Z.getKeywords("tlm").then(o=>{this.tlmKeywordExpressions=o.data.map(he)})}async checkText(o){const{linesToCheck:s,linesToSkip:a}=o.split(`
2
+ `).reduce((i,g,f)=>{if(g=g.trim(),g.match(/^#/))return i;const h=g.match(/^([^#'"]*(?:(?:"[^"]*"|'[^']*')[^#'"]*)*)(#.*)$/),k=h?h[1].trim():g,d=this.cmdKeywordExpressions.reduce((R,F)=>R||k.match(F),null),v=this.tlmKeywordExpressions.reduce((R,F)=>R||k.match(F),null);if(!d&&!v)return i;const V=(d||v)[2];if(!V)return i;const _=V.match(/[\(\s)]/);if(!_)return i;let E=V.substring(_.index+1).replace(/\)+.*$/,"");if(E.match(De))return i.linesToSkip.push(f+1),i;const x=!!E.match(Fe);if(!x){const R=E.match(/^['"]/);if(R){const F=R[0],B=E.indexOf(F,1);B>0&&(E=E.substring(1,B))}}const O=E.split(x?",":" ");if(O.length<2)return i;const S={target:O[0],packet:O[1]};if(v)S.item=O[2];else{const R=O.slice(2);x?S.params=R.map(F=>F.split("=>")[0]):S.params=R.filter((F,B)=>B%2)}for(const R in S)typeof S[R]=="string"?S[R]=S[R].replace(/['"]/g,"").trim():S[R]=S[R].map(F=>F.replace(/['"]/g,"").trim());return i.linesToCheck.push({line:g,mnemonic:S,lineNumber:f+1}),i},{linesToCheck:[],linesToSkip:[]}),n=await this._checkLines(s);return{skipped:a.sort(),problems:n.sort((i,g)=>i.lineNumber-g.lineNumber)}}async _checkLines(o){const s=[],a=Z.groupBy(o,n=>n.mnemonic.target);for(const n in a){if(!this.targets[n]){for(const g of a[n])s.push({...g,error:`Target "${n}" does not exist.`});continue}const i=Z.groupBy(a[n],g=>g.mnemonic.packet);for(const g in i)for(const f of i[g]){const h=f.mnemonic.item?"tlm":"cmd";if(!this.targets[n][h]){const d=f.mnemonic.item?"get_all_tlm":"get_all_cmds",v=await this.api[d](n);this.targets[n][h]=v.reduce((b,V)=>(b[V.packet_name]=V.items.map(_=>_.name),b),{})}const k=this.targets[n][h][g];if(!k){s.push({...f,error:`${h==="tlm"?"Packet":"Command"} "${n} ${g}" does not exist.`});continue}if(f.mnemonic.item){if(!k.some(d=>d===f.mnemonic.item)){s.push({...f,error:`Item "${n} ${g} ${f.mnemonic.item}" does not exist.`});continue}}else for(const d of f.mnemonic.params)if(!k.some(v=>v===d)){s.push({...f,error:`Command "${n} ${g}" param "${d}" does not exist.`});continue}}}return s}}const ze={key:0},Ie={key:1},we={__name:"RunningScripts",props:{tabId:{type:Number,default:null},curTab:{type:Number,default:null},connectInNewTab:Boolean},emits:["disconnect","close"],setup(t,{emit:o}){const s=t,a=o,n=ye.useRouter(),i=e.inject("notify"),g=e.inject("dialog"),{formatDateTimeHMS:f}=Ne.TimeFilters.methods,h=new T.yi,k=e.ref("local"),d=e.ref("completed"),v=e.ref(null),b=e.ref(null),V=e.ref(""),_=e.ref([]),E=e.ref(0),x=e.ref(!1),O=e.ref(1),S=e.ref(10),R=[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Stop",key:"stop",sortable:!1,filterable:!1}],F=e.ref(""),B=e.ref([]),y=e.ref(0),A=e.ref(!1),D=e.ref(1),w=e.ref(10),q=[{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Log",key:"log",sortable:!1,filterable:!1},{title:"Report",key:"report",sortable:!1,filterable:!1}],z=e.ref(!1),U=e.ref(""),L=e.ref(""),J=e.ref("");e.watch(d,l=>{l==="running"?M():l==="completed"&&Q()}),e.onMounted(async()=>{try{const l=await h.get_setting("time_zone");l&&(k.value=l)}catch{}M(),Q(),b.value=setInterval(()=>{d.value==="running"&&M()},5e3)}),e.onBeforeUnmount(()=>{b.value&&clearInterval(b.value)});function G(l){if(l<0)return"N/A";if(l<1e3)return"< 1s";if(l<6e4)return`${Math.round(l/1e3)}s`;if(l<36e5){const r=Math.floor(l/6e4),m=Math.round(l%6e4/1e3);return`${r}m ${m}s`}else{const r=Math.floor(l/36e5),m=Math.floor(l%36e5/6e4),u=Math.round(l%6e4/1e3);return`${r}h ${m}m ${u}s`}}async function M(){x.value=!0;const l=(O.value-1)*S.value;try{const r=await T.Fr.get(`/script-api/running-script?scope=DEFAULT&offset=${l}&limit=${S.value}`),m=r.data.items||[],u=new Date;m.forEach(p=>{if(p.user_display=`${p.user_full_name} (${p.username})`,p.start_time){const C=new Date(p.start_time),N=u-C;p.start_time_formatted=f(C,k.value),p.duration=G(N)}else p.duration="N/A"}),_.value=m,E.value=r.data.total||m.length,x.value=!1}catch(r){x.value=!1,i.caution({title:"Error Loading Running Scripts",body:r.message})}}function H(l){O.value=l,M()}function se(l){S.value=l,O.value=1,M()}async function Q(){A.value=!0;const l=(D.value-1)*w.value;try{const r=await T.Fr.get(`/script-api/completed-scripts?scope=DEFAULT&offset=${l}&limit=${w.value}`),m=r.data.items||[];m.forEach(u=>{if(u.user_display=`${u.user_full_name} (${u.username})`,u.start_time&&u.end_time){const p=new Date(u.start_time),N=new Date(u.end_time)-p;u.start_time_formatted=f(p,k.value),u.duration=G(N)}else u.duration="N/A"}),B.value=m,y.value=r.data.total||m.length,A.value=!1}catch(r){A.value=!1,i.caution({title:"Error Loading Completed Scripts",body:r.message})}}function $(l){D.value=l,Q()}function le(l){w.value=l,D.value=1,Q()}function ne(l){L.value=JSON.stringify(l,null,2),U.value="Script: "+l.name,J.value="",z.value=!0}function re(l){a("disconnect");const r={name:"ScriptRunner",params:{id:l.name}};if(s.connectInNewTab){const{href:m}=n.resolve(r);window.open(m,"_blank")}else n.push(r),a("close")}async function ee(l){try{await g.confirm(`Are you sure you want to stop script: ${l.name} ${l.filename}?
3
+ `,{okText:"Stop",cancelText:"Cancel"}),await T.Fr.post(`/script-api/running-script/${l.name}/delete`),i.normal({body:`Stopped script: ${l.name} ${l.filename}`}),M()}catch(r){r!==!0&&i.caution({body:`Failed to stop script: ${l.name} ${l.filename}`})}}async function K(l,r){let m=null;r==="report"?(U.value="Report",m=l.report):(U.value="Log",m=l.log);const u=await T.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(m)}?bucket=OPENC3_LOGS_BUCKET`),p=m.split("/");J.value=p[p.length-1],L.value=window.atob(u.data.contents),z.value=!0}async function te(l,r,m="text"){let u=null;r==="report"?(U.value="Report",u=l.report):(U.value="Log",u=l.log),v.value=l;try{if(m==="ctrf"&&r==="report"){const p=await T.Fr.get(`/openc3-api/storage/download_file/${encodeURIComponent(u)}?bucket=OPENC3_LOGS_BUCKET&format=ctrf`),C=new Blob([window.atob(p.data.contents)],{type:"application/json"}),N=document.createElement("a");N.href=URL.createObjectURL(C),N.setAttribute("download",p.data.filename),N.click(),v.value=null}else{const p=await T.Fr.get(`/openc3-api/storage/download/${encodeURIComponent(u)}?bucket=OPENC3_LOGS_BUCKET`),C=u.split("/"),N=C[C.length-1],P=document.createElement("a");P.href=p.data.url,P.setAttribute("download",N),P.click(),v.value=null}}catch{i.caution({title:`Unable to download log ${u}`,body:`You may be able to download this log manually from the 'logs' bucket at ${u}`}),v.value=null}}return(l,r)=>{const m=e.resolveComponent("v-tab"),u=e.resolveComponent("v-tabs"),p=e.resolveComponent("v-spacer"),C=e.resolveComponent("v-btn"),N=e.resolveComponent("v-text-field"),P=e.resolveComponent("v-row"),j=e.resolveComponent("v-card-title"),oe=e.resolveComponent("v-icon"),c=e.resolveComponent("v-data-table-server"),W=e.resolveComponent("v-window-item"),me=e.resolveComponent("v-list-item-title"),pe=e.resolveComponent("v-list-item"),ke=e.resolveComponent("v-list"),be=e.resolveComponent("v-menu"),xe=e.resolveComponent("v-window"),Ve=e.resolveComponent("v-card");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Ve,{flat:"",class:"tab-card"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=I=>d.value=I),"bg-color":"var(--color-background-base-default)"},{default:e.withCtx(()=>[e.createVNode(m,{value:"running"},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createTextVNode("Running Scripts",-1)])]),_:1}),e.createVNode(m,{value:"completed"},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("Completed Scripts",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(xe,{modelValue:d.value,"onUpdate:modelValue":r[3]||(r[3]=I=>d.value=I)},{default:e.withCtx(()=>[e.createVNode(W,{value:"running"},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(P,{dense:""},{default:e.withCtx(()=>[e.createVNode(p),e.createVNode(C,{class:"mr-3",color:"primary",onClick:M},{default:e.withCtx(()=>[...r[8]||(r[8]=[e.createTextVNode(" Refresh ",-1)])]),_:1}),e.createVNode(N,{modelValue:V.value,"onUpdate:modelValue":r[1]||(r[1]=I=>V.value=I),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(c,{headers:R,items:_.value,"items-length":E.value,loading:x.value,search:V.value,density:"compact","data-test":"running-scripts","items-per-page":S.value,page:O.value,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":H,"onUpdate:itemsPerPage":se},{"item.name":e.withCtx(({item:I})=>[e.createVNode(C,{color:"primary",density:"comfortable",onClick:X=>ne(I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.name),1)]),_:2},1032,["onClick"])]),"item.connect":e.withCtx(({item:I})=>[e.createVNode(C,{color:"primary",onClick:X=>re(I)},{default:e.withCtx(()=>[r[10]||(r[10]=e.createElementVNode("span",null,"Connect",-1)),e.withDirectives(e.createVNode(oe,{end:""},{default:e.withCtx(()=>[...r[9]||(r[9]=[e.createTextVNode(" mdi-open-in-new ",-1)])]),_:1},512),[[e.vShow,t.connectInNewTab]])]),_:1},8,["onClick"])]),"item.stop":e.withCtx(({item:I})=>[e.createVNode(C,{color:"primary",onClick:X=>ee(I)},{default:e.withCtx(()=>[r[12]||(r[12]=e.createElementVNode("span",null,"Stop",-1)),e.createVNode(oe,{end:""},{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode(" mdi-close-circle-outline ",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1},8,["items","items-length","loading","search","items-per-page","page"])]),_:1}),e.createVNode(W,{value:"completed"},{default:e.withCtx(()=>[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(P,{dense:""},{default:e.withCtx(()=>[e.createVNode(p),e.createVNode(C,{class:"mr-3",color:"primary",onClick:Q},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode(" Refresh ",-1)])]),_:1}),e.createVNode(N,{modelValue:F.value,"onUpdate:modelValue":r[2]||(r[2]=I=>F.value=I),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(c,{headers:q,items:B.value,"items-length":y.value,loading:A.value,search:F.value,density:"compact","data-test":"completed-scripts","items-per-page":w.value,page:D.value,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":$,"onUpdate:itemsPerPage":le},{"item.name":e.withCtx(({item:I})=>[e.createVNode(C,{color:"primary",density:"comfortable",onClick:X=>ne(I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.name),1)]),_:2},1032,["onClick"])]),"item.log":e.withCtx(({item:I})=>[e.createVNode(C,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:X=>K(I,"log")},null,8,["onClick"]),e.createVNode(C,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:v.value,loading:v.value&&v.value.name===I.name,onClick:X=>te(I,"log")},null,8,["disabled","loading","onClick"])]),"item.report":e.withCtx(({item:I})=>[I.report?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(C,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:X=>K(I,"report")},null,8,["onClick"]),e.createVNode(be,null,{activator:e.withCtx(({props:X})=>[e.createVNode(C,e.mergeProps({color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:v.value,loading:v.value&&v.value.name===I.name},X),null,16,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(ke,null,{default:e.withCtx(()=>[e.createVNode(pe,{onClick:X=>te(I,"report","text")},{default:e.withCtx(()=>[e.createVNode(me,null,{default:e.withCtx(()=>[...r[15]||(r[15]=[e.createTextVNode("Download as Text",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(pe,{onClick:X=>te(I,"report","ctrf")},{default:e.withCtx(()=>[e.createVNode(me,null,{default:e.withCtx(()=>[...r[16]||(r[16]=[e.createTextVNode("Download as CTRF",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)])):(e.openBlock(),e.createElementBlock("div",ze,[...r[14]||(r[14]=[e.createElementVNode("span",null,"N/A",-1)])]))]),_:1},8,["items","items-length","loading","search","items-per-page","page"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),z.value?(e.openBlock(),e.createBlock(e.unref(ve.OutputDialog),{key:0,modelValue:z.value,"onUpdate:modelValue":r[4]||(r[4]=I=>z.value=I),content:L.value,type:"Script",name:U.value,filename:J.value,onSubmit:r[5]||(r[5]=I=>z.value=!1)},null,8,["modelValue","content","name","filename"])):e.createCommentVNode("",!0)])}}},Ce={__name:"ScriptLogMessages",props:{modelValue:{type:Array,required:!0},modelModifiers:{}},emits:e.mergeModels(["sort"],["update:modelValue"]),setup(t,{emit:o}){const s=e.useModel(t,"modelValue"),a=o,n=e.inject("dialog"),i=e.ref(""),g=[{title:"Message",value:"message",sortable:!1}],f=["Newest on Top","Newest on Bottom"],h=e.ref("Newest on Top");e.watch(h,b=>{a("sort",b)});function k(b){return b.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":b.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""}function d(){const b=s.value.map(E=>E.message).join(`
4
+ `),V=new Blob([b],{type:"text/plain"}),_=document.createElement("a");_.href=URL.createObjectURL(V),_.setAttribute("download",ce.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),_.click()}async function v(){try{await n.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}),s.value=[]}catch{}}return(b,V)=>{const _=e.resolveComponent("v-btn"),E=e.resolveComponent("v-spacer"),x=e.resolveComponent("v-select"),O=e.resolveComponent("v-text-field"),S=e.resolveComponent("v-card-title"),R=e.resolveComponent("v-data-table"),F=e.resolveComponent("v-card-text"),B=e.resolveComponent("v-card");return e.openBlock(),e.createBlock(B,{class:"d-flex flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(S,{class:"d-flex align-center"},{default:e.withCtx(()=>[e.createVNode(_,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:d}),V[2]||(V[2]=e.createTextVNode(" Script Messages ",-1)),e.createVNode(E),e.createVNode(x,{modelValue:h.value,"onUpdate:modelValue":V[0]||(V[0]=y=>h.value=y),density:"compact","hide-details":"",variant:"outlined",items:f,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue"]),e.createVNode(E),e.createVNode(O,{modelValue:i.value,"onUpdate:modelValue":V[1]||(V[1]=y=>i.value=y),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),e.createVNode(_,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:v})]),_:1}),e.createVNode(F,{class:"overflow-auto"},{default:e.withCtx(()=>[e.createVNode(R,{id:"script-log-messages",headers:g,items:s.value,search:i.value,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":e.withCtx(({item:y})=>[e.createElementVNode("div",{class:e.normalizeClass(k(y.message))},e.toDisplayString(y.message),3)]),_:1},8,["items","search"])]),_:1})]),_:1})}}},Pe={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:o}){const s=o,a=t,n=e.useSlots(),i=e.ref([]),g=e.computed(()=>i.value.reduce((l,r)=>(l[~~r.id]=r)&&l,{})),f=e.computed(()=>i.value.length),h=e.ref(null),k=e.ref(!1),d=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),v=e.ref({splitter:null,timeoutId:null}),b=e.computed(()=>({[`splitpanes splitpanes--${a.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":d.value.dragging})),V=()=>{document.addEventListener("mousemove",x,{passive:!1}),document.addEventListener("mouseup",O),"ontouchstart"in window&&(document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",O))},_=()=>{document.removeEventListener("mousemove",x,{passive:!1}),document.removeEventListener("mouseup",O),"ontouchstart"in window&&(document.removeEventListener("touchmove",x,{passive:!1}),document.removeEventListener("touchend",O))},E=(l,r)=>{const m=l.target.closest(".splitpanes__splitter");if(m){const{left:u,top:p}=m.getBoundingClientRect(),{clientX:C,clientY:N}="ontouchstart"in window&&l.touches?l.touches[0]:l;d.value.cursorOffset=a.horizontal?N-p:C-u}V(),d.value.mouseDown=!0,d.value.activeSplitter=r},x=l=>{d.value.mouseDown&&(l.preventDefault(),d.value.dragging=!0,requestAnimationFrame(()=>{A(B(l)),K("resize",{event:l},!0)}))},O=l=>{d.value.dragging&&(window.getSelection().removeAllRanges(),K("resized",{event:l},!0)),d.value.mouseDown=!1,d.value.activeSplitter=null,setTimeout(()=>{d.value.dragging=!1,_()},100)},S=(l,r)=>{"ontouchstart"in window&&(l.preventDefault(),v.value.splitter===r?(clearTimeout(v.value.timeoutId),v.value.timeoutId=null,R(l,r),v.value.splitter=null):(v.value.splitter=r,v.value.timeoutId=setTimeout(()=>v.value.splitter=null,500))),d.value.dragging||K("splitter-click",{event:l,index:r},!0)},R=(l,r)=>{if(K("splitter-dblclick",{event:l,index:r},!0),a.maximizePanes){let m=0;i.value=i.value.map((u,p)=>(u.size=p===r?u.max:u.min,p!==r&&(m+=u.min),u)),i.value[r].size-=m,K("pane-maximize",{event:l,index:r,pane:i.value[r]}),K("resized",{event:l,index:r},!0)}},F=(l,r)=>{K("pane-click",{event:l,index:g.value[r].index,pane:g.value[r]})},B=l=>{const r=h.value.getBoundingClientRect(),{clientX:m,clientY:u}="ontouchstart"in window&&l.touches?l.touches[0]:l;return{x:m-(a.horizontal?0:d.value.cursorOffset)-r.left,y:u-(a.horizontal?d.value.cursorOffset:0)-r.top}},y=l=>{l=l[a.horizontal?"y":"x"];const r=h.value[a.horizontal?"clientHeight":"clientWidth"];return a.rtl&&!a.horizontal&&(l=r-l),l*100/r},A=l=>{const r=d.value.activeSplitter;let m={prevPanesSize:w(r),nextPanesSize:q(r),prevReachedMinPanes:0,nextReachedMinPanes:0};const u=0+(a.pushOtherPanes?0:m.prevPanesSize),p=100-(a.pushOtherPanes?0:m.nextPanesSize),C=Math.max(Math.min(y(l),p),u);let N=[r,r+1],P=i.value[N[0]]||null,j=i.value[N[1]]||null;const oe=P.max<100&&C>=P.max+m.prevPanesSize,c=j.max<100&&C<=100-(j.max+q(r+1));if(oe||c){oe?(P.size=P.max,j.size=Math.max(100-P.max-m.prevPanesSize-m.nextPanesSize,0)):(P.size=Math.max(100-j.max-m.prevPanesSize-q(r+1),0),j.size=j.max);return}if(a.pushOtherPanes){const W=D(m,C);if(!W)return;({sums:m,panesToResize:N}=W),P=i.value[N[0]]||null,j=i.value[N[1]]||null}P!==null&&(P.size=Math.min(Math.max(C-m.prevPanesSize-m.prevReachedMinPanes,P.min),P.max)),j!==null&&(j.size=Math.min(Math.max(100-C-m.nextPanesSize-m.nextReachedMinPanes,j.min),j.max))},D=(l,r)=>{const m=d.value.activeSplitter,u=[m,m+1];return r<l.prevPanesSize+i.value[u[0]].min&&(u[0]=z(m).index,l.prevReachedMinPanes=0,u[0]<m&&i.value.forEach((p,C)=>{C>u[0]&&C<=m&&(p.size=p.min,l.prevReachedMinPanes+=p.min)}),l.prevPanesSize=w(u[0]),u[0]===void 0)?(l.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((p,C)=>{C>0&&C<=m&&(p.size=p.min,l.prevReachedMinPanes+=p.min)}),i.value[u[1]].size=100-l.prevReachedMinPanes-i.value[0].min-l.prevPanesSize-l.nextPanesSize,null):r>100-l.nextPanesSize-i.value[u[1]].min&&(u[1]=U(m).index,l.nextReachedMinPanes=0,u[1]>m+1&&i.value.forEach((p,C)=>{C>m&&C<u[1]&&(p.size=p.min,l.nextReachedMinPanes+=p.min)}),l.nextPanesSize=q(u[1]-1),u[1]===void 0)?(l.nextReachedMinPanes=0,i.value.forEach((p,C)=>{C<f.value-1&&C>=m+1&&(p.size=p.min,l.nextReachedMinPanes+=p.min)}),i.value[u[0]].size=100-l.prevPanesSize-q(u[0]-1),null):{sums:l,panesToResize:u}},w=l=>i.value.reduce((r,m,u)=>r+(u<l?m.size:0),0),q=l=>i.value.reduce((r,m,u)=>r+(u>l+1?m.size:0),0),z=l=>[...i.value].reverse().find(r=>r.index<l&&r.size>r.min)||{},U=l=>i.value.find(r=>r.index>l+1&&r.size>r.min)||{},L=()=>{var l;const r=Array.from(((l=h.value)==null?void 0:l.children)||[]);for(const m of r){const u=m.classList.contains("splitpanes__pane"),p=m.classList.contains("splitpanes__splitter");!u&&!p&&(m.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},J=(l,r,m=!1)=>{const u=l-1,p=document.createElement("div");p.classList.add("splitpanes__splitter"),m||(p.onmousedown=C=>E(C,u),typeof window<"u"&&"ontouchstart"in window&&(p.ontouchstart=C=>E(C,u)),p.onclick=C=>S(C,u+1)),p.ondblclick=C=>R(C,u+1),r.parentNode.insertBefore(p,r)},G=l=>{l.onmousedown=void 0,l.onclick=void 0,l.ondblclick=void 0,l.remove()},M=()=>{var l;const r=Array.from(((l=h.value)==null?void 0:l.children)||[]);for(const u of r)u.className.includes("splitpanes__splitter")&&G(u);let m=0;for(const u of r)u.className.includes("splitpanes__pane")&&(!m&&a.firstSplitter?J(m,u,!0):m&&J(m,u),m++)},H=({uid:l,...r})=>{const m=g.value[l];for(const[u,p]of Object.entries(r))m[u]=p},se=l=>{var r;let m=-1;Array.from(((r=h.value)==null?void 0:r.children)||[]).some(u=>(u.className.includes("splitpanes__pane")&&m++,u.isSameNode(l.el))),i.value.splice(m,0,{...l,index:m}),i.value.forEach((u,p)=>u.index=p),k.value&&e.nextTick(()=>{M(),$({addedPane:i.value[m]}),K("pane-add",{pane:i.value[m]})})},Q=l=>{const r=i.value.findIndex(u=>u.id===l);i.value[r].el=null;const m=i.value.splice(r,1)[0];i.value.forEach((u,p)=>u.index=p),e.nextTick(()=>{M(),K("pane-remove",{pane:m}),$({removedPane:{...m}})})},$=(l={})=>{!l.addedPane&&!l.removedPane?ne():i.value.some(r=>r.givenSize!==null||r.min||r.max<100)?re(l):le(),k.value&&K("resized")},le=()=>{const l=100/f.value;let r=0;const m=[],u=[];for(const p of i.value)p.size=Math.max(Math.min(l,p.max),p.min),r-=p.size,p.size>=p.max&&m.push(p.id),p.size<=p.min&&u.push(p.id);r>.1&&ee(r,m,u)},ne=()=>{let l=100;const r=[],m=[];let u=0;for(const C of i.value)l-=C.size,C.givenSize!==null&&u++,C.size>=C.max&&r.push(C.id),C.size<=C.min&&m.push(C.id);let p=100;if(l>.1){for(const C of i.value)C.givenSize===null&&(C.size=Math.max(Math.min(l/(f.value-u),C.max),C.min)),p-=C.size;p>.1&&ee(p,r,m)}},re=({addedPane:l,removedPane:r}={})=>{let m=100/f.value,u=0;const p=[],C=[];(l?.givenSize??null)!==null&&(m=(100-l.givenSize)/(f.value-1));for(const N of i.value)u-=N.size,N.size>=N.max&&p.push(N.id),N.size<=N.min&&C.push(N.id);if(!(Math.abs(u)<.1)){for(const N of i.value)l?.givenSize!==null&&l?.id===N.id||(N.size=Math.max(Math.min(m,N.max),N.min)),u-=N.size,N.size>=N.max&&p.push(N.id),N.size<=N.min&&C.push(N.id);u>.1&&ee(u,p,C)}},ee=(l,r,m)=>{let u;l>0?u=l/(f.value-r.length):u=l/(f.value-m.length),i.value.forEach((p,C)=>{if(l>0&&!r.includes(p.id)){const N=Math.max(Math.min(p.size+u,p.max),p.min),P=N-p.size;l-=P,p.size=N}else if(!m.includes(p.id)){const N=Math.max(Math.min(p.size+u,p.max),p.min),P=N-p.size;l-=P,p.size=N}}),Math.abs(l)>.1&&e.nextTick(()=>{k.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},K=(l,r=void 0,m=!1)=>{const u=r?.index??d.value.activeSplitter??null;s(l,{...r,...u!==null&&{index:u},...m&&u!==null&&{prevPane:i.value[u-(a.firstSplitter?1:0)],nextPane:i.value[u+(a.firstSplitter?0:1)]},panes:i.value.map(p=>({min:p.min,max:p.max,size:p.size}))})};e.watch(()=>a.firstSplitter,()=>M()),e.onMounted(()=>{L(),M(),$(),K("ready"),k.value=!0}),e.onBeforeUnmount(()=>k.value=!1);const te=()=>{var l;return e.h("div",{ref:h,class:b.value},(l=n.default)==null?void 0:l.call(n))};return e.provide("panes",i),e.provide("indexedPanes",g),e.provide("horizontal",e.computed(()=>a.horizontal)),e.provide("requestUpdate",H),e.provide("onPaneAdd",se),e.provide("onPaneRemove",Q),e.provide("onPaneClick",F),(l,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(te)))}},Le={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var o;const s=t,a=e.inject("requestUpdate"),n=e.inject("onPaneAdd"),i=e.inject("horizontal"),g=e.inject("onPaneRemove"),f=e.inject("onPaneClick"),h=(o=e.getCurrentInstance())==null?void 0:o.uid,k=e.inject("indexedPanes"),d=e.computed(()=>k.value[h]),v=e.ref(null),b=e.computed(()=>{const x=isNaN(s.size)||s.size===void 0?0:parseFloat(s.size);return Math.max(Math.min(x,_.value),V.value)}),V=e.computed(()=>{const x=parseFloat(s.minSize);return isNaN(x)?0:x}),_=e.computed(()=>{const x=parseFloat(s.maxSize);return isNaN(x)?100:x}),E=e.computed(()=>{var x;return`${i.value?"height":"width"}: ${(x=d.value)==null?void 0:x.size}%`});return e.watch(()=>b.value,x=>a({uid:h,size:x})),e.watch(()=>V.value,x=>a({uid:h,min:x})),e.watch(()=>_.value,x=>a({uid:h,max:x})),e.onMounted(()=>{n({id:h,el:v.value,min:V.value,max:_.value,givenSize:s.size===void 0?null:b.value,size:b.value})}),e.onBeforeUnmount(()=>g(h)),(x,O)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:v,class:"splitpanes__pane",onClick:O[0]||(O[0]=S=>e.unref(f)(S,x._.uid)),style:e.normalizeStyle(E.value)},[e.renderSlot(x.$slots,"default")],4))}},Ae={class:"pa-2"},qe={class:"question"},He={__name:"AskDialog",props:e.mergeModels({question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["response"],["update:modelValue"]),setup(t,{emit:o}){const s=t,a=o,n=e.useModel(t,"modelValue"),i=e.ref(s.default||""),g=e.ref(!!s.default||!s.answerRequired),f=e.computed(()=>s.answerRequired?[d=>!!d||"Required"]:[d=>!0]);function h(){a("response",i.value)}function k(){a("response","COSMOS__CANCEL")}return(d,v)=>{const b=e.resolveComponent("v-spacer"),V=e.resolveComponent("v-toolbar"),_=e.resolveComponent("v-text-field"),E=e.resolveComponent("v-card-text"),x=e.resolveComponent("v-btn"),O=e.resolveComponent("v-card-actions"),S=e.resolveComponent("v-form"),R=e.resolveComponent("v-card"),F=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(F,{modelValue:n.value,"onUpdate:modelValue":v[2]||(v[2]=B=>n.value=B),persistent:"",width:"600",onKeydown:e.withKeys(k,["esc"])},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(S,{modelValue:g.value,"onUpdate:modelValue":v[1]||(v[1]=B=>g.value=B),onSubmit:e.withModifiers(h,["prevent"])},{default:e.withCtx(()=>[e.createVNode(V,{height:"24"},{default:e.withCtx(()=>[e.createVNode(b),v[3]||(v[3]=e.createElementVNode("span",null," User Input Required ",-1)),e.createVNode(b)]),_:1}),e.createElementVNode("div",Ae,[e.createVNode(E,null,{default:e.withCtx(()=>[e.createElementVNode("div",qe,e.toDisplayString(t.question),1),e.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":v[0]||(v[0]=B=>i.value=B),autofocus:"","data-test":"ask-value-input",type:t.password?"password":"text",rules:f.value},null,8,["modelValue","type","rules"])]),_:1})]),e.createVNode(O,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(b),e.createVNode(x,{variant:"outlined","data-test":"ask-cancel",onClick:k},{default:e.withCtx(()=>[...v[4]||(v[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(x,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!g.value,onClick:e.withModifiers(h,["prevent"])},{default:e.withCtx(()=>[...v[5]||(v[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}}},Ge=ie._export_sfc(He,[["__scopeId","data-v-97451a95"]]),Ke={props:{title:{type:String,required:!0},message:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","response"],data(){return{buckets:[],selectedBucket:null,path:"",files:[],selectedFile:null,search:"",loading:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},breadcrumbPath(){if(!this.path)return[];const t=this.path.split("/").filter(o=>!!o);return t.map((o,s)=>({name:o,path:t.slice(0,s+1).join("/")+"/"}))},filteredFiles(){if(!this.search)return this.files;const t=this.search.toLowerCase();return this.files.filter(o=>o.name.toLowerCase().includes(t))}},created(){T.Fr.get("/openc3-api/storage/buckets").then(t=>{this.buckets=t.data})},methods:{formatSize(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`},selectBucket(t){this.selectedBucket=t,this.path="",this.selectedFile=null,this.updateFiles()},backArrow(){if(this.path==="")return;const t=this.path.split("/");this.path=t.slice(0,-2).join("/"),this.path&&(this.path+="/"),this.selectedFile=null,this.updateFiles()},gotoPath(t){this.path=t,this.selectedFile=null,this.updateFiles()},itemClick(t){t.icon==="mdi-folder"?(this.path+=`${t.name}/`,this.selectedFile=null,this.updateFiles()):this.selectedFile=t.name},itemDblClick(t){t.icon==="mdi-file"&&(this.selectedFile=t.name,this.submitHandler())},updateFiles(){this.loading=!0;const t=this.selectedBucket.toUpperCase();T.Fr.get(`/openc3-api/storage/files/OPENC3_${t}_BUCKET/${this.path}`).then(o=>{this.files=o.data[0].map(s=>({name:s,icon:"mdi-folder"})),this.files=this.files.concat(o.data[1].map(s=>({name:s.name,icon:"mdi-file",size:s.size}))),this.loading=!1}).catch(()=>{this.files=[],this.loading=!1})},submitHandler(){this.$emit("response",{bucket:`OPENC3_${this.selectedBucket.toUpperCase()}_BUCKET`,path:`${this.path}${this.selectedFile}`,filename:this.selectedFile})},cancelHandler(){this.$emit("response","COSMOS__CANCEL")}}},je={class:"pa-2"},We={class:"text-h6"},Je=["textContent"],Ye={class:"ma-2",style:{"font-size":"0.875rem"},"data-test":"bucket-path"},Xe=["onClick"],Qe={class:"text-caption"};function Ze(t,o,s,a,n,i){const g=e.resolveComponent("v-spacer"),f=e.resolveComponent("v-toolbar"),h=e.resolveComponent("v-row"),k=e.resolveComponent("v-icon"),d=e.resolveComponent("v-chip"),v=e.resolveComponent("v-btn"),b=e.resolveComponent("v-text-field"),V=e.resolveComponent("v-progress-circular"),_=e.resolveComponent("v-list-item"),E=e.resolveComponent("v-list-item-title"),x=e.resolveComponent("v-list"),O=e.resolveComponent("v-col"),S=e.resolveComponent("v-card-text"),R=e.resolveComponent("v-card-actions"),F=e.resolveComponent("v-card"),B=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(B,{modelValue:i.show,"onUpdate:modelValue":o[1]||(o[1]=y=>i.show=y),persistent:"",width:"800",onKeydown:e.withKeys(i.cancelHandler,["esc"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(f,{height:"24"},{default:e.withCtx(()=>[e.createVNode(g),o[2]||(o[2]=e.createElementVNode("span",null," Bucket Dialog ",-1)),e.createVNode(g)]),_:1}),e.createElementVNode("div",je,[e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(h,null,{default:e.withCtx(()=>[e.createElementVNode("span",We,e.toDisplayString(s.title),1)]),_:1}),s.message?(e.openBlock(),e.createBlock(h,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(s.message)},null,8,Je)]),_:1})):e.createCommentVNode("",!0),e.createVNode(h,{class:"my-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buckets,(y,A)=>(e.openBlock(),e.createBlock(d,{key:A,variant:n.selectedBucket===y?"elevated":"outlined",color:"primary",class:"ma-2","data-test":"bucket-chip",onClick:e.withModifiers(D=>i.selectBucket(y),["stop"])},{default:e.withCtx(()=>[e.createVNode(k,{start:""},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("mdi-bucket",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(y),1)]),_:2},1032,["variant","onClick"]))),128))]),_:1}),n.selectedBucket?(e.openBlock(),e.createBlock(h,{key:1,class:"my-1"},{default:e.withCtx(()=>[e.createVNode(O,{class:"pa-0"},{default:e.withCtx(()=>[e.createVNode(h,{class:"ma-0 align-center",style:{"background-color":"var(--color-background-surface-header)"}},{default:e.withCtx(()=>[e.createVNode(v,{icon:"mdi-chevron-left-box-outline",variant:"text",density:"compact",class:"ml-2","data-test":"bucket-nav-back","aria-label":"Navigate Back",onClick:e.withModifiers(i.backArrow,["stop"])},null,8,["onClick"]),e.createElementVNode("div",Ye,[e.createTextVNode(e.toDisplayString(n.selectedBucket)+"/",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.breadcrumbPath,(y,A)=>(e.openBlock(),e.createElementBlock("span",{key:A},[e.createElementVNode("a",{style:{cursor:"pointer"},onClick:e.withModifiers(D=>i.gotoPath(y.path),["prevent"])},e.toDisplayString(y.name),9,Xe),o[4]||(o[4]=e.createTextVNode("/",-1))]))),128))])]),_:1}),e.createVNode(b,{modelValue:n.search,"onUpdate:modelValue":o[0]||(o[0]=y=>n.search=y),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"mx-2 mt-2","data-test":"bucket-search"},null,8,["modelValue"]),e.createVNode(x,{density:"compact",class:"bucket-file-list","data-test":"bucket-file-list"},{default:e.withCtx(()=>[n.loading?(e.openBlock(),e.createBlock(_,{key:0},{default:e.withCtx(()=>[e.createVNode(V,{indeterminate:"",size:"20",class:"mr-2"}),o[5]||(o[5]=e.createTextVNode(" Loading... ",-1))]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.filteredFiles,y=>(e.openBlock(),e.createBlock(_,{key:y.name,class:e.normalizeClass({"selected-file":n.selectedFile===y.name&&y.icon==="mdi-file"}),"data-test":`bucket-item-${y.name}`,onClick:A=>i.itemClick(y),onDblclick:A=>i.itemDblClick(y)},e.createSlots({prepend:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.icon),1)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1024)]),_:2},[y.size?{name:"append",fn:e.withCtx(()=>[e.createElementVNode("span",Qe,e.toDisplayString(i.formatSize(y.size)),1)]),key:"0"}:void 0]),1032,["class","data-test","onClick","onDblclick"]))),128)),!n.loading&&i.filteredFiles.length===0?(e.openBlock(),e.createBlock(_,{key:1},{default:e.withCtx(()=>[e.createVNode(E,{class:"text-caption text-grey"},{default:e.withCtx(()=>[...o[6]||(o[6]=[e.createTextVNode(" No files found ",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(R,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(g),e.createVNode(v,{variant:"outlined","data-test":"bucket-cancel",onClick:i.cancelHandler},{default:e.withCtx(()=>[...o[7]||(o[7]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(v,{variant:"flat","data-test":"bucket-ok",disabled:!n.selectedFile,onClick:e.withModifiers(i.submitHandler,["prevent"])},{default:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const $e=ie._export_sfc(Ke,[["render",Ze],["__scopeId","data-v-16b638bb"]]),et={class:"pa-2"},tt={class:"text-h6"},ot=["textContent"],nt={__name:"FileDialog",props:e.mergeModels({title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["response"],["update:modelValue"]),setup(t,{emit:o}){const s=t,a=e.useModel(t,"modelValue"),n=o,i=e.ref(null),g=e.ref(null),f=e.computed(()=>[d=>s.multiple?d.length!=0||"Required":!!d||"Required"]),h=()=>{let d=i.value;Array.isArray(d)||(d=[d]),n("response",d)},k=()=>{n("response","COSMOS__CANCEL")};return(d,v)=>{const b=e.resolveComponent("v-spacer"),V=e.resolveComponent("v-toolbar"),_=e.resolveComponent("v-row"),E=e.resolveComponent("v-file-input"),x=e.resolveComponent("v-card-text"),O=e.resolveComponent("v-btn"),S=e.resolveComponent("v-card-actions"),R=e.resolveComponent("v-form"),F=e.resolveComponent("v-card"),B=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(B,{modelValue:a.value,"onUpdate:modelValue":v[2]||(v[2]=y=>a.value=y),persistent:"",width:"600",onKeydown:e.withKeys(k,["esc"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(R,{modelValue:g.value,"onUpdate:modelValue":v[1]||(v[1]=y=>g.value=y),onSubmit:e.withModifiers(h,["prevent"])},{default:e.withCtx(()=>[e.createVNode(V,{height:"24"},{default:e.withCtx(()=>[e.createVNode(b),v[3]||(v[3]=e.createElementVNode("span",null," File Dialog ",-1)),e.createVNode(b)]),_:1}),e.createElementVNode("div",et,[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createElementVNode("span",tt,e.toDisplayString(t.title),1)]),_:1}),t.message?(e.openBlock(),e.createBlock(_,{key:0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:e.toDisplayString(t.message)},null,8,ot)]),_:1})):e.createCommentVNode("",!0),e.createVNode(_,{class:"my-1"},{default:e.withCtx(()=>[e.createVNode(E,{modelValue:i.value,"onUpdate:modelValue":v[0]||(v[0]=y=>i.value=y),label:"Choose File",rules:f.value,autofocus:"","data-test":"file-input",accept:t.filter,"small-chips":"",multiple:t.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),e.createVNode(S,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(b),e.createVNode(O,{variant:"outlined","data-test":"file-cancel",onClick:k},{default:e.withCtx(()=>[...v[4]||(v[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(O,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!g.value,onClick:e.withModifiers(h,["prevent"])},{default:e.withCtx(()=>[...v[5]||(v[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}}},it=ie._export_sfc(nt,[["__scopeId","data-v-db719031"]]),st=["textContent"],lt={class:"pa-2"},rt=["textContent"],at={__name:"InformationDialog",props:e.mergeModels({title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue");return(s,a)=>{const n=e.resolveComponent("v-spacer"),i=e.resolveComponent("v-toolbar"),g=e.resolveComponent("v-row"),f=e.resolveComponent("v-card-text"),h=e.resolveComponent("v-btn"),k=e.resolveComponent("v-card-actions"),d=e.resolveComponent("v-card"),v=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(v,{modelValue:o.value,"onUpdate:modelValue":a[1]||(a[1]=b=>o.value=b),width:t.width},{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(i,{height:"24"},{default:e.withCtx(()=>[e.createVNode(n),e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(t.title)},null,8,st),e.createVNode(n)]),_:1}),e.createElementVNode("div",lt,[e.createVNode(f,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.text,(b,V)=>(e.openBlock(),e.createBlock(g,{key:V,"no-gutters":""},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"white-space":"pre"},textContent:e.toDisplayString(b)},null,8,rt)]),_:2},1024))),128))]),_:1})]),e.createVNode(k,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(n),e.createVNode(h,{variant:"flat",onClick:a[0]||(a[0]=b=>o.value=!o.value)},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}}},dt={class:"pa-2"},ct={__name:"OverridesDialog",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue"),s=new T.yi,a=e.ref([]),n=e.ref(""),i=[{title:"Target",key:"target_name"},{title:"Packet",key:"packet_name"},{title:"Item",key:"item_name"},{title:"Type",key:"value_type"},{title:"Value",key:"value"},{title:"Delete",key:"delete"}];async function g(){const k=await s.get_overrides();a.value=k}async function f(){const k=[...new Map(a.value.map(d=>[`${d.target_name}__${d.packet_name}__${d.item_name}`,d])).values()];for(const d of k)await s.normalize_tlm(d.target_name,d.packet_name,d.item_name,"ALL"),a.value=[]}async function h(k){await s.normalize_tlm(k.target_name,k.packet_name,k.item_name,k.value_type);const d=a.value.indexOf(k);a.value.splice(d,1)}return e.onMounted(()=>{g()}),(k,d)=>{const v=e.resolveComponent("v-spacer"),b=e.resolveComponent("v-toolbar"),V=e.resolveComponent("v-btn"),_=e.resolveComponent("v-text-field"),E=e.resolveComponent("v-row"),x=e.resolveComponent("v-data-table"),O=e.resolveComponent("v-card-text"),S=e.resolveComponent("v-card-actions"),R=e.resolveComponent("v-card"),F=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(F,{modelValue:o.value,"onUpdate:modelValue":d[2]||(d[2]=B=>o.value=B),width:"1000"},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(b,{height:"24"},{default:e.withCtx(()=>[e.createVNode(v),d[3]||(d[3]=e.createElementVNode("span",null,"Overrides",-1)),e.createVNode(v)]),_:1}),e.createElementVNode("div",dt,[e.createVNode(O,null,{default:e.withCtx(()=>[e.createVNode(E,{class:"ma-1"},{default:e.withCtx(()=>[e.createVNode(V,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:f},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode(" Clear All Overrides ",-1)])]),_:1}),e.createVNode(v),e.createVNode(_,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=B=>n.value=B),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),e.createVNode(x,{headers:i,items:a.value,search:n.value,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":e.withCtx(({item:B})=>[e.createVNode(V,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:y=>h(B)},null,8,["onClick"])]),_:1},8,["items","search"])]),_:1})]),e.createVNode(S,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(v),e.createVNode(V,{variant:"flat","data-test":"overrides-dialog-ok",onClick:d[1]||(d[1]=B=>o.value=!o.value)},{default:e.withCtx(()=>[...d[5]||(d[5]=[e.createTextVNode(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}}},ut=["textContent"],mt={class:"pa-2",style:{"max-height":"60vh",overflow:"auto"}},pt=["textContent"],ht=["textContent"],ft={key:0},vt={key:1},gt={key:2},wt={__name:"PromptDialog",props:e.mergeModels({title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal",validator(t){return["horizontal","vertical","combo","check"].includes(t)}},multiple:{type:Boolean,default:!1,required:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["response"],["update:modelValue"]),setup(t,{emit:o}){const s=t,a=e.useModel(t,"modelValue"),n=o,i=e.ref([]),g=e.ref(!0),f=e.ref(null),h=e.computed(()=>{const V="px-2 d-flex align-start";return s.layout==="vertical"?`${V} flex-column prompt-buttons-vertical`:`${V} flex-row flex-wrap prompt-buttons-horizontal`});function k(V){f.value=V,d()}function d(){n("response",f.value)}function v(){n("response",i.value)}function b(){n("response","COSMOS__CANCEL")}return(V,_)=>{const E=e.resolveComponent("v-spacer"),x=e.resolveComponent("v-toolbar"),O=e.resolveComponent("v-card-subtitle"),S=e.resolveComponent("v-row"),R=e.resolveComponent("v-card-text"),F=e.resolveComponent("v-select"),B=e.resolveComponent("v-btn"),y=e.resolveComponent("v-card-actions"),A=e.resolveComponent("v-checkbox"),D=e.resolveComponent("v-col"),w=e.resolveComponent("v-card"),q=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(q,{modelValue:a.value,"onUpdate:modelValue":_[3]||(_[3]=z=>a.value=z),persistent:"",scrollable:"",width:"600",onKeydown:e.withKeys(b,["esc"])},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(x,{height:"24"},{default:e.withCtx(()=>[e.createVNode(E),e.createElementVNode("span",{class:"text",textContent:e.toDisplayString(t.title)},null,8,ut),e.createVNode(E)]),_:1}),e.createElementVNode("div",mt,[e.createVNode(R,{class:"text"},{default:e.withCtx(()=>[t.subtitle?(e.openBlock(),e.createBlock(S,{key:0,class:"mb-2"},{default:e.withCtx(()=>[e.createVNode(O,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.subtitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(S,{class:"mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(t.message)},null,8,pt)]),_:1}),t.details?(e.openBlock(),e.createBlock(S,{key:1,class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("span",{textContent:e.toDisplayString(t.details)},null,8,ht)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),t.layout==="combo"?(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(S,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(F,{modelValue:f.value,"onUpdate:modelValue":[_[0]||(_[0]=z=>f.value=z),_[1]||(_[1]=z=>g.value=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:t.buttons,multiple:t.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),e.createVNode(y,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(E),e.createVNode(B,{variant:"outlined","data-test":"prompt-cancel",onClick:b},{default:e.withCtx(()=>[..._[4]||(_[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(B,{variant:"flat","data-test":"prompt-ok",disabled:g.value,onClick:d},{default:e.withCtx(()=>[..._[5]||(_[5]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})])):t.layout==="check"?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(S,{class:"ma-2"},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,(z,U)=>(e.openBlock(),e.createBlock(A,{key:U,modelValue:i.value,"onUpdate:modelValue":_[2]||(_[2]=L=>i.value=L),label:z.title,value:z.value,color:"secondary",density:"compact","hide-details":"","data-test":`prompt-check-${z.value}`},null,8,["modelValue","label","value","data-test"]))),128))]),_:1})]),_:1}),e.createVNode(y,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(E),e.createVNode(B,{variant:"outlined","data-test":"prompt-cancel",onClick:b},{default:e.withCtx(()=>[..._[6]||(_[6]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(B,{variant:"flat","data-test":"prompt-ok",disabled:i.value.length===0,onClick:v},{default:e.withCtx(()=>[..._[7]||(_[7]=[e.createTextVNode(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})])):(e.openBlock(),e.createElementBlock("div",gt,[e.createVNode(y,{class:e.normalizeClass(h.value)},{default:e.withCtx(()=>[t.layout!=="vertical"?(e.openBlock(),e.createBlock(E,{key:0})):e.createCommentVNode("",!0),e.createVNode(B,{variant:"outlined","data-test":"prompt-cancel",onClick:b},{default:e.withCtx(()=>[..._[8]||(_[8]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,(z,U)=>(e.openBlock(),e.createElementBlock("div",{key:U},[e.createVNode(B,{variant:"flat","data-test":`prompt-${z.text}`,onClick:L=>k(z.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue"])}}},Ct=ie._export_sfc(wt,[["__scopeId","data-v-11ef54cb"]]),_t={class:"pa-2"},kt={__name:"ResultsDialog",props:e.mergeModels({text:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,s=e.useModel(t,"modelValue"),a=e.ref(null);function n(){const i=new Blob([o.text],{type:"text/plain"}),g=document.createElement("a");g.href=URL.createObjectURL(i),g.setAttribute("download",ce.format(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),g.click()}return e.onMounted(()=>{setTimeout(()=>{a.value?.$el?.focus()})}),(i,g)=>{const f=e.resolveComponent("v-spacer"),h=e.resolveComponent("v-toolbar"),k=e.resolveComponent("v-textarea"),d=e.resolveComponent("v-card-text"),v=e.resolveComponent("v-btn"),b=e.resolveComponent("v-card-actions"),V=e.resolveComponent("v-card"),_=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(_,{modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=E=>s.value=E),scrollable:"",width:"800"},{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{height:"24"},{default:e.withCtx(()=>[e.createVNode(f),g[2]||(g[2]=e.createElementVNode("span",null," Script Results ",-1)),e.createVNode(f)]),_:1}),e.createElementVNode("div",_t,[e.createVNode(d,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:e.withCtx(()=>[e.createVNode(k,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":t.text},null,8,["model-value"])]),_:1})]),e.createVNode(b,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(f),e.createVNode(v,{variant:"outlined",onClick:n},{default:e.withCtx(()=>[...g[3]||(g[3]=[e.createTextVNode(" Download ",-1)])]),_:1}),e.createVNode(v,{ref_key:"okButton",ref:a,variant:"flat",onClick:g[0]||(g[0]=E=>s.value=!s.value)},{default:e.withCtx(()=>[...g[4]||(g[4]=[e.createTextVNode(" Ok ",-1)])]),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}}},bt={class:"pa-2"},xt={__name:"ScriptEnvironmentDialog",props:e.mergeModels({inputEnvironment:{type:Array,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:e.mergeModels(["environment"],["update:modelValue"]),setup(t,{emit:o}){const s=t,a=e.useModel(t,"modelValue"),n=o,i=e.ref([]);function g(){i.value=[...s.inputEnvironment]}function f(){n("environment",i.value),a.value=!a.value}function h(){a.value=!a.value}return e.onMounted(()=>{g()}),(k,d)=>{const v=e.resolveComponent("v-spacer"),b=e.resolveComponent("v-toolbar"),V=e.resolveComponent("v-card-text"),_=e.resolveComponent("v-btn"),E=e.resolveComponent("v-card-actions"),x=e.resolveComponent("v-card"),O=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(O,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=S=>a.value=S),persistent:"",width:"600",onKeydown:e.withKeys(h,["esc"])},{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(b,{height:"24"},{default:e.withCtx(()=>[e.createVNode(v),d[2]||(d[2]=e.createElementVNode("span",null,"Script Environment Variables",-1)),e.createVNode(v)]),_:1}),e.createElementVNode("div",bt,[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ge.EnvironmentChooser),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=S=>i.value=S)},null,8,["modelValue"])]),_:1})]),e.createVNode(E,{class:"px-2"},{default:e.withCtx(()=>[e.createVNode(v),e.createVNode(_,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:h},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(_,{variant:"flat","data-test":"environment-dialog-save",onClick:f},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}}},Vt={id:"tr-container"},yt={__name:"SuiteRunner",props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},emits:["button","loaded"],setup(t,{emit:o}){const s=t,a=o,n=e.ref([]),i=e.ref([]),g=e.ref([]),f=e.ref(""),h=e.ref(""),k=e.ref(""),d=e.ref(["pauseOnError","manual","continueAfterError"]),v=e.ref({}),b=e.computed(()=>s.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"),V=e.computed(()=>s.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"),_=e.computed(()=>!!(f.value&&s.suiteMap[f.value]?.setup)),E=e.computed(()=>!!(f.value&&s.suiteMap[f.value]?.teardown)),x=e.computed(()=>!!(f.value&&h.value&&s.suiteMap[f.value]?.groups[h.value]?.setup)),O=e.computed(()=>!!(f.value&&h.value&&s.suiteMap[f.value]?.groups[h.value]?.teardown)),S=e.computed(()=>g.value.map(D=>({title:D.replace(/^(script_|test_)/,""),value:D})));e.watch(()=>s.suiteMap,()=>{R()},{deep:!0});function R(){n.value=Object.keys(s.suiteMap),s.suiteMap[f.value]==null||s.suiteMap[f.value].groups[h.value]==null?F():(i.value=Object.keys(s.suiteMap[f.value].groups),g.value=s.suiteMap[f.value].groups[h.value].scripts)}function F(){n.value=Object.keys(s.suiteMap),B(n.value[0])}function B(D){!D||s.suiteMap[D]==null||(f.value=D,h.value="",k.value="",i.value=Object.keys(s.suiteMap[D].groups),y(i.value[0]))}function y(D){!D||s.suiteMap[f.value]==null||s.suiteMap[f.value].groups[D]==null||(h.value=D,k.value="",g.value=s.suiteMap[f.value].groups[D].scripts,A(g.value[0]))}function A(D){k.value=D}return e.onMounted(()=>{v.value=JSON.parse(localStorage.script_runner__userinfo),F(),a("loaded")}),(D,w)=>{const q=e.resolveComponent("v-checkbox"),z=e.resolveComponent("v-tooltip"),U=e.resolveComponent("v-col"),L=e.resolveComponent("v-row"),J=e.resolveComponent("v-select"),G=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Vt,[e.createVNode(L,{"no-gutters":"",align:"center"},{default:e.withCtx(()=>[e.createVNode(U,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=H=>d.value=H),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[w[16]||(w[16]=e.createElementVNode("span",null,[e.createTextVNode(" Checked pauses the script when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[1]||(w[1]=H=>d.value=H),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(b.value),1),w[17]||(w[17]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(V.value),1)])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(U,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(U,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:f.value,"onUpdate:modelValue":[w[2]||(w[2]=M=>f.value=M),B],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:n.value,"data-test":"select-suite"},null,8,["modelValue","items"])]),_:1}),e.createVNode(U,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(G,{color:"primary",class:"mr-2",disabled:t.disableButtons||!v.value.execute,"data-test":"start-suite",onClick:w[3]||(w[3]=M=>D.$emit("button",{method:"start",suite:f.value,options:d.value}))},{default:e.withCtx(()=>[...w[18]||(w[18]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(G,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:t.disableButtons||!_.value||!v.value.execute,onClick:w[4]||(w[4]=M=>D.$emit("button",{method:"setup",suite:f.value,options:d.value}))},{default:e.withCtx(()=>[...w[19]||(w[19]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(G,{color:"primary","data-test":"teardown-suite",disabled:t.disableButtons||!E.value||!v.value.execute,onClick:w[5]||(w[5]=M=>D.$emit("button",{method:"teardown",suite:f.value,options:d.value}))},{default:e.withCtx(()=>[...w[20]||(w[20]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(L,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(U,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[6]||(w[6]=H=>d.value=H),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[w[21]||(w[21]=e.createElementVNode("span",null,[e.createTextVNode(" Checked allows the script to continue when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[7]||(w[7]=H=>d.value=H),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[w[22]||(w[22]=e.createElementVNode("span",null,[e.createTextVNode(" Checked continuously executes until explicitly stopped"),e.createElementVNode("br"),e.createTextVNode(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(U,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(U,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:h.value,"onUpdate:modelValue":[w[8]||(w[8]=M=>h.value=M),y],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:i.value,"data-test":"select-group"},null,8,["modelValue","items"])]),_:1}),e.createVNode(U,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(G,{color:"primary",class:"mr-2",disabled:t.disableButtons||!v.value.execute,"data-test":"start-group",onClick:w[9]||(w[9]=M=>D.$emit("button",{method:"start",suite:f.value,group:h.value,options:d.value}))},{default:e.withCtx(()=>[...w[23]||(w[23]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(G,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:t.disableButtons||!x.value||!v.value.execute,onClick:w[10]||(w[10]=M=>D.$emit("button",{method:"setup",suite:f.value,group:h.value,options:d.value}))},{default:e.withCtx(()=>[...w[24]||(w[24]=[e.createTextVNode(" Setup ",-1)])]),_:1},8,["disabled"]),e.createVNode(G,{color:"primary","data-test":"teardown-group",disabled:t.disableButtons||!O.value||!v.value.execute,onClick:w[11]||(w[11]=M=>D.$emit("button",{method:"teardown",suite:f.value,group:h.value,options:d.value}))},{default:e.withCtx(()=>[...w[25]||(w[25]=[e.createTextVNode(" Teardown ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(L,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(U,{cols:"4"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[12]||(w[12]=H=>d.value=H),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:e.withCtx(()=>[w[26]||(w[26]=e.createElementVNode("span",null,[e.createTextVNode(" Checked stops additional script execution when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),e.createVNode(U,{cols:"6"},{default:e.withCtx(()=>[e.createVNode(z,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:M})=>[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(M)),[e.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":w[13]||(w[13]=H=>d.value=H),disabled:!d.value.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:e.withCtx(()=>[w[27]||(w[27]=e.createElementVNode("span",null,[e.createTextVNode(" Checked breaks the loop option when an error is encountered"),e.createElementVNode("br"),e.createTextVNode(" Unchecked allows the loop to run continuously"),e.createElementVNode("br"),e.createTextVNode(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),e.createVNode(U,{cols:"8"},{default:e.withCtx(()=>[e.createVNode(L,{"no-gutters":"",justify:"end"},{default:e.withCtx(()=>[e.createVNode(U,{cols:"5"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:k.value,"onUpdate:modelValue":[w[14]||(w[14]=M=>k.value=M),A],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:S.value,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items"])]),_:1}),e.createVNode(U,{cols:"auto"},{default:e.withCtx(()=>[e.createVNode(G,{color:"primary",class:"mr-2",disabled:t.disableButtons||!v.value.execute,"data-test":"start-script",onClick:w[15]||(w[15]=M=>D.$emit("button",{method:"start",suite:f.value,group:h.value,script:k.value,options:d.value}))},{default:e.withCtx(()=>[...w[28]||(w[28]=[e.createTextVNode(" Start ",-1)])]),_:1},8,["disabled"]),e.createVNode(G,{color:"primary",class:"mr-2 invisible"},{default:e.withCtx(()=>[...w[29]||(w[29]=[e.createTextVNode(" Setup ",-1)])]),_:1}),e.createVNode(G,{color:"primary",class:"invisible"},{default:e.withCtx(()=>[...w[30]||(w[30]=[e.createTextVNode(" Teardown ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}}},_e=ie._export_sfc(yt,[["__scopeId","data-v-9cca3314"]]);class Nt{#e;#t;#o;#n;#i;constructor(o,{pattern:s,text:a,type:n}){this.#e=`regexAnnotator-${Math.floor(Math.random()*1e7)}`,this.#t=o,this.#o=s,this.#n=a,this.#i=n}refresh=()=>{const o=this.#t.session;this.#a(o);const s={lines:o.doc.$lines,action:"insert",start:{row:0},end:{row:o.doc.$lines.length}};this.annotate(s,o)};annotate=(o,s)=>{if(o.lines.length>1)switch(o.action){case"insert":this.#l(s,o.start.row,o.lines.length-1);break;case"remove":this.#l(s,o.start.row+1,-o.lines.length+1);break}for(let a=o.start.row;a<=o.end.row;a++){let n=s.doc.$lines[a]?.match(this.#o)?.index;n!==void 0?(n!==0&&(n+=1),this.#r(s,{row:a,column:n,text:this.#n,type:this.#i,openc3Id:this.#e})):o.action==="remove"&&this.#s(s,a)}};#r=(o,s)=>{this.#s(o,s.row),o.setAnnotations([...o.getAnnotations(),s])};#s=(o,s)=>{o.setAnnotations(o.getAnnotations().filter(a=>a.openc3Id!==this.#e||a.row!==s))};#l=(o,s,a)=>{o.setAnnotations(o.getAnnotations().map(n=>(n.row>s&&(n.row+=a),n)))};#a=o=>{o.setAnnotations(o.getAnnotations().filter(s=>s.openc3Id!==this.#e))}}class St extends Nt{constructor(o){const s="(^|[{\\s])",a="sleep",n="[\\(\\s]";super(o,{pattern:new RegExp(`${s}${a}${n}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const fe="__TEMP__",Y="<Untitled>",ue="Start",Et="Go",de="Pause",Bt="Retry",Tt={components:{FileOpenSaveDialog:Z.FileOpenSaveDialog,Openc3Screen:Z.Openc3Screen,EnvironmentDialog:Z.EnvironmentDialog,Splitpanes:Pe,Pane:Le,TopBar:ae.TopBar,AskDialog:Ge,BucketDialog:$e,FileDialog:it,InformationDialog:at,EventListDialog:Re.EventListDialog,OverridesDialog:ct,PromptDialog:Ct,ResultsDialog:kt,ScriptEnvironmentDialog:xt,SimpleTextDialog:Me.SimpleTextDialog,SuiteRunner:_e,RunningScripts:we,ScriptLogMessages:Ce,CriticalCmdDialog:Te.CriticalCmdDialog,CommandEditor:ge.CommandEditor},mixins:[ve.AceEditorModes,Oe._sfc_main],beforeRouteUpdate:function(t,o,s){t.params.id?this.tryLoadRunningScript(t.params.id).then(s):s()},props:{inline:{type:Boolean,default:!1},body:{type:String,default:null},initialFilename:{type:String,default:null}},emits:["alert","script-id"],setup(){return{containerHeight:Ee.useContainerHeight()}},data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:ue,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:de,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:Y,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,inlineTab:"script",maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},bucket:{show:!1,title:"",message:""},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new Ue,showScripts:!1,showOverrides:!1,overridesCount:0,commandEditor:{show:!1,targetName:null,commandName:null,dialogError:null,cmdString:null,isEditing:!1,editLine:null},currentLineHasCommand:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1,editorBoxSize:50}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state==="completed_errors"?"completed":this.state},stateColorClass:function(){return this.state==="error"||this.state==="crashed"||this.state==="killed"?"script-state-red":this.state==="completed_errors"?"script-state-orange":this.state==="completed"?"script-state-green":""},fileList:function(){const t=Object.keys(this.files);return t.push(this.fullFilename),[...new Set(t)]},environmentModified:function(){return this.scriptEnvironment.env.length>0},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===Y?Y:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===Y?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFileWithConfirm()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFileWithConfirm()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]}},watch:{isLocked:function(t){this.showEditingToast=t,this.suiteRunner||(this.startOrGoDisabled=t),this.readOnlyUser==!1&&t==!1&&!this.inline?this.editor.setReadOnly(t):this.editor.setReadOnly(!0)},fullFilename:function(t){this.filenameSelect=t,this.inline||(t===Y?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=t)},readOnlyUser:function(t){this.editor&&(t?(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none"):(this.inline||this.editor.setReadOnly(!1),this.editor.renderer.$cursorLayer.element.style.display=null))},showOverrides:function(t,o){o&&!t&&this.updateOverridesCount()}},created:async function(){this.api=new T.yi,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(s=>{s&&(this.timeZone=s)}).catch(s=>{}),this.updateOverridesCount(),this.NEW_FILENAME=Y;let t=OpenC3Auth.user(),o=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let s of o)s!="viewer"&&(s=="admin"||s=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):s=="runner"?this.executeUser=!0:await T.Fr.get(`/openc3-api/roles/${s}`).then(a=>{a.data!==null&&a.data.permissions!==void 0&&(a.data.permissions.some(n=>n.permission=="script_edit")&&(this.readOnlyUser=!1),a.data.permissions.some(n=>n.permission=="script_run")&&(this.executeUser=!0))}));if(this.inline||(localStorage.script_runner__userinfo=JSON.stringify({name:t.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser})),this.readOnlyUser==!0){this.alertType="info";let s=`User ${t.preferred_username} is read only`;this.executeUser&&(s+=" but can execute scripts"),this.alertText=s,this.showAlert=!0}T.Fr.get("/openc3-api/autocomplete/keywords/screen").then(s=>{this.screenKeywords=s.data}),this.inline&&(this.readOnly=!0)},mounted:async function(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const t=this.buildRubyMode(),o=this.buildPythonMode();this.rubyMode=new t,this.pythonMode=new o,ae.AceEditorUtils.getDefaultScriptingLanguage()==="python"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Z.CmdCompleter,new Z.TlmCompleter],this.editor.setHighlightActiveLine(!1),ae.AceEditorUtils.applyVimModeIfEnabled(this.editor,{saveFn:this.saveFile}),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),(this.readOnlyUser||this.inline)&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const a=new St(this.editor);this.editor.session.on("change",(n,i)=>{a.annotate(n,i),this.updateBreakpoints(n,i)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),this.cable=new T.bi("/script-api/cable"),!this.inline&&localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(n=>({...n,command:async i=>{this.filename=i.label,await this.reloadFile()}}))),this.inline?this.body&&(this.editor.setValue(this.body),this.editor.clearSelection(),this.initialFilename&&(this.filename=this.initialFilename)):this.$route.query?.file?(this.filename=this.$route.query.file,await this.reloadFile()):this.$route.params?.id?await this.tryLoadRunningScript(this.$route.params.id):(this.scriptId=sessionStorage.getItem("script_runner__script_id"),this.scriptId?await this.tryLoadRunningScript(this.scriptId):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1))),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.scriptId&&!this.inline&&sessionStorage.setItem("script_runner__script_id",this.scriptId),this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},methods:{updateOverridesCount:function(){this.api.get_overrides().then(t=>{this.overridesCount=t.length})},toggleVimMode(){ae.AceEditorUtils.toggleVimMode(this.editor)},openCommandEditor(){this.executeSelectionMenu=!1;const t=this.editor.getCursorPosition(),o=this.editor.session.getLine(t.row);if(this.currentLineHasCommand){const s=this.parseCommandFromLine(o);this.commandEditor.cmdString=s,this.commandEditor.isEditing=!0,this.commandEditor.editLine=t.row}else this.commandEditor.cmdString=null,this.commandEditor.isEditing=!1,this.commandEditor.editLine=null;this.commandEditor.show=!0,this.commandEditor.dialogError=null},insertCommand(t){let o="";try{o=this.$refs.commandEditor.getCmdString();let s=o.split(" ");this.commandEditor.targetName=s[0],this.commandEditor.commandName=s[1]}catch(s){this.commandEditor.dialogError=s.message||"Please fix command parameters";return}if(this.commandEditor.isEditing&&this.commandEditor.editLine!==null){const s=this.editor.session.getLine(this.commandEditor.editLine),a=s.match(/^\s*/)[0],n=s.match(/\s+#.*$/),i=n?n[0]:"",g=`${a}cmd("${o}")${i}`,f=this.Range;this.editor.session.replace(new f(this.commandEditor.editLine,0,this.commandEditor.editLine,s.length),g)}else{const s=this.editor.getCursorPosition();this.editor.session.insert(s,`cmd("${o}")
5
+ `)}this.fileModified=!0,this.commandEditor.show=!1},closeCommandDialog:function(){this.commandEditor.show=!1},doResize(){this.editor.resize()},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){T.Fr.get("/openc3-api/metadata").then(t=>{this.inputMetadata.events=t.data.map(o=>({name:"Metadata",start:new Date(o.start*1e3),end:new Date(o.start*1e3),color:o.color,type:o.type,timed:!0,metadata:o})),this.inputMetadata.show=!0})},messageSortOrder(t){t==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):t==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(t){t=t.split("*")[0],this.editor.setValue(this.files[t].content),this.restoreBreakpoints(t),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[t].lineNo-1,0,this.files[t].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[t].lineNo)},tryLoadRunningScript:function(t){return T.Fr.get(`/script-api/running-script/${t}`).then(o=>{if(o.data){let s=o.data.state;s!=="completed"&&s!=="completed_errors"&&s!=="stopped"&&s!=="crashed"&&s!=="killed"?(this.filename=o.data.filename,this.tryLoadSuites(o),this.initScriptStart(),this.scriptStart(t)):(this.$notify.caution({title:`Script ${t} has already completed`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0)}else throw new Error(`Unable to load state for running script ${t}`)}).catch(o=>{this.$notify.caution({title:`Running Script ${t} not found`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0})},tryLoadSuites:function(t){t.data.suites&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(t.data.suites)),this.doResize()},showExecuteSelectionMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;const o=this.editor.getCursorPosition(),s=this.editor.session.getLine(o.row);this.currentLineHasCommand=this.isCommandLine(s),this.executeSelectionMenu=!0},isCommandLine:function(t){const o=t.trim();return/^\s*cmd(_\w+)?\s*\(/.test(o)},parseCommandFromLine:function(t){const o=t.match(/cmd(_\w+)?\s*\(\s*["'](.+?)["']\s*\)/);return o?o[2]:null},runFromCursor:function(){const t=this.editor.getCursorPosition().row+1;this.scriptId?T.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,t]}}):this.start(null,null,t)},executeSelection:function(){const t=this.editor.getSelectionRange();let o=t.start.row+1,s=t.end.row+1;t.end.column===0&&(s-=1),this.scriptId?T.Fr.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,o,s]}}):this.start(null,null,o,s)},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(t){if(!this.scriptId){const o=t.getDocumentPosition().row;t.editor.session.getBreakpoints(o,0)[o]?t.editor.session.clearBreakpoint(o):t.editor.session.setBreakpoint(o)}},updateBreakpoints:function(t,o){if(t.lines.length<=1)return;const s=this.getBreakpointRows(o).filter(i=>t.start.column===0&&i===t.start.row||i>t.start.row);let a=[],n=0;switch(t.action){case"insert":n=t.lines.length-1,s.reverse();break;case"remove":n=-t.lines.length+1,a=[...Array(t.lines.length).keys()].map(i=>i+t.start.row);break}s.forEach(i=>{o.clearBreakpoint(i),a.includes(i)||o.setBreakpoint(i+n)})},getBreakpointRows:function(t=this.editor.session){return t.getBreakpoints().map((o,s)=>o&&s).filter(Number.isInteger)},restoreBreakpoints:function(t){this.clearBreakpoints(),this.breakpoints[t]?.forEach(o=>{this.editor.session.setBreakpoint(o)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(t=>T.Fr.delete("/script-api/breakpoints/delete/all")).then(t=>{this.clearBreakpoints()})},suiteRunnerButton(t){this.startOrGoButton===ue?this.start(t,"suiteRunner"):this.go(t,"suiteRunner")},async keydown(t){this.scriptId||this.editor.getReadOnly()===!0||(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.shiftKey?(t.preventDefault(),this.saveAs()):(t.preventDefault(),await this.saveFile()))},onChange(t){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){let t=this.filename;this.filename!==Y&&(t.endsWith(".rb")||t.endsWith(".py")||T.Fr.post(`/script-api/scripts/${this.filename}/mnemonics`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(o=>{let s="";s+=`<strong>${o.data.title}</strong><br/><br/>`,s+=JSON.parse(o.data.description),this.$dialog.alert(s.trim(),{html:!0})})),this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:o,problems:s})=>{let a="";if(s.length){const n=s.map(i=>`${i.lineNumber}: ${i.error}`).join("<br/>");a+=`<strong>The following lines have problems:</strong><br/>${n}<br/><br/>`}o.length&&(a+="<strong>Mnemonics with string interpolation were not checked.</strong>"),a===""&&(a="<strong>Everything looks good!</strong>"),this.$dialog.alert(a.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=Et,this.editor.setReadOnly(!0)},scriptStart(t){this.$emit("script-id",t),this.scriptId=t,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:o=>this.received(o)},{id:this.scriptId}).then(o=>{this.subscription=o})},async scriptComplete(){this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&!this.inline&&this.editor.setReadOnly(!1),this.scriptId=null,sessionStorage.removeItem("script_runner__script_id"),this.disableSuiteButtons=!1,this.startOrGoButton=ue,this.pauseOrRetryButton=de,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.updateOverridesCount()},environmentHandler:function(t){this.scriptEnvironment.env=t},startHandler:function(){this.start()},async start(t=null,o=null,s=null,a=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let n=this.filename;this.filename===Y&&(n=this.tempFilename);let i=`/script-api/scripts/${n}/run`;this.showDisconnect&&(i+="/disconnect");let g=this.scriptEnvironment.env;this.enableStackTraces&&(g=g.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let f={environment:g};o&&(f.suiteRunner=t),s!==null&&(f.line_no=s),a!==null&&(f.end_line_no=a),T.Fr.post(i,{data:f}).then(h=>{this.scriptStart(h.data)}).catch(h=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),T.Fr.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===de?T.Fr.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=de,T.Fr.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){T.Fr.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){T.Fr.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(t){t.filename&&t.filename!==this.currentFilename&&(this.files[t.filename]?(this.currentFilename=t.filename,this.editor.setValue(this.files[t.filename].content),this.restoreBreakpoints(t.filename),this.editor.clearSelection()):(this.files[t.filename]={content:"",lineNo:0},T.Fr.get(`/script-api/scripts/${t.filename}`).then(s=>{this.files[t.filename]={content:s.data.contents,lineNo:0},this.breakpoints[t.filename]=s.data.breakpoints,this.restoreBreakpoints(t.filename),this.currentFilename=null}).catch(s=>{this.files[t.filename]=null}))),this.state=t.state;const o=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=de,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(t.line_no-1,0,t.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(t.line_no),this.files[t.filename].lineNo=t.line_no;break;case"error":this.pauseOrRetryButton=Bt;case"spawning":case"init":case"paused":case"waiting":case"breakpoint":if(this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,Object.keys(o).filter(a=>o[a].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let a=t.line_no>0?t.line_no:1;this.editor.session.addMarker(new this.Range(a-1,0,a-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(a),t.filename&&(this.files[t.filename].lineNo=a)}break;case"completed":case"completed_errors":case"stopped":case"crashed":case"killed":this.removeAllMarkers();break}},processReceived(){let t=0;for(let o of this.receivedEvents){t+=1;let s=0;switch(o.type){case"file":this.files[o.filename]={content:o.text,lineNo:0},this.breakpoints[o.filename]=o.breakpoints,this.currentFilename===o.filename&&this.restoreBreakpoints(o.filename);break;case"line":this.processLine(o);break;case"output":let a=o.line;a==null?a="":typeof a=="object"?a=JSON.stringify(a):a=String(a);for(const f of a.split(`
6
+ `))f&&(this.messagesNewestOnTop?this.messages.unshift({message:f}):this.messages.push({message:f}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(o);break;case"report":this.results.text=o.report,this.results.show=!0;break;case"complete":o.report&&(this.results.text=o.report,this.results.show=!0),this.removeAllMarkers(),this.scriptComplete();break;case"step":this.showDebug=!0;break;case"screen":let n=!1,i={};for(screen of this.screens){if(screen.target==o.target_name&&screen.screen==o.screen_name){i=screen,n=!0;break}s+=1}i.target=o.target_name,i.screen=o.screen_name,i.definition=o.definition,o.x?i.left=o.x:i.left=0,o.y?i.top=o.y:i.top=0,i.count=this.updateCounter++,n?this.screens[s]=i:(i.id=this.idCounter++,this.screens[this.screens.length]=i);break;case"clearscreen":for(screen of this.screens){if(screen.target==o.target_name&&screen.screen==o.screen_name){this.screens.splice(s,1);break}s+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const g=document.createElement("a");g.href=window.location.origin+o.url,g.setAttribute("download",o.filename),g.click();break;case"opentab":window.open(o.url,"_blank");break}}this.receivedEvents.splice(0,t)},received(t){this.cable.recordPing(),this.receivedEvents.push(t)},promptDialogCallback(t){this.prompt.show=!1,T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:t,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(t){if(t.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1,this.file.show=!1,this.bucket.show=!1;return}switch(this.activePromptId=t.prompt_id,this.prompt.method=t.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,t.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=t.args[0],t.args[1]&&t.args[1]!==!0&&t.args[1]!==!1?this.ask.default=t.args[1].toString():t.args[1]===!0&&(this.ask.answerRequired=!1),t.args[2]===!0&&(this.ask.password=!0),this.ask.callback=o=>{this.ask.show=!1,this.ask.password?T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,password:o,prompt_id:this.activePromptId}}):T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:o,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${t.args[0]} ${t.args[1]} is Hazardous. `,t.args[2]&&(this.prompt.message+=t.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=t.args[0],this.criticalCmdString=t.args[5],this.criticalCmdUser=t.args[1],this.displayCriticalCmd=!0;break;case"prompt":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":case"check_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),(t.method==="check_box"||t.kwargs&&t.kwargs.multiple)&&(this.prompt.multiple=!0),this.prompt.message=t.args[0],t.args.slice(1).forEach(o=>{this.prompt.buttons.push({title:o,value:o})}),this.prompt.layout=t.method.split("_")[0],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],t.args.slice(1).forEach(o=>{this.prompt.buttons.push({text:o,value:o})}),t.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=t.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=o=>{this.inputMetadata.show=!1,T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:o,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_bucket_dialog":this.bucket.title=t.args[0],this.bucket.message=t.args[1],this.bucket.show=!0;break;case"open_file_dialog":case"open_files_dialog":this.file.title=t.args[0],this.file.message=t.args[1],t.kwargs&&t.kwargs.filter&&(this.file.filter=t.kwargs.filter),t.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(t){let o="COSMOS__CANCEL",s=[];t!="COSMOS__CANCEL"&&(o=[],t.forEach(a=>{o.push(a.name),s.push(T.Fr.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${a.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(n=>{s.push(Se.axios({...n.data,data:a}))}))})),Promise.all(s).then(a=>{T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:o,prompt_id:this.activePromptId}}),this.file.show=!1})},bucketDialogCallback(t){this.bucket.show=!1,T.Fr.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:"open_bucket_dialog",answer:t,prompt_id:this.activePromptId}})},setError(t){this.alertType="error",this.alertText=`Error: ${t}`,this.showAlert=!0},async confirmUnsavedChanges(){return this.fileModified==="*"?await this.$dialog.confirm("You have unsaved changes. Are you sure you want to continue?",{okText:"Continue",cancelText:"Cancel"}):!0},async newFileWithConfirm(){await this.confirmUnsavedChanges()&&this.newFile()},newFile(){this.unlockFile(),this.filename=Y,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.inline||(this.$router.replace({name:"ScriptRunner"}).catch(t=>{}),document.title="Script Runner"),this.doResize()},async newRubyTestSuite(){await this.confirmUnsavedChanges()&&(this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
7
7
 
8
8
  # Group class name should indicate what the scripts are testing
9
9
  class Power < OpenC3::Group
@@ -81,6 +81,6 @@ class TestSuite(Suite):
81
81
  # Run when Suite Teardown button is pressed
82
82
  # Run after all groups when Suite Start is pressed
83
83
  pass
84
- `),await this.saveFile("auto"))},addToRecent(i){let t=this.recent.findIndex(s=>s.label===i);t!==-1&&this.recent.splice(t,1),this.recent.unshift({label:i,icon:Ce.fileIcon(i),command:async s=>{await this.confirmUnsavedChanges()&&(this.filename=s.label,await this.reloadFile())}}),this.recent.length>8&&this.recent.pop(),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},removeFromRecent(i){this.recent=this.recent.filter(t=>t.label!==i),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent),localStorage.script_runner__filename===i&&localStorage.removeItem("script_runner__filename"))},async openFileWithConfirm(){await this.confirmUnsavedChanges()&&this.openFile()},openFile(){this.fileOpen=!0},async reloadFile(i=!0){this.saveAllowed=!1,this.startOrGoDisabled=!0,await V.Fr.get(`/script-api/scripts/${this.filename}`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(t=>{const s={name:this.filename,contents:t.data.contents};t.data.suites&&(s.suites=JSON.parse(t.data.suites)),t.data.error&&(s.error=t.data.error),t.data.success&&(s.success=t.data.success);const r=t.data.locked,o=t.data.breakpoints;this.setFile({file:s,locked:r,breakpoints:o},!0),this.saveAllowed=!0}).catch(t=>{i===!0&&this.$notify.caution({title:"File Open Error",body:`Failed to open ${this.filename} due to ${t}`}),this.removeFromRecent(this.filename),this.newFile()})},setFile({file:i,locked:t,breakpoints:s},r=!1){this.files={};let o=i.name.split("*")[0];if(r===!1&&this.filename!==o&&(this.unlockFile(),this.lockedBy=t),this.filename=o,!this.inline){this.$router.replace({name:"ScriptRunner",query:{file:this.filename}}).catch(a=>{});let n=this.filename.split("/");document.title=`${n.pop()} (${n.join("/")})`}this.filename.split(".").pop()==="py"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.currentFilename=null,this.editor.session.setValue(i.contents),this.breakpoints[this.filename]=s,this.restoreBreakpoints(this.filename),this.fileModified="",this.envDisabled=!1,this.addToRecent(this.filename),i.suites?(this.suiteRunner=!0,this.suiteMap=i.suites,this.startOrGoDisabled=!0):(this.suiteRunner=!1,this.startOrGoDisabled=!1),i.error&&(this.suiteError=i.error,this.showSuiteError=!0),this.disableSuiteButtons=i.success==!1,this.doResize()},clearTemp(){this.recent=this.recent.filter(i=>!i.label.includes("__TEMP__")),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},detectLanguage(){let i=new RegExp("^\\s*(require|load|puts) "),t=new RegExp("^\\s*(import|from) "),s=new RegExp("^\\s*end\\s*$"),r=new RegExp("^\\s*(if|def|while|else|elif|class).*:\\s*$"),o=/\(f"/,n=/\(.*\w+:\s+.+\)(?!:)$/,p=this.editor.getValue().split(`
85
- `);for(let c of p){if(c.match(i))return"ruby";if(c.match(t))return"python";if(c.match(s))return"ruby";if(c.match(r)||c.match(o))return"python";if(c.match(n))return"ruby"}return"unknown"},async saveFile(i="menu"){if(!this.readOnlyUser)if(this.saveAllowed){const t=this.getBreakpointRows();if(this.filename===F){if(i==="menu"){this.saveAs();return}else if(this.tempFilename===null){let s=this.detectLanguage();s==="unknown"&&(s=J.AceEditorUtils.getDefaultScriptingLanguage());const r=crypto.randomUUID().split("-")[0];if(s==="ruby")this.tempFilename=ue+"/"+$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+r+"_temp.rb";else if(s==="python")this.tempFilename=ue+"/"+$.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+r+"_temp.py";else return;this.filename=this.tempFilename,this.addToRecent(this.filename)}}this.showSave=!0,await V.Fr.post(`/script-api/scripts/${this.filename}`,{data:{text:this.editor.getValue(),breakpoints:t}}).then(s=>{s.status==200?(s.data.suites?(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(s.data.suites)):(this.startOrGoDisabled=!1,this.suiteRunner=!1,this.suiteMap={}),s.data.error&&(this.suiteError=s.data.error,this.showSuiteError=!0),this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)):(this.showSave=!1,this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`,this.showAlert=!0),this.lockFile(),this.doResize()}).catch(({response:s})=>{this.showSave=!1,s.status==422?(this.alertType="error",this.alertText=s.data.suites):(this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`),this.showAlert=!0})}else this.setError("Attempt to save file when not allowed")},saveAs(){this.showSaveAs=!0},async saveAsFilename(i){this.filename=i.split("*")[0],this.currentFilename=null,this.tempFilename&&(V.Fr.post(`/script-api/scripts/${this.tempFilename}/delete`),this.tempFilename=null),await this.saveFile("menu")},delete(){let i=this.filename;this.tempFilename&&(i=this.tempFilename),this.$dialog.confirm(`Permanently delete file: ${i}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>V.Fr.post(`/script-api/scripts/${i}/delete`,{data:{}})).then(t=>{this.removeFromRecent(i),this.newFile()}).catch(t=>{if(t!==!0){const s={text:`Failed Multi-Delete. ${t}`,type:"error"};this.$emit("alert",s)}})},download(){const i=new Blob([this.editor.getValue()],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.setAttribute("download",this.filename),t.click()},syntaxCheck(){V.Fr.post(`/script-api/scripts/${this.filename}/syntax`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="600"})},showInstrumented(){V.Fr.post(`/script-api/scripts/${this.filename}/instrumented`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(i=>{this.information.title=i.data.title,this.information.text=JSON.parse(i.data.description),this.information.show=!0,this.information.width="90vw"})},showCallStack(){V.Fr.post(`/script-api/running-script/${this.scriptId}/backtrace`)},toggleDebug(){this.showDebug=!this.showDebug,this.showDebug&&this.$nextTick(()=>{this.$refs.debug.focus()})},toggleDisconnect(){this.showDisconnect=!this.showDisconnect},debugKeydown(i){i.key==="Escape"?(this.debug="",this.debugHistoryIndex=this.debugHistory.length):i.key==="Enter"?(this.debugHistory.push(this.debug),this.debugHistoryIndex=this.debugHistory.length,V.Fr.post(`/script-api/running-script/${this.scriptId}/debug`,{data:{args:this.debug}}),this.debug=""):i.key==="ArrowUp"?(this.debugHistoryIndex-=1,this.debugHistoryIndex<0&&(this.debugHistoryIndex=this.debugHistory.length-1),this.debug=this.debugHistory[this.debugHistoryIndex],i.preventDefault()):i.key==="ArrowDown"&&(this.debugHistoryIndex+=1,this.debugHistoryIndex>=this.debugHistory.length&&(this.debugHistoryIndex=0),this.debug=this.debugHistory[this.debugHistoryIndex])},removeAllMarkers:function(){const i=this.editor.session.getMarkers();Object.keys(i).filter(t=>i[t].type==="fullLine").forEach(t=>this.editor.session.removeMarker(t))},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){if(!this.readOnlyUser)return V.Fr.post(`/script-api/scripts/${this.filename}/lock`)},unlockFile:function(){this.filename!==F&&!this.readOnly&&!this.readOnlyUser&&V.Fr.post(`/script-api/scripts/${this.filename}/unlock`)},backToNewScript:async function(){this.scriptDisconnect(),this.removeAllMarkers(),await this.scriptComplete(),this.newFile()},screenId(i){return"scriptRunnerScreen"+i},closeScreen(i){let t=0;for(screen of this.screens){if(screen.id==i){this.screens.splice(t,1);break}t+=1}}}},Et={class:"grid"},Tt=["id"],Bt={class:"item-content"},Rt={id:"sr-controls"},Ot={class:"d-flex align-center mr-1"},Mt={key:0},Dt={key:1},It={key:2,style:{width:"40px",height:"40px"},class:"mx-2"},Ut={key:3},Pt={key:4},Ft={key:0,id:"debug",class:"pa-0"},zt={key:1,style:{"background-color":"var(--color-background-base-default)",margin:"0px",padding:"0px"}},Lt={key:0},At={key:1},Ht={style:{height:"200px",overflow:"hidden"}},qt={key:0,class:"error-message"},Gt={class:"flex-grow-1"};function Kt(i,t,s,r,o,n){const a=e.resolveComponent("top-bar"),p=e.resolveComponent("v-icon"),c=e.resolveComponent("v-btn"),g=e.resolveComponent("v-snackbar"),_=e.resolveComponent("openc3-screen"),C=e.resolveComponent("suite-runner"),v=e.resolveComponent("v-tooltip"),x=e.resolveComponent("v-select"),k=e.resolveComponent("v-text-field"),S=e.resolveComponent("v-progress-circular"),w=e.resolveComponent("v-spacer"),T=e.resolveComponent("v-badge"),B=e.resolveComponent("v-row"),E=e.resolveComponent("v-card-text"),R=e.resolveComponent("v-card"),M=e.resolveComponent("v-list-item"),H=e.resolveComponent("v-divider"),N=e.resolveComponent("v-list"),D=e.resolveComponent("v-menu"),G=e.resolveComponent("pane"),A=e.resolveComponent("script-log-messages"),ee=e.resolveComponent("splitpanes"),Z=e.resolveComponent("v-tab"),te=e.resolveComponent("v-tabs"),K=e.resolveComponent("v-col"),X=e.resolveComponent("v-tabs-window-item"),q=e.resolveComponent("v-tabs-window"),Q=e.resolveComponent("file-open-save-dialog"),ie=e.resolveComponent("environment-dialog"),oe=e.resolveComponent("ask-dialog"),j=e.resolveComponent("file-dialog"),ne=e.resolveComponent("information-dialog"),se=e.resolveComponent("event-list-dialog"),re=e.resolveComponent("overrides-dialog"),W=e.resolveComponent("prompt-dialog"),I=e.resolveComponent("results-dialog"),le=e.resolveComponent("script-environment-dialog"),l=e.resolveComponent("simple-text-dialog"),u=e.resolveComponent("critical-cmd-dialog"),f=e.resolveComponent("v-card-title"),m=e.resolveComponent("command-editor"),h=e.resolveComponent("v-card-actions"),b=e.resolveComponent("v-dialog"),y=e.resolveComponent("running-scripts"),O=e.resolveComponent("v-sheet"),U=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.inline?(e.openBlock(),e.createElementBlock("div",zt,[e.createVNode(B,{"no-gutters":"",justify:"right"},{default:e.withCtx(()=>[e.createVNode(te,{modelValue:o.inlineTab,"onUpdate:modelValue":t[16]||(t[16]=d=>o.inlineTab=d),density:"compact"},{default:e.withCtx(()=>[e.createVNode(Z,{value:"script",text:"Script","data-test":"script-tab"}),e.createVNode(Z,{value:"messages",text:"Messages","data-test":"messages-tab"})]),_:1},8,["modelValue"]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:d})=>[e.createElementVNode("div",e.mergeProps(d,{style:{width:"32rem"}}),[e.createVNode(x,{id:"inline-filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[17]||(t[17]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[18]||(t[18]=d=>o.scriptId=d),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[19]||(t[19]=d=>n.stateTimer=d),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:0,size:40,class:"mx-2",indeterminate:"",color:"primary"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q,{modelValue:o.inlineTab,"onUpdate:modelValue":t[22]||(t[22]=d=>o.inlineTab=d)},{default:e.withCtx(()=>[e.createVNode(X,{value:"script"},{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(K,{class:"v-col-10",style:{margin:"15px 0px 0px 0px",padding:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("pre",{ref:"editor",class:"editor",style:{height:"200px"},onContextmenu:t[20]||(t[20]=e.withModifiers((...d)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...d),["prevent"]))},null,544)]),_:1}),e.createVNode(K,{class:"v-col-2",style:{display:"flex","justify-content":"center","align-items":"center","background-color":"var(--color-background-surface-default)"}},{default:e.withCtx(()=>[o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(c,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",At,[e.createVNode(c,{color:"primary",class:"ma-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(c,{color:"primary",class:"ma-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(c,{color:"primary",class:"ma-2",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})]),_:1})]),_:1}),e.createVNode(X,{value:"messages"},{default:e.withCtx(()=>[e.createElementVNode("div",Ht,[e.createVNode(A,{modelValue:o.messages,"onUpdate:modelValue":t[21]||(t[21]=d=>o.messages=d),"newest-on-top":o.messagesNewestOnTop,onMessageOrderChanged:i.messageOrderChanged},null,8,["modelValue","newest-on-top","onMessageOrderChanged"])])]),_:1})]),_:1},8,["modelValue"])])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-column overflow-hidden",style:e.normalizeStyle({height:r.containerHeight})},[e.createVNode(a,{menus:n.menus,title:o.title},null,8,["menus","title"]),e.createVNode(g,{modelValue:o.showAlert,"onUpdate:modelValue":t[1]||(t[1]=d=>o.showAlert=d),absolute:"",color:o.alertType,timeout:3e3,class:"apply-top",style:e.normalizeStyle(i.classificationStyles)},{actions:e.withCtx(({attrs:d})=>[e.createVNode(c,e.mergeProps({variant:"text",text:"Close"},d,{onClick:t[0]||(t[0]=P=>o.showAlert=!1)}),null,16)]),default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createTextVNode(" mdi-"+e.toDisplayString(o.alertType),1)]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.alertText)+" ",1)]),_:1},8,["modelValue","color","style"]),e.createVNode(g,{modelValue:o.showEditingToast,"onUpdate:modelValue":t[3]||(t[3]=d=>o.showEditingToast=d),absolute:"",class:"apply-top",style:e.normalizeStyle(i.classificationStyles),timeout:-1,color:"orange"},{actions:e.withCtx(({attrs:d})=>[e.createVNode(c,e.mergeProps({variant:"text"},d,{color:"danger",text:"Unlock","data-test":"unlock-button",onClick:n.confirmLocalUnlock}),null,16,["onClick"]),e.createVNode(c,e.mergeProps({variant:"text",text:"Dismiss"},d,{onClick:t[2]||(t[2]=()=>{o.showEditingToast=!1})}),null,16)]),default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[...t[48]||(t[48]=[e.createTextVNode(" mdi-pencil-off ",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(o.lockedBy)+" is editing this script. Editor is in read-only mode ",1)]),_:1},8,["modelValue","style"]),e.createElementVNode("div",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.screens,d=>(e.openBlock(),e.createElementBlock("div",{id:n.screenId(d.id),key:d.id,ref_for:!0,ref:"gridItem",class:"item"},[e.createElementVNode("div",Bt,[e.createVNode(_,{target:d.target,screen:d.screen,definition:d.definition,keywords:o.screenKeywords,"initial-floated":!0,"initial-top":d.top,"initial-left":d.left,"initial-z":3,"min-z":3,"fix-floated":!0,count:d.count,onCloseScreen:P=>n.closeScreen(d.id),onDeleteScreen:P=>n.closeScreen(d.id)},null,8,["target","screen","definition","keywords","initial-top","initial-left","count","onCloseScreen","onDeleteScreen"])])],8,Tt))),128))]),e.createVNode(R,{class:"flex-shrink-0"},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[o.suiteRunner?(e.openBlock(),e.createBlock(C,{key:0,class:"suite-runner","suite-map":o.suiteMap,"disable-buttons":o.disableSuiteButtons,filename:n.fullFilename,onButton:n.suiteRunnerButton,onLoaded:n.doResize},null,8,["suite-map","disable-buttons","filename","onButton","onLoaded"])):e.createCommentVNode("",!0),e.createElementVNode("div",Rt,[e.createVNode(B,{"no-gutters":"",justify:"space-between"},{default:e.withCtx(()=>[o.showDisconnect?(e.openBlock(),e.createBlock(p,{key:0,class:"mt-2",color:"red"},{default:e.withCtx(()=>[...t[49]||(t[49]=[e.createTextVNode(" mdi-connection ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[o.scriptId?(e.openBlock(),e.createBlock(c,e.mergeProps({key:1},d,{icon:"mdi-arrow-left",variant:"text",density:"compact",onClick:n.backToNewScript}),null,16,["onClick"])):(e.openBlock(),e.createBlock(c,e.mergeProps({key:0},d,{icon:"mdi-cached",variant:"text",density:"compact",disabled:o.filename===i.NEW_FILENAME,"aria-label":"Reload File",onClick:n.reloadFile}),null,16,["disabled","onClick"]))]),default:e.withCtx(()=>[o.scriptId?(e.openBlock(),e.createElementBlock("span",Dt," Back to New Script ")):(e.openBlock(),e.createElementBlock("span",Mt," Reload File "))]),_:1})]),e.createVNode(v,{location:"bottom",text:o.filenameSelect,disabled:!o.filenameSelect||o.filenameSelect.length<=45},{activator:e.withCtx(({props:d})=>[e.createElementVNode("div",e.mergeProps(d,{style:{width:"32rem"}}),[e.createVNode(x,{id:"filename",modelValue:o.filenameSelect,"onUpdate:modelValue":[t[4]||(t[4]=P=>o.filenameSelect=P),n.fileNameChanged],items:n.fileList,disabled:n.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(k,{modelValue:o.scriptId,"onUpdate:modelValue":t[5]||(t[5]=d=>o.scriptId=d),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(k,{modelValue:n.stateTimer,"onUpdate:modelValue":t[6]||(t[6]=d=>n.stateTimer=d),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",n.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),o.state==="Connecting..."?(e.openBlock(),e.createBlock(S,{key:1,size:40,class:"mx-2",indeterminate:"",color:"primary"})):(e.openBlock(),e.createElementBlock("div",It)),e.createVNode(w),o.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Ut,[o.overridesCount>0?(e.openBlock(),e.createBlock(v,{key:0,"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[e.createVNode(c,e.mergeProps(d,{class:"mr-4",icon:"",variant:"text",density:"compact","data-test":"tlm-override-button","aria-label":"TLM Overrides",onClick:t[7]||(t[7]=P=>o.showOverrides=!o.showOverrides)}),{default:e.withCtx(()=>[e.createVNode(T,{content:o.overridesCount>99?"99+":o.overridesCount,floating:"",color:"primary"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"mdi-application-cog-outline"})]),_:1},8,["content"])]),_:1},16)]),default:e.withCtx(()=>[e.createElementVNode("span",null," TLM Overrides ("+e.toDisplayString(o.overridesCount)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(v,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:d})=>[e.createVNode(c,e.mergeProps(d,{class:"mr-2",icon:"",variant:"text",density:"compact",disabled:o.envDisabled,"data-test":"env-button","aria-label":"Script Environment",onClick:t[9]||(t[9]=P=>o.scriptEnvironment.show=!o.scriptEnvironment.show)}),{default:e.withCtx(()=>[e.createVNode(T,{modelValue:n.environmentModified,"onUpdate:modelValue":t[8]||(t[8]=P=>n.environmentModified=P),floating:"",dot:""},{default:e.withCtx(()=>[e.createVNode(p,{icon:"mdi-application-variable"})]),_:1},8,["modelValue"])]),_:1},16,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,[t[50]||(t[50]=e.createTextVNode(" Script Environment ",-1)),n.environmentModified?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" (modified) ")],64)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(c,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:o.startOrGoDisabled||!o.executeUser,hidden:o.suiteRunner,onClick:n.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(c,{color:"primary",class:"mr-2",text:"Go",disabled:o.startOrGoDisabled,"data-test":"go-button",onClick:n.go},null,8,["disabled","onClick"]),e.createVNode(c,{color:"primary",class:"mr-2",text:o.pauseOrRetryButton,disabled:o.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:n.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(c,{color:"primary",text:"Stop","data-test":"stop-button",disabled:o.stopDisabled,onClick:n.stop},null,8,["disabled","onClick"])]))]),_:1})])]),_:1})]),_:1}),e.createVNode(ee,{horizontal:"",class:"flex-grow-1 overflow-hidden",onResize:t[15]||(t[15]=({prevPane:d})=>o.editorBoxSize=d.size)},{default:e.withCtx(()=>[e.createVNode(G,{class:"editorbox",size:o.editorBoxSize},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.showSave,"onUpdate:modelValue":t[10]||(t[10]=d=>o.showSave=d),absolute:"",location:"right",timeout:-1,class:"saving apply-top",style:e.normalizeStyle(i.classificationStyles)},{default:e.withCtx(()=>[...t[51]||(t[51]=[e.createTextVNode(" Saving... ",-1)])]),_:1},8,["modelValue","style"]),e.createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:t[11]||(t[11]=e.withModifiers((...d)=>n.showExecuteSelectionMenu&&n.showExecuteSelectionMenu(...d),["prevent"]))},null,544),e.createVNode(D,{modelValue:o.executeSelectionMenu,"onUpdate:modelValue":t[12]||(t[12]=d=>o.executeSelectionMenu=d),target:[o.menuX,o.menuY]},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(M,{title:o.currentLineHasCommand?"Edit Command":"Insert Command",onClick:n.openCommandEditor},null,8,["title","onClick"]),e.createVNode(H),e.createVNode(M,{title:"Execute Selection",onClick:n.executeSelection},null,8,["onClick"]),o.scriptId?(e.openBlock(),e.createBlock(M,{key:0,title:"Goto Line",onClick:n.runFromCursor},null,8,["onClick"])):e.createCommentVNode("",!0),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:1,title:"Run From Line",onClick:n.runFromCursor},null,8,["onClick"])),o.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:2,title:"Clear Local Breakpoints",onClick:n.clearBreakpoints},null,8,["onClick"])),e.createVNode(H),e.createVNode(M,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:n.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1},8,["size"]),e.createVNode(G,{id:"messages",class:"mt-2",size:100-o.editorBoxSize},{default:e.withCtx(()=>[o.showDebug?(e.openBlock(),e.createElementBlock("div",Ft,[e.createVNode(B,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(c,{color:"primary",style:{width:"100px"},class:"mr-4",text:"Step","append-icon":"mdi-step-forward",disabled:!o.scriptId,"data-test":"step-button",onClick:n.step},null,8,["disabled","onClick"]),e.createVNode(k,{ref:"debug",modelValue:o.debug,"onUpdate:modelValue":t[13]||(t[13]=d=>o.debug=d),class:"mb-2",variant:"outlined",density:"compact","hide-details":"",label:"Debug","data-test":"debug-text",onKeydown:n.debugKeydown},null,8,["modelValue","onKeydown"])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(A,{id:"log-messages",modelValue:o.messages,"onUpdate:modelValue":t[14]||(t[14]=d=>o.messages=d),onSort:n.messageSortOrder},null,8,["modelValue","onSort"])]),_:1},8,["size"])]),_:1})],4)),o.fileOpen?(e.openBlock(),e.createBlock(Q,{key:2,modelValue:o.fileOpen,"onUpdate:modelValue":t[23]||(t[23]=d=>o.fileOpen=d),type:"open","api-url":"/script-api/scripts",onFile:t[24]||(t[24]=d=>n.setFile(d)),onError:t[25]||(t[25]=d=>n.setError(d)),onClearTemp:t[26]||(t[26]=d=>n.clearTemp(d))},null,8,["modelValue"])):e.createCommentVNode("",!0),o.showSaveAs?(e.openBlock(),e.createBlock(Q,{key:3,modelValue:o.showSaveAs,"onUpdate:modelValue":t[27]||(t[27]=d=>o.showSaveAs=d),type:"save","api-url":"/script-api/scripts","require-target-parent-dir":"","input-filename":n.filenameOrBlank,onFilename:t[28]||(t[28]=d=>n.saveAsFilename(d)),onError:t[29]||(t[29]=d=>n.setError(d)),onClearTemp:t[30]||(t[30]=d=>n.clearTemp(d))},null,8,["modelValue","input-filename"])):e.createCommentVNode("",!0),o.showEnvironment?(e.openBlock(),e.createBlock(ie,{key:4,modelValue:o.showEnvironment,"onUpdate:modelValue":t[31]||(t[31]=d=>o.showEnvironment=d)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.ask.show?(e.openBlock(),e.createBlock(oe,{key:5,modelValue:o.ask.show,"onUpdate:modelValue":t[32]||(t[32]=d=>o.ask.show=d),question:o.ask.question,default:o.ask.default,password:o.ask.password,"answer-required":o.ask.answerRequired,onResponse:o.ask.callback},null,8,["modelValue","question","default","password","answer-required","onResponse"])):e.createCommentVNode("",!0),o.file.show?(e.openBlock(),e.createBlock(j,{key:6,modelValue:o.file.show,"onUpdate:modelValue":t[33]||(t[33]=d=>o.file.show=d),title:o.file.title,message:o.file.message,multiple:o.file.multiple,filter:o.file.filter,onResponse:n.fileDialogCallback},null,8,["modelValue","title","message","multiple","filter","onResponse"])):e.createCommentVNode("",!0),o.information.show?(e.openBlock(),e.createBlock(ne,{key:7,modelValue:o.information.show,"onUpdate:modelValue":t[34]||(t[34]=d=>o.information.show=d),title:o.information.title,text:o.information.text,width:o.information.width},null,8,["modelValue","title","text","width"])):e.createCommentVNode("",!0),o.inputMetadata.show?(e.openBlock(),e.createBlock(se,{key:8,modelValue:o.inputMetadata.show,"onUpdate:modelValue":t[35]||(t[35]=d=>o.inputMetadata.show=d),events:o.inputMetadata.events,"time-zone":o.timeZone,"new-metadata":"",onClose:o.inputMetadata.callback},null,8,["modelValue","events","time-zone","onClose"])):e.createCommentVNode("",!0),o.showOverrides?(e.openBlock(),e.createBlock(re,{key:9,modelValue:o.showOverrides,"onUpdate:modelValue":t[36]||(t[36]=d=>o.showOverrides=d)},null,8,["modelValue"])):e.createCommentVNode("",!0),o.prompt.show?(e.openBlock(),e.createBlock(W,{key:10,modelValue:o.prompt.show,"onUpdate:modelValue":t[37]||(t[37]=d=>o.prompt.show=d),title:o.prompt.title,subtitle:o.prompt.subtitle,message:o.prompt.message,details:o.prompt.details,buttons:o.prompt.buttons,layout:o.prompt.layout,multiple:o.prompt.multiple,onResponse:o.prompt.callback},null,8,["modelValue","title","subtitle","message","details","buttons","layout","multiple","onResponse"])):e.createCommentVNode("",!0),o.results.show?(e.openBlock(),e.createBlock(I,{key:11,modelValue:o.results.show,"onUpdate:modelValue":t[38]||(t[38]=d=>o.results.show=d),text:o.results.text},null,8,["modelValue","text"])):e.createCommentVNode("",!0),o.scriptEnvironment.show?(e.openBlock(),e.createBlock(le,{key:12,modelValue:o.scriptEnvironment.show,"onUpdate:modelValue":t[39]||(t[39]=d=>o.scriptEnvironment.show=d),"input-environment":o.scriptEnvironment.env,onEnvironment:n.environmentHandler},null,8,["modelValue","input-environment","onEnvironment"])):e.createCommentVNode("",!0),e.createVNode(l,{modelValue:o.showSuiteError,"onUpdate:modelValue":t[40]||(t[40]=d=>o.showSuiteError=d),title:"Suite Analysis Error",text:o.suiteError,width:1e3},null,8,["modelValue","text"]),e.createVNode(u,{modelValue:o.displayCriticalCmd,"onUpdate:modelValue":t[41]||(t[41]=d=>o.displayCriticalCmd=d),uuid:o.criticalCmdUuid,"cmd-string":o.criticalCmdString,"cmd-user":o.criticalCmdUser,persistent:!0,onStatus:n.promptDialogCallback},null,8,["modelValue","uuid","cmd-string","cmd-user","onStatus"]),e.createVNode(b,{modelValue:o.commandEditor.show,"onUpdate:modelValue":t[45]||(t[45]=d=>o.commandEditor.show=d),"max-width":"1200",persistent:"",scrollable:"",onKeydown:e.withKeys(n.closeCommandDialog,["esc"])},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(f,{class:"d-flex align-center"},{default:e.withCtx(()=>[t[52]||(t[52]=e.createElementVNode("span",null,"Insert Command",-1)),e.createVNode(w),e.createVNode(c,{icon:"mdi-close",variant:"text",onClick:n.closeCommandDialog},null,8,["onClick"])]),_:1}),e.createVNode(E,{class:"pa-0"},{default:e.withCtx(()=>[o.commandEditor.dialogError?(e.openBlock(),e.createElementBlock("div",qt,[e.createVNode(p,{class:"mr-2",color:"error"},{default:e.withCtx(()=>[...t[53]||(t[53]=[e.createTextVNode("mdi-alert-circle",-1)])]),_:1}),e.createElementVNode("span",Gt,e.toDisplayString(o.commandEditor.dialogError),1),e.createVNode(c,{icon:"mdi-close",size:"small",variant:"text",color:"error",class:"ml-2",onClick:t[42]||(t[42]=d=>o.commandEditor.dialogError=null)})])):e.createCommentVNode("",!0),e.createVNode(m,{ref:"commandEditor","initial-target-name":o.commandEditor.targetName,"initial-packet-name":o.commandEditor.packetName,"cmd-string":o.commandEditor.cmdString,"send-disabled":!1,"show-command-button":!1,onBuildCmd:t[43]||(t[43]=d=>n.insertCommand(d))},null,8,["initial-target-name","initial-packet-name","cmd-string"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(w),e.createVNode(c,{variant:"outlined",onClick:n.closeCommandDialog},{default:e.withCtx(()=>[...t[54]||(t[54]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(c,{color:"primary",variant:"flat",onClick:t[44]||(t[44]=d=>n.insertCommand())},{default:e.withCtx(()=>[...t[55]||(t[55]=[e.createTextVNode(" Insert Command ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),e.createVNode(U,{modelValue:o.showScripts,"onUpdate:modelValue":t[47]||(t[47]=d=>o.showScripts=d)},{default:e.withCtx(()=>[e.createVNode(O,{class:"pb-11 pt-5 px-5"},{default:e.withCtx(()=>[o.showScripts?(e.openBlock(),e.createBlock(y,{key:0,"connect-in-new-tab":!!o.fileModified,onDisconnect:n.scriptDisconnect,onClose:t[46]||(t[46]=()=>{o.showScripts=!1})},null,8,["connect-in-new-tab","onDisconnect"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"])],64)}const jt=z._export_sfc(St,[["render",Kt],["__scopeId","data-v-e6cc8981"]]);exports.RunningScripts=he;exports.ScriptLogMessages=fe;exports.ScriptRunner=jt;exports.SuiteRunner=ge;
84
+ `),await this.saveFile("auto"))},addToRecent(t){let o=this.recent.findIndex(s=>s.label===t);o!==-1&&this.recent.splice(o,1),this.recent.unshift({label:t,icon:Be.fileIcon(t),command:async s=>{await this.confirmUnsavedChanges()&&(this.filename=s.label,await this.reloadFile())}}),this.recent.length>8&&this.recent.pop(),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},removeFromRecent(t){this.recent=this.recent.filter(o=>o.label!==t),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent),localStorage.script_runner__filename===t&&localStorage.removeItem("script_runner__filename"))},async openFileWithConfirm(){await this.confirmUnsavedChanges()&&this.openFile()},openFile(){this.fileOpen=!0},async reloadFile(t=!0){this.saveAllowed=!1,this.startOrGoDisabled=!0,await T.Fr.get(`/script-api/scripts/${this.filename}`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(o=>{const s={name:this.filename,contents:o.data.contents};o.data.suites&&(s.suites=JSON.parse(o.data.suites)),o.data.error&&(s.error=o.data.error),o.data.success&&(s.success=o.data.success);const a=o.data.locked,n=o.data.breakpoints;this.setFile({file:s,locked:a,breakpoints:n},!0),this.saveAllowed=!0}).catch(o=>{t===!0&&this.$notify.caution({title:"File Open Error",body:`Failed to open ${this.filename} due to ${o}`}),this.removeFromRecent(this.filename),this.newFile()})},setFile({file:t,locked:o,breakpoints:s},a=!1){this.files={};let n=t.name.split("*")[0];if(a===!1&&this.filename!==n&&(this.unlockFile(),this.lockedBy=o),this.filename=n,!this.inline){this.$router.replace({name:"ScriptRunner",query:{file:this.filename}}).catch(g=>{});let i=this.filename.split("/");document.title=`${i.pop()} (${i.join("/")})`}this.filename.split(".").pop()==="py"?this.editor.session.setMode(this.pythonMode):this.editor.session.setMode(this.rubyMode),this.currentFilename=null,this.editor.session.setValue(t.contents),this.breakpoints[this.filename]=s,this.restoreBreakpoints(this.filename),this.fileModified="",this.envDisabled=!1,this.addToRecent(this.filename),t.suites?(this.suiteRunner=!0,this.suiteMap=t.suites,this.startOrGoDisabled=!0):(this.suiteRunner=!1,this.startOrGoDisabled=!1),t.error&&(this.suiteError=t.error,this.showSuiteError=!0),this.disableSuiteButtons=t.success==!1,this.doResize()},clearTemp(){this.recent=this.recent.filter(t=>!t.label.includes("__TEMP__")),this.inline||(localStorage.script_runner__recent=JSON.stringify(this.recent))},detectLanguage(){let t=new RegExp("^\\s*(require|load|puts) "),o=new RegExp("^\\s*(import|from) "),s=new RegExp("^\\s*end\\s*$"),a=new RegExp("^\\s*(if|def|while|else|elif|class).*:\\s*$"),n=/\(f"/,i=/\(.*\w+:\s+.+\)(?!:)$/,f=this.editor.getValue().split(`
85
+ `);for(let h of f){if(h.match(t))return"ruby";if(h.match(o))return"python";if(h.match(s))return"ruby";if(h.match(a)||h.match(n))return"python";if(h.match(i))return"ruby"}return"unknown"},async saveFile(t="menu"){if(!this.readOnlyUser)if(this.saveAllowed){const o=this.getBreakpointRows();if(this.filename===Y){if(t==="menu"){this.saveAs();return}else if(this.tempFilename===null){let s=this.detectLanguage();s==="unknown"&&(s=ae.AceEditorUtils.getDefaultScriptingLanguage());const a=crypto.randomUUID().split("-")[0];if(s==="ruby")this.tempFilename=fe+"/"+ce.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+a+"_temp.rb";else if(s==="python")this.tempFilename=fe+"/"+ce.format(Date.now(),"yyyy_MM_dd_HH_mm_ss_SSS")+"_"+a+"_temp.py";else return;this.filename=this.tempFilename,this.addToRecent(this.filename)}}this.showSave=!0,await T.Fr.post(`/script-api/scripts/${this.filename}`,{data:{text:this.editor.getValue(),breakpoints:o}}).then(s=>{s.status==200?(s.data.suites?(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(s.data.suites)):(this.startOrGoDisabled=!1,this.suiteRunner=!1,this.suiteMap={}),s.data.error&&(this.suiteError=s.data.error,this.showSuiteError=!0),this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)):(this.showSave=!1,this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`,this.showAlert=!0),this.lockFile(),this.doResize()}).catch(({response:s})=>{this.showSave=!1,s.status==422?(this.alertType="error",this.alertText=s.data.suites):(this.alertType="error",this.alertText=`Error saving file. Code: ${s.status} Text: ${s.statusText}`),this.showAlert=!0})}else this.setError("Attempt to save file when not allowed")},saveAs(){this.showSaveAs=!0},async saveAsFilename(t){this.filename=t.split("*")[0],this.currentFilename=null,this.tempFilename&&(T.Fr.post(`/script-api/scripts/${this.tempFilename}/delete`),this.tempFilename=null),await this.saveFile("menu")},delete(){let t=this.filename;this.tempFilename&&(t=this.tempFilename),this.$dialog.confirm(`Permanently delete file: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(o=>T.Fr.post(`/script-api/scripts/${t}/delete`,{data:{}})).then(o=>{this.removeFromRecent(t),this.newFile()}).catch(o=>{if(o!==!0){const s={text:`Failed Multi-Delete. ${o}`,type:"error"};this.$emit("alert",s)}})},download(){const t=new Blob([this.editor.getValue()],{type:"text/plain"}),o=document.createElement("a");o.href=URL.createObjectURL(t),o.setAttribute("download",this.filename),o.click()},syntaxCheck(){T.Fr.post(`/script-api/scripts/${this.filename}/syntax`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{this.information.title=t.data.title,this.information.text=JSON.parse(t.data.description),this.information.show=!0,this.information.width="600"})},showInstrumented(){T.Fr.post(`/script-api/scripts/${this.filename}/instrumented`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{this.information.title=t.data.title,this.information.text=JSON.parse(t.data.description),this.information.show=!0,this.information.width="90vw"})},showCallStack(){T.Fr.post(`/script-api/running-script/${this.scriptId}/backtrace`)},toggleDebug(){this.showDebug=!this.showDebug,this.showDebug&&this.$nextTick(()=>{this.$refs.debug.focus()})},toggleDisconnect(){this.showDisconnect=!this.showDisconnect},debugKeydown(t){t.key==="Escape"?(this.debug="",this.debugHistoryIndex=this.debugHistory.length):t.key==="Enter"?(this.debugHistory.push(this.debug),this.debugHistoryIndex=this.debugHistory.length,T.Fr.post(`/script-api/running-script/${this.scriptId}/debug`,{data:{args:this.debug}}),this.debug=""):t.key==="ArrowUp"?(this.debugHistoryIndex-=1,this.debugHistoryIndex<0&&(this.debugHistoryIndex=this.debugHistory.length-1),this.debug=this.debugHistory[this.debugHistoryIndex],t.preventDefault()):t.key==="ArrowDown"&&(this.debugHistoryIndex+=1,this.debugHistoryIndex>=this.debugHistory.length&&(this.debugHistoryIndex=0),this.debug=this.debugHistory[this.debugHistoryIndex])},removeAllMarkers:function(){const t=this.editor.session.getMarkers();Object.keys(t).filter(o=>t[o].type==="fullLine").forEach(o=>this.editor.session.removeMarker(o))},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){if(!this.readOnlyUser)return T.Fr.post(`/script-api/scripts/${this.filename}/lock`)},unlockFile:function(){this.filename!==Y&&!this.readOnly&&!this.readOnlyUser&&T.Fr.post(`/script-api/scripts/${this.filename}/unlock`)},backToNewScript:async function(){this.scriptDisconnect(),this.removeAllMarkers(),await this.scriptComplete(),this.newFile()},screenId(t){return"scriptRunnerScreen"+t},closeScreen(t){let o=0;for(screen of this.screens){if(screen.id==t){this.screens.splice(o,1);break}o+=1}}}},Mt={class:"grid"},Ot=["id"],Rt={class:"item-content"},Dt={id:"sr-controls"},Ft={class:"d-flex align-center mr-1"},Ut={key:0},zt={key:1},It={key:2,style:{width:"40px",height:"40px"},class:"mx-2"},Pt={key:3},Lt={key:4},At={key:0,id:"debug",class:"pa-0"},qt={key:1,style:{"background-color":"var(--color-background-base-default)",margin:"0px",padding:"0px"}},Ht={key:0},Gt={key:1},Kt={style:{height:"200px",overflow:"hidden"}},jt={key:0,class:"error-message"},Wt={class:"flex-grow-1"};function Jt(t,o,s,a,n,i){const g=e.resolveComponent("top-bar"),f=e.resolveComponent("v-icon"),h=e.resolveComponent("v-btn"),k=e.resolveComponent("v-snackbar"),d=e.resolveComponent("openc3-screen"),v=e.resolveComponent("suite-runner"),b=e.resolveComponent("v-tooltip"),V=e.resolveComponent("v-select"),_=e.resolveComponent("v-text-field"),E=e.resolveComponent("v-progress-circular"),x=e.resolveComponent("v-spacer"),O=e.resolveComponent("v-badge"),S=e.resolveComponent("v-row"),R=e.resolveComponent("v-card-text"),F=e.resolveComponent("v-card"),B=e.resolveComponent("v-list-item"),y=e.resolveComponent("v-divider"),A=e.resolveComponent("v-list"),D=e.resolveComponent("v-menu"),w=e.resolveComponent("pane"),q=e.resolveComponent("script-log-messages"),z=e.resolveComponent("splitpanes"),U=e.resolveComponent("v-tab"),L=e.resolveComponent("v-tabs"),J=e.resolveComponent("v-col"),G=e.resolveComponent("v-tabs-window-item"),M=e.resolveComponent("v-tabs-window"),H=e.resolveComponent("file-open-save-dialog"),se=e.resolveComponent("environment-dialog"),Q=e.resolveComponent("ask-dialog"),$=e.resolveComponent("file-dialog"),le=e.resolveComponent("bucket-dialog"),ne=e.resolveComponent("information-dialog"),re=e.resolveComponent("event-list-dialog"),ee=e.resolveComponent("overrides-dialog"),K=e.resolveComponent("prompt-dialog"),te=e.resolveComponent("results-dialog"),l=e.resolveComponent("script-environment-dialog"),r=e.resolveComponent("simple-text-dialog"),m=e.resolveComponent("critical-cmd-dialog"),u=e.resolveComponent("v-card-title"),p=e.resolveComponent("command-editor"),C=e.resolveComponent("v-card-actions"),N=e.resolveComponent("v-dialog"),P=e.resolveComponent("running-scripts"),j=e.resolveComponent("v-sheet"),oe=e.resolveComponent("v-bottom-sheet");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.inline?(e.openBlock(),e.createElementBlock("div",qt,[e.createVNode(S,{"no-gutters":"",justify:"right"},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:n.inlineTab,"onUpdate:modelValue":o[16]||(o[16]=c=>n.inlineTab=c),density:"compact"},{default:e.withCtx(()=>[e.createVNode(U,{value:"script",text:"Script","data-test":"script-tab"}),e.createVNode(U,{value:"messages",text:"Messages","data-test":"messages-tab"})]),_:1},8,["modelValue"]),e.createVNode(b,{location:"bottom",text:n.filenameSelect,disabled:!n.filenameSelect||n.filenameSelect.length<=45},{activator:e.withCtx(({props:c})=>[e.createElementVNode("div",e.mergeProps(c,{style:{width:"32rem"}}),[e.createVNode(V,{id:"inline-filename",modelValue:n.filenameSelect,"onUpdate:modelValue":[o[17]||(o[17]=W=>n.filenameSelect=W),i.fileNameChanged],items:i.fileList,disabled:i.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(_,{modelValue:n.scriptId,"onUpdate:modelValue":o[18]||(o[18]=c=>n.scriptId=c),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(_,{modelValue:i.stateTimer,"onUpdate:modelValue":o[19]||(o[19]=c=>i.stateTimer=c),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",i.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),n.state==="Connecting..."?(e.openBlock(),e.createBlock(E,{key:0,size:40,class:"mx-2",indeterminate:"",color:"primary"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(M,{modelValue:n.inlineTab,"onUpdate:modelValue":o[22]||(o[22]=c=>n.inlineTab=c)},{default:e.withCtx(()=>[e.createVNode(G,{value:"script"},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"v-col-10",style:{margin:"15px 0px 0px 0px",padding:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("pre",{ref:"editor",class:"editor",style:{height:"200px"},onContextmenu:o[20]||(o[20]=e.withModifiers((...c)=>i.showExecuteSelectionMenu&&i.showExecuteSelectionMenu(...c),["prevent"]))},null,544)]),_:1}),e.createVNode(J,{class:"v-col-2",style:{display:"flex","justify-content":"center","align-items":"center","background-color":"var(--color-background-surface-default)"}},{default:e.withCtx(()=>[n.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Ht,[e.createVNode(h,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:n.startOrGoDisabled||!n.executeUser,hidden:n.suiteRunner,onClick:i.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Gt,[e.createVNode(h,{color:"primary",class:"ma-2",text:"Go",disabled:n.startOrGoDisabled,"data-test":"go-button",onClick:i.go},null,8,["disabled","onClick"]),e.createVNode(h,{color:"primary",class:"ma-2",text:n.pauseOrRetryButton,disabled:n.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:i.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(h,{color:"primary",class:"ma-2",text:"Stop","data-test":"stop-button",disabled:n.stopDisabled,onClick:i.stop},null,8,["disabled","onClick"])]))]),_:1})]),_:1})]),_:1}),e.createVNode(G,{value:"messages"},{default:e.withCtx(()=>[e.createElementVNode("div",Kt,[e.createVNode(q,{modelValue:n.messages,"onUpdate:modelValue":o[21]||(o[21]=c=>n.messages=c),"newest-on-top":n.messagesNewestOnTop,onMessageOrderChanged:t.messageOrderChanged},null,8,["modelValue","newest-on-top","onMessageOrderChanged"])])]),_:1})]),_:1},8,["modelValue"])])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-column overflow-hidden",style:e.normalizeStyle({height:a.containerHeight})},[e.createVNode(g,{menus:i.menus,title:n.title},null,8,["menus","title"]),e.createVNode(k,{modelValue:n.showAlert,"onUpdate:modelValue":o[1]||(o[1]=c=>n.showAlert=c),absolute:"",color:n.alertType,timeout:3e3,class:"apply-top",style:e.normalizeStyle(t.classificationStyles)},{actions:e.withCtx(({attrs:c})=>[e.createVNode(h,e.mergeProps({variant:"text",text:"Close"},c,{onClick:o[0]||(o[0]=W=>n.showAlert=!1)}),null,16)]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(" mdi-"+e.toDisplayString(n.alertType),1)]),_:1}),e.createTextVNode(" "+e.toDisplayString(n.alertText)+" ",1)]),_:1},8,["modelValue","color","style"]),e.createVNode(k,{modelValue:n.showEditingToast,"onUpdate:modelValue":o[3]||(o[3]=c=>n.showEditingToast=c),absolute:"",class:"apply-top",style:e.normalizeStyle(t.classificationStyles),timeout:-1,color:"orange"},{actions:e.withCtx(({attrs:c})=>[e.createVNode(h,e.mergeProps({variant:"text"},c,{color:"danger",text:"Unlock","data-test":"unlock-button",onClick:i.confirmLocalUnlock}),null,16,["onClick"]),e.createVNode(h,e.mergeProps({variant:"text",text:"Dismiss"},c,{onClick:o[2]||(o[2]=()=>{n.showEditingToast=!1})}),null,16)]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[...o[49]||(o[49]=[e.createTextVNode(" mdi-pencil-off ",-1)])]),_:1}),e.createTextVNode(" "+e.toDisplayString(n.lockedBy)+" is editing this script. Editor is in read-only mode ",1)]),_:1},8,["modelValue","style"]),e.createElementVNode("div",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.screens,c=>(e.openBlock(),e.createElementBlock("div",{id:i.screenId(c.id),key:c.id,ref_for:!0,ref:"gridItem",class:"item"},[e.createElementVNode("div",Rt,[e.createVNode(d,{target:c.target,screen:c.screen,definition:c.definition,keywords:n.screenKeywords,"initial-floated":!0,"initial-top":c.top,"initial-left":c.left,"initial-z":3,"min-z":3,"fix-floated":!0,count:c.count,onCloseScreen:W=>i.closeScreen(c.id),onDeleteScreen:W=>i.closeScreen(c.id)},null,8,["target","screen","definition","keywords","initial-top","initial-left","count","onCloseScreen","onDeleteScreen"])])],8,Ot))),128))]),e.createVNode(F,{class:"flex-shrink-0"},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[n.suiteRunner?(e.openBlock(),e.createBlock(v,{key:0,class:"suite-runner","suite-map":n.suiteMap,"disable-buttons":n.disableSuiteButtons,filename:i.fullFilename,onButton:i.suiteRunnerButton,onLoaded:i.doResize},null,8,["suite-map","disable-buttons","filename","onButton","onLoaded"])):e.createCommentVNode("",!0),e.createElementVNode("div",Dt,[e.createVNode(S,{"no-gutters":"",justify:"space-between"},{default:e.withCtx(()=>[n.showDisconnect?(e.openBlock(),e.createBlock(f,{key:0,class:"mt-2",color:"red"},{default:e.withCtx(()=>[...o[50]||(o[50]=[e.createTextVNode(" mdi-connection ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",Ft,[e.createVNode(b,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[n.scriptId?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},c,{icon:"mdi-arrow-left",variant:"text",density:"compact",onClick:i.backToNewScript}),null,16,["onClick"])):(e.openBlock(),e.createBlock(h,e.mergeProps({key:0},c,{icon:"mdi-cached",variant:"text",density:"compact",disabled:n.filename===t.NEW_FILENAME,"aria-label":"Reload File",onClick:i.reloadFile}),null,16,["disabled","onClick"]))]),default:e.withCtx(()=>[n.scriptId?(e.openBlock(),e.createElementBlock("span",zt," Back to New Script ")):(e.openBlock(),e.createElementBlock("span",Ut," Reload File "))]),_:1})]),e.createVNode(b,{location:"bottom",text:n.filenameSelect,disabled:!n.filenameSelect||n.filenameSelect.length<=45},{activator:e.withCtx(({props:c})=>[e.createElementVNode("div",e.mergeProps(c,{style:{width:"32rem"}}),[e.createVNode(V,{id:"filename",modelValue:n.filenameSelect,"onUpdate:modelValue":[o[4]||(o[4]=W=>n.filenameSelect=W),i.fileNameChanged],items:i.fileList,disabled:i.fileList.length<=1,label:"Filename","data-test":"filename",density:"compact",variant:"outlined","hide-details":""},null,8,["modelValue","items","disabled","onUpdate:modelValue"])],16)]),_:1},8,["text","disabled"]),e.createVNode(_,{modelValue:n.scriptId,"onUpdate:modelValue":o[5]||(o[5]=c=>n.scriptId=c),label:"Script ID","data-test":"id",class:"shrink ml-2 script-state",style:{"max-width":"100px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue"]),e.createVNode(_,{modelValue:i.stateTimer,"onUpdate:modelValue":o[6]||(o[6]=c=>i.stateTimer=c),label:"Script State","data-test":"state",class:e.normalizeClass(["shrink","ml-2","script-state",i.stateColorClass]),style:{"max-width":"120px"},density:"compact",variant:"outlined",readonly:"","hide-details":""},null,8,["modelValue","class"]),n.state==="Connecting..."?(e.openBlock(),e.createBlock(E,{key:1,size:40,class:"mx-2",indeterminate:"",color:"primary"})):(e.openBlock(),e.createElementBlock("div",It)),e.createVNode(x),n.startOrGoButton==="Start"?(e.openBlock(),e.createElementBlock("div",Pt,[n.overridesCount>0?(e.openBlock(),e.createBlock(b,{key:0,"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[e.createVNode(h,e.mergeProps(c,{class:"mr-4",icon:"",variant:"text",density:"compact","data-test":"tlm-override-button","aria-label":"TLM Overrides",onClick:o[7]||(o[7]=W=>n.showOverrides=!n.showOverrides)}),{default:e.withCtx(()=>[e.createVNode(O,{content:n.overridesCount>99?"99+":n.overridesCount,floating:"",color:"primary"},{default:e.withCtx(()=>[e.createVNode(f,{icon:"mdi-application-cog-outline"})]),_:1},8,["content"])]),_:1},16)]),default:e.withCtx(()=>[e.createElementVNode("span",null," TLM Overrides ("+e.toDisplayString(n.overridesCount)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(b,{"open-delay":600,location:"top"},{activator:e.withCtx(({props:c})=>[e.createVNode(h,e.mergeProps(c,{class:"mr-2",icon:"",variant:"text",density:"compact",disabled:n.envDisabled,"data-test":"env-button","aria-label":"Script Environment",onClick:o[9]||(o[9]=W=>n.scriptEnvironment.show=!n.scriptEnvironment.show)}),{default:e.withCtx(()=>[e.createVNode(O,{modelValue:i.environmentModified,"onUpdate:modelValue":o[8]||(o[8]=W=>i.environmentModified=W),floating:"",dot:""},{default:e.withCtx(()=>[e.createVNode(f,{icon:"mdi-application-variable"})]),_:1},8,["modelValue"])]),_:1},16,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,[o[51]||(o[51]=e.createTextVNode(" Script Environment ",-1)),i.environmentModified?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" (modified) ")],64)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(h,{class:"mx-1",color:"primary",text:"Start","data-test":"start-button",disabled:n.startOrGoDisabled||!n.executeUser,hidden:n.suiteRunner,onClick:i.startHandler},null,8,["disabled","hidden","onClick"])])):(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(h,{color:"primary",class:"mr-2",text:"Go",disabled:n.startOrGoDisabled,"data-test":"go-button",onClick:i.go},null,8,["disabled","onClick"]),e.createVNode(h,{color:"primary",class:"mr-2",text:n.pauseOrRetryButton,disabled:n.pauseOrRetryDisabled,"data-test":"pause-retry-button",onClick:i.pauseOrRetry},null,8,["text","disabled","onClick"]),e.createVNode(h,{color:"primary",text:"Stop","data-test":"stop-button",disabled:n.stopDisabled,onClick:i.stop},null,8,["disabled","onClick"])]))]),_:1})])]),_:1})]),_:1}),e.createVNode(z,{horizontal:"",class:"flex-grow-1 overflow-hidden",onResize:o[15]||(o[15]=({prevPane:c})=>n.editorBoxSize=c.size)},{default:e.withCtx(()=>[e.createVNode(w,{class:"editorbox",size:n.editorBoxSize},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:n.showSave,"onUpdate:modelValue":o[10]||(o[10]=c=>n.showSave=c),absolute:"",location:"right",timeout:-1,class:"saving apply-top",style:e.normalizeStyle(t.classificationStyles)},{default:e.withCtx(()=>[...o[52]||(o[52]=[e.createTextVNode(" Saving... ",-1)])]),_:1},8,["modelValue","style"]),e.createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:o[11]||(o[11]=e.withModifiers((...c)=>i.showExecuteSelectionMenu&&i.showExecuteSelectionMenu(...c),["prevent"]))},null,544),e.createVNode(D,{modelValue:n.executeSelectionMenu,"onUpdate:modelValue":o[12]||(o[12]=c=>n.executeSelectionMenu=c),target:[n.menuX,n.menuY]},{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(B,{title:n.currentLineHasCommand?"Edit Command":"Insert Command",onClick:i.openCommandEditor},null,8,["title","onClick"]),e.createVNode(y),e.createVNode(B,{title:"Execute Selection",onClick:i.executeSelection},null,8,["onClick"]),n.scriptId?(e.openBlock(),e.createBlock(B,{key:0,title:"Goto Line",onClick:i.runFromCursor},null,8,["onClick"])):e.createCommentVNode("",!0),n.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:1,title:"Run From Line",onClick:i.runFromCursor},null,8,["onClick"])),n.scriptId?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(B,{key:2,title:"Clear Local Breakpoints",onClick:i.clearBreakpoints},null,8,["onClick"])),e.createVNode(y),e.createVNode(B,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:i.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1},8,["size"]),e.createVNode(w,{id:"messages",class:"mt-2",size:100-n.editorBoxSize},{default:e.withCtx(()=>[n.showDebug?(e.openBlock(),e.createElementBlock("div",At,[e.createVNode(S,{"no-gutters":""},{default:e.withCtx(()=>[e.createVNode(h,{color:"primary",style:{width:"100px"},class:"mr-4",text:"Step","append-icon":"mdi-step-forward",disabled:!n.scriptId,"data-test":"step-button",onClick:i.step},null,8,["disabled","onClick"]),e.createVNode(_,{ref:"debug",modelValue:n.debug,"onUpdate:modelValue":o[13]||(o[13]=c=>n.debug=c),class:"mb-2",variant:"outlined",density:"compact","hide-details":"",label:"Debug","data-test":"debug-text",onKeydown:i.debugKeydown},null,8,["modelValue","onKeydown"])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(q,{id:"log-messages",modelValue:n.messages,"onUpdate:modelValue":o[14]||(o[14]=c=>n.messages=c),onSort:i.messageSortOrder},null,8,["modelValue","onSort"])]),_:1},8,["size"])]),_:1})],4)),n.fileOpen?(e.openBlock(),e.createBlock(H,{key:2,modelValue:n.fileOpen,"onUpdate:modelValue":o[23]||(o[23]=c=>n.fileOpen=c),type:"open","api-url":"/script-api/scripts",onFile:o[24]||(o[24]=c=>i.setFile(c)),onError:o[25]||(o[25]=c=>i.setError(c)),onClearTemp:o[26]||(o[26]=c=>i.clearTemp(c))},null,8,["modelValue"])):e.createCommentVNode("",!0),n.showSaveAs?(e.openBlock(),e.createBlock(H,{key:3,modelValue:n.showSaveAs,"onUpdate:modelValue":o[27]||(o[27]=c=>n.showSaveAs=c),type:"save","api-url":"/script-api/scripts","require-target-parent-dir":"","input-filename":i.filenameOrBlank,onFilename:o[28]||(o[28]=c=>i.saveAsFilename(c)),onError:o[29]||(o[29]=c=>i.setError(c)),onClearTemp:o[30]||(o[30]=c=>i.clearTemp(c))},null,8,["modelValue","input-filename"])):e.createCommentVNode("",!0),n.showEnvironment?(e.openBlock(),e.createBlock(se,{key:4,modelValue:n.showEnvironment,"onUpdate:modelValue":o[31]||(o[31]=c=>n.showEnvironment=c)},null,8,["modelValue"])):e.createCommentVNode("",!0),n.ask.show?(e.openBlock(),e.createBlock(Q,{key:5,modelValue:n.ask.show,"onUpdate:modelValue":o[32]||(o[32]=c=>n.ask.show=c),question:n.ask.question,default:n.ask.default,password:n.ask.password,"answer-required":n.ask.answerRequired,onResponse:n.ask.callback},null,8,["modelValue","question","default","password","answer-required","onResponse"])):e.createCommentVNode("",!0),n.file.show?(e.openBlock(),e.createBlock($,{key:6,modelValue:n.file.show,"onUpdate:modelValue":o[33]||(o[33]=c=>n.file.show=c),title:n.file.title,message:n.file.message,multiple:n.file.multiple,filter:n.file.filter,onResponse:i.fileDialogCallback},null,8,["modelValue","title","message","multiple","filter","onResponse"])):e.createCommentVNode("",!0),n.bucket.show?(e.openBlock(),e.createBlock(le,{key:7,modelValue:n.bucket.show,"onUpdate:modelValue":o[34]||(o[34]=c=>n.bucket.show=c),title:n.bucket.title,message:n.bucket.message,onResponse:i.bucketDialogCallback},null,8,["modelValue","title","message","onResponse"])):e.createCommentVNode("",!0),n.information.show?(e.openBlock(),e.createBlock(ne,{key:8,modelValue:n.information.show,"onUpdate:modelValue":o[35]||(o[35]=c=>n.information.show=c),title:n.information.title,text:n.information.text,width:n.information.width},null,8,["modelValue","title","text","width"])):e.createCommentVNode("",!0),n.inputMetadata.show?(e.openBlock(),e.createBlock(re,{key:9,modelValue:n.inputMetadata.show,"onUpdate:modelValue":o[36]||(o[36]=c=>n.inputMetadata.show=c),events:n.inputMetadata.events,"time-zone":n.timeZone,"new-metadata":"",onClose:n.inputMetadata.callback},null,8,["modelValue","events","time-zone","onClose"])):e.createCommentVNode("",!0),n.showOverrides?(e.openBlock(),e.createBlock(ee,{key:10,modelValue:n.showOverrides,"onUpdate:modelValue":o[37]||(o[37]=c=>n.showOverrides=c)},null,8,["modelValue"])):e.createCommentVNode("",!0),n.prompt.show?(e.openBlock(),e.createBlock(K,{key:11,modelValue:n.prompt.show,"onUpdate:modelValue":o[38]||(o[38]=c=>n.prompt.show=c),title:n.prompt.title,subtitle:n.prompt.subtitle,message:n.prompt.message,details:n.prompt.details,buttons:n.prompt.buttons,layout:n.prompt.layout,multiple:n.prompt.multiple,onResponse:n.prompt.callback},null,8,["modelValue","title","subtitle","message","details","buttons","layout","multiple","onResponse"])):e.createCommentVNode("",!0),n.results.show?(e.openBlock(),e.createBlock(te,{key:12,modelValue:n.results.show,"onUpdate:modelValue":o[39]||(o[39]=c=>n.results.show=c),text:n.results.text},null,8,["modelValue","text"])):e.createCommentVNode("",!0),n.scriptEnvironment.show?(e.openBlock(),e.createBlock(l,{key:13,modelValue:n.scriptEnvironment.show,"onUpdate:modelValue":o[40]||(o[40]=c=>n.scriptEnvironment.show=c),"input-environment":n.scriptEnvironment.env,onEnvironment:i.environmentHandler},null,8,["modelValue","input-environment","onEnvironment"])):e.createCommentVNode("",!0),e.createVNode(r,{modelValue:n.showSuiteError,"onUpdate:modelValue":o[41]||(o[41]=c=>n.showSuiteError=c),title:"Suite Analysis Error",text:n.suiteError,width:1e3},null,8,["modelValue","text"]),e.createVNode(m,{modelValue:n.displayCriticalCmd,"onUpdate:modelValue":o[42]||(o[42]=c=>n.displayCriticalCmd=c),uuid:n.criticalCmdUuid,"cmd-string":n.criticalCmdString,"cmd-user":n.criticalCmdUser,persistent:!0,onStatus:i.promptDialogCallback},null,8,["modelValue","uuid","cmd-string","cmd-user","onStatus"]),e.createVNode(N,{modelValue:n.commandEditor.show,"onUpdate:modelValue":o[46]||(o[46]=c=>n.commandEditor.show=c),"max-width":"1200",persistent:"",scrollable:"",onKeydown:e.withKeys(i.closeCommandDialog,["esc"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(u,{class:"d-flex align-center"},{default:e.withCtx(()=>[o[53]||(o[53]=e.createElementVNode("span",null,"Insert Command",-1)),e.createVNode(x),e.createVNode(h,{icon:"mdi-close",variant:"text",onClick:i.closeCommandDialog},null,8,["onClick"])]),_:1}),e.createVNode(R,{class:"pa-0"},{default:e.withCtx(()=>[n.commandEditor.dialogError?(e.openBlock(),e.createElementBlock("div",jt,[e.createVNode(f,{class:"mr-2",color:"error"},{default:e.withCtx(()=>[...o[54]||(o[54]=[e.createTextVNode("mdi-alert-circle",-1)])]),_:1}),e.createElementVNode("span",Wt,e.toDisplayString(n.commandEditor.dialogError),1),e.createVNode(h,{icon:"mdi-close",size:"small",variant:"text",color:"error",class:"ml-2",onClick:o[43]||(o[43]=c=>n.commandEditor.dialogError=null)})])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"commandEditor","initial-target-name":n.commandEditor.targetName,"initial-packet-name":n.commandEditor.packetName,"cmd-string":n.commandEditor.cmdString,"send-disabled":!1,"show-command-button":!1,onBuildCmd:o[44]||(o[44]=c=>i.insertCommand(c))},null,8,["initial-target-name","initial-packet-name","cmd-string"])]),_:1}),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(x),e.createVNode(h,{variant:"outlined",onClick:i.closeCommandDialog},{default:e.withCtx(()=>[...o[55]||(o[55]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(h,{color:"primary",variant:"flat",onClick:o[45]||(o[45]=c=>i.insertCommand())},{default:e.withCtx(()=>[...o[56]||(o[56]=[e.createTextVNode(" Insert Command ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),e.createVNode(oe,{modelValue:n.showScripts,"onUpdate:modelValue":o[48]||(o[48]=c=>n.showScripts=c)},{default:e.withCtx(()=>[e.createVNode(j,{class:"pb-11 pt-5 px-5"},{default:e.withCtx(()=>[n.showScripts?(e.openBlock(),e.createBlock(P,{key:0,"connect-in-new-tab":!!n.fileModified,onDisconnect:i.scriptDisconnect,onClose:o[47]||(o[47]=()=>{n.showScripts=!1})},null,8,["connect-in-new-tab","onDisconnect"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"])],64)}const Yt=ie._export_sfc(Tt,[["render",Jt],["__scopeId","data-v-2d948023"]]);exports.RunningScripts=we;exports.ScriptLogMessages=Ce;exports.ScriptRunner=Yt;exports.SuiteRunner=_e;
86
86
  //# sourceMappingURL=scriptrunner.cjs.map