openc3-cosmos-tool-cmdtlmserver 6.8.1 → 6.9.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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdtlmserver/ArrayWidget-DLfNWDzN-1e8a3face2ed377ee14b.js +2 -0
  3. data/tools/cmdtlmserver/ArrayplotWidget-CoRsUxHG-9354353a435dca29d91b.js +1 -0
  4. data/tools/cmdtlmserver/BarColumn-DHP-zQ4R-13ea24b96ea1a8d35a6a.js +1 -0
  5. data/tools/cmdtlmserver/BlockWidget-BmHSFvOq-9bcd30fb55af2e9adfcc.js +2 -0
  6. data/tools/cmdtlmserver/ButtonWidget-C3ZWRjZZ-a09343e371e16d86fb23.js +2 -0
  7. data/tools/cmdtlmserver/CanvasWidget-CL-XzPF4-fa3331797f3605b54876.js +1 -0
  8. data/tools/cmdtlmserver/CanvasdotWidget-D8Y9DgVE-202754fdc6e1f8bc69b8.js +1 -0
  9. data/tools/cmdtlmserver/CanvasimageWidget-DHSGK_tD-706d31ac92632aa26d40.js +1 -0
  10. data/tools/cmdtlmserver/CanvasimagevalueWidget-Btt_fQfC-6211eb7aa7d153f644a5.js +1 -0
  11. data/tools/cmdtlmserver/CanvaslabelWidget-BF_8RTjv-ec3af661f0fe151ab181.js +1 -0
  12. data/tools/cmdtlmserver/CanvaslabelvalueWidget-scbwaujI-6f6e59336806beadc6d3.js +1 -0
  13. data/tools/cmdtlmserver/CanvaslineWidget-gRvm_-TT-6d1e9b263ef79c1b1647.js +1 -0
  14. data/tools/cmdtlmserver/CanvaslinevalueWidget-CljziRek-4250356d341ec24d29f4.js +1 -0
  15. data/tools/cmdtlmserver/CheckbuttonWidget-BOabI_jE-e4387e7d27cd938ef89b.js +1 -0
  16. data/tools/cmdtlmserver/CmdPacketsTab-7e20541da3036a84b375.js +1 -0
  17. data/tools/cmdtlmserver/CmdTlmServer-7b54c774fee5033c13bd.js +2 -0
  18. data/tools/cmdtlmserver/ComboboxWidget-BLXNYFiY-d5fd5406c480881fb5d4.js +1 -0
  19. data/tools/cmdtlmserver/DataFlowsTab-368d1fdb4209d66844af.js +1 -0
  20. data/tools/cmdtlmserver/DateWidget-BTqLCtLS-202c9085c8a667b42627.js +1 -0
  21. data/tools/cmdtlmserver/DetailsDialog-BNCS3QAe-2191292a9b1ab8d8ae75.js +1 -0
  22. data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-3e0eec47273fa4c63aee.js +1 -0
  23. data/tools/cmdtlmserver/FormatvalueWidget-CLYx8qbg-2913871219c14842cecb.js +1 -0
  24. data/tools/cmdtlmserver/Graph-BliBYJxD-bb80bc8984750d2f31de.js +1 -0
  25. data/tools/cmdtlmserver/GraphWidget-Cb6Ozf54-52583b1f0ff33268742b.js +1 -0
  26. data/tools/cmdtlmserver/HorizontalWidget-AY2M01qP-c726ad4d7b9989195780.js +1 -0
  27. data/tools/cmdtlmserver/HorizontalboxWidget-2MEKvq_C-caebeb4bc79733504840.js +1 -0
  28. data/tools/cmdtlmserver/HorizontallineWidget-DgpOPA7q-3e3c6a88bc67fe5f390c.js +1 -0
  29. data/tools/cmdtlmserver/IframeWidget-UKKUl7k5-58809376594a655a5f2a.js +1 -0
  30. data/tools/cmdtlmserver/ImageLoader-C-CIL4YD-bc35b32770c8a5c44e5e.js +1 -0
  31. data/tools/cmdtlmserver/ImageviewerWidget-DhuQH5Io-78d2c2dd21a053a89c51.js +1 -0
  32. data/tools/cmdtlmserver/InterfaceFlowChart-5d2b3bb2659991d3b6a7.js +27 -0
  33. data/tools/cmdtlmserver/InterfacesTab-3009a17e96e92ac1e70a.js +1 -0
  34. data/tools/cmdtlmserver/LabelWidget-SO9zqcNN-a13de181566f05837b14.js +1 -0
  35. data/tools/cmdtlmserver/LabelledWidget-DWoM5AJ5-ec761858f941c15ff604.js +1 -0
  36. data/tools/cmdtlmserver/LabelprogressbarWidget-D3vnkvQZ-af0accd1118f3923a9a3.js +1 -0
  37. data/tools/cmdtlmserver/LabelsparklineWidget-DO0T-Jot-ecf847a6e96a08b254ab.js +1 -0
  38. data/tools/cmdtlmserver/LabelvalueWidget-B6BbNFnk-3d45d1e6db6b2f8d29a5.js +1 -0
  39. data/tools/cmdtlmserver/LabelvaluedescWidget-CxfL-H9C-3a42edd68921e90d31ca.js +1 -0
  40. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-BT5k9mHv-52975b7494653d8c515f.js +1 -0
  41. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DUbmxh4p-f295e97e30657fccc248.js +1 -0
  42. data/tools/cmdtlmserver/LabelvaluerangebarWidget-DexAc2UB-f151f5b53d9d4b184b06.js +1 -0
  43. data/tools/cmdtlmserver/Layout-Dd6dRf3R-ef7bd13b7ea3d133ccb0.js +1 -0
  44. data/tools/cmdtlmserver/LedWidget-D1RwHb_V-260ff4715a4a88a41508.js +1 -0
  45. data/tools/cmdtlmserver/LimitsbarWidget-ClOmoV50-48e5673dec9cb6e22731.js +1 -0
  46. data/tools/cmdtlmserver/LimitscolorWidget-CBUoEYKp-41ffd9d133666ed0f970.js +1 -0
  47. data/tools/cmdtlmserver/LimitscolumnWidget-hsHkmY-_-a3f6218974e5498090eb.js +1 -0
  48. data/tools/cmdtlmserver/LinegraphWidget-CXrKtxOo-be6c9cdfe9742e8d3bbc.js +1 -0
  49. data/tools/cmdtlmserver/MatrixbycolumnsWidget-CsogVU9c-8bc60a5aed8d3cabf27c.js +1 -0
  50. data/tools/cmdtlmserver/ProgressbarWidget-CO6CEkxP-4f04f42e3b29e4f6badf.js +1 -0
  51. data/tools/cmdtlmserver/RadiobuttonWidget-DrxUclws-e53a8ceae55c8d39b1bc.js +1 -0
  52. data/tools/cmdtlmserver/RadiogroupWidget-DN9C38cg-d3e2cee52f161e968cda.js +1 -0
  53. data/tools/cmdtlmserver/RangebarWidget-5uQTfLMP-3dc94e1929eab734826a.js +1 -0
  54. data/tools/cmdtlmserver/RawBuffer-5d94750d4746b711f55b.js +6 -0
  55. data/tools/cmdtlmserver/RawDialog-772a1282457ac36fd7a8.js +5 -0
  56. data/tools/cmdtlmserver/RollupWidget-B0DCULnu-75370b4e7a1f88bdc783.js +1 -0
  57. data/tools/cmdtlmserver/RoutersTab-2e3fa3d19fb8969dfab5.js +1 -0
  58. data/tools/cmdtlmserver/ScrollwindowWidget-BOkZQgtf-5862d90a0a854f7253c4.js +1 -0
  59. data/tools/cmdtlmserver/SignalWidget-Cis0Xkea-6a51ce3da68ffd3d9ac5.js +1 -0
  60. data/tools/cmdtlmserver/SpacerWidget-CLcqC2Qk-81d85af00986f3f5b056.js +1 -0
  61. data/tools/cmdtlmserver/SparklineWidget-CTp83eZ--bfbe9dc264b948bfeccf.js +1 -0
  62. data/tools/cmdtlmserver/StatusTab-37f142b5a919a517b454.js +1 -0
  63. data/tools/cmdtlmserver/TabbookWidget-uucd-zsX-f9571b1707f3d2313c74.js +1 -0
  64. data/tools/cmdtlmserver/TargetsTab-31817182dd194fae103f.js +1 -0
  65. data/tools/cmdtlmserver/TextboxWidget-C2n38ti5-70eef7e9cc17f76c4b45.js +1 -0
  66. data/tools/cmdtlmserver/TextfieldWidget--HTv9ddk-4f61e63b99bb27d3d0f9.js +1 -0
  67. data/tools/cmdtlmserver/TimeWidget-CPNVZaUM-84e9c1d910942f7918cb.js +1 -0
  68. data/tools/cmdtlmserver/TitleWidget-Cp0cb6V8-26da1f1345ebd0e2d8d2.js +1 -0
  69. data/tools/cmdtlmserver/TlmPacketsTab-8ab3463162d1614ac633.js +1 -0
  70. data/tools/cmdtlmserver/Updater-837ca86e536f4a3bdfa3.js +1 -0
  71. data/tools/cmdtlmserver/VWidget-DQGJRgAk-db0f8060669e1acf20ea.js +1 -0
  72. data/tools/cmdtlmserver/ValueWidget-Bk1RFjks-404325b51d8960d194ea.js +1 -0
  73. data/tools/cmdtlmserver/ValuelimitsbarWidget-C0HIBYh2-b127b268f152554e33fc.js +1 -0
  74. data/tools/cmdtlmserver/ValuelimitscolumnWidget-BTT90uyX-1d351782a10b310813e7.js +1 -0
  75. data/tools/cmdtlmserver/ValuerangebarWidget-CcQw_XK9-4bfb89b00ab2e5f9864a.js +1 -0
  76. data/tools/cmdtlmserver/VerticalWidget-CNtFQv3R-7c9384e32e2a84bdb6a3.js +1 -0
  77. data/tools/cmdtlmserver/VerticalboxWidget-Yxmz1SnU-f6d8fdccf06693ea3492.js +1 -0
  78. data/tools/cmdtlmserver/Widget-LsyjS7ZS-7441069f38e76756cf77.js +1 -0
  79. data/tools/cmdtlmserver/main-f371259352e08317c745.js +1505 -0
  80. data/tools/cmdtlmserver/main.js +1 -1
  81. data/tools/cmdtlmserver/services-eb1403f6c88517815ca2.js +7 -0
  82. metadata +81 -78
  83. data/tools/cmdtlmserver/ArrayWidget-FGjLmPfG-683db8ebbd412ff5cf60.js +0 -2
  84. data/tools/cmdtlmserver/ArrayplotWidget-Cfo18TYm-c2c8c904050bb47be42d.js +0 -1
  85. data/tools/cmdtlmserver/BarColumn-BuJ6MTYG-cd72ee4fac54e0162c5b.js +0 -1
  86. data/tools/cmdtlmserver/BlockWidget-B_JwY8-N-4d0fd7f8eaf32c3149fa.js +0 -2
  87. data/tools/cmdtlmserver/ButtonWidget-Cd4M3aBD-c6e6ee5a4de20cee38c4.js +0 -2
  88. data/tools/cmdtlmserver/CanvasWidget-CpKdOgTG-e21cfaf765f87dc06820.js +0 -1
  89. data/tools/cmdtlmserver/CanvasdotWidget-zYbI5LAw-75b3ab3135056a71bd66.js +0 -1
  90. data/tools/cmdtlmserver/CanvasimageWidget--ORQEPj6-c58343b2fe7598056f45.js +0 -1
  91. data/tools/cmdtlmserver/CanvasimagevalueWidget-CtAtYHRm-70ebc4e8daa927c22814.js +0 -1
  92. data/tools/cmdtlmserver/CanvaslabelWidget-DWoROb6o-476ec50948cf48d49fbd.js +0 -1
  93. data/tools/cmdtlmserver/CanvaslabelvalueWidget-A4UbtwEc-1c361cc4b4b5146a5d33.js +0 -1
  94. data/tools/cmdtlmserver/CanvaslineWidget-BBGi0nrb-d4088e55a3153f2ccb95.js +0 -1
  95. data/tools/cmdtlmserver/CanvaslinevalueWidget-C_9OkL7f-ffe44fffbe9c6f58dd9e.js +0 -1
  96. data/tools/cmdtlmserver/CheckbuttonWidget-CTJg8Ypg-e7b7bf6b3dd279023328.js +0 -1
  97. data/tools/cmdtlmserver/CmdPacketsTab-f0bc4223a524614b062f.js +0 -1
  98. data/tools/cmdtlmserver/CmdTlmServer-bc76235d10c09682c6e2.js +0 -2
  99. data/tools/cmdtlmserver/ComboboxWidget-DWiMZZk8-656b04f7d9af94bd5d42.js +0 -1
  100. data/tools/cmdtlmserver/DateWidget-C7GSh68_-13f0f32ea6e8efc4871a.js +0 -1
  101. data/tools/cmdtlmserver/DetailsDialog-B2l0BNc2-9ae1d4713aeae76dbd5d.js +0 -1
  102. data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-925a3fc3c572312a55a3.js +0 -1
  103. data/tools/cmdtlmserver/FormatvalueWidget-CZJdsUAq-bb32367559b73c0909bc.js +0 -1
  104. data/tools/cmdtlmserver/Graph-DZBpdSgR-f56dde00f81280043da9.js +0 -1
  105. data/tools/cmdtlmserver/GraphWidget-CHm4bhMI-44dd778434539663613d.js +0 -1
  106. data/tools/cmdtlmserver/HorizontalWidget-B2skpV1m-b23f5fd3c367fd63ccd6.js +0 -1
  107. data/tools/cmdtlmserver/HorizontalboxWidget-BI0WZP5M-ee4fbb561897d0ecd67f.js +0 -1
  108. data/tools/cmdtlmserver/HorizontallineWidget-AmxVeXcU-288549f981a254098664.js +0 -1
  109. data/tools/cmdtlmserver/IframeWidget-DcqRMhyW-5e1bb93e1aa72c466dd2.js +0 -1
  110. data/tools/cmdtlmserver/ImageLoader-ly4zoGpO-b6ef72444fb0db18f0a6.js +0 -1
  111. data/tools/cmdtlmserver/ImageviewerWidget-cmDHcmW4-f29c44e7be2549619a02.js +0 -1
  112. data/tools/cmdtlmserver/InterfacesTab-ef2e279c2d974542fbb7.js +0 -1
  113. data/tools/cmdtlmserver/LabelWidget-Bemw8Erq-77bfb932644b19401509.js +0 -1
  114. data/tools/cmdtlmserver/LabelledWidget-Cb7EvtUG-21700e23054272de0cdf.js +0 -1
  115. data/tools/cmdtlmserver/LabelprogressbarWidget-qYgrGqLY-afe2e284394185569250.js +0 -1
  116. data/tools/cmdtlmserver/LabelsparklineWidget-CMklq9-f-89ac388088ab17b0d9b2.js +0 -1
  117. data/tools/cmdtlmserver/LabelvalueWidget-NjCMgiYL-c36a0b089904315582dd.js +0 -1
  118. data/tools/cmdtlmserver/LabelvaluedescWidget-Dflulqm7-b5d359d3b572346f63af.js +0 -1
  119. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-M34NDk2S-e8550809276767a62c80.js +0 -1
  120. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Cchaw_-k-8b4ee4b4717aaff157c9.js +0 -1
  121. data/tools/cmdtlmserver/LabelvaluerangebarWidget-7pEykAm3-5dfe07da7d1638b771d3.js +0 -1
  122. data/tools/cmdtlmserver/Layout-BNvQKlyy-42669883439252bc6d22.js +0 -1
  123. data/tools/cmdtlmserver/LedWidget-_EA7ZKM8-1787942a8f24943d5f0c.js +0 -1
  124. data/tools/cmdtlmserver/LimitsbarWidget-DdoQf46y-a99c661845df64dcf68d.js +0 -1
  125. data/tools/cmdtlmserver/LimitscolorWidget-Cv0umnVo-3ebe584cf417b4b72ad0.js +0 -1
  126. data/tools/cmdtlmserver/LimitscolumnWidget-CnCQtxim-7d2c6a4a3ac5022d2e6b.js +0 -1
  127. data/tools/cmdtlmserver/LinegraphWidget-ekyQoR7x-6ccbac58fdd534b9d86e.js +0 -1
  128. data/tools/cmdtlmserver/MatrixbycolumnsWidget-IBUcGNF7-6e6e8ca8f95b59321550.js +0 -1
  129. data/tools/cmdtlmserver/ProgressbarWidget-CnveFZVh-39dfa34c59474909f2f1.js +0 -1
  130. data/tools/cmdtlmserver/RadiobuttonWidget-hWLrCb8W-4267747702f7f998ed48.js +0 -1
  131. data/tools/cmdtlmserver/RadiogroupWidget-DK1fphkh-4240a6df70fa8dca51a1.js +0 -1
  132. data/tools/cmdtlmserver/RangebarWidget-vspY8CGV-ebdba021106feba919b8.js +0 -1
  133. data/tools/cmdtlmserver/RawDialog-2e14a913b76847da4ba9.js +0 -11
  134. data/tools/cmdtlmserver/RollupWidget-07pNcXQV-ba5e4005c086c12c06ec.js +0 -1
  135. data/tools/cmdtlmserver/RoutersTab-4a1f6189bc2c16e48e45.js +0 -1
  136. data/tools/cmdtlmserver/ScrollwindowWidget-BcbyrYUo-10281c7d6b14389eed73.js +0 -1
  137. data/tools/cmdtlmserver/SignalWidget-BDp5sUHj-a65e9d98e5ee38497414.js +0 -1
  138. data/tools/cmdtlmserver/SpacerWidget-DcOnQ1yI-85ede0dfdaf5332a75b5.js +0 -1
  139. data/tools/cmdtlmserver/SparklineWidget-CVglnlAm-70c13afcad82b1af8856.js +0 -1
  140. data/tools/cmdtlmserver/StatusTab-81f0151e31400a845091.js +0 -1
  141. data/tools/cmdtlmserver/TabbookWidget-p51Oa7Ru-5c77c55d3ca8c8eea2a2.js +0 -1
  142. data/tools/cmdtlmserver/TargetsTab-d315b150506412fd940d.js +0 -1
  143. data/tools/cmdtlmserver/TextboxWidget-DM-XX97e-a610e3330b16f7d8c357.js +0 -1
  144. data/tools/cmdtlmserver/TextfieldWidget-7cYHAgH8-cc633ee5c7fdc2827af2.js +0 -1
  145. data/tools/cmdtlmserver/TimeWidget-EvQJyu6x-8891f75d3167aa20e23f.js +0 -1
  146. data/tools/cmdtlmserver/TitleWidget-6ddfJuqd-3bbefc62c80d7df57c87.js +0 -1
  147. data/tools/cmdtlmserver/TlmPacketsTab-572f438a925f8dc917d2.js +0 -1
  148. data/tools/cmdtlmserver/Updater-7264a034babccd19df9b.js +0 -1
  149. data/tools/cmdtlmserver/VWidget-P-X9ffkl-c8b72dc1178eb3c8e2cd.js +0 -1
  150. data/tools/cmdtlmserver/ValueWidget-DAUGuQ9f-5aefd22f107264b78496.js +0 -1
  151. data/tools/cmdtlmserver/ValuelimitsbarWidget-DmLUXw0I-a8b62fb2384528e1f282.js +0 -1
  152. data/tools/cmdtlmserver/ValuelimitscolumnWidget-DDmo8wHJ-452d429087199fd8fd8f.js +0 -1
  153. data/tools/cmdtlmserver/ValuerangebarWidget-CbzWSWq3-36e7a304c66d8858de05.js +0 -1
  154. data/tools/cmdtlmserver/VerticalWidget-BuKinn_c-22586ad6fe541c906104.js +0 -1
  155. data/tools/cmdtlmserver/VerticalboxWidget-C0zD5h0O-b1a55e28b18d8849b8ef.js +0 -1
  156. data/tools/cmdtlmserver/Widget-BIXl-Pk5-d010324d778e54fd1761.js +0 -1
  157. data/tools/cmdtlmserver/main-465ec4b7b5416a57d004.js +0 -1504
  158. data/tools/cmdtlmserver/services-fc57b62f64eeefd0928c.js +0 -7
