openc3-cosmos-tool-dataextractor 7.0.1 → 7.1.0

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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/{ArrayWidget-Dh6zDiC7-873bed41f0920d4f20e2.js → ArrayWidget-CcQFJGCA-f76220cc11a39cef93d3.js} +2 -2
  3. data/tools/dataextractor/{ArrayplotWidget-CSc_TqNm-faea7e102c3b0e77340e.js → ArrayplotWidget-DGJEXAY0-2638e110104829429b7e.js} +1 -1
  4. data/tools/dataextractor/BarColumn-DwZmAe8g-87b5d97eefa9dd364079.js +1 -0
  5. data/tools/dataextractor/BlockWidget-BHtugveV-3a86c79f29993edbe557.js +2 -0
  6. data/tools/dataextractor/{ButtonWidget-DZ4VCNWU-467ba3039befef92a15a.js → ButtonWidget-Cc9cYsg8-fa11db39baed1ca10dd9.js} +2 -2
  7. data/tools/dataextractor/{CanvasWidget-DuXOo3jG-cca60757795adfc9b555.js → CanvasWidget-Bn70gBcc-9779d7c4a0937c4e2f70.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget-CMROfW3O-f502b2d25ac1e3251128.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-tWpK5rsv-037c03642913e202f682.js → CanvasimageWidget-BpM05v_m-6263bd6847c2e58b6b84.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-BVzJYz3l-3d76b92444baed7b16b9.js → CanvasimagevalueWidget-E6G93iGc-49d367288d7991a84f17.js} +1 -1
  11. data/tools/dataextractor/CanvaslabelWidget-C074R2Fy-8fa147b0578e1ddd8e31.js +1 -0
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-DzJKD6qs-16454bcd3f0db6ad1a0d.js → CanvaslabelvalueWidget-B0nJeS4X-b4d8b3e018abcec044ee.js} +1 -1
  13. data/tools/dataextractor/CanvaslineWidget-CxnNAqOX-d042686da706d5408c3e.js +1 -0
  14. data/tools/dataextractor/{CanvaslinevalueWidget-i6G0JfnZ-6ed33732c8ac89cd98bb.js → CanvaslinevalueWidget-BwfFyCwH-7997bd44b424ae4b1561.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-yAm10oX0-e8125b88e4be2fc48dbf.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-BnWksnnp-c1d54211236c9e26a34b.js +1 -0
  17. data/tools/dataextractor/DataExtractor-4fdb57d1945b0887db0f.js +14 -0
  18. data/tools/dataextractor/{DateWidget-DkFAFlc8-8b87a00cd8c7df7adf8c.js → DateWidget-CAiG2FIl-c146fb495ef13560c452.js} +1 -1
  19. data/tools/dataextractor/{DetailsDialog-sqja4Lzq-3c07f8084078cec125bc.js → DetailsDialog-q5SDzw3R-7c15f8bc9d13be343b4a.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-BuSbQVhf-57879c868050e8e6066a.js → DynamicWidget-BuSbQVhf-86285e64782585bb8284.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-DqJ_hvN4-458d5afdd66f766a320e.js → FilechecksumWidget-DeW9wy5d-248571c63dba27319b36.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-CYznG_tf-633ffe7729c3d8df045f.js → FiledisplayWidget-C_zPFu2E-2d17e2f1448559a44f05.js} +1 -1
  23. data/tools/dataextractor/{FormatvalueWidget-BnVu4YGx-685c1b3d38cda62137ef.js → FormatvalueWidget-BrvPWwfN-e050d5adc896a68175ca.js} +1 -1
  24. data/tools/dataextractor/Graph-BCvaO4yI-a403dbd09e8a3025cceb.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-DO5XbOGy-edd2165bb446a9306f21.js → GraphWidget-QS-VJoes-2024d5d6197b125514ef.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-BA9PiP3d-61dbe5e15cff5d64bb29.js → HorizontalWidget-cFSsdChw-d979f75547fda5fa7327.js} +1 -1
  27. data/tools/dataextractor/{HorizontalboxWidget-B-7HOqgl-32dab144449bf94f15aa.js → HorizontalboxWidget-CKA7rLGd-9f624ef7e0a8f5e8341a.js} +1 -1
  28. data/tools/dataextractor/HorizontallineWidget-BqbLK0zc-032877ba9a30de523df1.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-BzOka-fX-cbf4824b3f4d3e3f6424.js → IframeWidget-CITX8Es1-f88b11b4cb0abe9013a6.js} +1 -1
  30. data/tools/dataextractor/{ImageLoader-CstmWFM4-f27420bebced8580ff70.js → ImageLoader-DQV_11Vd-6bd51c2e0e35e48f84d3.js} +1 -1
  31. data/tools/dataextractor/{ImageviewerWidget-BA9uOM1q-b0947f82f033e760c532.js → ImageviewerWidget-BIsSA7KD-27ebd6d54624aecc85c5.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-Da2howZF-bfb9fcc9c81e16f870e5.js → LabelWidget-FQI-cH_A-6ba874245f82dee1b5b4.js} +1 -1
  33. data/tools/dataextractor/{LabelledWidget-BH8y3OXT-68af25a9704951142531.js → LabelledWidget-KGXtQ4Zb-fd5dd58e0de56789b7b2.js} +1 -1
  34. data/tools/dataextractor/LabelprogressbarWidget-72WyzD_Q-0c61a376a160ac8eabc1.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-DtWNf4mK-49ac92040f51acb6ad41.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget-D_JLdY7r-95bd967c8c4f6cb0fb1c.js +1 -0
  37. data/tools/dataextractor/LabelvaluedescWidget-BppM5vGp-e2eb8f62ec8b1edab5c7.js +1 -0
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-B69ogLif-bfa23b96929cba8117ff.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-DPYwFdgq-2159672e62922d671ff6.js +1 -0
  40. data/tools/dataextractor/LabelvaluerangebarWidget-BT0BcOoK-db30aa4c4f1abbb71f06.js +1 -0
  41. data/tools/dataextractor/{Layout-D7RGn0Fe-4c6501b5b5c13bc5939b.js → Layout-d-vb0okO-5143877d6be73c3e6315.js} +1 -1
  42. data/tools/dataextractor/{LedWidget-DgMtvsiv-f9fb0a4ee2f71ef2a9f6.js → LedWidget-Cmr6eVG2-aa2c79bda6817327a734.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-CcOaAw0C-3ee7e5044b0ba18270a6.js → LimitsBar-qMynDHYT-9ef33b1b3b889d3fab97.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-DpmJn1Lo-06311c5aa1a8fd9c3272.js → LimitsbarWidget-CMvcwa-m-d060dbaa92ea217695a7.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-BMXiEaDm-82722cde5d79a4a63dd5.js → LimitscolorWidget-CZ9wMtcI-600a0d33cfdac9e606c6.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-ufFMz6R--c471ef82b3a96efbb076.js → LimitscolumnWidget-r84KJGU--63f1ce2e287b7e068fe3.js} +1 -1
  47. data/tools/dataextractor/{LinegraphWidget-BC2wVOny-7d86e1f9b9bee5c66333.js → LinegraphWidget-COGBGOjF-5c8d32bb60f274b053cd.js} +1 -1
  48. data/tools/dataextractor/{MatrixbycolumnsWidget-DfUAeBnO-b55624295093260752b3.js → MatrixbycolumnsWidget-Dx2iz0YF-999d3afe43e2aa9db87e.js} +1 -1
  49. data/tools/dataextractor/OpenC3TimePicker-C3vCnk72-b6adff64018a7923eb93.js +1 -0
  50. data/tools/dataextractor/{ProgressbarWidget-D3ndYnq_-3586c760d2e8861c4010.js → ProgressbarWidget-DPbAVjdC-2981b1af8af4da20b6d1.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-CP0S9nWW-7982529538978f6d02c1.js → RadiobuttonWidget-iXI9yCDk-59f850a8bd9d843024e5.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-BXHfA21T-dd31b0768cdf93c1cabc.js → RadiogroupWidget-CMM_p1eA-1a39ed7902af769f50d0.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-Bv2DqkPo-ec5662b730343afaa28e.js → RangebarWidget-DJXGUHAc-63d6cdc08c070ce2280c.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-o_huYU0x-8a7a96915fa5538ce930.js → RollupWidget-BbWLSsTT-f862029486671e1966d7.js} +1 -1
  55. data/tools/dataextractor/ScrollwindowWidget-Dxhp7yKn-8b0ba7315cde67bcc9f6.js +1 -0
  56. data/tools/dataextractor/{SignalWidget-Dd54y28I-ad29f9a3ddb39bc8e712.js → SignalWidget-65q0tiuo-52c981c4470bf5006886.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-DFzbojmX-55a4d9330581f9b7285d.js +1 -0
  58. data/tools/dataextractor/SparklineWidget-Bu4I8zY0-d05e82f937b095333a15.js +1 -0
  59. data/tools/dataextractor/TabbookWidget-CELMWyx7-1d7b6a3a541b8b6cffb3.js +1 -0
  60. data/tools/dataextractor/TargetPacketItemChooser-BOdVLVbe-d94873f0ee88694988de.js +1 -0
  61. data/tools/dataextractor/{TextboxWidget-tL41zWUX-75750425b2582c87e1a4.js → TextboxWidget-DYsqXntS-d477d1867f2a65ae0699.js} +1 -1
  62. data/tools/dataextractor/TextfieldWidget-BIUgV9Q4-7664df7a16deff334036.js +1 -0
  63. data/tools/dataextractor/TimeWidget-BPXcY1Wy-61008f558728b5f906d7.js +1 -0
  64. data/tools/dataextractor/TitleWidget-DJ9mHRLE-52e464994c49c45eae92.js +1 -0
  65. data/tools/dataextractor/VWidget-BDy0211S-1ff9c9310d5fdbf00390.js +1 -0
  66. data/tools/dataextractor/ValueWidget-DzOSy7lp-92479ffa8015859984c7.js +1 -0
  67. data/tools/dataextractor/ValuelimitsbarWidget-D5dSlW6D-cae311a05073ff60ddb1.js +1 -0
  68. data/tools/dataextractor/ValuelimitscolumnWidget-7DXCsVW_-86690696d7ef52117561.js +1 -0
  69. data/tools/dataextractor/ValuerangebarWidget-BWjnpmyy-ef11d2ea672f2dbd1a8a.js +1 -0
  70. data/tools/dataextractor/{VerticalWidget-BvsVh0Ob-32ffa67d963ba10b5185.js → VerticalWidget-BOtXAhxt-19d6adff2d379742f886.js} +1 -1
  71. data/tools/dataextractor/VerticalboxWidget-RAsXfGdI-c0d18d921ac32d9c3bbe.js +1 -0
  72. data/tools/dataextractor/{Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js → Widget-BDsgRxuV-660e8eb4690c2793e6b6.js} +1 -1
  73. data/tools/dataextractor/main-cb94da8783ff5b6915d8.js +1496 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/BarColumn-DmjMnw5l-e63ca3ac4f4e5f880c78.js +0 -1
  77. data/tools/dataextractor/BlockWidget-BdR_HCVc-339e6dbc0abdf23824ee.js +0 -2
  78. data/tools/dataextractor/CanvasdotWidget-WoLpxI1u-42cc7026c74d2b83f1bf.js +0 -1
  79. data/tools/dataextractor/CanvaslabelWidget-CDFf8Vll-90f5994b9ebe9dd669d7.js +0 -1
  80. data/tools/dataextractor/CanvaslineWidget-BttTXCZq-4f927bb9d629d4ca2431.js +0 -1
  81. data/tools/dataextractor/CheckbuttonWidget-18jtf7sh-1bb7cf5924c0accea787.js +0 -1
  82. data/tools/dataextractor/ComboboxWidget-BjaVFbD4-68be351db2576115fc45.js +0 -1
  83. data/tools/dataextractor/DataExtractor-6a57a8b8549d610cacac.js +0 -11
  84. data/tools/dataextractor/Graph-CUFzx8Ti-e326729124e84b220373.js +0 -1
  85. data/tools/dataextractor/HorizontallineWidget-D-o9MGo0-ddb9630a2adc743b1e74.js +0 -1
  86. data/tools/dataextractor/LabelprogressbarWidget-Brl24F4c-e37d3a3a1ea8e0130fa0.js +0 -1
  87. data/tools/dataextractor/LabelsparklineWidget-D22MB7-4-4d4c54cc590572f96ebc.js +0 -1
  88. data/tools/dataextractor/LabelvalueWidget-_1JPbK-K-79535add803f699f912d.js +0 -1
  89. data/tools/dataextractor/LabelvaluedescWidget-BgduSJJb-2c9d371ecc2f493464fd.js +0 -1
  90. data/tools/dataextractor/LabelvaluelimitsbarWidget-C9PlEhWo-124291211bb9a7fb7a20.js +0 -1
  91. data/tools/dataextractor/LabelvaluelimitscolumnWidget-Cay6AhoZ-aeb62c844e9d862bc2b3.js +0 -1
  92. data/tools/dataextractor/LabelvaluerangebarWidget-s_8IgY-C-299393edba519bae3a75.js +0 -1
  93. data/tools/dataextractor/OpenC3TimePicker-DpkbfbgC-b9b15927c58cff1786d9.js +0 -1
  94. data/tools/dataextractor/ScrollwindowWidget-DdjaML6D-b4480561f3da8583459b.js +0 -1
  95. data/tools/dataextractor/SpacerWidget-GPFYtIG1-9dd77eb1e2a7304cf299.js +0 -1
  96. data/tools/dataextractor/SparklineWidget-f11nrlLS-92deda7a9b6298571159.js +0 -1
  97. data/tools/dataextractor/TabbookWidget-DeaC27yC-a92ec7a904c37d283bab.js +0 -1
  98. data/tools/dataextractor/TargetPacketItemChooser-BoBqvs3T-341c7c9e84a220b1a0d3.js +0 -1
  99. data/tools/dataextractor/TextfieldWidget-D1qj14Qi-0858b199ec7f9902291c.js +0 -1
  100. data/tools/dataextractor/TimeWidget-CSVGNong-12f265007f01523c523a.js +0 -1
  101. data/tools/dataextractor/TitleWidget-CLx-tuYT-e469f1843cd091fea225.js +0 -1
  102. data/tools/dataextractor/VWidget-CxnaMF0w-a4302069e065dead5397.js +0 -1
  103. data/tools/dataextractor/ValueWidget-BYgpXfDo-9f7bb34efd4d22fd774e.js +0 -1
  104. data/tools/dataextractor/ValuelimitsbarWidget-Dc9-VNZ3-42880e7e026ad3e9e259.js +0 -1
  105. data/tools/dataextractor/ValuelimitscolumnWidget-b7W8K3mR-c331b0200587603b6c9e.js +0 -1
  106. data/tools/dataextractor/ValuerangebarWidget-DmhczZQb-c8c6852c06a1fb11c936.js +0 -1
  107. data/tools/dataextractor/VerticalboxWidget-ClTCDCQN-b36d02475eee09ac8fa2.js +0 -1
  108. data/tools/dataextractor/main-7641c12765b47b03f01d.js +0 -1490
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45c1b99166a2a82ed8829fae82a199b1c0090573016c84236aade9d366829f8c
4
- data.tar.gz: f266405e7513e8107ea422b125f343d8423f41e5651d43b9add15b47db38b3f6
3
+ metadata.gz: 94b79a83014a15959bb69561ba1c566a9f4ad70072aaaa436a1345a1719bf707
4
+ data.tar.gz: 1f5613258c4b89502bde5ab99589cc64bc0a190d48d76f3506bd8224bbf91cbd
5
5
  SHA512:
6
- metadata.gz: 6f3d0c6baabc46758fcfca2282aaa98fa459e5c46e6d2f2f069636ef65a287c740305ba5d25159851004704882c5186ef9ebeddf9e5c321546035c5dc5f195bb
7
- data.tar.gz: 4da336def37121944a6c7b4ea8e4b3b93908e7b25d8982f4fa55daf2309d7e420e21c841f0b56f7450ec2170e0ca67e782e37aecbc93326b802f17ee037c9df5
6
+ metadata.gz: 7bee4fed367d3854bcad834a7a2bca438979d56749880d0f048569f94554a4eb1aa0ca13ff19e865baaadbbf5a2d1345850307b25fc7ef18e2c314e2d3a682f0
7
+ data.tar.gz: 2ce112065a86aa6a483280c8d98f92fe97119a9c12b211c1e73701e2d5fb139aa95fc84897ffdd66d225ec9da9792b4376269092259a4f0c358c65877c5005fc
@@ -1,2 +1,2 @@
1
- System.register(["./main-7641c12765b47b03f01d.js","vue","./DetailsDialog-sqja4Lzq-3c07f8084078cec125bc.js","single-spa","./VWidget-CxnaMF0w-a4302069e065dead5397.js","vue-router","pinia","vuetify","./LimitsBar-CcOaAw0C-3ee7e5044b0ba18270a6.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js"],(function(D,A){"use strict";var c,i,l,u,r,h,d,s,p,g,f,v,w,C,x,y;return{setters:[t=>{c=t.d},t=>{i=t.resolveComponent,l=t.openBlock,u=t.createElementBlock,r=t.createVNode,h=t.normalizeStyle,d=t.normalizeClass,s=t.withCtx,p=t.Fragment,g=t.renderList,f=t.createBlock,v=t.withModifiers,w=t.createTextVNode,C=t.toDisplayString},t=>{x=t.X},null,t=>{y=t.x},null,null,null,null,null,null],execute:(function(){const t={components:{DetailsDialog:x},mixins:[y],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=Number.parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){let a="",V=" ",k=`
2
- `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=k):a+=V;return a.trim()}else return e}}},B={class:"array-widget-container"};function L(e,a,V,k,o,m){const S=i("v-textarea"),j=i("v-list-item-title"),z=i("v-list-item"),M=i("v-list"),_=i("v-menu"),N=i("details-dialog");return l(),u("div",B,[r(S,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:h([e.computedStyle,m.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),r(_,{modelValue:e.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:s(()=>[r(M,null,{default:s(()=>[(l(!0),u(p,null,g(e.contextMenuOptions,(n,R)=>(l(),f(z,{key:R,onClick:v(n.action,["stop"])},{default:s(()=>[r(j,null,{default:s(()=>[w(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),r(N,{modelValue:e.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const E=D("default",c(t,[["render",L],["__scopeId","data-v-9da1fd5e"]]))})}}));
1
+ System.register(["./main-cb94da8783ff5b6915d8.js","vue","./DetailsDialog-q5SDzw3R-7c15f8bc9d13be343b4a.js","single-spa","./VWidget-BDy0211S-1ff9c9310d5fdbf00390.js","vue-router","pinia","vuetify","./LimitsBar-qMynDHYT-9ef33b1b3b889d3fab97.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js"],(function(k,N){"use strict";var c,i,l,u,r,h,d,s,p,g,f,v,w,y,x,C;return{setters:[t=>{c=t.d},t=>{i=t.resolveComponent,l=t.openBlock,u=t.createElementBlock,r=t.createVNode,h=t.normalizeStyle,d=t.normalizeClass,s=t.withCtx,p=t.Fragment,g=t.renderList,f=t.createBlock,v=t.withModifiers,w=t.createTextVNode,y=t.toDisplayString},t=>{x=t.Z},null,t=>{C=t.T},null,null,null,null,null,null],execute:(function(){const t={components:{DetailsDialog:x},mixins:[C],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=Number.parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){let a="",V=" ",D=`
2
+ `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=D):a+=V;return a.trim()}else return e}}},B={class:"array-widget-container"};function S(e,a,V,D,o,m){const z=i("v-textarea"),M=i("v-list-item-title"),R=i("v-list-item"),T=i("v-list"),_=i("v-menu"),j=i("details-dialog");return l(),u("div",B,[r(z,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:h([e.computedStyle,m.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),r(_,{modelValue:e.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:s(()=>[r(T,null,{default:s(()=>[(l(!0),u(p,null,g(e.contextMenuOptions,(n,L)=>(l(),f(R,{key:L,onClick:v(n.action,["stop"])},{default:s(()=>[r(M,null,{default:s(()=>[w(y(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),r(j,{modelValue:e.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const E=k("default",c(t,[["render",S],["__scopeId","data-v-9da1fd5e"]]))})}}));
@@ -1 +1 @@
1
- System.register(["./main-7641c12765b47b03f01d.js","./GraphWidget-DO5XbOGy-edd2165bb446a9306f21.js","vue","vue-router","pinia","single-spa","vuetify","./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js"],(function(m,y){"use strict";var c,h,l,d,u,p;return{setters:[s=>{c=s.d,h=s.c,l=s.W},s=>{d=s.M},s=>{u=s.openBlock,p=s.createElementBlock},null,null,null,null,null],execute:(function(){const s={mixins:[d],data:function(){return{items:[],indexes:{},data:[[]],cable:new l,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:Number.parseFloat(e[1]),step:Number.parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||Number.isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new h(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return u(),p("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const k=m("default",c(s,[["render",g]]))})}}));
1
+ System.register(["./main-cb94da8783ff5b6915d8.js","./GraphWidget-QS-VJoes-2024d5d6197b125514ef.js","vue","vue-router","pinia","single-spa","vuetify","./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js"],(function(m,w){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.o,h=s.z},s=>{d=s.M},s=>{u=s.openBlock,p=s.createElementBlock},null,null,null,null,null],execute:(function(){const s={mixins:[d],data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:Number.parseFloat(e[1]),step:Number.parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||Number.isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return u(),p("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const k=m("default",c(s,[["render",g]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","./main-cb94da8783ff5b6915d8.js"],(function(a,n){"use strict";var h,l;return{setters:[e=>{h=e.h},e=>{l=e.J}],execute:(function(){const e=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){if(!this.screenValues[this.valueId])return{};let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l;const t=this.parseItemName(this.parameters[2]);this.parameters[2]=t.name,this.api.get_limits(this.parameters[0],this.parameters[1],t.name).then(i=>{this.limitsSettings=i}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(i=>{i[0]==="MIN_VALUE"&&(this.minValue=parseInt(i[1])),i[0]==="MAX_VALUE"&&(this.maxValue=parseInt(i[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(t==null||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const s=parseInt((t-r)/this.scale);return s>100?100:s<0?0:s}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})})}}));
@@ -0,0 +1,2 @@
1
+ System.register(["./main-cb94da8783ff5b6915d8.js","vue","./DetailsDialog-q5SDzw3R-7c15f8bc9d13be343b4a.js","single-spa","./VWidget-BDy0211S-1ff9c9310d5fdbf00390.js","vue-router","pinia","vuetify","./LimitsBar-qMynDHYT-9ef33b1b3b889d3fab97.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js"],(function(S,j){"use strict";var c,a,h,d,s,p,g,o,w,f,v,y,x,C,V,k;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,h=e.openBlock,d=e.createElementBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,C=e.toDisplayString},e=>{V=e.Z},null,e=>{k=e.T},null,null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:V},mixins:[k],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=Number.parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=Number.parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let D=" ",B=`
2
+ `,i=0,l=0;const m=this.bytesPerWord*this.wordsPerRow;for(const u of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=m),r+=sprintf(this.formatter,u),i+=1,i%m===0?(i=0,r+=B):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,D,B,i,l){const m=a("v-textarea"),u=a("v-list-item-title"),b=a("v-list-item"),P=a("v-list"),R=a("v-menu"),T=a("details-dialog");return h(),d("div",M,[s(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(R,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(P,null,{default:o(()=>[(h(!0),d(w,null,f(t.contextMenuOptions,(n,_)=>(h(),v(b,{key:_,onClick:y(n.action,["stop"])},{default:o(()=>[s(u,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(T,{modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const z=S("default",c(e,[["render",W],["__scopeId","data-v-fc296592"]]))})}}));
@@ -1,2 +1,2 @@
1
- System.register(["./main-7641c12765b47b03f01d.js","vue","single-spa","./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","vue-router","pinia","vuetify"],(function(exports,module){"use strict";var d,R,yS,zA,resolveComponent,openBlock,createBlock,withCtx,createVNode,createElementVNode,createTextVNode,toDisplayString,createCommentVNode,withModifiers,createElementBlock,normalizeStyle,u;return{setters:[e=>{d=e.d,R=e.a,yS=e.y,zA=e.z},e=>{resolveComponent=e.resolveComponent,openBlock=e.openBlock,createBlock=e.createBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createCommentVNode=e.createCommentVNode,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{u=e.u},null,null,null],execute:(function(){const S={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(e,t){e?(yS.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?yS.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await yS.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();R.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await yS.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await R.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await R.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,p,a,o){const l=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),r=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),v=resolveComponent("v-card-text"),c=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{modelValue:o.show,"onUpdate:modelValue":t[3]||(t[3]=n=>o.show=n),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(l),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(l)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=n=>a.error=n),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(r,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(r,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(r,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=n=>a.username=n),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=n=>a.password=n),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(r,{class:"pt-2"},{default:withCtx(()=>[createVNode(l),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:o.disableButtons,"data-test":"reject",onClick:withModifiers(o.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:o.disableButtons,"data-test":"approve",onClick:withModifiers(o.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(S,[["render",E],["__scopeId","data-v-d01f6934"]]),_sfc_main={components:{CriticalCmdDialog:N},mixins:[u],data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new zA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
2
- `).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});yS.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,p,a,o){const l=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),m=resolveComponent("v-row"),r=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(l,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:o.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(o.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=c=>a.displaySendHazardous=c),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(r),createVNode(l,{variant:"outlined",onClick:o.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(l,{class:"bg-primary mx-1",onClick:o.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=c=>a.displayCriticalCmd=c),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))})}}));
1
+ System.register(["./main-cb94da8783ff5b6915d8.js","vue","single-spa","./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue-router","pinia","vuetify"],(function(exports,module){"use strict";var d,g,ls,Jo,resolveComponent,openBlock,createBlock,withCtx,createVNode,createElementVNode,createTextVNode,toDisplayString,createCommentVNode,withModifiers,createElementBlock,normalizeStyle,h;return{setters:[e=>{d=e.d,g=e.g,ls=e.l,Jo=e.J},e=>{resolveComponent=e.resolveComponent,openBlock=e.openBlock,createBlock=e.createBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createCommentVNode=e.createCommentVNode,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{h=e.h},null,null,null],execute:(function(){const S={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(e,t){e?(ls.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?ls.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await ls.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();g.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await ls.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await g.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await g.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function B(e,t,s,u,a,o){const l=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),p=resolveComponent("v-alert"),r=resolveComponent("v-row"),m=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),v=resolveComponent("v-card-text"),c=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{modelValue:o.show,"onUpdate:modelValue":t[3]||(t[3]=n=>o.show=n),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(l),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(l)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(p,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=n=>a.error=n),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(r,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(r,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(r,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(m,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=n=>a.username=n),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:1},{default:withCtx(()=>[createVNode(m,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=n=>a.password=n),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(r,{class:"pt-2"},{default:withCtx(()=>[createVNode(l),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:o.disableButtons,"data-test":"reject",onClick:withModifiers(o.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:o.disableButtons,"data-test":"approve",onClick:withModifiers(o.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const P=d(S,[["render",B],["__scopeId","data-v-d01f6934"]]),_sfc_main={components:{CriticalCmdDialog:P},mixins:[h],data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new Jo},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
2
+ `).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let u=[];for(const a in s)u.push({key:a,value:s[a],readonly:!1});ls.post(`/script-api/scripts/${e}/run`,{data:{environment:u}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,u,a,o){const l=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),p=resolveComponent("v-row"),r=resolveComponent("v-spacer"),m=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(l,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:o.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(o.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=c=>a.displaySendHazardous=c),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(p,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(r),createVNode(l,{variant:"outlined",onClick:o.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(l,{class:"bg-primary mx-1",onClick:o.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=c=>a.displayCriticalCmd=c),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Layout-D7RGn0Fe-4c6501b5b5c13bc5939b.js","vue","./main-7641c12765b47b03f01d.js","./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","vue-router","pinia","single-spa","vuetify"],(function(p,f){"use strict";var i,n,s,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,o=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:(function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,k,y,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const w=p("default",g(e,[["render",h],["__scopeId","data-v-50b8991f"]]))})}}));
1
+ System.register(["./Layout-d-vb0okO-5143877d6be73c3e6315.js","vue","./main-cb94da8783ff5b6915d8.js","./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue-router","pinia","single-spa","vuetify"],(function(p,f){"use strict";var i,n,s,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,o=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:(function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,w,y,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const k=p("default",g(e,[["render",h],["__scopeId","data-v-50b8991f"]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(s,a){"use strict";var t,n,l,c;return{setters:[e=>{t=e.h},e=>{n=e.openBlock,l=e.createElementBlock},e=>{c=e.d},null,null,null,null],execute:(function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,p,f,d,x){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","./ImageLoader-CstmWFM4-f27420bebced8580ff70.js","vue","./main-7641c12765b47b03f01d.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.u},e=>{n=e.s},e=>{s=e.openBlock,a=e.createElementBlock,l=e.normalizeStyle,c=e.createCommentVNode},e=>{h=e.d},null,null,null,null],execute:(function(){const e={mixins:[i,n],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},o=["href","x","y","width","height"];function p(t,m,y,k,N,r){return t.imageUrl?(s(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:l(r.pointerStyle),onClick:m[0]||(m[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,o)):c("",!0)}const f=u("default",h(e,[["render",p]]))})}}));
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","./ImageLoader-DQV_11Vd-6bd51c2e0e35e48f84d3.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(o,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.h},e=>{n=e.s},e=>{s=e.openBlock,a=e.createElementBlock,l=e.normalizeStyle,c=e.createCommentVNode},e=>{h=e.d},null,null,null,null],execute:(function(){const e={mixins:[i,n],emits:["open"],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,m,y,k,N,r){return t.imageUrl?(s(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:l(r.pointerStyle),onClick:m[0]||(m[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):c("",!0)}const f=o("default",h(e,[["render",p]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","./ImageLoader-CstmWFM4-f27420bebced8580ff70.js","vue","./main-7641c12765b47b03f01d.js","vue-router","pinia","single-spa","vuetify"],(function(I,S){"use strict";var m,d,l,n,g,o,h,u,c,p,f;return{setters:[t=>{m=t.u},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,g=t.Fragment,o=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,p=t.createCommentVNode},t=>{f=t.d},null,null,null,null],execute:(function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(i=>i.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const i=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let r=e[2];return r.startsWith("http")||(r=await this.getPresignedUrl(r)),{url:r,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(i).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let r=this.parameters[4];r.startsWith("http")?this.defaultImage={...e,url:r}:this.getPresignedUrl(r).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(i,e,r,y,N,a){return l(),n("g",null,[(l(!0),n(g,null,o(i.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,v)),[[c,s.value==a.selectedValue]])),128)),i.defaultImage?h((l(),n("image",{key:0,href:i.defaultImage.url,x:i.defaultImage.x,y:i.defaultImage.y,width:i.defaultImage.width,height:i.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):p("",!0)])}const $=I("default",f(t,[["render",k]]))})}}));
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","./ImageLoader-DQV_11Vd-6bd51c2e0e35e48f84d3.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(I,S){"use strict";var m,d,l,n,g,o,h,u,c,p,f;return{setters:[t=>{m=t.h},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,g=t.Fragment,o=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,p=t.createCommentVNode},t=>{f=t.d},null,null,null,null],execute:(function(){const t={mixins:[m,d],emits:["addItem","deleteItem","open"],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(i=>i.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const i=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let r=e[2];return r.startsWith("http")||(r=await this.getPresignedUrl(r)),{url:r,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(i).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let r=this.parameters[4];r.startsWith("http")?this.defaultImage={...e,url:r}:this.getPresignedUrl(r).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(i,e,r,y,$,a){return l(),n("g",null,[(l(!0),n(g,null,o(i.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,v)),[[c,s.value==a.selectedValue]])),128)),i.defaultImage?h((l(),n("image",{key:0,href:i.defaultImage.url,x:i.defaultImage.x,y:i.defaultImage.y,width:i.defaultImage.width,height:i.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):p("",!0)])}const V=I("default",f(t,[["render",k]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(a,p){"use strict";var r,l,n,i,s;return{setters:[e=>{r=e.h},e=>{l=e.openBlock,n=e.createElementBlock,i=e.toDisplayString},e=>{s=e.d},null,null,null,null],execute:(function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},o=["x","y","fill"];function u(t,f,x,d,g,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},i(t.parameters[2]),9,o)}const m=a("default",s(e,[["render",u]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","vue","./main-7641c12765b47b03f01d.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.u},e=>{a=e.openBlock,i=e.createElementBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:(function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:""},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x","y","font-size","fill"];function o(t,h,c,f,v,r){return a(),i("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,m)}const p=u("default",n(e,[["render",o]]))})}}));
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.h},e=>{a=e.openBlock,i=e.createElementBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:(function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:""},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x","y","font-size","fill"];function o(t,h,c,f,v,r){return a(),i("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,m)}const p=u("default",n(e,[["render",o]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(c,p){"use strict";var l,n,s,a,i;return{setters:[e=>{l=e.h},e=>{n=e.openBlock,s=e.createElementBlock,a=e.normalizeStyle},e=>{i=e.d},null,null,null,null],execute:(function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function m(t,r,d,h,k,o){return n(),s("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(o.calcStyle)},null,12,u)}const y=c("default",i(e,[["render",m]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","vue","./main-7641c12765b47b03f01d.js","vue-router","pinia","single-spa","vuetify"],(function(u,h){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.u},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:(function(){const t={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function d(e,a,o,v,y,c){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(c.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",d]]))})}}));
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.h},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:(function(){const t={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},m=["x1","y1","x2","y2"];function h(e,a,o,v,y,c){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(c.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",h]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(i,p){"use strict";var t,a,n,s,r,u;return{setters:[e=>{t=e.h},e=>{a=e.resolveComponent,n=e.openBlock,s=e.createBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:(function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function c(d,o,k,y,l,b){const m=a("v-checkbox");return n(),s(m,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=h=>l.value=h),"hide-details":"",density:"compact",label:l.label,style:r(d.computedStyle)},null,8,["modelValue","label","style"])}const v=i("default",u(e,[["render",c]]))})}}));
@@ -0,0 +1 @@
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","vue","./main-cb94da8783ff5b6915d8.js","vue-router","pinia","single-spa","vuetify"],(function(o,p){"use strict";var l,n,s,i,a,r;return{setters:[e=>{l=e.h},e=>{n=e.resolveComponent,s=e.openBlock,i=e.createBlock,a=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:(function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,u,y,f,t,B){const d=n("v-select");return s(),i(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:a(m.computedStyle)},null,8,["modelValue","items","style"])}const h=o("default",r(e,[["render",c]]))})}}));
@@ -0,0 +1,14 @@
1
+ System.register(["./main-cb94da8783ff5b6915d8.js","vue","./TargetPacketItemChooser-BOdVLVbe-d94873f0ee88694988de.js","./OpenC3TimePicker-C3vCnk72-b6adff64018a7923eb93.js","vue-router","pinia","single-spa","vuetify"],(function(Is,Li){"use strict";var mt,gt,bt,_t,yt,wt,C,N,M,vt,f,p,Se,G,te,ae,fe,Et,F,He,ze,We,le,Tt,Je,St,Ot;return{setters:[x=>{mt=x.d,gt=x._,bt=x.k,_t=x.R,yt=x.M,wt=x.I},x=>{C=x.resolveComponent,N=x.openBlock,M=x.createBlock,vt=x.Teleport,f=x.createVNode,p=x.withCtx,Se=x.createElementVNode,G=x.toDisplayString,te=x.createElementBlock,ae=x.Fragment,fe=x.renderList,Et=x.ref,F=x.createTextVNode,He=x.mergeProps,ze=x.createSlots,We=x.normalizeStyle,le=x.createCommentVNode,Tt=x.withModifiers,Je=x.withKeys},x=>{St=x._},x=>{Ot=x.z},null,null,null,null],execute:(function(){var x=document.createElement("style");x.textContent=`.title-font[data-v-eb45238b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-eb45238b]{transition:none!important}
2
+ /*$vite$:1*/`,document.head.appendChild(x);const js={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,r=Et(!1);function n(){r.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=C("v-icon"),u=C("v-btn"),d=C("v-divider"),m=C("v-list-item-title"),y=C("v-list-item"),b=C("v-list"),_=C("v-menu"),h=C("v-radio"),v=C("v-list-item-action"),T=C("v-radio-group"),O=C("v-checkbox");return N(),M(_,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=g=>r.value=g),"close-on-content-click":!1},{activator:p(({props:g})=>[f(u,He(g,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:p(()=>[f(l,{class:"menu-button-icon"},{default:p(()=>[...a[1]||(a[1]=[F(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:p(()=>[f(b,null,{default:p(()=>[(N(!0),te(ae,null,fe(t.menu.items,(g,R)=>(N(),te(ae,null,[g.divider?(N(),M(d,{key:R+"-divider"})):g.subMenu&&g.subMenu.length>0?(N(),te("div",{key:R+"-submenu"},[(N(),M(_,{key:R,"open-on-hover":"",location:"right"},{activator:p(({props:k})=>[(N(),M(y,He({ref_for:!0},k,{key:R,disabled:g.disabled}),ze({append:p(()=>[f(l,null,{default:p(()=>[...a[2]||(a[2]=[F(" mdi-chevron-right ",-1)])]),_:1})]),default:p(()=>[!g.radio&&!g.checkbox?(N(),M(m,{key:0,style:We("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:p(()=>[F(G(g.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[g.icon?{name:"prepend",fn:p(()=>[f(l,{disabled:g.disabled},{default:p(()=>[F(G(g.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:p(()=>[f(b,null,{default:p(()=>[(N(!0),te(ae,null,fe(g.subMenu,(k,$)=>(N(),M(y,{key:$,"prepend-icon":k.icon,onClick:j=>s("submenu-click",k)},{default:p(()=>[f(m,null,{default:p(()=>[F(G(k.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):g.radioGroup?(N(),M(T,{key:R+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":g.value,"onUpdate:modelValue":g.command},{default:p(()=>[(N(!0),te(ae,null,fe(g.choices,(k,$)=>(N(),M(y,{key:$+"-choice"},{default:p(()=>[f(v,{class:"list-action"},{default:p(()=>[f(h,{color:"secondary",label:k.label,value:k.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(N(),M(y,{key:R+"-list",disabled:g.disabled,"data-test":o(`${t.title} ${t.menu.label} ${g.label}`),onClick:()=>{g.command(g),g.checkbox||n()}},ze({default:p(()=>[g.checkbox?(N(),M(v,{key:0,class:"list-action"},{default:p(()=>[f(O,{modelValue:g.checked,"onUpdate:modelValue":k=>g.checked=k,label:g.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):le("",!0),!g.radio&&!g.checkbox?(N(),M(m,{key:1,style:We("cursor: pointer;"+(g.disabled?"opacity: 0.2":""))},{default:p(()=>[F(G(g.label),1)]),_:2},1032,["style"])):le("",!0)]),_:2},[g.icon?{name:"prepend",fn:p(()=>[f(l,{icon:g.icon,disabled:g.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Us={components:{TopBarMenu:js},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},Ms={class:"app-title mr-2"};function Ls(t,e,s,r,n,o){const i=C("v-col"),a=C("v-row"),l=C("TopBarMenu");return N(),M(vt,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:p(()=>[f(i,{"align-self":"end"},{default:p(()=>[Se("span",Ms,G(s.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:p(()=>[(N(!0),te(ae,null,fe(s.menus,(u,d)=>(N(),M(l,{key:d+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const Fs=mt(Us,[["render",Ls],["__scopeId","data-v-f4fb184e"]]);function Ct(t,e){return function(){return t.apply(e,arguments)}}const{toString:Vs}=Object.prototype,{getPrototypeOf:Oe}=Object,{iterator:Ce,toStringTag:xt}=Symbol,xe=(t=>e=>{const s=Vs.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),X=t=>(t=t.toLowerCase(),e=>xe(e)===t),Re=t=>e=>typeof e===t,{isArray:ce}=Array,ue=Re("undefined");function pe(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&q(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Rt=X("ArrayBuffer");function qs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Rt(t.buffer),e}const Bs=Re("string"),q=Re("function"),At=Re("number"),me=t=>t!==null&&typeof t=="object",$s=t=>t===!0||t===!1,Ae=t=>{if(xe(t)!=="object")return!1;const e=Oe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(xt in t)&&!(Ce in t)},Hs=t=>{if(!me(t)||pe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},zs=X("Date"),Ws=X("File"),Js=t=>!!(t&&typeof t.uri<"u"),Ks=t=>t&&typeof t.getParts<"u",Xs=X("Blob"),Zs=X("FileList"),Gs=t=>me(t)&&q(t.pipe);function Qs(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const kt=Qs(),Pt=typeof kt.FormData<"u"?kt.FormData:void 0,Ys=t=>{if(!t)return!1;if(Pt&&t instanceof Pt)return!0;const e=Oe(t);if(!e||e===Object.prototype||!q(t.append))return!1;const s=xe(t);return s==="formdata"||s==="object"&&q(t.toString)&&t.toString()==="[object FormData]"},er=X("URLSearchParams"),[tr,sr,rr,nr]=["ReadableStream","Request","Response","Headers"].map(X),ir=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ge(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),ce(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(pe(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function Dt(t,e){if(pe(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nt=t=>!ue(t)&&t!==se;function Ke(){const{caseless:t,skipUndefined:e}=Nt(this)&&this||{},s={},r=(n,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=t&&Dt(s,o)||o;Ae(s[i])&&Ae(n)?s[i]=Ke(s[i],n):Ae(n)?s[i]=Ke({},n):ce(n)?s[i]=n.slice():(!e||!ue(n))&&(s[i]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&ge(arguments[n],r);return s}const or=(t,e,s,{allOwnKeys:r}={})=>(ge(e,(n,o)=>{s&&q(n)?Object.defineProperty(t,o,{value:Ct(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),ar=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),lr=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},cr=(t,e,s,r)=>{let n,o,i;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&Oe(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},ur=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},dr=t=>{if(!t)return null;if(ce(t))return t;let e=t.length;if(!At(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},hr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oe(Uint8Array)),fr=(t,e)=>{const s=(t&&t[Ce]).call(t);let r;for(;(r=s.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},pr=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},mr=X("HTMLFormElement"),gr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),It=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),br=X("RegExp"),jt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};ge(s,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(r[o]=i||n)}),Object.defineProperties(t,r)},_r=t=>{jt(t,(e,s)=>{if(q(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const r=t[s];if(q(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},yr=(t,e)=>{const s={},r=n=>{n.forEach(o=>{s[o]=!0})};return ce(t)?r(t):r(String(t).split(e)),s},wr=()=>{},vr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Er(t){return!!(t&&q(t.append)&&t[xt]==="FormData"&&t[Ce])}const Tr=t=>{const e=new Array(10),s=(r,n)=>{if(me(r)){if(e.indexOf(r)>=0)return;if(pe(r))return r;if(!("toJSON"in r)){e[n]=r;const o=ce(r)?[]:{};return ge(r,(i,a)=>{const l=s(i,n+1);!ue(l)&&(o[a]=l)}),e[n]=void 0,o}}return r};return s(t,0)},Sr=X("AsyncFunction"),Or=t=>t&&(me(t)||q(t))&&q(t.then)&&q(t.catch),Ut=((t,e)=>t?setImmediate:e?((s,r)=>(se.addEventListener("message",({source:n,data:o})=>{n===se&&o===s&&r.length&&r.shift()()},!1),n=>{r.push(n),se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",q(se.postMessage)),Cr=typeof queueMicrotask<"u"?queueMicrotask.bind(se):typeof process<"u"&&process.nextTick||Ut,xr=t=>t!=null&&q(t[Ce]),c={isArray:ce,isArrayBuffer:Rt,isBuffer:pe,isFormData:Ys,isArrayBufferView:qs,isString:Bs,isNumber:At,isBoolean:$s,isObject:me,isPlainObject:Ae,isEmptyObject:Hs,isReadableStream:tr,isRequest:sr,isResponse:rr,isHeaders:nr,isUndefined:ue,isDate:zs,isFile:Ws,isReactNativeBlob:Js,isReactNative:Ks,isBlob:Xs,isRegExp:br,isFunction:q,isStream:Gs,isURLSearchParams:er,isTypedArray:hr,isFileList:Zs,forEach:ge,merge:Ke,extend:or,trim:ir,stripBOM:ar,inherits:lr,toFlatObject:cr,kindOf:xe,kindOfTest:X,endsWith:ur,toArray:dr,forEachEntry:fr,matchAll:pr,isHTMLForm:mr,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:jt,freezeMethods:_r,toObjectSet:yr,toCamelCase:gr,noop:wr,toFiniteNumber:vr,findKey:Dt,global:se,isContextDefined:Nt,isSpecCompliantForm:Er,toJSONObject:Tr,isAsyncFn:Sr,isThenable:Or,setImmediate:Ut,asap:Cr,isIterable:xr};let E=class Ds extends Error{static from(e,s,r,n,o,i){const a=new Ds(e.message,s||e.code,r,n,o);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,s,r,n,o){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};E.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",E.ERR_BAD_OPTION="ERR_BAD_OPTION",E.ECONNABORTED="ECONNABORTED",E.ETIMEDOUT="ETIMEDOUT",E.ERR_NETWORK="ERR_NETWORK",E.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",E.ERR_DEPRECATED="ERR_DEPRECATED",E.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",E.ERR_BAD_REQUEST="ERR_BAD_REQUEST",E.ERR_CANCELED="ERR_CANCELED",E.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",E.ERR_INVALID_URL="ERR_INVALID_URL",E.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Rr=null;function Xe(t){return c.isPlainObject(t)||c.isArray(t)}function Mt(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function Ze(t,e,s){return t?t.concat(e).map(function(r,n){return r=Mt(r),!s&&n?"["+r+"]":r}).join(s?".":""):e}function Ar(t){return c.isArray(t)&&!t.some(Xe)}const kr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function ke(t,e,s){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=c.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,v){return!c.isUndefined(v[h])});const r=s.metaTokens,n=s.visitor||m,o=s.dots,i=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,l=s.maxDepth===void 0?100:s.maxDepth,u=a&&c.isSpecCompliantForm(e);if(!c.isFunction(n))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(c.isBoolean(h))return h.toString();if(!u&&c.isBlob(h))throw new E("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function m(h,v,T){let O=h;if(c.isReactNative(e)&&c.isReactNativeBlob(h))return e.append(Ze(T,v,o),d(h)),!1;if(h&&!T&&typeof h=="object"){if(c.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&Ar(h)||(c.isFileList(h)||c.endsWith(v,"[]"))&&(O=c.toArray(h)))return v=Mt(v),O.forEach(function(g,R){!(c.isUndefined(g)||g===null)&&e.append(i===!0?Ze([v],R,o):i===null?v:v+"[]",d(g))}),!1}return Xe(h)?!0:(e.append(Ze(T,v,o),d(h)),!1)}const y=[],b=Object.assign(kr,{defaultVisitor:m,convertValue:d,isVisitable:Xe});function _(h,v,T=0){if(!c.isUndefined(h)){if(T>l)throw new E("Object is too deeply nested ("+T+" levels). Max depth: "+l,E.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));y.push(h),c.forEach(h,function(O,g){(!(c.isUndefined(O)||O===null)&&n.call(e,O,c.isString(g)?g.trim():g,v,b))===!0&&_(O,v?v.concat(g):[g],T+1)}),y.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return _(t),e}function Lt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function Ge(t,e){this._pairs=[],t&&ke(t,this,e)}const Ft=Ge.prototype;Ft.append=function(t,e){this._pairs.push([t,e])},Ft.toString=function(t){const e=t?function(s){return t.call(this,s,Lt)}:Lt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Pr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vt(t,e,s){if(!e)return t;const r=s&&s.encode||Pr,n=c.isFunction(s)?{serialize:s}:s,o=n&&n.serialize;let i;if(o?i=o(e,n):i=c.isURLSearchParams(e)?e.toString():new Ge(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class qt{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Qe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Dr=typeof URLSearchParams<"u"?URLSearchParams:Ge,Nr=typeof FormData<"u"?FormData:null,Ir=typeof Blob<"u"?Blob:null,jr={isBrowser:!0,classes:{URLSearchParams:Dr,FormData:Nr,Blob:Ir},protocols:["http","https","file","blob","url","data"]},Ye=typeof window<"u"&&typeof document<"u",et=typeof navigator=="object"&&navigator||void 0,Ur=Ye&&(!et||["ReactNative","NativeScript","NS"].indexOf(et.product)<0),Mr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lr=Ye&&window.location.href||"http://localhost",Fr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ye,hasStandardBrowserEnv:Ur,hasStandardBrowserWebWorkerEnv:Mr,navigator:et,origin:Lr},Symbol.toStringTag,{value:"Module"})),L={...Fr,...jr};function Vr(t,e){return ke(t,new L.classes.URLSearchParams,{visitor:function(s,r,n,o){return L.isNode&&c.isBuffer(s)?(this.append(r,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function qr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Br(t){const e={},s=Object.keys(t);let r;const n=s.length;let o;for(r=0;r<n;r++)o=s[r],e[o]=t[o];return e}function Bt(t){function e(s,r,n,o){let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=s.length;return i=!i&&c.isArray(n)?n.length:i,l?(c.hasOwnProp(n,i)?n[i]=c.isArray(n[i])?n[i].concat(r):[n[i],r]:n[i]=r,!a):((!n[i]||!c.isObject(n[i]))&&(n[i]=[]),e(s,r,n[i],o)&&c.isArray(n[i])&&(n[i]=Br(n[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(r,n)=>{e(qr(r),n,s,0)}),s}return null}const de=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function $r(t,e,s){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const be={transitional:Qe,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,n=c.isObject(t);if(n&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return r?JSON.stringify(Bt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){const i=de(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return Vr(t,i).toString();if((o=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=de(this,"env"),l=a&&a.FormData;return ke(o?{"files[]":t}:t,l&&new l,i)}}return n||r?(e.setContentType("application/json",!1),$r(t)):t}],transformResponse:[function(t){const e=de(this,"transitional")||be.transitional,s=e&&e.forcedJSONParsing,r=de(this,"responseType"),n=r==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!r||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,de(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?E.from(i,E.ERR_BAD_RESPONSE,this,null,de(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{be.headers[t]={}});const Hr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zr=t=>{const e={};let s,r,n;return t&&t.split(`
3
+ `).forEach(function(o){n=o.indexOf(":"),s=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim(),!(!s||e[s]&&Hr[s])&&(s==="set-cookie"?e[s]?e[s].push(r):e[s]=[r]:e[s]=e[s]?e[s]+", "+r:r)}),e},$t=Symbol("internals"),Wr=/[^\x09\x20-\x7E\x80-\xFF]/g;function Jr(t){let e=0,s=t.length;for(;e<s;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;s>e;){const r=t.charCodeAt(s-1);if(r!==9&&r!==32)break;s-=1}return e===0&&s===t.length?t:t.slice(e,s)}function _e(t){return t&&String(t).trim().toLowerCase()}function Kr(t){return Jr(t.replace(Wr,""))}function Pe(t){return t===!1||t==null?t:c.isArray(t)?t.map(Pe):Kr(String(t))}function Xr(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const Zr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function tt(t,e,s,r,n){if(c.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Gr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function Qr(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{value:function(n,o,i){return this[r].call(this,e,n,o,i)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function n(i,a,l){const u=_e(a);if(!u)throw new Error("header name must be a non-empty string");const d=c.findKey(r,u);(!d||r[d]===void 0||l===!0||l===void 0&&r[d]!==!1)&&(r[d||a]=Pe(i))}const o=(i,a)=>c.forEach(i,(l,u)=>n(l,u,a));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c.isString(t)&&(t=t.trim())&&!Zr(t))o(zr(t),e);else if(c.isObject(t)&&c.isIterable(t)){let i={},a,l;for(const u of t){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[l=u[0]]=(a=i[l])?c.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}o(i,e)}else t!=null&&n(e,t,s);return this}get(t,e){if(t=_e(t),t){const s=c.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return Xr(r);if(c.isFunction(e))return e.call(this,r,s);if(c.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_e(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||tt(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let r=!1;function n(o){if(o=_e(o),o){const i=c.findKey(s,o);i&&(!e||tt(s,s[i],i,e))&&(delete s[i],r=!0)}}return c.isArray(t)?t.forEach(n):n(t),r}clear(t){const e=Object.keys(this);let s=e.length,r=!1;for(;s--;){const n=e[s];(!t||tt(this,this[n],n,t,!0))&&(delete this[n],r=!0)}return r}normalize(t){const e=this,s={};return c.forEach(this,(r,n)=>{const o=c.findKey(s,n);if(o){e[o]=Pe(r),delete e[n];return}const i=t?Gr(n):String(n).trim();i!==n&&delete e[n],e[i]=Pe(r),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(s,r)=>{s!=null&&s!==!1&&(e[r]=t&&c.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const e=(this[$t]=this[$t]={accessors:{}}).accessors,s=this.prototype;function r(n){const o=_e(n);e[o]||(Qr(s,n),e[o]=!0)}return c.isArray(t)?t.forEach(r):r(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(B.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),c.freezeMethods(B);function st(t,e){const s=this||be,r=e||s,n=B.from(r.headers);let o=r.data;return c.forEach(t,function(i){o=i.call(s,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function Ht(t){return!!(t&&t.__CANCEL__)}let ye=class extends E{constructor(t,e,s){super(t??"canceled",E.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function zt(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new E("Request failed with status code "+s.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Yr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function en(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),u=r[o];i||(i=l),s[n]=a,r[n]=l;let d=o,m=0;for(;d!==n;)m+=s[d++],d=d%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),l-i<e)return;const y=u&&l-u;return y?Math.round(m*1e3/y):void 0}}function tn(t,e){let s=0,r=1e3/e,n,o;const i=(a,l=Date.now())=>{s=l,n=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const l=Date.now(),u=l-s;u>=r?i(a,l):(n=a,o||(o=setTimeout(()=>{o=null,i(n)},r-u)))},()=>n&&i(n)]}const De=(t,e,s=3)=>{let r=0;const n=en(50,250);return tn(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=a!=null?Math.min(i,a):i,u=Math.max(0,l-r),d=n(u);r=Math.max(r,l);const m={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:d||void 0,estimated:d&&a?(a-l)/d:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},s)},Wt=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},Jt=t=>(...e)=>c.asap(()=>t(...e)),sn=L.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,L.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,rn=L.hasStandardBrowserEnv?{write(t,e,s,r,n,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(n)&&a.push(`domain=${n}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function on(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Kt(t,e,s){let r=!nn(e);return t&&(r||s===!1)?on(t,e):e}const Xt=t=>t instanceof B?{...t}:t;function re(t,e){e=e||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,d,m,y){return c.isPlainObject(u)&&c.isPlainObject(d)?c.merge.call({caseless:y},u,d):c.isPlainObject(d)?c.merge({},d):c.isArray(d)?d.slice():d}function n(u,d,m,y){if(c.isUndefined(d)){if(!c.isUndefined(u))return r(void 0,u,m,y)}else return r(u,d,m,y)}function o(u,d){if(!c.isUndefined(d))return r(void 0,d)}function i(u,d){if(c.isUndefined(d)){if(!c.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,m){if(c.hasOwnProp(e,m))return r(u,d);if(c.hasOwnProp(t,m))return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(u,d,m)=>n(Xt(u),Xt(d),m,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=c.hasOwnProp(l,u)?l[u]:n,m=c.hasOwnProp(t,u)?t[u]:void 0,y=c.hasOwnProp(e,u)?e[u]:void 0,b=d(m,y,u);c.isUndefined(b)&&d!==a||(s[u]=b)}),s}const Zt=t=>{const e=re({},t),s=y=>c.hasOwnProp(e,y)?e[y]:void 0,r=s("data");let n=s("withXSRFToken");const o=s("xsrfHeaderName"),i=s("xsrfCookieName");let a=s("headers");const l=s("auth"),u=s("baseURL"),d=s("allowAbsoluteUrls"),m=s("url");if(e.headers=a=B.from(a),e.url=Vt(Kt(u,m,d),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),c.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(c.isFunction(r.getHeaders)){const y=r.getHeaders(),b=["content-type","content-length"];Object.entries(y).forEach(([_,h])=>{b.includes(_.toLowerCase())&&a.set(_,h)})}}if(L.hasStandardBrowserEnv&&(c.isFunction(n)&&(n=n(e)),n===!0||n==null&&sn(e.url))){const y=o&&i&&rn.read(i);y&&a.set(o,y)}return e},an=typeof XMLHttpRequest<"u",ln=an&&function(t){return new Promise(function(e,s){const r=Zt(t);let n=r.data;const o=B.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=r,u,d,m,y,b;function _(){y&&y(),b&&b(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function v(){if(!h)return;const O=B.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:O,config:t,request:h};zt(function(R){e(R),_()},function(R){s(R),_()},g),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(s(new E("Request aborted",E.ECONNABORTED,t,h)),h=null)},h.onerror=function(O){const g=O&&O.message?O.message:"Network Error",R=new E(g,E.ERR_NETWORK,t,h);R.event=O||null,s(R),h=null},h.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const g=r.transitional||Qe;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),s(new E(O,g.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,h)),h=null},n===void 0&&o.setContentType(null),"setRequestHeader"in h&&c.forEach(o.toJSON(),function(O,g){h.setRequestHeader(g,O)}),c.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),i&&i!=="json"&&(h.responseType=r.responseType),l&&([m,b]=De(l,!0),h.addEventListener("progress",m)),a&&h.upload&&([d,y]=De(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(u=O=>{h&&(s(!O||O.type?new ye(null,t,h):O),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const T=Yr(r.url);if(T&&L.protocols.indexOf(T)===-1){s(new E("Unsupported protocol "+T+":",E.ERR_BAD_REQUEST,t));return}h.send(n||null)})},cn=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let r=new AbortController,n;const o=function(u){if(!n){n=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof E?d:new ye(d instanceof Error?d.message:d))}};let i=e&&setTimeout(()=>{i=null,o(new E(`timeout of ${e}ms exceeded`,E.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>c.asap(a),l}},un=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},dn=async function*(t,e){for await(const s of hn(t))yield*un(s,e)},hn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},Gt=(t,e,s,r)=>{const n=dn(t,e);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await n.next();if(u){a(),l.close();return}let m=d.byteLength;if(s){let y=o+=m;s(y)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),n.return()}},{highWaterMark:2})},Qt=64*1024,{isFunction:Ne}=c,fn=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:Yt,TextEncoder:es}=c.global,ts=(t,...e)=>{try{return!!t(...e)}catch{return!1}},pn=t=>{t=c.merge.call({skipUndefined:!0},fn,t);const{fetch:e,Request:s,Response:r}=t,n=e?Ne(e):typeof fetch=="function",o=Ne(s),i=Ne(r);if(!n)return!1;const a=n&&Ne(Yt),l=n&&(typeof es=="function"?(_=>h=>_.encode(h))(new es):async _=>new Uint8Array(await new s(_).arrayBuffer())),u=o&&a&&ts(()=>{let _=!1;const h=new s(L.origin,{body:new Yt,method:"POST",get duplex(){return _=!0,"half"}}),v=h.headers.has("Content-Type");return h.body!=null&&h.body.cancel(),_&&!v}),d=i&&a&&ts(()=>c.isReadableStream(new r("").body)),m={stream:d&&(_=>_.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!m[_]&&(m[_]=(h,v)=>{let T=h&&h[_];if(T)return T.call(h);throw new E(`Response type '${_}' is not supported`,E.ERR_NOT_SUPPORT,v)})});const y=async _=>{if(_==null)return 0;if(c.isBlob(_))return _.size;if(c.isSpecCompliantForm(_))return(await new s(L.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(c.isArrayBufferView(_)||c.isArrayBuffer(_))return _.byteLength;if(c.isURLSearchParams(_)&&(_=_+""),c.isString(_))return(await l(_)).byteLength},b=async(_,h)=>c.toFiniteNumber(_.getContentLength())??y(h);return async _=>{let{url:h,method:v,data:T,signal:O,cancelToken:g,timeout:R,onDownloadProgress:k,onUploadProgress:$,responseType:j,headers:H,withCredentials:V="same-origin",fetchOptions:Q}=Zt(_),z=e||fetch;j=j?(j+"").toLowerCase():"text";let w=cn([O,g&&g.toAbortSignal()],R),P=null;const W=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let Be;try{if($&&u&&v!=="get"&&v!=="head"&&(Be=await b(H,T))!==0){let U=new s(h,{method:"POST",body:T,duplex:"half"}),ee;if(c.isFormData(T)&&(ee=U.headers.get("content-type"))&&H.setContentType(ee),U.body){const[pt,$e]=Wt(Be,De(Jt($)));T=Gt(U.body,Qt,pt,$e)}}c.isString(V)||(V=V?"include":"omit");const D=o&&"credentials"in s.prototype;if(c.isFormData(T)){const U=H.getContentType();U&&/^multipart\/form-data/i.test(U)&&!/boundary=/i.test(U)&&H.delete("content-type")}const S={...Q,signal:w,method:v.toUpperCase(),headers:H.normalize().toJSON(),body:T,duplex:"half",credentials:D?V:void 0};P=o&&new s(h,S);let A=await(o?z(P,Q):z(h,S));const K=d&&(j==="stream"||j==="response");if(d&&(k||K&&W)){const U={};["status","statusText","headers"].forEach(Ps=>{U[Ps]=A[Ps]});const ee=c.toFiniteNumber(A.headers.get("content-length")),[pt,$e]=k&&Wt(ee,De(Jt(k),!0))||[];A=new r(Gt(A.body,Qt,pt,()=>{$e&&$e(),W&&W()}),U)}j=j||"text";let Y=await m[c.findKey(m,j)||"text"](A,_);return!K&&W&&W(),await new Promise((U,ee)=>{zt(U,ee,{data:Y,headers:B.from(A.headers),status:A.status,statusText:A.statusText,config:_,request:P})})}catch(D){throw W&&W(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,_,P,D&&D.response),{cause:D.cause||D}):E.from(D,D&&D.code,_,P,D&&D.response)}}},mn=new Map,ss=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,o=[r,n,s];let i=o.length,a=i,l,u,d=mn;for(;a--;)l=o[a],u=d.get(l),u===void 0&&d.set(l,u=a?new Map:pn(e)),d=u;return u};ss();const rt={http:Rr,xhr:ln,fetch:{get:ss}};c.forEach(rt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rs=t=>`- ${t}`,gn=t=>c.isFunction(t)||t===null||t===!1;function bn(t,e){t=c.isArray(t)?t:[t];const{length:s}=t;let r,n;const o={};for(let i=0;i<s;i++){r=t[i];let a;if(n=r,!gn(r)&&(n=rt[(a=String(r)).toLowerCase()],n===void 0))throw new E(`Unknown adapter '${a}'`);if(n&&(c.isFunction(n)||(n=n.get(e))))break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
5
+ `+i.map(rs).join(`
6
+ `):" "+rs(i[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n}const ns={getAdapter:bn,adapters:rt};function nt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ye(null,t)}function is(t){return nt(t),t.headers=B.from(t.headers),t.data=st.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ns.getAdapter(t.adapter||be.adapter,t)(t).then(function(e){return nt(t),e.data=st.call(t,t.transformResponse,e),e.headers=B.from(e.headers),e},function(e){return Ht(e)||(nt(t),e&&e.response&&(e.response.data=st.call(t,t.transformResponse,e.response),e.response.headers=B.from(e.response.headers))),Promise.reject(e)})}const os="1.15.2",Ie={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ie[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const as={};Ie.transitional=function(t,e,s){function r(n,o){return"[Axios v"+os+"] Transitional option '"+n+"'"+o+(s?". "+s:"")}return(n,o,i)=>{if(t===!1)throw new E(r(o," has been removed"+(e?" in "+e:"")),E.ERR_DEPRECATED);return e&&!as[o]&&(as[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},Ie.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function _n(t,e,s){if(typeof t!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const o=r[n],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new E("option "+o+" must be "+l,E.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const je={assertOptions:_n,validators:Ie},J=je.validators;let ne=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qt,response:new qt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const n=(()=>{if(!r.stack)return"";const o=r.stack.indexOf(`
7
+ `);return o===-1?"":r.stack.slice(o+1)})();try{if(!s.stack)s.stack=n;else if(n){const o=n.indexOf(`
8
+ `),i=o===-1?-1:n.indexOf(`
9
+ `,o+1),a=i===-1?"":n.slice(i+1);String(s.stack).endsWith(a)||(s.stack+=`
10
+ `+n)}}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=re(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:n}=e;s!==void 0&&je.assertOptions(s,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean),legacyInterceptorReqResOrdering:J.transitional(J.boolean)},!1),r!=null&&(c.isFunction(r)?e.paramsSerializer={serialize:r}:je.assertOptions(r,{encode:J.function,serialize:J.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),je.assertOptions(e,{baseUrl:J.spelling("baseURL"),withXsrfToken:J.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&c.merge(n.common,n[e.method]);n&&c.forEach(["delete","get","head","post","put","patch","common"],b=>{delete n[b]}),e.headers=B.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(e)===!1)return;a=a&&b.synchronous;const _=e.transitional||Qe;_&&_.legacyInterceptorReqResOrdering?i.unshift(b.fulfilled,b.rejected):i.push(b.fulfilled,b.rejected)});const l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let u,d=0,m;if(!a){const b=[is.bind(this),void 0];for(b.unshift(...i),b.push(...l),m=b.length,u=Promise.resolve(e);d<m;)u=u.then(b[d++],b[d++]);return u}m=i.length;let y=e;for(;d<m;){const b=i[d++],_=i[d++];try{y=b(y)}catch(h){_.call(this,h);break}}try{u=is.call(this,y)}catch(b){return Promise.reject(b)}for(d=0,m=l.length;d<m;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=re(this.defaults,t);const e=Kt(t.baseURL,t.url,t.allowAbsoluteUrls);return Vt(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){ne.prototype[t]=function(e,s){return this.request(re(s||{},{method:t,url:e,data:(s||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function e(s){return function(r,n,o){return this.request(re(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ne.prototype[t]=e(),ne.prototype[t+"Form"]=e(!0)});let yn=class Ns{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(n){s=n});const r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(n);return i.cancel=function(){r.unsubscribe(o)},i},e(function(n,o,i){r.reason||(r.reason=new ye(n,o,i),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new Ns(function(s){e=s}),cancel:e}}};function wn(t){return function(e){return t.apply(null,e)}}function vn(t){return c.isObject(t)&&t.isAxiosError===!0}const it={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(it).forEach(([t,e])=>{it[e]=t});function ls(t){const e=new ne(t),s=Ct(ne.prototype.request,e);return c.extend(s,ne.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(r){return ls(re(t,r))},s}const I=ls(be);I.Axios=ne,I.CanceledError=ye,I.CancelToken=yn,I.isCancel=Ht,I.VERSION=os,I.toFormData=ke,I.AxiosError=E,I.Cancel=I.CanceledError,I.all=function(t){return Promise.all(t)},I.spread=wn,I.isAxiosError=vn,I.mergeConfig=re,I.AxiosHeaders=B,I.formToJSON=t=>Bt(c.isHTMLForm(t)?new FormData(t):t),I.getAdapter=ns.getAdapter,I.HttpStatusCode=it,I.default=I;const{Axios:Fi,AxiosError:Vi,CanceledError:qi,isCancel:Bi,CancelToken:$i,VERSION:Hi,all:zi,Cancel:Wi,isAxiosError:Ji,spread:Ki,toFormData:Xi,AxiosHeaders:Zi,HttpStatusCode:Gi,formToJSON:Qi,getAdapter:Yi,mergeConfig:eo}=I,ot=I.create({baseURL:location.origin,timeout:6e4,params:{}});ot.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let e=`HTTP ${t.response.status} - `;t.response?.statusText&&(e+=`${t.response.statusText} `),t.response?.config?.data&&(e+=`${t.response.config.data} `),t.response?.data?.message?e+=`${t.response.data.message}`:t.response?.data?.exception?e+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(e+=`${t.response.data.error.class} `),e+=`${t.response.data.error.message}`):e+=`${t.response?.data}`;const{$cosmosNotify:s}=window;throw s&&s.serious({title:"Network error",body:e}),t}else throw t});const Ue=async function(t,e,{data:s,params:r={},headers:n,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!i&&!r.scope&&(r.scope=window.openc3Scope),ot({method:t,url:e,data:s,params:r,headers:n,onUploadProgress:a})},at={Accept:"application/json"},cs={...at,"Content-Type":"application/json"},us={get:function(t,{params:e,headers:s=at,noScope:r,noAuth:n,onUploadProgress:o}={}){return Ue("get",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:r=cs,noScope:n,noAuth:o,onUploadProgress:i}={}){return Ue("put",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:r=cs,noScope:n,noAuth:o,onUploadProgress:i}={}){return Ue("post",t,{data:e,params:s,headers:r,noScope:n,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=at,noScope:r,noAuth:n,onUploadProgress:o}={}){return Ue("delete",t,{params:e,headers:s,noScope:r,noAuth:n,onUploadProgress:o})}};let Me=()=>({emit(t,...e){for(let s=this.events[t]||[],r=0,n=s.length;r<n;r++)s[r](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class we extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class lt extends we{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class En extends we{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Z extends we{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class Tn extends Z{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function ds(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class Sn{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:String(e),info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:r,info:n})=>(s[r]=n,s),{})}}const ie=Symbol("state");class hs{constructor(e={}){this.emitter=Me(),this.params=Object.freeze(e),this.presence=new Sn(this),this.initialConnect=!0,this[ie]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=ds({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ie]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ie]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ie]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ie]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ie]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ie]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(n=>n()),e()})),r.push(this.on("close",n=>{r.forEach(o=>o()),s(n||new we("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class On{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(r=>r[e](s[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,r={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),s(r)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(r),n&&await n.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class Cn{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class xn{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Cn),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:r}){let n=this._subscriptions[e]=new On(e);return n.remoteId=this._localToRemote[e],n.subscriber=s,n.unsubscriber=r,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let r=this.get(e);r&&(r.remoteId=s)}}class Rn{constructor(e={}){this.subscriptions=new xn(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let r=s.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,s,r){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,s,r]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(s,r)})}notify(e,s,r){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(s,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):s.push(r);this._pendingMessages=s}}const fs={debug:0,info:1,warn:2,error:3};class ps{constructor(e){this.level=e||"warn"}log(e,s,r){fs[e]<fs[this.level]||this.writeLogEntry(e,s,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class ve extends ps{writeLogEntry(){}}class An{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let kn=0;class ms{constructor(e={}){let{logger:s}=e;this.logger=s||new ve,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let r={channel:e};s&&Object.assign(r,s);let n=ds(r);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let l=++kn;this.pendingSubscriptions[n]={resolve:i,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,r))},r)}maybeExpireSubscribe(e,s,r){setTimeout(()=>{let n=this.pendingSubscriptions[s];n&&n.id===e&&(delete this.pendingSubscriptions[s],n.reject(new En(`Haven't received subscription ack in ${r*2}ms for ${s}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,r){return s==="$whisper"?this.whisper(e,r):(r||(r={}),r.action||=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new Z(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new lt)):this.logger.error("subscription not found",{type:s,identifier:r})}if(n)return{identifier:r,message:n};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const gs=()=>Date.now()/1e3|0;class Pn extends ms{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=gs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:r,message:n}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=gs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=n.type;if(o==="info"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[r];i&&(delete this.pendingPresence[r],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:r,message:n}}if(n){let o=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:n,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,r){switch(s){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,s,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(s.history=r,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(s.presence=n),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},r=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(r=!0,s[n]=o)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,r,n){if(!(!s||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:r,offset:n},{stream:s,epoch:r,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,n)=>{this.pendingPresence[e]={resolve:r,reject:n},this.cable.send({command:"presence",identifier:e,data:s})})}}class Dn extends we{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class bs extends hs{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const Nn="$pubsub";class _s extends hs{static identifier=Nn;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const oe=Symbol("state");let In=class{constructor({transport:t,protocol:e,encoder:s,logger:r,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=Me(),this.transport=t,this.encoder=s,this.logger=r||new ve,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new Rn(o||{}),this[oe]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[oe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[oe]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[oe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Z("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[oe]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Z("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Z(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[oe]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof Z?t:new Z(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[oe]="closed";let s=e||new Z("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:r,identifier:n,message:o,meta:i}=s;r?this.hub.notify(n,r,o):this.hub.transmit(n,o,i)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new _s({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new _s({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,r;return typeof t=="string"&&(r=t,t=bs),s=r?new t(r,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),n.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(r,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof lt&&this.logger.warn("rejected",o),i instanceof Z){this.logger.debug("disconnected during subscription; will retry on connect",o),n.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(r)}n.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof Z?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Dn;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=r.remoteId,o={id:n,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,e,s);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...r)=>{s(),e(...r)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(r=>r()),t()})),s.push(this.on("close",r=>{s.forEach(n=>n()),e(r)})),s.push(this.on("disconnect",r=>{s.forEach(n=>n()),e(r)}))}),this._pendingConnect)}};const jn={maxMissingPings:2,maxReconnectAttempts:1/0},he=()=>Date.now(),ys=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:r,maxInterval:n}=e;return s=s||2,r===void 0&&(r=.5),o=>{let i=t*s**o,a=i*s,l=i+(a-i)*Math.random(),u=2*(Math.random()-.5)*r;return l=l*(1+u),n&&n<l&&(l=n),l}};let ws=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},jn,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new ve,this.state="pending_connect",this.attempts=0,this.disconnectedAt=he()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=he(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=he(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=he(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=he()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=he()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Tn))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class Un{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Me(),this.unbind=[],this.logger=s.logger||new ve}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${s.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(r=>{r.setParam(e,s)})}setToken(e,s){this.transports.forEach(r=>{r.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Mn{constructor(e,s={}){this.url=e;let r=s.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Me();let{format:n,subprotocol:o,authStrategy:i}=s;this.format=n||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,r)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),s()})),n.push(this.once("close",()=>{n.forEach(o=>o()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let r=new URL(this.url);r.searchParams.set(e,s);let n=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(n)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${s}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let r=this.emitter.on(e,(...n)=>{r(),s(...n)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class Ln{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Fn extends bs{constructor(e,s,r){super(e,s),this.subscription=new Ln(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof lt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Vn{constructor(e){this.cable=e}create(e,s){let r,n;typeof e=="object"?(r=e.channel,delete e.channel,n=e):(r=e,n={});let o=new Fn(r,n,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class qn{constructor(e){this.cable=e,this.subscriptions=new Vn(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const vs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Bn(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},vs,e);let{protocol:s,websocketImplementation:r,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:u,transport:d,encoder:m,lazy:y,monitor:b,pingInterval:_,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:T,subprotocol:O,tokenRefresher:g,historyTimestamp:R,protocolOptions:k,concurrentSubscribes:$,performFailures:j,transportConfigurator:H,auth:V}=e;if(u=u||new ve(l),typeof s=="string"){O=O||s;let w=s.substring(0,s.lastIndexOf("-")),P=s.substring(s.lastIndexOf("-")+1);if(k=k||{},w==="actioncable-v1")s=new ms({logger:u,...k});else if(w==="actioncable-v1-ext")s=new Pn({logger:u,historyTimestamp:R,...k});else throw Error(`Protocol is not supported yet: ${s}`);if(P==="json")m=m||new An,n=n||"text";else if(P==="msgpack"){if(n="binary",!m)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(P==="protobuf"){if(n=n||"binary",!m)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Mn(t,{websocketImplementation:r,websocketOptions:o,subprotocol:O,authStrategy:i,format:n}),a&&(d=new Un([d,...a],{logger:u})),V&&V.token&&d.setToken(V.token,V.param||"jid"),h=h||ys(_),b!==!1&&(b=b||new ws({pingInterval:_,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:T,logger:u}));let Q={concurrentSubscribes:$},z=new In({protocol:s,transport:d,encoder:m,logger:u,lazy:y,hubOptions:Q,performFailures:j,transportConfigurator:H});return b&&(b.watch(z),z.monitor=b),g&&$n(z,async()=>{try{await g(d)}catch(w){return u.error("Failed to refresh authentication token: "+w),!1}return z.connect().catch(()=>{}),!0}),z}function $n(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async r=>{if(r){if(s){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(s=!0,await e())}})}class Hn extends ps{writeLogEntry(e,s,r){r?console[e](s,r):console[e](s)}}class zn extends ws{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},r=()=>this.disconnect(new Z("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Wn=["cable","action-cable"],Jn="/cable",Le=(t,e)=>{for(let s of Wn){let r=t.head.querySelector(`meta[name='${s}-${e}']`);if(r)return r.getAttribute("content")}},Es=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Kn=()=>{if(typeof document<"u"&&document.head){let t=Le(document,"url");if(t)return Es(t)}return Es(Jn)},Xn=()=>{if(typeof document<"u"&&document.head){let t=Le(document,"history-timestamp");if(t)return t|0}},Zn=()=>{if(typeof document<"u"&&document.head)return Le(document,"token")},Gn=()=>{if(typeof document<"u"&&document.head)return Le(document,"token-param")};function Qn(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Kn(),e=e||{},e.historyTimestamp||=Xn();let s=Zn();if(s){let u=Gn();e.auth=Object.assign({token:s,param:u},e.auth||{})}e=Object.assign({},vs,e);let{logLevel:r,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new Hn(r),i=e.reconnectStrategy=e.reconnectStrategy||ys(o),e.monitor!==!1&&(e.monitor=e.monitor||new zn({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:n})),Bn(t,e)}function Yn(t,e){let s=Qn(t,e);return new qn(s)}class ei{constructor(e="/openc3-api/cable",s="/openc3-api/auth/otp"){this._cable=null,this._url=e,this._otpUrl=s}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,r={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>(o&&OpenC3Auth.setTokens(),us.get(this._otpUrl,{params:{scope:s}}))).then(({data:o})=>{if(this._cable==null){const i=new URL(this._url,document.baseURI);i.searchParams.set("scope",s),i.searchParams.set("authorization",o),this._cable=Yn(i.href)}return this._cable.subscriptions.create({channel:e,...n},r)})}recordPing(){}}function Ee(t){return ti.test(t)}const ti=/^-?[0-9]+$/;function Ts(t){return si.test(t)}const si=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ss(t,e){if(Ee(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),r=String(s);if(t===r)return!0;const n=Os(t),o=Os(r);return!!(n===o||e?.approx===!0&&!Ee(t)&&o.length>=14&&n.startsWith(o.substring(0,14)))}let Te=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function ri(t){if(Ss(t,{approx:!1}))return;if(Ee(t))return Te.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Te.underflow:Te.truncate_float:Te.overflow}function Os(t){const{start:e,end:s}=ni(t),r=t.substring(e,s),n=r.indexOf(".");return n===-1?r:r.substring(0,n)+r.substring(n+1)}function ni(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class ii{isLosslessNumber=!0;constructor(e){if(!Ts(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=ri(this.value);if(e===void 0||e===Te.truncate_float)return Number.parseFloat(this.value);if(Ee(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function oi(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function ai(t){return new ii(t)}function li(t,e){return ct({"":t},"",t,e)}function ct(t,e,s,r){return Array.isArray(s)?r.call(t,e,ui(s,r)):s&&typeof s=="object"&&!oi(s)?r.call(t,e,ci(s,r)):r.call(t,e,s)}function ci(t,e){for(const s of Object.keys(t)){const r=ct(t,s,t[s],e);r!==void 0?t[s]=r:delete t[s]}return t}function ui(t,e){for(let s=0;s<t.length;s++)t[s]=ct(t,String(s),t[s],e);return t}function di(t,e,s){const r=typeof s=="function"?{parseNumber:s}:s,n=r?.parseNumber??ai,o=r?.onDuplicateKey??j;let i=0;const a=d();return T(a),g(),e?li(a,e):a;function l(){if(t.charCodeAt(i)===bi){i++,y();const S={};let A=!0;for(;i<t.length&&t.charCodeAt(i)!==xs;){A?A=!1:(h(),y());const K=i,Y=b();if(Y===void 0){$();return}y(),v();const U=d();if(U===void 0){w();return}if(Object.prototype.hasOwnProperty.call(S,Y)&&!ut(U,S[Y])){const ee=o({key:Y,position:K+1,oldValue:S[Y],newValue:U});ee!==void 0&&(S[Y]=ee)}else S[Y]=U}return t.charCodeAt(i)!==xs&&H(),i++,S}}function u(){if(t.charCodeAt(i)===_i){i++,y();const S=[];let A=!0;for(;i<t.length&&t.charCodeAt(i)!==Rs;){A?A=!1:h();const K=d();O(K),S.push(K)}return t.charCodeAt(i)!==Rs&&V(),i++,S}}function d(){y();const S=b()??_()??l()??u()??m("true",!0)??m("false",!1)??m("null",null);return y(),S}function m(S,A){if(t.slice(i,i+S.length)===S)return i+=S.length,A}function y(){for(;hi(t.charCodeAt(i));)i++}function b(){if(t.charCodeAt(i)===dt){i++;let S="";for(;i<t.length&&t.charCodeAt(i)!==dt;){if(t.charCodeAt(i)===gi){const A=t[i+1],K=mi[A];K!==void 0?(S+=K,i++):A==="u"?Fe(t.charCodeAt(i+2))&&Fe(t.charCodeAt(i+3))&&Fe(t.charCodeAt(i+4))&&Fe(t.charCodeAt(i+5))?(S+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):P(i):z(i)}else pi(t.charCodeAt(i))?S+=t[i]:Q(t[i]);i++}return k(),i++,S}}function _(){const S=i;if(t.charCodeAt(i)===As&&(i++,R(S)),t.charCodeAt(i)===ht)i++;else if(fi(t.charCodeAt(i)))for(i++;Ve(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Ci)for(i++,R(S);Ve(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Pi||t.charCodeAt(i)===ki)for(i++,(t.charCodeAt(i)===As||t.charCodeAt(i)===Ti)&&i++,R(S);Ve(t.charCodeAt(i));)i++;if(i>S)return n(t.slice(S,i))}function h(){if(t.charCodeAt(i)!==Oi)throw new SyntaxError(`Comma ',' expected after value ${D()}`);i++}function v(){if(t.charCodeAt(i)!==xi)throw new SyntaxError(`Colon ':' expected after property name ${D()}`);i++}function T(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${D()}`)}function O(S){if(S===void 0)throw new SyntaxError(`Array item expected ${D()}`)}function g(){if(i<t.length)throw new SyntaxError(`Expected end of input ${D()}`)}function R(S){if(!Ve(t.charCodeAt(i))){const A=t.slice(S,i);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${D()}`)}}function k(){if(t.charCodeAt(i)!==dt)throw new SyntaxError(`End of string '"' expected ${D()}`)}function $(){throw new SyntaxError(`Quoted object key expected ${D()}`)}function j(S){let{key:A,position:K}=S;throw new SyntaxError(`Duplicate key '${A}' encountered at position ${K}`)}function H(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${D()}`)}function V(){throw new SyntaxError(`Array item or end of array ']' expected ${D()}`)}function Q(S){throw new SyntaxError(`Invalid character '${S}' ${W()}`)}function z(S){const A=t.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${A}' ${W()}`)}function w(){throw new SyntaxError(`Object value expected after ':' ${W()}`)}function P(S){const A=t.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${A}' ${W()}`)}function W(){return`at position ${i}`}function Be(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function D(){return`${Be()} ${W()}`}}function hi(t){return t===yi||t===wi||t===vi||t===Ei}function Fe(t){return t>=ht&&t<=ft||t>=Ri&&t<=Di||t>=Ai&&t<=Ni}function Ve(t){return t>=ht&&t<=ft}function fi(t){return t>=Si&&t<=ft}function pi(t){return t>=32&&t<=1114111}function ut(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,r)=>ut(s,e[r])):Cs(t)&&Cs(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>ut(t[s],e[s])):!1}function Cs(t){return typeof t=="object"&&t!==null}const mi={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
11
+ `,r:"\r",t:" "},gi=92,bi=123,xs=125,_i=91,Rs=93,yi=32,wi=10,vi=9,Ei=13,dt=34,Ti=43,As=45,ht=48,Si=49,ft=57,Oi=44,Ci=46,xi=58,Ri=65,Ai=97,ki=69,Pi=101,Di=70,Ni=102;function ks(t,e,s,r){return n(t);function n(l,u){if(Array.isArray(r)){const d=r.find(m=>m.test(l));if(d){const m=d.stringify(l);if(typeof m!="string"||!Ts(m))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${m})`);return m}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l?.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return o(l);if(l&&typeof l=="object")return i(l)}function o(l,u){if(l.length===0)return"[]";let d="[";for(let m=0;m<l.length;m++){const y=l[m];typeof y<"u"&&typeof y!="function"?d+=n(y):d+="null",m<l.length-1&&(d+=",")}return d+="]",d}function i(l,u){if(typeof l.toJSON=="function")return ks(l.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(l);if(d.length===0)return"{}";let m=!0,y="{";for(const b of d){const _=l[b];if(a(b,_)){m?m=!1:y+=",";const h=JSON.stringify(b);y+=`${h}:`,y+=n(_)}}return y+="}",y}function a(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Ii(t){return Ee(t)&&!Ss(t)?BigInt(t):parseFloat(t)}class ji{id=1;constructor(){}async exec(e,s,r={},n={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,n.manual=!0,(await ot.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,a)=>ks(i)],transformResponse:[i=>{try{return di(i,void 0,Ii)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),l=new Error(`Server returned non-JSON response: ${a}`);throw l.name="ServerError",l}}]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s,r,n,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,s,r,n){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:r,tlm_only:n})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...r){return this.exec("interface_cmd",[e,s,...r])}interface_target_enable(e,s,r=!1,n=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:r,tlm_only:n})}interface_target_disable(e,s,r=!1,n=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:r,tlm_only:n})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,r,n,o){return this.exec("map_target_to_router",[e,s],{cmd_only:r,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,s,r,n){return this.exec("unmap_target_from_router",[e,s],{cmd_only:r,tlm_only:n})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,r=!1,n=!1){return this.exec("router_target_enable",[e,s],{cmd_only:r,tlm_only:n})}router_target_disable(e,s,r=!1,n=!1){return this.exec("router_target_disable",[e,s],{cmd_only:r,tlm_only:n})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,r){return this.exec("get_item",[e,s,r])}get_param(e,s,r){return this.exec("get_param",[e,s,r])}get_parameter(e,s,r){return this.exec("get_param",[e,s,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,r,n=30){const o=await this.exec("get_tlm_packet",[e,s],{type:r,stale_time:n});if(o!=null){let i=o.length,a=null;for(let l=0;l<i;l++)a=this.decode_openc3_type(o[l][1]),a!==null&&(o[l][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,r=null,n=null,o=null){let i={stale_time:s};r!==null&&(i.cache_timeout=r),n!==null&&(i.start_time=n.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let l=a.length,u=null;for(let d=0;d<l;d++)u=this.decode_openc3_type(a[d][0]),u!==null&&(a[d][0]=u)}return a}get_limits(e,s,r){return this.exec("get_limits",[e,s,r])}async tlm(e,s,r,n="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED or FORMATTED.`,a}else o=await this.exec("tlm",[e,s,r],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,r=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,s,r],{type:n,stored:o})}set_tlm(e,s,r,n){return this.exec("set_tlm",[e,s,r],{type:n})}override_tlm(e,s,r,n){return this.exec("override_tlm",[e,s,r],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,r,n){return this.exec("normalize_tlm",[e,s,r],{type:n})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,r,n="CONVERTED"){return this.exec("get_cmd_value",[e,s,r,n])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,r,n,o,i={}){let a=null;for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&(a=this.encode_openc3_type(n[l]),a!==null&&(n[l]=a));return this.exec(e,[s,r,n],i,o)}get_cmd_hazardous(e,s,r,n={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,s,r,n)}cmd(e,s,r,n={},o={}){return s===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,s,r,n,o)}cmd_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,s,r,n,o)}cmd_raw(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,s,r,n,o)}cmd_raw_no_range_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,s,r,n,o)}cmd_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,s,r,n,o)}cmd_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,s,r,n,o)}cmd_raw_no_hazardous_check(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,s,r,n,o)}cmd_raw_no_checks(e,s,r,n={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,s,r,n,o)}build_cmd(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}build_command(e,s,r,n={},o={}){return s===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,s,r,n,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,r){return this.exec("save_config",[e,s,r])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,r){return this.exec("enable_limits",[e,s,r])}disable_limits(e,s,r){return this.exec("disable_limits",[e,s,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",s),n=new Uint8Array(r);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let qe=[];const Ui={components:{OpenC3TimePicker:Ot,OpenConfigDialog:wt,SaveConfigDialog:yt,TargetPacketItemChooser:St,TopBar:Fs},mixins:[bt,_t],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,allowWildcards:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new ei,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{label:"Allow Wildcards",checkbox:!0,checked:this.allowWildcards,command:()=>{this.allowWildcards=!this.allowWildcards}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,allowWildcards:this.allowWildcards,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},allowWildcards:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new ji,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await us.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.allowWildcards=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.allowWildcards=t.allowWildcards,this.menus[1].items[3].checked=this.allowWildcards||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
12
+ continue to stream in real-time until
13
+ ${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){qe=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let r=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(r=r+"__"+e.reducedType);let n=String(s);this.keyMap[n]=r,t.push([r,n])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let n of t){let o=Object.keys(n);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),qe.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e]||e;const[s,r,n,o,i,a,l]=e.split("__");let u=i;this.columnMode==="full"&&(u=n+" "+o+" "+i),s&&s!=="DECOM"&&(u=u+" {"+s+"}"),a&&a!=="CONVERTED"&&(u=u+" ("+a+")"),l&&(u=u+" ["+l+"]"),this.columnHeaders.push(u)})},createFile:async function(){let t=qe.flat(),e=this.columnHeaders,s=this.columnMap,r=[];this.resetPerFileVars();let n="";this.matlabHeader&&(n+="% "),n+=e.join(this.delimiter),r.push(n),await this.yieldToMain(),t.sort((b,_)=>b.__time-_.__time),await this.yieldToMain();let o=[],i=[],a=null,l=0;for(let b of t){let _=!1;this.fillDown&&a?i=[...a]:i=[];let h="";if(Object.keys(b).forEach(v=>{if(v.slice(0,2)==="__"||v==="COSMOS_EXTRA")return;h=v;let T=s[v];if(typeof b[v]=="object")if(b[v]===null)i[T]="";else if(Array.isArray(b[v]))i[T]='"['+b[v]+']"';else{let O=b[v].raw;if(Array.isArray(O)){let g="0x";O.forEach(R=>{g+=R.toString(16).padStart(2,"0").toUpperCase()}),i[T]=g}else i[T]="'"+O+"'"}else i[T]=b[v];this.uniqueOnly&&o[T]!==i[T]&&(_=!0),o[T]=i[T]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||_){if(this.columnMode==="normal"){h=this.keyMap[h]||h;const[v,T,O,g,R,k,$]=h.split("__"),j=BigInt(b.__time),H=Number(j/1000000n),V=Number(j%1000000n),Q=new Date(H).toISOString(),z=String(V).padStart(6,"0");if(i[0]=Q.replace(/\.(\d{3})Z$/,(w,P)=>`.${P}${z}Z`),i[1]=O,i[2]=g,this.hasCommands){const w=b.COSMOS_EXTRA?JSON.parse(b.COSMOS_EXTRA):{};i[3]=w?.username||"",this.enterprise&&(i[4]=w?.approver||"")}}r.push(i.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let u=".csv",d="text/csv";this.delimiter===" "&&(u=".txt",d="text/tab-separated-values"),await this.yieldToMain();const m=new Blob([r.join(`
14
+ `)],{type:d});await this.yieldToMain();const y=document.createElement("a");y.href=URL.createObjectURL(m),y.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+u),y.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),qe.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function Mi(t,e,s,r,n,o){const i=C("top-bar"),a=C("v-text-field"),l=C("v-col"),u=C("OpenC3TimePicker"),d=C("v-row"),m=C("v-radio"),y=C("v-radio-group"),b=C("target-packet-item-chooser"),_=C("v-container"),h=C("v-progress-circular"),v=C("v-spacer"),T=C("v-btn"),O=C("v-toolbar"),g=C("v-card-title"),R=C("v-select"),k=C("v-card-text"),$=C("v-card-actions"),j=C("v-card"),H=C("v-dialog"),V=C("v-data-table"),Q=C("open-config-dialog"),z=C("save-config-dialog");return N(),te("div",null,[f(i,{menus:o.menus,title:n.title},null,8,["menus","title"]),f(j,null,{default:p(()=>[f(_,null,{default:p(()=>[f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(a,{modelValue:n.startDate,"onUpdate:modelValue":e[0]||(e[0]=w=>n.startDate=w),label:"Start Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:p(()=>[f(u,{modelValue:n.startTime,"onUpdate:modelValue":e[1]||(e[1]=w=>n.startTime=w),label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(l,null,{default:p(()=>[f(a,{modelValue:n.endDate,"onUpdate:modelValue":e[2]||(e[2]=w=>n.endDate=w),label:"End Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:p(()=>[f(u,{modelValue:n.endTime,"onUpdate:modelValue":e[3]||(e[3]=w=>n.endTime=w),label:"End Time",rules:[n.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(d,{"no-gutters":""},{default:p(()=>[f(l,null,{default:p(()=>[f(y,{modelValue:n.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=w=>n.cmdOrTlm=w),inline:"","hide-details":"",class:"mt-0"},{default:p(()=>[f(m,{label:"Command",value:"cmd","data-test":"cmd-radio"}),f(m,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(b,{"button-text":"Add Item",mode:n.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"","allow-glob":n.allowWildcards,"show-latest":"",onAddItem:e[5]||(e[5]=w=>o.addItem(w))},null,8,["mode","allow-glob"])]),_:1})]),_:1})]),_:1}),f(O,{class:"pl-3"},{default:p(()=>[f(h,{"model-value":n.progress},null,8,["model-value"]),F("   Processed: "+G(n.totalPacketsReceived)+" packets, "+G(n.totalItemsReceived)+" items ",1),f(v),f(T,{class:"bg-primary",disabled:n.items.length<1,onClick:o.processItems},{default:p(()=>[F(G(n.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(v),f(T,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=w=>n.editAll=!0)},null,8,["disabled"]),f(T,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),f(j,{width:"100%"},{default:p(()=>[f(g,null,{default:p(()=>[e[18]||(e[18]=F(" Items ",-1)),f(v),f(a,{modelValue:n.search,"onUpdate:modelValue":e[7]||(e[7]=w=>n.search=w),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f(V,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=w=>n.itemsPerPage=w),headers:n.headers,items:n.items,search:n.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":p(({item:w})=>[f(T,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Tt(P=>w.edit=!0,["stop"])},null,8,["onClick"]),f(H,{modelValue:w.edit,"onUpdate:modelValue":P=>w.edit=P,"max-width":"600",persistent:"",onKeydown:Je(P=>w.edit=!1,["esc"])},{default:p(()=>[f(j,null,{default:p(()=>[f(O,{height:"24"},{default:p(()=>[f(v),e[19]||(e[19]=Se("span",null," DataExtractor: Edit Item Mode ",-1)),f(v)]),_:1}),f(k,null,{default:p(()=>[f(d,{class:"mt-3 title-font"},{default:p(()=>[f(l,null,{default:p(()=>[F(G(o.getItemLabel(w)),1)]),_:2},1024)]),_:2},1024),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:w.mode,"onUpdate:modelValue":P=>w.mode=P,"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:w.valueType,"onUpdate:modelValue":P=>w.valueType=P,"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:w.reducedType,"onUpdate:modelValue":P=>w.reducedType=P,"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),f($,{class:"px-6 py-3"},{default:p(()=>[f(v),f(T,{variant:"flat",onClick:P=>w.edit=!1},{default:p(()=>[...e[20]||(e[20]=[F(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":p(({item:w})=>[f(T,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:P=>o.deleteItem(w)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(H,{modelValue:n.editAll,"onUpdate:modelValue":e[14]||(e[14]=w=>n.editAll=w),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=Je(w=>n.editAll=!1,["esc"]))},{default:p(()=>[f(j,null,{default:p(()=>[f(O,{height:"24"},{default:p(()=>[f(v),e[21]||(e[21]=Se("span",null," DataExtractor: Edit All Items",-1)),f(v)]),_:1}),f(k,null,{default:p(()=>[f(d,{class:"mt-3"},{default:p(()=>[f(l,null,{default:p(()=>[...e[22]||(e[22]=[F(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:n.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=w=>n.allItemMode=w),"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:n.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=w=>n.allItemValueType=w),"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(d,null,{default:p(()=>[f(l,null,{default:p(()=>[f(R,{modelValue:n.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=w=>n.allItemReducedType=w),"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),f($,{class:"px-6 py-3"},{default:p(()=>[f(v),f(T,{variant:"outlined",onClick:e[12]||(e[12]=w=>n.editAll=!1)},{default:p(()=>[...e[23]||(e[23]=[F(" Cancel ",-1)])]),_:1}),f(T,{variant:"flat",disabled:!n.allItemValueType,onClick:e[13]||(e[13]=w=>o.editAllItems())},{default:p(()=>[...e[24]||(e[24]=[F(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),n.openConfig?(N(),M(Q,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[16]||(e[16]=w=>n.openConfig=w),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0),n.saveConfig?(N(),M(z,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=w=>n.saveConfig=w),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):le("",!0)])}const to=Is("default",gt(Ui,[["render",Mi],["__scopeId","data-v-eb45238b"]]))})}}));
@@ -1 +1 @@
1
- System.register(["./Widget-DRhVdCLP-3d6dd25fe49a64f4c89c.js","./main-7641c12765b47b03f01d.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,V){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.u},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,o,y,v,t,b){const h=r("v-text-field");return s(),u(h,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))})}}));
1
+ System.register(["./Widget-BDsgRxuV-660e8eb4690c2793e6b6.js","./main-cb94da8783ff5b6915d8.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,V){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.h},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(h,o,v,y,t,b){const m=r("v-text-field");return s(),u(m,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(h.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))})}}));