@@ -1 +1 @@
1
- System.register(["vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(t,e){"use strict";return{setters:[null,u=>{t({bootstrap:u.b,mount:u.m,unmount:u.u})},null,null,null,null],execute:(function(){})}}));
1
+ System.register(["vue","./main-f371259352e08317c745.js","vue-router","single-spa","vuex","vuetify"],function(t,e){"use strict";return{setters:[null,u=>{t({bootstrap:u.b,mount:u.m,unmount:u.u})},null,null,null,null],execute:function(){}}});
@@ -0,0 +1,7 @@
1
+ System.register([],function(Ae,Ks){"use strict";return{execute:function(){var rn=Object.defineProperty,sn=(t,e,n)=>e in t?rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ue=(t,e,n)=>sn(t,typeof e!="symbol"?e+"":e,n);function Ge(t,e){return function(){return t.apply(e,arguments)}}const{toString:on}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:he,toStringTag:Qe}=Symbol,de=(t=>e=>{const n=on.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=t=>(t=t.toLowerCase(),e=>de(e)===t),fe=t=>e=>typeof e===t,{isArray:V}=Array,K=fe("undefined");function te(t){return t!==null&&!K(t)&&t.constructor!==null&&!K(t.constructor)&&C(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ye=N("ArrayBuffer");function cn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ye(t.buffer),e}const an=fe("string"),C=fe("function"),Ze=fe("number"),ne=t=>t!==null&&typeof t=="object",ln=t=>t===!0||t===!1,pe=t=>{if(de(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Qe in t)&&!(he in t)},un=t=>{if(!ne(t)||te(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},hn=N("Date"),dn=N("File"),fn=N("Blob"),pn=N("FileList"),gn=t=>ne(t)&&C(t.pipe),mn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||C(t.append)&&((e=de(t))==="formdata"||e==="object"&&C(t.toString)&&t.toString()==="[object FormData]"))},bn=N("URLSearchParams"),[_n,yn,wn,vn]=["ReadableStream","Request","Response","Headers"].map(N),Sn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),V(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(te(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(r=0;r<o;r++)c=i[r],e.call(null,t[c],c,t)}}function et(t,e){if(te(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tt=t=>!K(t)&&t!==B;function Te(){const{caseless:t,skipUndefined:e}=tt(this)&&this||{},n={},r=(s,i)=>{const o=t&&et(n,i)||i;pe(n[o])&&pe(s)?n[o]=Te(n[o],s):pe(s)?n[o]=Te({},s):V(s)?n[o]=s.slice():(!e||!K(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&re(arguments[s],r);return n}const En=(t,e,n,{allOwnKeys:r}={})=>(re(e,(s,i)=>{n&&C(s)?t[i]=Ge(s,n):t[i]=s},{allOwnKeys:r}),t),xn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),On=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Rn=(t,e,n,r)=>{let s,i,o;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=n!==!1&&Ce(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},An=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Cn=t=>{if(!t)return null;if(V(t))return t;let e=t.length;if(!Ze(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Tn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),kn=(t,e)=>{const n=(t&&t[he]).call(t);let r;for(;(r=n.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},jn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Pn=N("HTMLFormElement"),In=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),nt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Nn=N("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};re(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},Ln=t=>{rt(t,(e,n)=>{if(C(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(C(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Un=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return V(t)?r(t):r(String(t).split(e)),n},Fn=()=>{},$n=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function qn(t){return!!(t&&C(t.append)&&t[Qe]==="FormData"&&t[he])}const Dn=t=>{const e=new Array(10),n=(r,s)=>{if(ne(r)){if(e.indexOf(r)>=0)return;if(te(r))return r;if(!("toJSON"in r)){e[s]=r;const i=V(r)?[]:{};return re(r,(o,c)=>{const l=n(o,s+1);!K(l)&&(i[c]=l)}),e[s]=void 0,i}}return r};return n(t,0)},Bn=N("AsyncFunction"),Mn=t=>t&&(ne(t)||C(t))&&C(t.then)&&C(t.catch),st=((t,e)=>t?setImmediate:e?((n,r)=>(B.addEventListener("message",({source:s,data:i})=>{s===B&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),B.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",C(B.postMessage)),zn=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||st,Hn=t=>t!=null&&C(t[he]),a={isArray:V,isArrayBuffer:Ye,isBuffer:te,isFormData:mn,isArrayBufferView:cn,isString:an,isNumber:Ze,isBoolean:ln,isObject:ne,isPlainObject:pe,isEmptyObject:un,isReadableStream:_n,isRequest:yn,isResponse:wn,isHeaders:vn,isUndefined:K,isDate:hn,isFile:dn,isBlob:fn,isRegExp:Nn,isFunction:C,isStream:gn,isURLSearchParams:bn,isTypedArray:Tn,isFileList:pn,forEach:re,merge:Te,extend:En,trim:Sn,stripBOM:xn,inherits:On,toFlatObject:Rn,kindOf:de,kindOfTest:N,endsWith:An,toArray:Cn,forEachEntry:kn,matchAll:jn,isHTMLForm:Pn,hasOwnProperty:nt,hasOwnProp:nt,reduceDescriptors:rt,freezeMethods:Ln,toObjectSet:Un,toCamelCase:In,noop:Fn,toFiniteNumber:$n,findKey:et,global:B,isContextDefined:tt,isSpecCompliantForm:qn,toJSONObject:Dn,isAsyncFn:Bn,isThenable:Mn,setImmediate:st,asap:zn,isIterable:Hn};function _(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const it=_.prototype,ot={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ot[t]={value:t}}),Object.defineProperties(_,ot),Object.defineProperty(it,"isAxiosError",{value:!0}),_.from=(t,e,n,r,s,i)=>{const o=Object.create(it);a.toFlatObject(t,o,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const c=t&&t.message?t.message:"Error",l=e==null&&t?t.code:e;return _.call(o,c,l,n,r,s),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",i&&Object.assign(o,i),o};const Wn=null;function ke(t){return a.isPlainObject(t)||a.isArray(t)}function ct(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function at(t,e,n){return t?t.concat(e).map(function(r,s){return r=ct(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Jn(t){return a.isArray(t)&&!t.some(ke)}const Vn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!a.isUndefined(p[f])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(a.isBoolean(f))return f.toString();if(!c&&a.isBlob(f))throw new _("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,p,d){let v=f;if(f&&!d&&typeof f=="object"){if(a.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&Jn(f)||(a.isFileList(f)||a.endsWith(p,"[]"))&&(v=a.toArray(f)))return p=ct(p),v.forEach(function(S,w){!(a.isUndefined(S)||S===null)&&e.append(o===!0?at([p],w,i):o===null?p:p+"[]",l(S))}),!1}return ke(f)?!0:(e.append(at(d,p,i),l(f)),!1)}const h=[],g=Object.assign(Vn,{defaultVisitor:u,convertValue:l,isVisitable:ke});function m(f,p){if(!a.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(f),a.forEach(f,function(d,v){(!(a.isUndefined(d)||d===null)&&s.call(e,d,a.isString(v)?v.trim():v,p,g))===!0&&m(d,p?p.concat(v):[v])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return m(t),e}function lt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function je(t,e){this._pairs=[],t&&ge(t,this,e)}const ut=je.prototype;ut.append=function(t,e){this._pairs.push([t,e])},ut.toString=function(t){const e=t?function(n){return t.call(this,n,lt)}:lt;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Kn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ht(t,e,n){if(!e)return t;const r=n&&n.encode||Kn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(e,n):i=a.isURLSearchParams(e)?e.toString():new je(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class dt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xn=typeof URLSearchParams<"u"?URLSearchParams:je,Gn=typeof FormData<"u"?FormData:null,Qn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Xn,FormData:Gn,Blob:Qn},protocols:["http","https","file","blob","url","data"]},Pe=typeof window<"u"&&typeof document<"u",Ie=typeof navigator=="object"&&navigator||void 0,Zn=Pe&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),er=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tr=Pe&&window.location.href||"http://localhost",nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pe,hasStandardBrowserEnv:Zn,hasStandardBrowserWebWorkerEnv:er,navigator:Ie,origin:tr},Symbol.toStringTag,{value:"Module"})),O={...nr,...Yn};function rr(t,e){return ge(t,new O.classes.URLSearchParams,{visitor:function(n,r,s,i){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function sr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ir(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function pt(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=ir(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(sr(r),s,n,0)}),n}return null}function or(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const se={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,s=a.isObject(t);if(s&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return r?JSON.stringify(pt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return rr(t,this.formSerializer).toString();if((i=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ge(i?{"files[]":t}:t,o&&new o,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),or(t)):t}],transformResponse:[function(t){const e=this.transitional||se.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(n&&!this.responseType||r)){const s=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(i){if(s)throw i.name==="SyntaxError"?_.from(i,_.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{se.headers[t]={}});const cr=a.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"]),ar=t=>{const e={};let n,r,s;return t&&t.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&cr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},gt=Symbol("internals");function ie(t){return t&&String(t).trim().toLowerCase()}function me(t){return t===!1||t==null?t:a.isArray(t)?t.map(me):String(t)}function lr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const ur=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ne(t,e,n,r,s){if(a.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function hr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dr(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let T=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function s(o,c,l){const u=ie(c);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(r,u);(!h||r[h]===void 0||l===!0||l===void 0&&r[h]!==!1)&&(r[h||c]=me(o))}const i=(o,c)=>a.forEach(o,(l,u)=>s(l,u,c));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(a.isString(t)&&(t=t.trim())&&!ur(t))i(ar(t),e);else if(a.isObject(t)&&a.isIterable(t)){let o={},c,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[l=u[0]]=(c=o[l])?a.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(o,e)}else t!=null&&s(e,t,n);return this}get(t,e){if(t=ie(t),t){const n=a.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return lr(r);if(a.isFunction(e))return e.call(this,r,n);if(a.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ie(t),t){const n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Ne(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function s(i){if(i=ie(i),i){const o=a.findKey(n,i);o&&(!e||Ne(n,n[o],o,e))&&(delete n[o],r=!0)}}return a.isArray(t)?t.forEach(s):s(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const s=e[n];(!t||Ne(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const e=this,n={};return a.forEach(this,(r,s)=>{const i=a.findKey(n,s);if(i){e[i]=me(r),delete e[s];return}const o=t?hr(s):String(s).trim();o!==s&&delete e[s],e[o]=me(r),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&a.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
3
+ `)}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 n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[gt]=this[gt]={accessors:{}}).accessors,n=this.prototype;function r(s){const i=ie(s);e[i]||(dr(n,s),e[i]=!0)}return a.isArray(t)?t.forEach(r):r(t),this}};T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(T.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),a.freezeMethods(T);function Le(t,e){const n=this||se,r=e||n,s=T.from(r.headers);let i=r.data;return a.forEach(t,function(o){i=o.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function mt(t){return!!(t&&t.__CANCEL__)}function X(t,e,n){_.call(this,t??"canceled",_.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(X,_,{__CANCEL__:!0});function bt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new _("Request failed with status code "+n.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function pr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=r[i];o||(o=l),n[s]=c,r[s]=l;let h=i,g=0;for(;h!==s;)g+=n[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-o<e)return;const m=u&&l-u;return m?Math.round(g*1e3/m):void 0}}function gr(t,e){let n=0,r=1e3/e,s,i;const o=(c,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const l=Date.now(),u=l-n;u>=r?o(c,l):(s=c,i||(i=setTimeout(()=>{i=null,o(s)},r-u)))},()=>s&&o(s)]}const be=(t,e,n=3)=>{let r=0;const s=pr(50,250);return gr(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),h=o<=c;r=o;const g={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&h?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},_t=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},yt=t=>(...e)=>a.asap(()=>t(...e)),mr=O.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,O.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,br=O.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const o=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _r(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function wt(t,e,n){let r=!_r(e);return t&&(r||n==!1)?yr(t,e):e}const vt=t=>t instanceof T?{...t}:t;function M(t,e){e=e||{};const n={};function r(u,h,g,m){return a.isPlainObject(u)&&a.isPlainObject(h)?a.merge.call({caseless:m},u,h):a.isPlainObject(h)?a.merge({},h):a.isArray(h)?h.slice():h}function s(u,h,g,m){if(a.isUndefined(h)){if(!a.isUndefined(u))return r(void 0,u,g,m)}else return r(u,h,g,m)}function i(u,h){if(!a.isUndefined(h))return r(void 0,h)}function o(u,h){if(a.isUndefined(h)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function c(u,h,g){if(g in e)return r(u,h);if(g in t)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,h,g)=>s(vt(u),vt(h),g,!0)};return a.forEach(Object.keys({...t,...e}),function(u){const h=l[u]||s,g=h(t[u],e[u],u);a.isUndefined(g)&&h!==c||(n[u]=g)}),n}const St=t=>{const e=M({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=e;if(e.headers=o=T.from(o),e.url=ht(wt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([h,g])=>{u.includes(h.toLowerCase())&&o.set(h,g)})}}if(O.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&mr(e.url))){const l=s&&i&&br.read(i);l&&o.set(s,l)}return e},wr=typeof XMLHttpRequest<"u",vr=wr&&function(t){return new Promise(function(e,n){const r=St(t);let s=r.data;const i=T.from(r.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=r,u,h,g,m,f;function p(){m&&m(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function v(){if(!d)return;const w=T.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),A={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:w,config:t,request:d};bt(function(j){e(j),p()},function(j){n(j),p()},A),d=null}"onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(n(new _("Request aborted",_.ECONNABORTED,t,d)),d=null)},d.onerror=function(w){const A=w&&w.message?w.message:"Network Error",j=new _(A,_.ERR_NETWORK,t,d);j.event=w||null,n(j),d=null},d.ontimeout=function(){let w=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const A=r.transitional||ft;r.timeoutErrorMessage&&(w=r.timeoutErrorMessage),n(new _(w,A.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,t,d)),d=null},s===void 0&&i.setContentType(null),"setRequestHeader"in d&&a.forEach(i.toJSON(),function(w,A){d.setRequestHeader(A,w)}),a.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),o&&o!=="json"&&(d.responseType=r.responseType),l&&([g,f]=be(l,!0),d.addEventListener("progress",g)),c&&d.upload&&([h,m]=be(c),d.upload.addEventListener("progress",h),d.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(u=w=>{d&&(n(!w||w.type?new X(null,t,d):w),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const S=fr(r.url);if(S&&O.protocols.indexOf(S)===-1){n(new _("Unsupported protocol "+S+":",_.ERR_BAD_REQUEST,t));return}d.send(s||null)})},Sr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,c();const h=u instanceof Error?u:this.reason;r.abort(h instanceof _?h:new X(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,i(new _(`timeout ${e} of ms exceeded`,_.ETIMEDOUT))},e);const c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>a.asap(c),l}},Er=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},xr=async function*(t,e){for await(const n of Or(t))yield*Er(n,e)},Or=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Et=(t,e,n,r)=>{const s=xr(t,e);let i=0,o,c=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await s.next();if(u){c(),l.close();return}let g=h.byteLength;if(n){let m=i+=g;n(m)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},xt=64*1024,{isFunction:_e}=a,Ot=(({fetch:t,Request:e,Response:n})=>({fetch:t,Request:e,Response:n}))(a.global),{ReadableStream:Rt,TextEncoder:At}=a.global,Ct=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Rr=t=>{const{fetch:e,Request:n,Response:r}=Object.assign({},Ot,t),s=_e(e),i=_e(n),o=_e(r);if(!s)return!1;const c=s&&_e(Rt),l=s&&(typeof At=="function"?(p=>d=>p.encode(d))(new At):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=i&&c&&Ct(()=>{let p=!1;const d=new n(O.origin,{body:new Rt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!d}),h=o&&c&&Ct(()=>a.isReadableStream(new r("").body)),g={stream:h&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!g[p]&&(g[p]=(d,v)=>{let S=d&&d[p];if(S)return S.call(d);throw new _(`Response type '${p}' is not supported`,_.ERR_NOT_SUPPORT,v)})});const m=async p=>{if(p==null)return 0;if(a.isBlob(p))return p.size;if(a.isSpecCompliantForm(p))return(await new n(O.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(a.isArrayBufferView(p)||a.isArrayBuffer(p))return p.byteLength;if(a.isURLSearchParams(p)&&(p=p+""),a.isString(p))return(await l(p)).byteLength},f=async(p,d)=>a.toFiniteNumber(p.getContentLength())??m(d);return async p=>{let{url:d,method:v,data:S,signal:w,cancelToken:A,timeout:j,onDownloadProgress:$,onUploadProgress:Q,responseType:P,headers:J,withCredentials:U="same-origin",fetchOptions:Y}=St(p);P=P?(P+"").toLowerCase():"text";let R=Sr([w,A&&A.toAbortSignal()],j),I=null;const E=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let b;try{if(Q&&u&&v!=="get"&&v!=="head"&&(b=await f(J,S))!==0){let D=new n(d,{method:"POST",body:S,duplex:"half"}),ee;if(a.isFormData(S)&&(ee=D.headers.get("content-type"))&&J.setContentType(ee),D.body){const[Xe,Re]=_t(b,be(yt(Q)));S=Et(D.body,xt,Xe,Re)}}a.isString(U)||(U=U?"include":"omit");const y=i&&"credentials"in n.prototype,q={...Y,signal:R,method:v.toUpperCase(),headers:J.normalize().toJSON(),body:S,duplex:"half",credentials:y?U:void 0};I=i&&new n(d,q);let k=await(i?e(I,Y):e(d,q));const Z=h&&(P==="stream"||P==="response");if(h&&($||Z&&E)){const D={};["status","statusText","headers"].forEach(tn=>{D[tn]=k[tn]});const ee=a.toFiniteNumber(k.headers.get("content-length")),[Xe,Re]=$&&_t(ee,be(yt($),!0))||[];k=new r(Et(k.body,xt,Xe,()=>{Re&&Re(),E&&E()}),D)}P=P||"text";let Vs=await g[a.findKey(g,P)||"text"](k,p);return!Z&&E&&E(),await new Promise((D,ee)=>{bt(D,ee,{data:Vs,headers:T.from(k.headers),status:k.status,statusText:k.statusText,config:p,request:I})})}catch(y){throw E&&E(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,p,I),{cause:y.cause||y}):_.from(y,y&&y.code,p,I)}}},Ar=new Map,Tt=t=>{let e=a.merge.call({skipUndefined:!0},Ot,t?t.env:null);const{fetch:n,Request:r,Response:s}=e,i=[r,s,n];let o=i.length,c=o,l,u,h=Ar;for(;c--;)l=i[c],u=h.get(l),u===void 0&&h.set(l,u=c?new Map:Rr(e)),h=u;return u};Tt();const Ue={http:Wn,xhr:vr,fetch:{get:Tt}};a.forEach(Ue,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const kt=t=>`- ${t}`,Cr=t=>a.isFunction(t)||t===null||t===!1,jt={getAdapter:(t,e)=>{t=a.isArray(t)?t:[t];const{length:n}=t;let r,s;const i={};for(let o=0;o<n;o++){r=t[o];let c;if(s=r,!Cr(r)&&(s=Ue[(c=String(r)).toLowerCase()],s===void 0))throw new _(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(e))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
4
+ `+o.map(kt).join(`
5
+ `):" "+kt(o[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s},adapters:Ue};function Fe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new X(null,t)}function Pt(t){return Fe(t),t.headers=T.from(t.headers),t.data=Le.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),jt.getAdapter(t.adapter||se.adapter,t)(t).then(function(e){return Fe(t),e.data=Le.call(t,t.transformResponse,e),e.headers=T.from(e.headers),e},function(e){return mt(e)||(Fe(t),e&&e.response&&(e.response.data=Le.call(t,t.transformResponse,e.response),e.response.headers=T.from(e.response.headers))),Promise.reject(e)})}const It="1.12.0",ye={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ye[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Nt={};ye.transitional=function(t,e,n){function r(s,i){return"[Axios v"+It+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,o)=>{if(t===!1)throw new _(r(i," has been removed"+(e?" in "+e:"")),_.ERR_DEPRECATED);return e&&!Nt[i]&&(Nt[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,i,o):!0}},ye.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Tr(t,e,n){if(typeof t!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const c=t[i],l=c===void 0||o(c,i,t);if(l!==!0)throw new _("option "+i+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}}const we={assertOptions:Tr,validators:ye},F=we.validators;let z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+s):n.stack=s}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=M(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:s}=e;n!==void 0&&we.assertOptions(n,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),r!=null&&(a.isFunction(r)?e.paramsSerializer={serialize:r}:we.assertOptions(r,{encode:F.function,serialize:F.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),we.assertOptions(e,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[e.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),e.headers=T.concat(i,s);const o=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(e)===!1||(c=c&&f.synchronous,o.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let u,h=0,g;if(!c){const f=[Pt.bind(this),void 0];for(f.unshift(...o),f.push(...l),g=f.length,u=Promise.resolve(e);h<g;)u=u.then(f[h++],f[h++]);return u}g=o.length;let m=e;for(h=0;h<g;){const f=o[h++],p=o[h++];try{m=f(m)}catch(d){p.call(this,d);break}}try{u=Pt.call(this,m)}catch(f){return Promise.reject(f)}for(h=0,g=l.length;h<g;)u=u.then(l[h++],l[h++]);return u}getUri(t){t=M(this.defaults,t);const e=wt(t.baseURL,t.url,t.allowAbsoluteUrls);return ht(e,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){z.prototype[t]=function(e,n){return this.request(M(n||{},{method:t,url:e,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function e(n){return function(r,s,i){return this.request(M(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}z.prototype[t]=e(),z.prototype[t+"Form"]=e(!0)});let kr=class nn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(s,i,o){r.reason||(r.reason=new X(s,i,o),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new nn(function(n){e=n}),cancel:e}}};function jr(t){return function(e){return t.apply(null,e)}}function Pr(t){return a.isObject(t)&&t.isAxiosError===!0}const $e={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};Object.entries($e).forEach(([t,e])=>{$e[e]=t});function Lt(t){const e=new z(t),n=Ge(z.prototype.request,e);return a.extend(n,z.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Lt(M(t,r))},n}const x=Lt(se);x.Axios=z,x.CanceledError=X,x.CancelToken=kr,x.isCancel=mt,x.VERSION=It,x.toFormData=ge,x.AxiosError=_,x.Cancel=x.CanceledError,x.all=function(t){return Promise.all(t)},x.spread=jr,x.isAxiosError=Pr,x.mergeConfig=M,x.AxiosHeaders=T,x.formToJSON=t=>pt(a.isHTMLForm(t)?new FormData(t):t),x.getAdapter=jt.getAdapter,x.HttpStatusCode=$e,x.default=x;const{Axios:Xs,AxiosError:Gs,CanceledError:Qs,isCancel:Ys,CancelToken:Zs,VERSION:ei,all:ti,Cancel:ni,isAxiosError:ri,spread:si,toFormData:ii,AxiosHeaders:oi,HttpStatusCode:ci,formToJSON:ai,getAdapter:li,mergeConfig:ui}=x,qe=x.create({baseURL:location.origin,timeout:6e4,params:{}});qe.interceptors.response.use(t=>t,t=>{var e,n,r,s,i,o,c,l,u,h,g;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(p){p&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let m=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(m+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(m+=`${t.response.config.data} `),(i=(s=t.response)==null?void 0:s.data)!=null&&i.message?m+=`${t.response.data.message}`:(c=(o=t.response)==null?void 0:o.data)!=null&&c.exception?m+=`${t.response.data.exception}`:(h=(u=(l=t.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&h.message?(t.response.data.error.class&&(m+=`${t.response.data.error.class} `),m+=`${t.response.data.error.message}`):m+=`${(g=t.response)==null?void 0:g.data}`;const{$cosmosNotify:f}=window;throw f&&f.serious({title:"Network error",body:m}),t}else throw t});const ve=async function(t,e,{data:n,params:r={},headers:s,noAuth:i=!1,noScope:o=!1,onUploadProgress:c=!1}={}){if(!i){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}s.Authorization=localStorage.openc3Token}return s.manual=!0,!o&&!r.scope&&(r.scope=window.openc3Scope),qe({method:t,url:e,data:n,params:r,headers:s,onUploadProgress:c})},De={Accept:"application/json"},Ut={...De,"Content-Type":"application/json"},hi=Ae("h",{get:function(t,{params:e,headers:n=De,noScope:r,noAuth:s,onUploadProgress:i}={}){return ve("get",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})},put:function(t,{data:e,params:n,headers:r=Ut,noScope:s,noAuth:i,onUploadProgress:o}={}){return ve("put",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},post:function(t,{data:e,params:n,headers:r=Ut,noScope:s,noAuth:i,onUploadProgress:o}={}){return ve("post",t,{data:e,params:n,headers:r,noScope:s,noAuth:i,onUploadProgress:o})},delete:function(t,{params:e,headers:n=De,noScope:r,noAuth:s,onUploadProgress:i}={}){return ve("delete",t,{params:e,headers:n,noScope:r,noAuth:s,onUploadProgress:i})}});let Se=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,s=n.length;r<s;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(s=>e!==s)}}});class oe extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class Be extends oe{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Ir extends oe{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class L extends oe{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class Nr extends L{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Ft(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class Lr{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,n){if(!this._info)return this._info={id:e,info:n},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((n,{id:r,info:s})=>(n[r]=s,n),{})}}const H=Symbol("state");class $t{constructor(e={}){this.emitter=Se(),this.params=Object.freeze(e),this.presence=new Lr(this),this.initialConnect=!0,this[H]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Ft({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[H]}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[H]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[H]="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[H]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[H]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[H]="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,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});return r}emit(e,...n){return this.emitter.emit(e,...n)}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,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(s=>s()),e()})),r.push(this.on("close",s=>{r.forEach(i=>i()),n(s||new oe("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Ur{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 n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.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 n,r={promise:new Promise(i=>{n=i}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},s=this._pendingTop;return this._pendings.push(r),s&&await s.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 n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class Fr{constructor(){this.queue=[]}async acquire(e,n){n==="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 $r{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Fr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let s=this._subscriptions[e]=new Ur(e);return s.remoteId=this._localToRemote[e],s.subscriber=n,s.unsubscriber=r,s.gvl=this.glv,s}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class qr{constructor(e={}){this.subscriptions=new $r(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let s=this._remoteToLocal[e];if(!s){this._pendingMessages.push([e,n,r]);return}let i=this.subscriptions.get(s);i&&i.channels.forEach(o=>{o.receive(n,r)})}notify(e,n,r){let s=this._remoteToLocal[e];if(!s)return;let i=this.subscriptions.get(s);i&&i.channels.forEach(o=>o.emit(n,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 n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const qt={debug:0,info:1,warn:2,error:3};class Dt{constructor(e){this.level=e||"warn"}log(e,n,r){qt[e]<qt[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class ce extends Dt{writeLogEntry(){}}class Dr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Br=0;class Bt{constructor(e={}){let{logger:n}=e;this.logger=n||new ce,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let s=Ft(r);if(this.pendingUnsubscriptions[s]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,s),new Promise(c=>{setTimeout(()=>{c(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[s])return this.logger.warn("subscription is already pending, skipping",s),Promise.reject(Error("Already subscribing"));let i=this.subscribeRetryInterval;return new Promise((o,c)=>{let l=++Br;this.pendingSubscriptions[s]={resolve:o,reject:c,id:l},this.cable.send(this.buildSubscribeRequest(s)),this.maybeRetrySubscribe(l,s,i)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let s=this.pendingSubscriptions[n];s&&s.id===e&&(delete this.pendingSubscriptions[n],s.reject(new Ir(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},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,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:s,reason:i,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let c=e.sid;return c&&this.cable.setSessionId(c),this.cable.connected()}if(n==="disconnect"){let c=new L(i);this.reset(c),o===!1?this.cable.closed(c):this.cable.disconnected(c);return}if(n==="confirm_subscription"){let c=this.pendingSubscriptions[r];if(!c){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],c.resolve(r)}if(n==="reject_subscription"){let c=this.pendingSubscriptions[r];return c?(delete this.pendingSubscriptions[r],c.reject(new Be)):this.logger.error("subscription not found",{type:n,identifier:r})}if(s)return{identifier:r,message:s};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Mt=()=>Date.now()/1e3|0;class Mr extends Bt{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=Mt()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:s}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Mt()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let i=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of i)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(i)}return this.cable.connected(this.sessionId)}if(n==="presence"){let i=s.type;if(i==="info"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.resolve(s))}else if(i==="error"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:s}}if(s){let i=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:s,meta:i}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){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,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let s=this.presenceInfo[e];return s&&(n.presence=s),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let s of this.subscriptionStreams[e]){let i=this.streamsPositions[s];i&&(r=!0,n[s]=i)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,s){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:s},{stream:n,epoch:r,offset:s}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,s)=>{this.pendingPresence[e]={resolve:r,reject:s},this.cable.send({command:"presence",identifier:e,data:n})})}}class zr extends oe{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Me extends $t{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}ue(Me,"identifier","__ghost__");const Hr="$pubsub";class ze extends $t{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}ue(ze,"identifier",Hr);const W=Symbol("state");let Wr=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:s,hubOptions:i,performFailures:o,transportConfigurator:c}){this.emitter=Se(),this.transport=t,this.encoder=n,this.logger=r||new ce,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new qr(i||{}),this[W]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=c,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,s===!1&&this.connect().catch(()=>{})}get state(){return this[W]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[W]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[W]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new L("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[W]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new L("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new L(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[W]="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 L?t:new L(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[W]="closed";let n=e||new L("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),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 n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:s,message:i,meta:o}=n;r?this.hub.notify(s,r,i):this.hub.transmit(s,i,o)}}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 ze({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new ze({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Me),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=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 n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){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 s=await t.acquire("subscribed");if(s.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),s.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),s.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),s.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),s.release();return}let i={identifier:e,params:n};this.logger.debug("subscribing",i);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(r,o),this.logger.debug("subscribed",{...i,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof Be&&this.logger.warn("rejected",i),o instanceof L){this.logger.debug("disconnected during subscription; will retry on connect",i),s.release();return}this.logger.error("failed to subscribe",{error:o,...i})}t.close(o),this.hub.unsubscribe(r)}s.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.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}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.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),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(s){s&&(s instanceof L?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:s}):this.logger.error("unsubscribe failed",{id:e,error:s}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new zr;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 s=r.remoteId,i={id:s,action:e,payload:n};this.logger.debug("perform",i);try{let o=await this.protocol.perform(s,e,n);return o&&this.logger.debug("perform result",{message:o,request:i}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:i}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(s=>s()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(s=>s()),e(r)}))}),this._pendingConnect)}};const Jr={maxMissingPings:2,maxReconnectAttempts:1/0},G=()=>Date.now(),zt=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:s}=e;return n=n||2,r===void 0&&(r=.5),i=>{let o=t*n**i,c=o*n,l=o+(c-o)*Math.random(),u=2*(Math.random()-.5)*r;return l=l*(1+u),s&&s<l&&(l=s),l}};let Ht=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Jr,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 ce,this.state="pending_connect",this.attempts=0,this.disconnectedAt=G()}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=G(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=G(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=G(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=G()})),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=G()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Nr))}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 Vr{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Se(),this.unbind=[],this.logger=n.logger||new ce}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.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,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});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 Kr{constructor(e,n={}){this.url=e;let r=n.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=Se();let{format:s,subprotocol:i,authStrategy:o}=n;this.format=s||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=i}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((n,r)=>{let s=[];s.push(this.once("open",()=>{s.forEach(i=>i()),n()})),s.push(this.once("close",()=>{s.forEach(i=>i()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let s=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(s)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(s=>s.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,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...s)=>{r(),n(...s)});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 n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Wt={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Xr(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({},Wt,e);let{protocol:n,websocketImplementation:r,websocketFormat:s,websocketOptions:i,websocketAuthStrategy:o,fallbacks:c,logLevel:l,logger:u,transport:h,encoder:g,lazy:m,monitor:f,pingInterval:p,reconnectStrategy:d,maxMissingPings:v,maxReconnectAttempts:S,subprotocol:w,tokenRefresher:A,historyTimestamp:j,protocolOptions:$,concurrentSubscribes:Q,performFailures:P,transportConfigurator:J,auth:U}=e;if(u=u||new ce(l),typeof n=="string"){w=w||n;let I=n.substring(0,n.lastIndexOf("-")),E=n.substring(n.lastIndexOf("-")+1);if($=$||{},I==="actioncable-v1")n=new Bt({logger:u,...$});else if(I==="actioncable-v1-ext")n=new Mr({logger:u,historyTimestamp:j,...$});else throw Error(`Protocol is not supported yet: ${n}`);if(E==="json")g=g||new Dr,s=s||"text";else if(E==="msgpack"){if(s="binary",!g)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(E==="protobuf"){if(s=s||"binary",!g)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: ${n}`)}if(!n)throw Error("Protocol must be specified");h=h||new Kr(t,{websocketImplementation:r,websocketOptions:i,subprotocol:w,authStrategy:o,format:s}),c&&(h=new Vr([h,...c],{logger:u})),U&&U.token&&h.setToken(U.token,U.param||"jid"),d=d||zt(p),f!==!1&&(f=f||new Ht({pingInterval:p,reconnectStrategy:d,maxMissingPings:v,maxReconnectAttempts:S,logger:u}));let Y={concurrentSubscribes:Q},R=new Wr({protocol:n,transport:h,encoder:g,logger:u,lazy:m,hubOptions:Y,performFailures:P,transportConfigurator:J});return f&&(f.watch(R),R.monitor=f),A&&Gr(R,async()=>{try{await A(h)}catch(I){return u.error("Failed to refresh authentication token: "+I),!1}return R.connect().catch(()=>{}),!0}),R}function Gr(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class Qr{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Yr extends Me{constructor(e,n,r){super(e,n),this.subscription=new Qr(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:s})=>this.subscription.notify("connected",{reconnected:s})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",s=>this.subscription.notify("received",s)),this.on("close",s=>{s&&s instanceof Be?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Zr{constructor(e){this.cable=e}create(e,n){let r,s;typeof e=="object"?(r=e.channel,delete e.channel,s=e):(r=e,s={});let i=new Yr(r,s,n);return i.subscription.notify("initialized"),this.cable.subscribe(i),i.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class es{constructor(e){this.cable=e,this.subscriptions=new Zr(e)}}class ts extends Dt{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class ns extends Ht{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")},n=s=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:s})},r=()=>this.disconnect(new L("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!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 rs=["cable","action-cable"],ss="/cable",Ee=(t,e)=>{for(let n of rs){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},Jt=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,is=()=>{if(typeof document<"u"&&document.head){let t=Ee(document,"url");if(t)return Jt(t)}return Jt(ss)},os=()=>{if(typeof document<"u"&&document.head){let t=Ee(document,"history-timestamp");if(t)return t|0}},cs=()=>{if(typeof document<"u"&&document.head)return Ee(document,"token")},as=()=>{if(typeof document<"u"&&document.head)return Ee(document,"token-param")};function ls(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||is(),e=e||{},e.historyTimestamp||(e.historyTimestamp=os());let n=cs();if(n){let u=as();e.auth=Object.assign({token:n,param:u},e.auth||{})}e=Object.assign({},Wt,e);let{logLevel:r,logger:s,pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l}=e;return s=e.logger=e.logger||new ts(r),o=e.reconnectStrategy=e.reconnectStrategy||zt(i),e.monitor!==!1&&(e.monitor=e.monitor||new ns({pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l,logger:s})),Xr(t,e)}function us(t,e){let n=ls(t,e);return new es(n)}class hs{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},s={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(n)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=us(o)}return this._cable.subscriptions.create({channel:e,...s},r)})}recordPing(){}}Ae("p",hs);function ae(t){return ds.test(t)}const ds=/^-?[0-9]+$/;function Vt(t){return fs.test(t)}const fs=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Kt(t,e){if(ae(t))return Number.isSafeInteger(Number.parseInt(t,10));const n=Number.parseFloat(t),r=String(n);if(t===r)return!0;const s=Xt(t),i=Xt(r);return!!(s===i||(e==null?void 0:e.approx)===!0&&!ae(t)&&i.length>=14&&s.startsWith(i.substring(0,14)))}let le=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function ps(t){if(Kt(t,{approx:!1}))return;if(ae(t))return le.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?le.underflow:le.truncate_float:le.overflow}function Xt(t){const{start:e,end:n}=gs(t),r=t.substring(e,n),s=r.indexOf(".");return s===-1?r:r.substring(0,s)+r.substring(s+1)}function gs(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let n=t.lastIndexOf("e");for(n===-1&&(n=t.lastIndexOf("E")),n===-1&&(n=t.length);(t[n-1]==="0"||t[n-1]===".")&&n>e;)n--;return{start:e,end:n}}class ms{constructor(e){if(ue(this,"isLosslessNumber",!0),!Vt(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=ps(this.value);if(e===void 0||e===le.truncate_float)return Number.parseFloat(this.value);if(ae(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 bs(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function _s(t){return new ms(t)}function ys(t,e){return He({"":t},"",t,e)}function He(t,e,n,r){return Array.isArray(n)?r.call(t,e,vs(n,r)):n&&typeof n=="object"&&!bs(n)?r.call(t,e,ws(n,r)):r.call(t,e,n)}function ws(t,e){for(const n of Object.keys(t)){const r=He(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function vs(t,e){for(let n=0;n<t.length;n++)t[n]=He(t,String(n),t[n],e);return t}function Ss(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_s,r=0;const s=c();return p(s),v(),e?ys(s,e):s;function i(){if(t.charCodeAt(r)===Cs){r++,u();const b={};let y=!0;for(;r<t.length&&t.charCodeAt(r)!==Qt;){y?y=!1:(m(),u());const q=r,k=h();if(k===void 0){A();return}u(),f();const Z=c();if(Z===void 0){U();return}Object.prototype.hasOwnProperty.call(b,k)&&!We(Z,b[k])&&j(k,q+1),b[k]=Z}return t.charCodeAt(r)!==Qt&&$(),r++,b}}function o(){if(t.charCodeAt(r)===Ts){r++,u();const b=[];let y=!0;for(;r<t.length&&t.charCodeAt(r)!==Yt;){y?y=!1:m();const q=c();d(q),b.push(q)}return t.charCodeAt(r)!==Yt&&Q(),r++,b}}function c(){u();const b=h()??g()??i()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),b}function l(b,y){if(t.slice(r,r+b.length)===b)return r+=b.length,y}function u(){for(;Es(t.charCodeAt(r));)r++}function h(){if(t.charCodeAt(r)===Je){r++;let b="";for(;r<t.length&&t.charCodeAt(r)!==Je;){if(t.charCodeAt(r)===As){const y=t[r+1],q=Rs[y];q!==void 0?(b+=q,r++):y==="u"?xe(t.charCodeAt(r+2))&&xe(t.charCodeAt(r+3))&&xe(t.charCodeAt(r+4))&&xe(t.charCodeAt(r+5))?(b+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):Y(r):J(r)}else Os(t.charCodeAt(r))?b+=t[r]:P(t[r]);r++}return w(),r++,b}}function g(){const b=r;if(t.charCodeAt(r)===Zt&&(r++,S(b)),t.charCodeAt(r)===Ve)r++;else if(xs(t.charCodeAt(r)))for(r++;Oe(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===Fs)for(r++,S(b);Oe(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===Ms||t.charCodeAt(r)===Bs)for(r++,(t.charCodeAt(r)===Zt||t.charCodeAt(r)===Ns)&&r++,S(b);Oe(t.charCodeAt(r));)r++;if(r>b)return n(t.slice(b,r))}function m(){if(t.charCodeAt(r)!==Us)throw new SyntaxError(`Comma ',' expected after value ${E()}`);r++}function f(){if(t.charCodeAt(r)!==$s)throw new SyntaxError(`Colon ':' expected after property name ${E()}`);r++}function p(b){if(b===void 0)throw new SyntaxError(`JSON value expected ${E()}`)}function d(b){if(b===void 0)throw new SyntaxError(`Array item expected ${E()}`)}function v(){if(r<t.length)throw new SyntaxError(`Expected end of input ${E()}`)}function S(b){if(!Oe(t.charCodeAt(r))){const y=t.slice(b,r);throw new SyntaxError(`Invalid number '${y}', expecting a digit ${E()}`)}}function w(){if(t.charCodeAt(r)!==Je)throw new SyntaxError(`End of string '"' expected ${E()}`)}function A(){throw new SyntaxError(`Quoted object key expected ${E()}`)}function j(b,y){throw new SyntaxError(`Duplicate key '${b}' encountered at position ${y}`)}function $(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${E()}`)}function Q(){throw new SyntaxError(`Array item or end of array ']' expected ${E()}`)}function P(b){throw new SyntaxError(`Invalid character '${b}' ${R()}`)}function J(b){const y=t.slice(b,b+2);throw new SyntaxError(`Invalid escape character '${y}' ${R()}`)}function U(){throw new SyntaxError(`Object value expected after ':' ${R()}`)}function Y(b){const y=t.slice(b,b+6);throw new SyntaxError(`Invalid unicode character '${y}' ${R()}`)}function R(){return`at position ${r}`}function I(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function E(){return`${I()} ${R()}`}}function Es(t){return t===ks||t===js||t===Ps||t===Is}function xe(t){return t>=Ve&&t<=Ke||t>=qs&&t<=zs||t>=Ds&&t<=Hs}function Oe(t){return t>=Ve&&t<=Ke}function xs(t){return t>=Ls&&t<=Ke}function Os(t){return t>=32&&t<=1114111}function We(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>We(n,e[r])):Gt(t)&&Gt(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>We(t[n],e[n])):!1}function Gt(t){return typeof t=="object"&&t!==null}const Rs={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
7
+ `,r:"\r",t:" "},As=92,Cs=123,Qt=125,Ts=91,Yt=93,ks=32,js=10,Ps=9,Is=13,Je=34,Ns=43,Zt=45,Ve=48,Ls=49,Ke=57,Us=44,Fs=46,$s=58,qs=65,Ds=97,Bs=69,Ms=101,zs=70,Hs=102;function en(t,e,n,r){return s(t);function s(l,u){if(Array.isArray(r)){const h=r.find(g=>g.test(l));if(h){const g=h.stringify(l);if(typeof g!="string"||!Vt(g))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${g})`);return g}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return i(l);if(l&&typeof l=="object")return o(l)}function i(l,u){if(l.length===0)return"[]";let h="[";for(let g=0;g<l.length;g++){const m=l[g];typeof m<"u"&&typeof m!="function"?h+=s(m):h+="null",g<l.length-1&&(h+=",")}return h+="]",h}function o(l,u){if(typeof l.toJSON=="function")return en(l.toJSON(),e,n,void 0);const h=Array.isArray(e)?e.map(String):Object.keys(l);if(h.length===0)return"{}";let g=!0,m="{";for(const f of h){const p=l[f];if(c(f,p)){g?g=!1:m+=",";const d=JSON.stringify(f);m+=`${d}:`,m+=s(p)}}return m+="}",m}function c(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Ws(t){return ae(t)&&!Kt(t)?BigInt(t):parseFloat(t)}class Js{constructor(){ue(this,"id",1)}async exec(e,n,r={},s={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,s.manual=!0,(await qe.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...s},timeout:i,transformRequest:[(o,c)=>en(o)],transformResponse:[o=>Ss(o,void 0,Ws)]})).data.result}catch(o){let c=new Error;throw o.response?(c.name=o.response.data.error.data.class,c.message=o.response.data.error.data.message,c.object=o.response.data.error):o.request?(c.name="Request error",c.message="Request error, no response received"):c=o,c}}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,n,r,s,i){return this.exec("map_target_to_interface",[e,n],{cmd_only:r,tlm_only:s,unmap_old:i})}unmap_target_from_interface(e,n,r,s){return this.exec("unmap_target_from_interface",[e,n],{cmd_only:r,tlm_only:s})}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}interface_target_enable(e,n,r=!1,s=!1){return this.exec("interface_target_enable",[e,n],{cmd_only:r,tlm_only:s})}interface_target_disable(e,n,r=!1,s=!1){return this.exec("interface_target_disable",[e,n],{cmd_only:r,tlm_only:s})}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,n,r,s,i){return this.exec("map_target_to_router",[e,n],{cmd_only:r,tlm_only:s,unmap_old:i})}unmap_target_from_router(e,n,r,s){return this.exec("unmap_target_from_router",[e,n],{cmd_only:r,tlm_only:s})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,n,r=!1,s=!1){return this.exec("router_target_enable",[e,n],{cmd_only:r,tlm_only:s})}router_target_disable(e,n,r=!1,s=!1){return this.exec("router_target_disable",[e,n],{cmd_only:r,tlm_only:s})}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,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,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,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}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,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}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,n,r,s=30){const i=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:s});if(i!=null){let o=i.length,c=null;for(let l=0;l<o;l++)c=this.decode_openc3_type(i[l][1]),c!==null&&(i[l][1]=c)}return i}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,r=null,s=null,i=null){let o={stale_time:n};r!==null&&(o.cache_timeout=r),s!==null&&(o.start_time=s.toISOString()),i!==null&&(o.end_time=i.toISOString());const c=await this.exec("get_tlm_values",[e],o,{},1e4);if(c&&c.length>0){let l=c[0].length,u=null;for(let h=0;h<l;h++)u=this.decode_openc3_type(c[0][h]),u!==null&&(c[0][h]=u)}return c}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,s="CONVERTED"){let i=null;if(n===void 0)i=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))i=await this.exec("tlm",[e],{type:n});else{let c=new Error;throw c.name="TypeError",c.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,c}else i=await this.exec("tlm",[e,n,r],{type:s});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,n,r=null,s="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:s})}set_tlm(e,n,r,s){return this.exec("set_tlm",[e,n,r],{type:s})}override_tlm(e,n,r,s){return this.exec("override_tlm",[e,n,r],{type:s})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,s){return this.exec("normalize_tlm",[e,n,r],{type:s})}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,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,s="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,s])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,s,i,o={}){let c=null;for(let l in s)Object.prototype.hasOwnProperty.call(s,l)&&(c=this.encode_openc3_type(s[l]),c!==null&&(s[l]=c));return this.exec(e,[n,r,s],o,i)}get_cmd_hazardous(e,n,r,s={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},s):this._cmd("get_cmd_hazardous",e,n,r,s)}cmd(e,n,r,s={},i={}){return n===void 0?this.exec("cmd",e,{},s):this._cmd("cmd",e,n,r,s,i)}cmd_no_range_check(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_no_range_check",e,{},s,i):this._cmd("cmd_no_range_check",e,n,r,s,i)}cmd_raw(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_raw",e,{},s,i):this._cmd("cmd_raw",e,n,r,s,i)}cmd_raw_no_range_check(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},s,i):this._cmd("cmd_raw_no_range_check",e,n,r,s,i)}cmd_no_hazardous_check(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},s,i):this._cmd("cmd_no_hazardous_check",e,n,r,s,i)}cmd_no_checks(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_no_checks",e,{},s,i):this._cmd("cmd_no_checks",e,n,r,s,i)}cmd_raw_no_hazardous_check(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},s,i):this._cmd("cmd_raw_no_hazardous_check",e,n,r,s,i)}cmd_raw_no_checks(e,n,r,s={},i={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},s,i):this._cmd("cmd_raw_no_checks",e,n,r,s,i)}build_cmd(e,n,r,s={},i={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,s,i)}build_command(e,n,r,s={},i={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,s,i)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,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,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>i.toString(16).padStart(2,"0")).join("")}}}Ae("g",Js)}}});
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openc3-cosmos-tool-cmdtlmserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.1
4
+ version: 6.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Melton
@@ -22,83 +22,86 @@ files:
22
22
  - README.md
23
23
  - Rakefile
24
24
  - plugin.txt
25
- - tools/cmdtlmserver/ArrayWidget-FGjLmPfG-683db8ebbd412ff5cf60.js
26
- - tools/cmdtlmserver/ArrayplotWidget-Cfo18TYm-c2c8c904050bb47be42d.js
27
- - tools/cmdtlmserver/BarColumn-BuJ6MTYG-cd72ee4fac54e0162c5b.js
28
- - tools/cmdtlmserver/BlockWidget-B_JwY8-N-4d0fd7f8eaf32c3149fa.js
29
- - tools/cmdtlmserver/ButtonWidget-Cd4M3aBD-c6e6ee5a4de20cee38c4.js
30
- - tools/cmdtlmserver/CanvasWidget-CpKdOgTG-e21cfaf765f87dc06820.js
31
- - tools/cmdtlmserver/CanvasdotWidget-zYbI5LAw-75b3ab3135056a71bd66.js
32
- - tools/cmdtlmserver/CanvasimageWidget--ORQEPj6-c58343b2fe7598056f45.js
33
- - tools/cmdtlmserver/CanvasimagevalueWidget-CtAtYHRm-70ebc4e8daa927c22814.js
34
- - tools/cmdtlmserver/CanvaslabelWidget-DWoROb6o-476ec50948cf48d49fbd.js
35
- - tools/cmdtlmserver/CanvaslabelvalueWidget-A4UbtwEc-1c361cc4b4b5146a5d33.js
36
- - tools/cmdtlmserver/CanvaslineWidget-BBGi0nrb-d4088e55a3153f2ccb95.js
37
- - tools/cmdtlmserver/CanvaslinevalueWidget-C_9OkL7f-ffe44fffbe9c6f58dd9e.js
38
- - tools/cmdtlmserver/CheckbuttonWidget-CTJg8Ypg-e7b7bf6b3dd279023328.js
39
- - tools/cmdtlmserver/CmdPacketsTab-f0bc4223a524614b062f.js
40
- - tools/cmdtlmserver/CmdTlmServer-bc76235d10c09682c6e2.js
41
- - tools/cmdtlmserver/ComboboxWidget-DWiMZZk8-656b04f7d9af94bd5d42.js
42
- - tools/cmdtlmserver/DateWidget-C7GSh68_-13f0f32ea6e8efc4871a.js
43
- - tools/cmdtlmserver/DetailsDialog-B2l0BNc2-9ae1d4713aeae76dbd5d.js
44
- - tools/cmdtlmserver/DynamicWidget-CfMtj7H8-925a3fc3c572312a55a3.js
45
- - tools/cmdtlmserver/FormatvalueWidget-CZJdsUAq-bb32367559b73c0909bc.js
46
- - tools/cmdtlmserver/Graph-DZBpdSgR-f56dde00f81280043da9.js
47
- - tools/cmdtlmserver/GraphWidget-CHm4bhMI-44dd778434539663613d.js
48
- - tools/cmdtlmserver/HorizontalWidget-B2skpV1m-b23f5fd3c367fd63ccd6.js
49
- - tools/cmdtlmserver/HorizontalboxWidget-BI0WZP5M-ee4fbb561897d0ecd67f.js
50
- - tools/cmdtlmserver/HorizontallineWidget-AmxVeXcU-288549f981a254098664.js
51
- - tools/cmdtlmserver/IframeWidget-DcqRMhyW-5e1bb93e1aa72c466dd2.js
52
- - tools/cmdtlmserver/ImageLoader-ly4zoGpO-b6ef72444fb0db18f0a6.js
53
- - tools/cmdtlmserver/ImageviewerWidget-cmDHcmW4-f29c44e7be2549619a02.js
54
- - tools/cmdtlmserver/InterfacesTab-ef2e279c2d974542fbb7.js
55
- - tools/cmdtlmserver/LabelWidget-Bemw8Erq-77bfb932644b19401509.js
56
- - tools/cmdtlmserver/LabelledWidget-Cb7EvtUG-21700e23054272de0cdf.js
57
- - tools/cmdtlmserver/LabelprogressbarWidget-qYgrGqLY-afe2e284394185569250.js
58
- - tools/cmdtlmserver/LabelsparklineWidget-CMklq9-f-89ac388088ab17b0d9b2.js
59
- - tools/cmdtlmserver/LabelvalueWidget-NjCMgiYL-c36a0b089904315582dd.js
60
- - tools/cmdtlmserver/LabelvaluedescWidget-Dflulqm7-b5d359d3b572346f63af.js
61
- - tools/cmdtlmserver/LabelvaluelimitsbarWidget-M34NDk2S-e8550809276767a62c80.js
62
- - tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Cchaw_-k-8b4ee4b4717aaff157c9.js
63
- - tools/cmdtlmserver/LabelvaluerangebarWidget-7pEykAm3-5dfe07da7d1638b771d3.js
64
- - tools/cmdtlmserver/Layout-BNvQKlyy-42669883439252bc6d22.js
65
- - tools/cmdtlmserver/LedWidget-_EA7ZKM8-1787942a8f24943d5f0c.js
66
- - tools/cmdtlmserver/LimitsbarWidget-DdoQf46y-a99c661845df64dcf68d.js
67
- - tools/cmdtlmserver/LimitscolorWidget-Cv0umnVo-3ebe584cf417b4b72ad0.js
68
- - tools/cmdtlmserver/LimitscolumnWidget-CnCQtxim-7d2c6a4a3ac5022d2e6b.js
69
- - tools/cmdtlmserver/LinegraphWidget-ekyQoR7x-6ccbac58fdd534b9d86e.js
70
- - tools/cmdtlmserver/MatrixbycolumnsWidget-IBUcGNF7-6e6e8ca8f95b59321550.js
71
- - tools/cmdtlmserver/ProgressbarWidget-CnveFZVh-39dfa34c59474909f2f1.js
72
- - tools/cmdtlmserver/RadiobuttonWidget-hWLrCb8W-4267747702f7f998ed48.js
73
- - tools/cmdtlmserver/RadiogroupWidget-DK1fphkh-4240a6df70fa8dca51a1.js
74
- - tools/cmdtlmserver/RangebarWidget-vspY8CGV-ebdba021106feba919b8.js
75
- - tools/cmdtlmserver/RawDialog-2e14a913b76847da4ba9.js
76
- - tools/cmdtlmserver/RollupWidget-07pNcXQV-ba5e4005c086c12c06ec.js
77
- - tools/cmdtlmserver/RoutersTab-4a1f6189bc2c16e48e45.js
78
- - tools/cmdtlmserver/ScrollwindowWidget-BcbyrYUo-10281c7d6b14389eed73.js
79
- - tools/cmdtlmserver/SignalWidget-BDp5sUHj-a65e9d98e5ee38497414.js
80
- - tools/cmdtlmserver/SpacerWidget-DcOnQ1yI-85ede0dfdaf5332a75b5.js
81
- - tools/cmdtlmserver/SparklineWidget-CVglnlAm-70c13afcad82b1af8856.js
82
- - tools/cmdtlmserver/StatusTab-81f0151e31400a845091.js
83
- - tools/cmdtlmserver/TabbookWidget-p51Oa7Ru-5c77c55d3ca8c8eea2a2.js
84
- - tools/cmdtlmserver/TargetsTab-d315b150506412fd940d.js
85
- - tools/cmdtlmserver/TextboxWidget-DM-XX97e-a610e3330b16f7d8c357.js
86
- - tools/cmdtlmserver/TextfieldWidget-7cYHAgH8-cc633ee5c7fdc2827af2.js
87
- - tools/cmdtlmserver/TimeWidget-EvQJyu6x-8891f75d3167aa20e23f.js
88
- - tools/cmdtlmserver/TitleWidget-6ddfJuqd-3bbefc62c80d7df57c87.js
89
- - tools/cmdtlmserver/TlmPacketsTab-572f438a925f8dc917d2.js
90
- - tools/cmdtlmserver/Updater-7264a034babccd19df9b.js
91
- - tools/cmdtlmserver/VWidget-P-X9ffkl-c8b72dc1178eb3c8e2cd.js
92
- - tools/cmdtlmserver/ValueWidget-DAUGuQ9f-5aefd22f107264b78496.js
93
- - tools/cmdtlmserver/ValuelimitsbarWidget-DmLUXw0I-a8b62fb2384528e1f282.js
94
- - tools/cmdtlmserver/ValuelimitscolumnWidget-DDmo8wHJ-452d429087199fd8fd8f.js
95
- - tools/cmdtlmserver/ValuerangebarWidget-CbzWSWq3-36e7a304c66d8858de05.js
96
- - tools/cmdtlmserver/VerticalWidget-BuKinn_c-22586ad6fe541c906104.js
97
- - tools/cmdtlmserver/VerticalboxWidget-C0zD5h0O-b1a55e28b18d8849b8ef.js
98
- - tools/cmdtlmserver/Widget-BIXl-Pk5-d010324d778e54fd1761.js
99
- - tools/cmdtlmserver/main-465ec4b7b5416a57d004.js
25
+ - tools/cmdtlmserver/ArrayWidget-DLfNWDzN-1e8a3face2ed377ee14b.js
26
+ - tools/cmdtlmserver/ArrayplotWidget-CoRsUxHG-9354353a435dca29d91b.js
27
+ - tools/cmdtlmserver/BarColumn-DHP-zQ4R-13ea24b96ea1a8d35a6a.js
28
+ - tools/cmdtlmserver/BlockWidget-BmHSFvOq-9bcd30fb55af2e9adfcc.js
29
+ - tools/cmdtlmserver/ButtonWidget-C3ZWRjZZ-a09343e371e16d86fb23.js
30
+ - tools/cmdtlmserver/CanvasWidget-CL-XzPF4-fa3331797f3605b54876.js
31
+ - tools/cmdtlmserver/CanvasdotWidget-D8Y9DgVE-202754fdc6e1f8bc69b8.js
32
+ - tools/cmdtlmserver/CanvasimageWidget-DHSGK_tD-706d31ac92632aa26d40.js
33
+ - tools/cmdtlmserver/CanvasimagevalueWidget-Btt_fQfC-6211eb7aa7d153f644a5.js
34
+ - tools/cmdtlmserver/CanvaslabelWidget-BF_8RTjv-ec3af661f0fe151ab181.js
35
+ - tools/cmdtlmserver/CanvaslabelvalueWidget-scbwaujI-6f6e59336806beadc6d3.js
36
+ - tools/cmdtlmserver/CanvaslineWidget-gRvm_-TT-6d1e9b263ef79c1b1647.js
37
+ - tools/cmdtlmserver/CanvaslinevalueWidget-CljziRek-4250356d341ec24d29f4.js
38
+ - tools/cmdtlmserver/CheckbuttonWidget-BOabI_jE-e4387e7d27cd938ef89b.js
39
+ - tools/cmdtlmserver/CmdPacketsTab-7e20541da3036a84b375.js
40
+ - tools/cmdtlmserver/CmdTlmServer-7b54c774fee5033c13bd.js
41
+ - tools/cmdtlmserver/ComboboxWidget-BLXNYFiY-d5fd5406c480881fb5d4.js
42
+ - tools/cmdtlmserver/DataFlowsTab-368d1fdb4209d66844af.js
43
+ - tools/cmdtlmserver/DateWidget-BTqLCtLS-202c9085c8a667b42627.js
44
+ - tools/cmdtlmserver/DetailsDialog-BNCS3QAe-2191292a9b1ab8d8ae75.js
45
+ - tools/cmdtlmserver/DynamicWidget-CfMtj7H8-3e0eec47273fa4c63aee.js
46
+ - tools/cmdtlmserver/FormatvalueWidget-CLYx8qbg-2913871219c14842cecb.js
47
+ - tools/cmdtlmserver/Graph-BliBYJxD-bb80bc8984750d2f31de.js
48
+ - tools/cmdtlmserver/GraphWidget-Cb6Ozf54-52583b1f0ff33268742b.js
49
+ - tools/cmdtlmserver/HorizontalWidget-AY2M01qP-c726ad4d7b9989195780.js
50
+ - tools/cmdtlmserver/HorizontalboxWidget-2MEKvq_C-caebeb4bc79733504840.js
51
+ - tools/cmdtlmserver/HorizontallineWidget-DgpOPA7q-3e3c6a88bc67fe5f390c.js
52
+ - tools/cmdtlmserver/IframeWidget-UKKUl7k5-58809376594a655a5f2a.js
53
+ - tools/cmdtlmserver/ImageLoader-C-CIL4YD-bc35b32770c8a5c44e5e.js
54
+ - tools/cmdtlmserver/ImageviewerWidget-DhuQH5Io-78d2c2dd21a053a89c51.js
55
+ - tools/cmdtlmserver/InterfaceFlowChart-5d2b3bb2659991d3b6a7.js
56
+ - tools/cmdtlmserver/InterfacesTab-3009a17e96e92ac1e70a.js
57
+ - tools/cmdtlmserver/LabelWidget-SO9zqcNN-a13de181566f05837b14.js
58
+ - tools/cmdtlmserver/LabelledWidget-DWoM5AJ5-ec761858f941c15ff604.js
59
+ - tools/cmdtlmserver/LabelprogressbarWidget-D3vnkvQZ-af0accd1118f3923a9a3.js
60
+ - tools/cmdtlmserver/LabelsparklineWidget-DO0T-Jot-ecf847a6e96a08b254ab.js
61
+ - tools/cmdtlmserver/LabelvalueWidget-B6BbNFnk-3d45d1e6db6b2f8d29a5.js
62
+ - tools/cmdtlmserver/LabelvaluedescWidget-CxfL-H9C-3a42edd68921e90d31ca.js
63
+ - tools/cmdtlmserver/LabelvaluelimitsbarWidget-BT5k9mHv-52975b7494653d8c515f.js
64
+ - tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DUbmxh4p-f295e97e30657fccc248.js
65
+ - tools/cmdtlmserver/LabelvaluerangebarWidget-DexAc2UB-f151f5b53d9d4b184b06.js
66
+ - tools/cmdtlmserver/Layout-Dd6dRf3R-ef7bd13b7ea3d133ccb0.js
67
+ - tools/cmdtlmserver/LedWidget-D1RwHb_V-260ff4715a4a88a41508.js
68
+ - tools/cmdtlmserver/LimitsbarWidget-ClOmoV50-48e5673dec9cb6e22731.js
69
+ - tools/cmdtlmserver/LimitscolorWidget-CBUoEYKp-41ffd9d133666ed0f970.js
70
+ - tools/cmdtlmserver/LimitscolumnWidget-hsHkmY-_-a3f6218974e5498090eb.js
71
+ - tools/cmdtlmserver/LinegraphWidget-CXrKtxOo-be6c9cdfe9742e8d3bbc.js
72
+ - tools/cmdtlmserver/MatrixbycolumnsWidget-CsogVU9c-8bc60a5aed8d3cabf27c.js
73
+ - tools/cmdtlmserver/ProgressbarWidget-CO6CEkxP-4f04f42e3b29e4f6badf.js
74
+ - tools/cmdtlmserver/RadiobuttonWidget-DrxUclws-e53a8ceae55c8d39b1bc.js
75
+ - tools/cmdtlmserver/RadiogroupWidget-DN9C38cg-d3e2cee52f161e968cda.js
76
+ - tools/cmdtlmserver/RangebarWidget-5uQTfLMP-3dc94e1929eab734826a.js
77
+ - tools/cmdtlmserver/RawBuffer-5d94750d4746b711f55b.js
78
+ - tools/cmdtlmserver/RawDialog-772a1282457ac36fd7a8.js
79
+ - tools/cmdtlmserver/RollupWidget-B0DCULnu-75370b4e7a1f88bdc783.js
80
+ - tools/cmdtlmserver/RoutersTab-2e3fa3d19fb8969dfab5.js
81
+ - tools/cmdtlmserver/ScrollwindowWidget-BOkZQgtf-5862d90a0a854f7253c4.js
82
+ - tools/cmdtlmserver/SignalWidget-Cis0Xkea-6a51ce3da68ffd3d9ac5.js
83
+ - tools/cmdtlmserver/SpacerWidget-CLcqC2Qk-81d85af00986f3f5b056.js
84
+ - tools/cmdtlmserver/SparklineWidget-CTp83eZ--bfbe9dc264b948bfeccf.js
85
+ - tools/cmdtlmserver/StatusTab-37f142b5a919a517b454.js
86
+ - tools/cmdtlmserver/TabbookWidget-uucd-zsX-f9571b1707f3d2313c74.js
87
+ - tools/cmdtlmserver/TargetsTab-31817182dd194fae103f.js
88
+ - tools/cmdtlmserver/TextboxWidget-C2n38ti5-70eef7e9cc17f76c4b45.js
89
+ - tools/cmdtlmserver/TextfieldWidget--HTv9ddk-4f61e63b99bb27d3d0f9.js
90
+ - tools/cmdtlmserver/TimeWidget-CPNVZaUM-84e9c1d910942f7918cb.js
91
+ - tools/cmdtlmserver/TitleWidget-Cp0cb6V8-26da1f1345ebd0e2d8d2.js
92
+ - tools/cmdtlmserver/TlmPacketsTab-8ab3463162d1614ac633.js
93
+ - tools/cmdtlmserver/Updater-837ca86e536f4a3bdfa3.js
94
+ - tools/cmdtlmserver/VWidget-DQGJRgAk-db0f8060669e1acf20ea.js
95
+ - tools/cmdtlmserver/ValueWidget-Bk1RFjks-404325b51d8960d194ea.js
96
+ - tools/cmdtlmserver/ValuelimitsbarWidget-C0HIBYh2-b127b268f152554e33fc.js
97
+ - tools/cmdtlmserver/ValuelimitscolumnWidget-BTT90uyX-1d351782a10b310813e7.js
98
+ - tools/cmdtlmserver/ValuerangebarWidget-CcQw_XK9-4bfb89b00ab2e5f9864a.js
99
+ - tools/cmdtlmserver/VerticalWidget-CNtFQv3R-7c9384e32e2a84bdb6a3.js
100
+ - tools/cmdtlmserver/VerticalboxWidget-Yxmz1SnU-f6d8fdccf06693ea3492.js
101
+ - tools/cmdtlmserver/Widget-LsyjS7ZS-7441069f38e76756cf77.js
102
+ - tools/cmdtlmserver/main-f371259352e08317c745.js
100
103
  - tools/cmdtlmserver/main.js
101
- - tools/cmdtlmserver/services-fc57b62f64eeefd0928c.js
104
+ - tools/cmdtlmserver/services-eb1403f6c88517815ca2.js
102
105
  homepage: https://github.com/OpenC3/cosmos
103
106
  licenses:
104
107
  - AGPL-3.0-only
@@ -111,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
114
  requirements:
112
115
  - - ">="
113
116
  - !ruby/object:Gem::Version
114
- version: '0'
117
+ version: '3.0'
115
118
  required_rubygems_version: !ruby/object:Gem::Requirement
116
119
  requirements:
117
120
  - - ">="
@@ -1,2 +0,0 @@
1
- System.register(["./main-465ec4b7b5416a57d004.js","vue","./DetailsDialog-B2l0BNc2-9ae1d4713aeae76dbd5d.js","single-spa","./VWidget-P-X9ffkl-c8b72dc1178eb3c8e2cd.js","vue-router","vuex","vuetify","./Widget-BIXl-Pk5-d010324d778e54fd1761.js"],(function(D,I){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,k;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{k=t.h},null,null,null,null],execute:(function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[k],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let n="",V=" ",B=`
2
- `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?n+=sprintf(this.formatter,m):n+=m,o+=1,o%this.itemsPerRow===0?(o=0,n+=B):n+=V;return n.trim()}else return e}}},S={class:"array-widget-container"};function P(e,r,n,V,B,o){const m=a("v-textarea"),_=a("v-list-item-title"),z=a("v-list-item"),M=a("v-list"),N=a("v-menu"),j=a("details-dialog");return u(),c("div",S,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(N,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=s=>e.contextMenuShown=s),target:[e.x,e.y]},{default:l(()=>[i(M,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(s,E)=>(u(),v(z,{key:E,onClick:w(s.action,["stop"])},{default:l(()=>[i(_,null,{default:l(()=>[y(x(s.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(j,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=s=>e.viewDetails=s)},null,8,["target-name","packet-name","item-name","modelValue"])])}const L=D("default",h(t,[["render",P],["__scopeId","data-v-62b9e9e1"]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./main-465ec4b7b5416a57d004.js","./GraphWidget-CHm4bhMI-44dd778434539663613d.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-BIXl-Pk5-d010324d778e54fd1761.js"],(function(m,k){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.f,h=s.F},s=>{d=s.M},s=>{u=s.createElementBlock,p=s.openBlock},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:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const w=m("default",c(s,[["render",g]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","./main-465ec4b7b5416a57d004.js"],(function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.W}],execute:(function(){const s=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(){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,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let 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 e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},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})}}})})}}));
@@ -1,2 +0,0 @@
1
- System.register(["./main-465ec4b7b5416a57d004.js","vue","./DetailsDialog-B2l0BNc2-9ae1d4713aeae76dbd5d.js","single-spa","./VWidget-P-X9ffkl-c8b72dc1178eb3c8e2cd.js","vue-router","vuex","vuetify","./Widget-BIXl-Pk5-d010324d778e54fd1761.js"],(function(S,z){"use strict";var u,a,m,h,s,p,g,o,w,f,v,y,x,k,C,V;return{setters:[e=>{u=e.d},e=>{a=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,k=e.toDisplayString},e=>{C=e.P},null,e=>{V=e.h},null,null,null,null],execute:(function(){const e={components:{DetailsDialog:C},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let P=" ",B=`
2
- `,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=B):i%this.bytesPerWord===0&&(r+=P)}else r=t;return r}}},D={class:"block-widget-container"};function W(t,r,P,B,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),M=a("v-list-item"),_=a("v-list"),F=a("v-menu"),N=a("details-dialog");return h(),m("div",D,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(F,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(_,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,b)=>(h(),v(M,{key:b,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(k(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(N,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const R=S("default",u(e,[["render",W],["__scopeId","data-v-4d4589c2"]]))})}}));
@@ -1,2 +0,0 @@
1
- System.register(["./main-465ec4b7b5416a57d004.js","vue","single-spa","./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue-router","vuex","vuetify"],(function(exports,module){"use strict";var d,w,NA,WA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,w=e.w,NA=e.N,WA=e.W},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:(function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},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?(NA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?NA.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 NA.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();w.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await NA.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await w.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await w.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,p,a,r){const n=resolveComponent("v-spacer"),V=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),v=resolveComponent("v-container"),f=resolveComponent("v-card-text"),u=resolveComponent("v-card"),x=resolveComponent("v-dialog");return openBlock(),createBlock(x,{modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(V,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(v,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),type:"error",dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",outlined:"",disabled:r.disableButtons,"data-test":"reject",onClick:withModifiers(r.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve",onClick:withModifiers(r.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(S,[["render",E],["__scopeId","data-v-6e010bad"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},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 WA},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});NA.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,p,a,r){const n=resolveComponent("v-btn"),V=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),v=resolveComponent("v-dialog"),f=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(v,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(V,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:r.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{onClick:r.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(f,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Layout-BNvQKlyy-42669883439252bc6d22.js","vue","./main-465ec4b7b5416a57d004.js","./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue-router","single-spa","vuex","vuetify"],(function(p,f){"use strict";var i,s,n,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{s=e.createElementBlock,n=e.openBlock,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,w,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 y=p("default",g(e,[["render",h],["__scopeId","data-v-47bdfc3c"]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:(function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,d,k){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 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","./ImageLoader-ly4zoGpO-b6ef72444fb0db18f0a6.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(m,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.o},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:(function(){const e={mixins:[i,n],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,N,r){return t.imageUrl?(l(),s("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","./ImageLoader-ly4zoGpO-b6ef72444fb0db18f0a6.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(v,S){"use strict";var m,d,l,n,h,o,g,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,o=t.createCommentVNode,g=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:(function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return n(),l("g",null,[(n(!0),l(g,null,p(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):o("",!0)])}const $=v("default",f(t,[["render",k]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:(function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,k,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:(function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,d,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(i,p){"use strict";var l,n,s,a,c;return{setters:[e=>{l=e.o},e=>{n=e.createElementBlock,s=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:(function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,k,d,x,m){return s(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:(function(){const t={mixins:[s],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)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Widget-BIXl-Pk5-d010324d778e54fd1761.js","vue","./main-465ec4b7b5416a57d004.js","vue-router","single-spa","vuex","vuetify"],(function(c,h){"use strict";var t,a,n,o,s,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,o=e.openBlock,s=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:(function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,k,y,l,b){const m=a("v-checkbox");return o(),n(m,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:s(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))})}}));
@@ -1 +0,0 @@
1
- System.register(["./Updater-7264a034babccd19df9b.js","./RawDialog-2e14a913b76847da4ba9.js","vue","./main-465ec4b7b5416a57d004.js","./services-fc57b62f64eeefd0928c.js","vue-router","single-spa","vuex","vuetify"],(function(y,B){"use strict";var k,v,r,p,c,i,o,u,m,w,h,b,f;return{setters:[t=>{k=t.U},t=>{v=t.R},t=>{r=t.resolveComponent,p=t.createBlock,c=t.openBlock,i=t.withCtx,o=t.createVNode,u=t.createElementBlock,m=t.createTextVNode,w=t.toDisplayString,h=t.Fragment,b=t.renderList},t=>{f=t._},null,null,null,null,null],execute:(function(){const t={components:{RawDialog:v},mixins:[k],props:{tabId:{type:Number,required:!0},curTab:{type:Number,required:!0}},data(){return{search:"",data:[],headers:[{title:"Target Name",key:"target_name"},{title:"Packet Name",key:"packet_name"},{title:"Packet Count",key:"count"},{title:"View Raw",key:"view_raw"},{title:"View In Command Sender",key:"view_in_cmd_sender"}],rawDialogs:[],visible:null}},created(){this.api.get_target_names().then(a=>{a.map(e=>{this.api.get_all_cmd_names(e).then(s=>{this.data=this.data.concat(s.map(d=>({target_name:e,packet_name:d,count:0})))})})})},methods:{focus(a){this.rawDialogs.map(s=>{s.zIndex=1});let e=this.rawDialogs.indexOf(a);this.rawDialogs[e].zIndex=2},openViewRaw(a,e){this.rawDialogs.map(s=>{s.zIndex=1}),this.rawDialogs=this.rawDialogs.concat({target_name:a,packet_name:e,zIndex:2})},closeRawDialog(a){let e=this.rawDialogs.indexOf(a);this.rawDialogs.splice(e,1)},openCmdSender(a,e){window.open(`/tools/cmdsender/${encodeURIComponent(a)}/${encodeURIComponent(e)}/`,"_blank")},currentItems(a){this.visible=a.map(e=>[e.columns.target_name,e.columns.packet_name])},update(){this.tabId==this.curTab&&this.visible!==null&&this.api.get_cmd_cnts(this.visible).then(a=>{for(let e=0;e<a.length;e++){let s=this.data.findIndex(d=>d.target_name===this.visible[e][0]&&d.packet_name===this.visible[e][1]);this.data[s].count=a[e]}})}}},C={key:0};function D(a,e,s,d,l,_){const I=r("v-spacer"),V=r("v-text-field"),N=r("v-card-title"),x=r("v-btn"),R=r("v-icon"),U=r("v-data-table"),S=r("raw-dialog"),z=r("v-card");return c(),p(z,null,{default:i(()=>[o(N,{class:"d-flex align-center justify-content-space-between"},{default:i(()=>[m(w(l.data.length)+" Command Packets ",1),o(I),o(V,{modelValue:l.search,"onUpdate:modelValue":e[0]||(e[0]=n=>l.search=n),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),o(U,{headers:l.headers,items:l.data,search:l.search,"items-per-page":10,"items-per-page-options":[10,20,50,100],"sort-by":[{key:"target_name"},{key:"packet_name"}],"data-test":"cmd-packets-table","onUpdate:currentItems":_.currentItems},{"item.view_raw":i(({item:n})=>[o(x,{block:"",color:"primary",disabled:n.count<1,onClick:g=>_.openViewRaw(n.target_name,n.packet_name)},{default:i(()=>[...e[1]||(e[1]=[m(" View Raw ",-1)])]),_:1},8,["disabled","onClick"])]),"item.view_in_cmd_sender":i(({item:n})=>[n.target_name==="UNKNOWN"?(c(),u("span",C,"N/A")):(c(),p(x,{key:1,block:"",color:"primary",onClick:g=>_.openCmdSender(n.target_name,n.packet_name)},{default:i(()=>[e[3]||(e[3]=m(" View In Command Sender ",-1)),o(R,{end:""},{default:i(()=>[...e[2]||(e[2]=[m(" mdi-open-in-new ",-1)])]),_:1})]),_:1},8,["onClick"]))]),_:1},8,["headers","items","search","onUpdate:currentItems"]),(c(!0),u(h,null,b(l.rawDialogs,n=>(c(),p(S,{key:n.target_name+"_"+n.packet_name,type:"Command","target-name":n.target_name,"packet-name":n.packet_name,visible:!0,"z-index":n.zIndex,onClose:g=>_.closeRawDialog(n),onFocus:g=>_.focus(n)},null,8,["target-name","packet-name","z-index","onClose","onFocus"]))),128))]),_:1})}const T=y("default",f(t,[["render",D]]))})}}));