openc3-cosmos-tool-cmdtlmserver 6.3.0 → 6.4.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdtlmserver/{ArrayWidget-BbsN1dzF-ee2cfc7dad123cfaccf5.js → ArrayWidget-DAZApfkV-f88e557be03eaff0196a.js} +2 -2
  3. data/tools/cmdtlmserver/{ArrayplotWidget-CCKEyYIx-a00019e86008704efc46.js → ArrayplotWidget-BfsxDplv-ba452c09191ab9d2c9eb.js} +1 -1
  4. data/tools/cmdtlmserver/{BarColumn-C6p07yWK-a95a551de7a97b26a986.js → BarColumn-q0nAsvrd-979fd197d5ebe0b26180.js} +1 -1
  5. data/tools/cmdtlmserver/BlockWidget-SDCUWcMQ-bf304a4da8db5487fae4.js +2 -0
  6. data/tools/cmdtlmserver/{ButtonWidget-CtfJzCBR-9a325bb9d73eea161bde.js → ButtonWidget-BVMjwC19-ede0b497a027ec794404.js} +2 -2
  7. data/tools/cmdtlmserver/CanvasWidget-bVkufjRQ-9dcac9d39e370aa10c52.js +1 -0
  8. data/tools/cmdtlmserver/CanvasdotWidget-DpniFfca-f90aa75b137ff18b3798.js +1 -0
  9. data/tools/cmdtlmserver/{CanvasimageWidget-BPlj5QYK-148404626d26f39ae7a4.js → CanvasimageWidget-DHOSz-dJ-5a5ba6522191031db873.js} +1 -1
  10. data/tools/cmdtlmserver/{CanvasimagevalueWidget-DVFGLt8f-228223ab8bc7ab0b61c6.js → CanvasimagevalueWidget-zrURWWUL-74842a2e8e5704161b0c.js} +1 -1
  11. data/tools/cmdtlmserver/CanvaslabelWidget-D-XAMifp-ef701aeff5463ee972a8.js +1 -0
  12. data/tools/cmdtlmserver/{CanvaslabelvalueWidget-B7yIDmsn-725d0c4e2daf6bda08ec.js → CanvaslabelvalueWidget-BsIdBtEb-fb59e3539c9504cab09e.js} +1 -1
  13. data/tools/cmdtlmserver/{CanvaslineWidget-BICdxX0Q-7c180d081ca1a967d997.js → CanvaslineWidget-CA2aPGRg-49781b78cfbb16c58a8c.js} +1 -1
  14. data/tools/cmdtlmserver/{CanvaslinevalueWidget-Cq-Ddh0P-bdf272b782303e2bc8bb.js → CanvaslinevalueWidget-J7epKRlo-edd46a4b0deeef5ae0ed.js} +1 -1
  15. data/tools/cmdtlmserver/CheckbuttonWidget-ByH-PDRG-3155a1e301a42f78cfd7.js +1 -0
  16. data/tools/cmdtlmserver/{CmdPacketsTab-8938018b2c20935a31ff.js → CmdPacketsTab-a7526cd69bdab193ee5c.js} +1 -1
  17. data/tools/cmdtlmserver/{CmdTlmServer-3100bab0f78a7952a5f1.js → CmdTlmServer-309d57f324c500380120.js} +2 -2
  18. data/tools/cmdtlmserver/{ComboboxWidget-CtyKbEWb-7925168021879bcae865.js → ComboboxWidget-Bdm_fMzW-35d26cf71d2c4968d59f.js} +1 -1
  19. data/tools/cmdtlmserver/DateWidget-BaQqthC7-cdd37a33ebab941131bd.js +1 -0
  20. data/tools/cmdtlmserver/{DetailsDialog-DmEC5BTs-ae29c74b5a12a811ab58.js → DetailsDialog-C5jf8o0K-6c95c0f291529e1685c1.js} +1 -1
  21. data/tools/cmdtlmserver/{DynamicWidget-CfMtj7H8-dda9e71246a61119ef51.js → DynamicWidget-CfMtj7H8-2cf72b6eea3dd0c269ee.js} +1 -1
  22. data/tools/cmdtlmserver/FormatvalueWidget--H5B9i_Y-ea7b65d27cda96da7981.js +1 -0
  23. data/tools/cmdtlmserver/Graph-M382Zo8o-85a1f138f1c956abdd93.js +1 -0
  24. data/tools/cmdtlmserver/{GraphWidget-DurWDmpg-1d3f53de02fa1378a1c8.js → GraphWidget-_YOGDD1U-ab62f3ec1ddfc73d8261.js} +1 -1
  25. data/tools/cmdtlmserver/{HorizontalWidget-Cd_wl1b3-b4a1220511cbad208895.js → HorizontalWidget-D_gzrOWs-fdee514a9c5af4e3291e.js} +1 -1
  26. data/tools/cmdtlmserver/HorizontalboxWidget-GDcjO-UB-7c5f8b33fb5940c687c5.js +1 -0
  27. data/tools/cmdtlmserver/HorizontallineWidget-DZvOYFxf-66653528e98b7e7a6854.js +1 -0
  28. data/tools/cmdtlmserver/{IframeWidget-BPerHCCa-89189a6be7985eb8e47b.js → IframeWidget-CuUav9b3-f0fb66709947f9c31faa.js} +1 -1
  29. data/tools/cmdtlmserver/{ImageLoader-4N-7Gj61-e6e724f54c4470cc6855.js → ImageLoader-3KLKJ5mV-6d450caf10714a1c2108.js} +1 -1
  30. data/tools/cmdtlmserver/{ImageviewerWidget-Cw_H_HmZ-79d50f4df25f701d60c0.js → ImageviewerWidget-BMZ6REN4-af83de8358d437aabaaa.js} +1 -1
  31. data/tools/cmdtlmserver/{InterfacesTab-2d486c0457a95cc3e028.js → InterfacesTab-99bb37f3330ba2d25c87.js} +1 -1
  32. data/tools/cmdtlmserver/{LabelWidget-xrmcVeq8-870ee165781b2cf65c51.js → LabelWidget-oh6FIG6s-9270f681e463343ddbc3.js} +1 -1
  33. data/tools/cmdtlmserver/LabelledWidget-Bic36les-ef154fc814c821ffb0f2.js +1 -0
  34. data/tools/cmdtlmserver/LabelprogressbarWidget-CqIiGoDb-84eeed45dde02cb11ba1.js +1 -0
  35. data/tools/cmdtlmserver/LabelsparklineWidget-DLhmqO02-36d951bb7e324fe2527f.js +1 -0
  36. data/tools/cmdtlmserver/{LabelvalueWidget-CQ06wWDK-1796e7cae5e984c98aaf.js → LabelvalueWidget-BefwSSVq-4e84fe0e93bb57974749.js} +1 -1
  37. data/tools/cmdtlmserver/{LabelvaluedescWidget-Bo8zT01X-80efb25b4bedad034d9d.js → LabelvaluedescWidget-NxrCzznm-498585155de94a9d642a.js} +1 -1
  38. data/tools/cmdtlmserver/{LabelvaluelimitsbarWidget-BucTw8Yk-3294f1f5165c95dd609e.js → LabelvaluelimitsbarWidget-pq7qoolL-7fbe95c93b160ed39797.js} +1 -1
  39. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-edkpogsl-4d1dd09c79a5c7f9f634.js +1 -0
  40. data/tools/cmdtlmserver/{LabelvaluerangebarWidget-D8cbfXFM-ed365f14f0ddd33fc1ee.js → LabelvaluerangebarWidget-DpJNv9dh-e87dc2ccc07c6045b227.js} +1 -1
  41. data/tools/cmdtlmserver/{Layout-Tf--nruw-77595e15c57a061b0dba.js → Layout-B0hvhBQO-6d8d3e486762393ef9be.js} +1 -1
  42. data/tools/cmdtlmserver/{LedWidget-qH_FthkK-1cfbae497162dcc3aefa.js → LedWidget--4eSxBnn-849d3f80225bb6ea4279.js} +1 -1
  43. data/tools/cmdtlmserver/LimitsbarWidget-BQaumgRt-b86ec2d9b3c30d9a79e0.js +1 -0
  44. data/tools/cmdtlmserver/{LimitscolorWidget-c6Qa6su7-87921f3fb3e7afc5de79.js → LimitscolorWidget-BBF9sRtF-f1dab8dc05417d5099ae.js} +1 -1
  45. data/tools/cmdtlmserver/{LimitscolumnWidget-CcLs_443-604b2033bbe5db32cec6.js → LimitscolumnWidget-DZZtSoXw-b96074327af0a4eb8f1a.js} +1 -1
  46. data/tools/cmdtlmserver/LinegraphWidget-DTLZmyWs-76dc3e7fb815d8df3c63.js +1 -0
  47. data/tools/cmdtlmserver/MatrixbycolumnsWidget-dpgZz4wR-899f52fcc1cf07680726.js +1 -0
  48. data/tools/cmdtlmserver/{ProgressbarWidget-iYGw8-Dc-ebd0bd2f7dd1a5a808fc.js → ProgressbarWidget-7cYr8136-8a806c19acd9b2256deb.js} +1 -1
  49. data/tools/cmdtlmserver/RadiobuttonWidget-DTfn-7F2-44820ea50a2cf744199c.js +1 -0
  50. data/tools/cmdtlmserver/RadiogroupWidget-DWvTpw94-686f3de581689bdf40ea.js +1 -0
  51. data/tools/cmdtlmserver/{RangebarWidget-D_zGTtCa-8bfd7bef4ad63b9af243.js → RangebarWidget-CG2Y7eYp-c1a4a0e1ba7dc72e4ffc.js} +1 -1
  52. data/tools/cmdtlmserver/RawDialog-9d943e44f3112342601e.js +11 -0
  53. data/tools/cmdtlmserver/{RollupWidget-Dolsixyt-64fd8c2e5990b362afb3.js → RollupWidget-C6HKTfCR-e7ff42b2d6df403e4189.js} +1 -1
  54. data/tools/cmdtlmserver/{RoutersTab-12cdceede3476c777ebf.js → RoutersTab-c8c4095e051bd4eac1a6.js} +1 -1
  55. data/tools/cmdtlmserver/{ScrollwindowWidget-DV2nZuNi-622615ed3b3c3be199a7.js → ScrollwindowWidget-DvhBCYd2-2eda888b5878a3c9c43e.js} +1 -1
  56. data/tools/cmdtlmserver/SignalWidget-BZIoGjam-3f5bffb65296b2b4c9d3.js +1 -0
  57. data/tools/cmdtlmserver/{SpacerWidget-BH0p2OLi-d2bd2a8e1f0b4014a44f.js → SpacerWidget-YBS8RZIE-ea53c28322ecfeaf856a.js} +1 -1
  58. data/tools/cmdtlmserver/{SparklineWidget-coxi9r2g-93d3a65c88c064975334.js → SparklineWidget-BMhY9vYe-da8fa0c3c84c83859f98.js} +1 -1
  59. data/tools/cmdtlmserver/{StatusTab-84eda227fff2c85ad6b1.js → StatusTab-1c14fdf42c5eec6f89a0.js} +1 -1
  60. data/tools/cmdtlmserver/TabbookWidget-RfET19pq-2e5216e9a0e0355fdf93.js +1 -0
  61. data/tools/cmdtlmserver/TargetsTab-4550f57bc831c1f7a7eb.js +1 -0
  62. data/tools/cmdtlmserver/TextboxWidget-M8vFBSxS-ab8e94f59a6caf7ef59e.js +1 -0
  63. data/tools/cmdtlmserver/{TextfieldWidget-C08N4JE8-1068f0ee1d4002e54079.js → TextfieldWidget-Dev7lCsT-57eee147afa6de319acc.js} +1 -1
  64. data/tools/cmdtlmserver/{TimeWidget-DtwdEcFg-5a3bc19e8ab2a1804ae7.js → TimeWidget-CQzn13rQ-33c3d901e2ecc494bc4e.js} +1 -1
  65. data/tools/cmdtlmserver/TitleWidget-C4zbSian-94081f4edd1e63057002.js +1 -0
  66. data/tools/cmdtlmserver/{TlmPacketsTab-e5b98e3e4c15475a7a17.js → TlmPacketsTab-13c5610fdcc6520cc036.js} +1 -1
  67. data/tools/cmdtlmserver/{Updater-30365f17f9b4eb94ca1e.js → Updater-6429d216c3370ebd6673.js} +1 -1
  68. data/tools/cmdtlmserver/{VWidget-DQqb7NVW-4602918435743a49de41.js → VWidget-iASFPjdx-dec42be1780c3b23701d.js} +1 -1
  69. data/tools/cmdtlmserver/ValueWidget-BVI6uUVX-af1a23f95e0403600802.js +1 -0
  70. data/tools/cmdtlmserver/ValuelimitsbarWidget-BiIcery0-6faa39be217cfac99fe0.js +1 -0
  71. data/tools/cmdtlmserver/{ValuelimitscolumnWidget-QvhI6EcE-b0440ffbb0b94727592e.js → ValuelimitscolumnWidget-BiRI8GbI-ac216d8db3d2ba20fde8.js} +1 -1
  72. data/tools/cmdtlmserver/{ValuerangebarWidget-Dt3K9BnC-5a6ec326052278b4ed3d.js → ValuerangebarWidget-CtMFQu9--e26b11738302a6d54bdb.js} +1 -1
  73. data/tools/cmdtlmserver/{VerticalWidget-BIIViZgI-3d41ce14c58d12499a92.js → VerticalWidget-CRmcpQBn-9df168a6eea1affbbf4b.js} +1 -1
  74. data/tools/cmdtlmserver/VerticalboxWidget-C-qChjug-183c16ebf187f5b009d8.js +1 -0
  75. data/tools/cmdtlmserver/Widget-CFEnOKms-581f43b2be218bd79d7d.js +1 -0
  76. data/tools/cmdtlmserver/main-798cf58cd430cfe7259b.js +1503 -0
  77. data/tools/cmdtlmserver/main.js +1 -1
  78. data/tools/cmdtlmserver/services-389a1aae83969a37ebbc.js +7 -0
  79. metadata +78 -78
  80. data/tools/cmdtlmserver/BlockWidget-DlCHbqZX-c390667024b5d4780d6b.js +0 -2
  81. data/tools/cmdtlmserver/CanvasWidget-CqRlXc4r-fecb24efdf6f68a33ad2.js +0 -1
  82. data/tools/cmdtlmserver/CanvasdotWidget--Xr_KsZs-840bf70c26d7888f4d66.js +0 -1
  83. data/tools/cmdtlmserver/CanvaslabelWidget-CYNqmyP0-c9c9beb56e22552527cb.js +0 -1
  84. data/tools/cmdtlmserver/CheckbuttonWidget-B74AWeaW-de22da2f691ae5858bbf.js +0 -1
  85. data/tools/cmdtlmserver/DateWidget-BEVSczU8-95d14f0b9ce5fc0b69a3.js +0 -1
  86. data/tools/cmdtlmserver/FormatvalueWidget-DN12xymS-312eedcf339bb3a361e8.js +0 -1
  87. data/tools/cmdtlmserver/Graph-Bgo0cjl3-34cca1d79d056287c70c.js +0 -1
  88. data/tools/cmdtlmserver/HorizontalboxWidget-BcMTFBU--ebe35d30ef1038d848e8.js +0 -1
  89. data/tools/cmdtlmserver/HorizontallineWidget-CXFqHclf-fa0e898fc84d1495ab9f.js +0 -1
  90. data/tools/cmdtlmserver/LabelledWidget-D48QoyMk-8ef3423e6396375a66e4.js +0 -1
  91. data/tools/cmdtlmserver/LabelprogressbarWidget-C_950t6g-2936a8a5b4b14474e12e.js +0 -1
  92. data/tools/cmdtlmserver/LabelsparklineWidget-0KXQyPoU-da36e09f571b80924e16.js +0 -1
  93. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Dflb1hNd-a115105dee00eafa5323.js +0 -1
  94. data/tools/cmdtlmserver/LimitsbarWidget-B9lAB2RD-ba9cf8359583cfe6eeb1.js +0 -1
  95. data/tools/cmdtlmserver/LinegraphWidget-BSVYLFo1-e8a98958fba9fb2e2fb9.js +0 -1
  96. data/tools/cmdtlmserver/MatrixbycolumnsWidget-DXFpZTre-67f734ae3f31f19eb2a0.js +0 -1
  97. data/tools/cmdtlmserver/RadiobuttonWidget-ytmoVZ3u-3a28b6b2ee47bb71a55d.js +0 -1
  98. data/tools/cmdtlmserver/RadiogroupWidget-CusMBhKH-2ab564c7e2c5bd9ce708.js +0 -1
  99. data/tools/cmdtlmserver/RawDialog-9d64be002d16366306d0.js +0 -11
  100. data/tools/cmdtlmserver/SignalWidget-d9-6h85k-6fb4be9567110de7f7f2.js +0 -1
  101. data/tools/cmdtlmserver/TabbookWidget-B1XKplGH-e22ec8d6a5c838c7c5fd.js +0 -1
  102. data/tools/cmdtlmserver/TargetsTab-e4763d63ea20379aa310.js +0 -1
  103. data/tools/cmdtlmserver/TextboxWidget-C-_M2M4l-e87fb9cd37972bf5d25b.js +0 -1
  104. data/tools/cmdtlmserver/TitleWidget-CT-aLcNb-f05601921aa733b9911e.js +0 -1
  105. data/tools/cmdtlmserver/ValueWidget-C6RanBj3-1821aa6088bd82d581f4.js +0 -1
  106. data/tools/cmdtlmserver/ValuelimitsbarWidget-B3bvjfxc-4f2349bfcb30c31119c1.js +0 -1
  107. data/tools/cmdtlmserver/VerticalboxWidget-DY72fLHW-f459428e4aed8df3e9d9.js +0 -1
  108. data/tools/cmdtlmserver/Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js +0 -1
  109. data/tools/cmdtlmserver/main-3edbee545cea57a5f76d.js +0 -1499
  110. data/tools/cmdtlmserver/services-61aec8b87d81fdbc4b64.js +0 -7
@@ -1 +1 @@
1
- System.register(["vue","./main-3edbee545cea57a5f76d.js","vue-router","single-spa","vuex","vuetify"],function(e,t){"use strict";return{setters:[null,u=>{e({bootstrap:u.e,mount:u.f,unmount:u.u})},null,null,null,null],execute:function(){}}});
1
+ System.register(["vue","./main-798cf58cd430cfe7259b.js","vue-router","single-spa","vuex","vuetify"],function(t,e){"use strict";return{setters:[null,u=>{t({bootstrap:u.f,mount:u.g,unmount:u.u})},null,null,null,null],execute:function(){}}});
@@ -0,0 +1,7 @@
1
+ System.register([],function(ve,Hn){"use strict";return{execute:function(){var Gt=Object.defineProperty,Qt=(t,e,r)=>e in t?Gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,se=(t,e,r)=>Qt(t,typeof e!="symbol"?e+"":e,r);function Ve(t,e){return function(){return t.apply(e,arguments)}}const{toString:Yt}=Object.prototype,{getPrototypeOf:Se}=Object,{iterator:ne,toStringTag:Ke}=Symbol,ie=(t=>e=>{const r=Yt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),k=t=>(t=t.toLowerCase(),e=>ie(e)===t),oe=t=>e=>typeof e===t,{isArray:W}=Array,X=oe("undefined");function Zt(t){return t!==null&&!X(t)&&t.constructor!==null&&!X(t.constructor)&&R(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Xe=k("ArrayBuffer");function er(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Xe(t.buffer),e}const tr=oe("string"),R=oe("function"),Ge=oe("number"),ce=t=>t!==null&&typeof t=="object",rr=t=>t===!0||t===!1,ae=t=>{if(ie(t)!=="object")return!1;const e=Se(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ke in t)&&!(ne in t)},sr=k("Date"),nr=k("File"),ir=k("Blob"),or=k("FileList"),cr=t=>ce(t)&&R(t.pipe),ar=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||R(t.append)&&((e=ie(t))==="formdata"||e==="object"&&R(t.toString)&&t.toString()==="[object FormData]"))},lr=k("URLSearchParams"),[ur,hr,dr,fr]=["ReadableStream","Request","Response","Headers"].map(k),pr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,n;if(typeof t!="object"&&(t=[t]),W(t))for(s=0,n=t.length;s<n;s++)e.call(null,t[s],s,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(s=0;s<o;s++)c=i[s],e.call(null,t[c],c,t)}}function Qe(t,e){e=e.toLowerCase();const r=Object.keys(t);let s=r.length,n;for(;s-- >0;)if(n=r[s],e===n.toLowerCase())return n;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ye=t=>!X(t)&&t!==$;function Ee(){const{caseless:t}=Ye(this)&&this||{},e={},r=(s,n)=>{const i=t&&Qe(e,n)||n;ae(e[i])&&ae(s)?e[i]=Ee(e[i],s):ae(s)?e[i]=Ee({},s):W(s)?e[i]=s.slice():e[i]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&G(arguments[s],r);return e}const gr=(t,e,r,{allOwnKeys:s}={})=>(G(e,(n,i)=>{r&&R(n)?t[i]=Ve(n,r):t[i]=n},{allOwnKeys:s}),t),mr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),br=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},yr=(t,e,r,s)=>{let n,i,o;const c={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)o=n[i],(!s||s(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=r!==!1&&Se(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},_r=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},wr=t=>{if(!t)return null;if(W(t))return t;let e=t.length;if(!Ge(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},vr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Se(Uint8Array)),Sr=(t,e)=>{const r=(t&&t[ne]).call(t);let s;for(;(s=r.next())&&!s.done;){const n=s.value;e.call(t,n[0],n[1])}},Er=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},xr=k("HTMLFormElement"),Or=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,r,s){return r.toUpperCase()+s}),Ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Rr=k("RegExp"),et=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};G(r,(n,i)=>{let o;(o=e(n,i,t))!==!1&&(s[i]=o||n)}),Object.defineProperties(t,s)},Ar=t=>{et(t,(e,r)=>{if(R(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=t[r];if(R(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cr=(t,e)=>{const r={},s=n=>{n.forEach(i=>{r[i]=!0})};return W(t)?s(t):s(String(t).split(e)),r},Tr=()=>{},kr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Pr(t){return!!(t&&R(t.append)&&t[Ke]==="FormData"&&t[ne])}const jr=t=>{const e=new Array(10),r=(s,n)=>{if(ce(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[n]=s;const i=W(s)?[]:{};return G(s,(o,c)=>{const l=r(o,n+1);!X(l)&&(i[c]=l)}),e[n]=void 0,i}}return s};return r(t,0)},Nr=k("AsyncFunction"),Ir=t=>t&&(ce(t)||R(t))&&R(t.then)&&R(t.catch),tt=((t,e)=>t?setImmediate:e?((r,s)=>($.addEventListener("message",({source:n,data:i})=>{n===$&&i===r&&s.length&&s.shift()()},!1),n=>{s.push(n),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",R($.postMessage)),Lr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||tt,Ur=t=>t!=null&&R(t[ne]),a={isArray:W,isArrayBuffer:Xe,isBuffer:Zt,isFormData:ar,isArrayBufferView:er,isString:tr,isNumber:Ge,isBoolean:rr,isObject:ce,isPlainObject:ae,isReadableStream:ur,isRequest:hr,isResponse:dr,isHeaders:fr,isUndefined:X,isDate:sr,isFile:nr,isBlob:ir,isRegExp:Rr,isFunction:R,isStream:cr,isURLSearchParams:lr,isTypedArray:vr,isFileList:or,forEach:G,merge:Ee,extend:gr,trim:pr,stripBOM:mr,inherits:br,toFlatObject:yr,kindOf:ie,kindOfTest:k,endsWith:_r,toArray:wr,forEachEntry:Sr,matchAll:Er,isHTMLForm:xr,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:et,freezeMethods:Ar,toObjectSet:Cr,toCamelCase:Or,noop:Tr,toFiniteNumber:kr,findKey:Qe,global:$,isContextDefined:Ye,isSpecCompliantForm:Pr,toJSONObject:jr,isAsyncFn:Nr,isThenable:Ir,setImmediate:tt,asap:Lr,isIterable:Ur};function m(t,e,r,s,n){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),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(m,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 rt=m.prototype,st={};["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=>{st[t]={value:t}}),Object.defineProperties(m,st),Object.defineProperty(rt,"isAxiosError",{value:!0}),m.from=(t,e,r,s,n,i)=>{const o=Object.create(rt);return a.toFlatObject(t,o,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),m.call(o,t.message,e,r,s,n),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const Fr=null;function xe(t){return a.isPlainObject(t)||a.isArray(t)}function nt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function it(t,e,r){return t?t.concat(e).map(function(s,n){return s=nt(s),!r&&n?"["+s+"]":s}).join(r?".":""):e}function $r(t){return a.isArray(t)&&!t.some(xe)}const qr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function le(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,y){return!a.isUndefined(y[d])});const s=r.metaTokens,n=r.visitor||u,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!c&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?c&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,f){let S=d;if(d&&!f&&typeof d=="object"){if(a.endsWith(y,"{}"))y=s?y:y.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&$r(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(S=a.toArray(d)))return y=nt(y),S.forEach(function(w,_){!(a.isUndefined(w)||w===null)&&e.append(o===!0?it([y],_,i):o===null?y:y+"[]",l(w))}),!1}return xe(d)?!0:(e.append(it(f,y,i),l(d)),!1)}const h=[],p=Object.assign(qr,{defaultVisitor:u,convertValue:l,isVisitable:xe});function g(d,y){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),a.forEach(d,function(f,S){(!(a.isUndefined(f)||f===null)&&n.call(e,f,a.isString(S)?S.trim():S,y,p))===!0&&g(f,y?y.concat(S):[S])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Oe(t,e){this._pairs=[],t&&le(t,this,e)}const ct=Oe.prototype;ct.append=function(t,e){this._pairs.push([t,e])},ct.toString=function(t){const e=t?function(r){return t.call(this,r,ot)}:ot;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Dr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function at(t,e,r){if(!e)return t;const s=r&&r.encode||Dr;a.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let i;if(n?i=n(e,r):i=a.isURLSearchParams(e)?e.toString():new Oe(e,r).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class lt{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.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(r){r!==null&&e(r)})}}const ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Br=typeof URLSearchParams<"u"?URLSearchParams:Oe,Mr=typeof FormData<"u"?FormData:null,zr=typeof Blob<"u"?Blob:null,Jr={isBrowser:!0,classes:{URLSearchParams:Br,FormData:Mr,Blob:zr},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",Ae=typeof navigator=="object"&&navigator||void 0,Wr=Re&&(!Ae||["ReactNative","NativeScript","NS"].indexOf(Ae.product)<0),Hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vr=Re&&window.location.href||"http://localhost",Kr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:Wr,hasStandardBrowserWebWorkerEnv:Hr,navigator:Ae,origin:Vr},Symbol.toStringTag,{value:"Module"})),x={...Kr,...Jr};function Xr(t,e){return le(t,new x.classes.URLSearchParams,Object.assign({visitor:function(r,s,n,i){return x.isNode&&a.isBuffer(r)?(this.append(s,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Gr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Qr(t){const e={},r=Object.keys(t);let s;const n=r.length;let i;for(s=0;s<n;s++)i=r[s],e[i]=t[i];return e}function ht(t){function e(r,s,n,i){let o=r[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=r.length;return o=!o&&a.isArray(n)?n.length:o,l?(a.hasOwnProp(n,o)?n[o]=[n[o],s]:n[o]=s,!c):((!n[o]||!a.isObject(n[o]))&&(n[o]=[]),e(r,s,n[o],i)&&a.isArray(n[o])&&(n[o]=Qr(n[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const r={};return a.forEachEntry(t,(s,n)=>{e(Gr(s),n,r,0)}),r}return null}function Yr(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const Q={transitional:ut,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",s=r.indexOf("application/json")>-1,n=a.isObject(t);if(n&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ht(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(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xr(t,this.formSerializer).toString();if((i=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return le(i?{"files[]":t}:t,o&&new o,this.formSerializer)}}return n||s?(e.setContentType("application/json",!1),Yr(t)):t}],transformResponse:[function(t){const e=this.transitional||Q.transitional,r=e&&e.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const n=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(i){if(n)throw i.name==="SyntaxError"?m.from(i,m.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:x.classes.FormData,Blob:x.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=>{Q.headers[t]={}});const Zr=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"]),es=t=>{const e={};let r,s,n;return t&&t.split(`
2
+ `).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),s=i.substring(n+1).trim(),!(!r||e[r]&&Zr[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e},dt=Symbol("internals");function Y(t){return t&&String(t).trim().toLowerCase()}function ue(t){return t===!1||t==null?t:a.isArray(t)?t.map(ue):String(t)}function ts(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const rs=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ce(t,e,r,s,n){if(a.isFunction(s))return s.call(this,e,r);if(n&&(e=r),!!a.isString(e)){if(a.isString(s))return e.indexOf(s)!==-1;if(a.isRegExp(s))return s.test(e)}}function ss(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function ns(t,e){const r=a.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(n,i,o){return this[s].call(this,e,n,i,o)},configurable:!0})})}let A=class{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function n(o,c,l){const u=Y(c);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||c]=ue(o))}const i=(o,c)=>a.forEach(o,(l,u)=>n(l,u,c));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(a.isString(t)&&(t=t.trim())&&!rs(t))i(es(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&&n(e,t,r);return this}get(t,e){if(t=Y(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return ts(s);if(a.isFunction(e))return e.call(this,s,r);if(a.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Y(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Ce(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function n(i){if(i=Y(i),i){const o=a.findKey(r,i);o&&(!e||Ce(r,r[o],o,e))&&(delete r[o],s=!0)}}return a.isArray(t)?t.forEach(n):n(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];(!t||Ce(this,this[n],n,t,!0))&&(delete this[n],s=!0)}return s}normalize(t){const e=this,r={};return a.forEach(this,(s,n)=>{const i=a.findKey(r,n);if(i){e[i]=ue(s),delete e[n];return}const o=t?ss(n):String(n).trim();o!==n&&delete e[n],e[o]=ue(s),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&a.isArray(r)?r.join(", "):r)}),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 r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[dt]=this[dt]={accessors:{}}).accessors,r=this.prototype;function s(n){const i=Y(n);e[i]||(ns(r,n),e[i]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(A.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),a.freezeMethods(A);function Te(t,e){const r=this||Q,s=e||r,n=A.from(s.headers);let i=s.data;return a.forEach(t,function(o){i=o.call(r,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function ft(t){return!!(t&&t.__CANCEL__)}function H(t,e,r){m.call(this,t??"canceled",m.ERR_CANCELED,e,r),this.name="CanceledError"}a.inherits(H,m,{__CANCEL__:!0});function pt(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new m("Request failed with status code "+r.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function is(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function os(t,e){t=t||10;const r=new Array(t),s=new Array(t);let n=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=s[i];o||(o=l),r[n]=c,s[n]=l;let h=i,p=0;for(;h!==n;)p+=r[h++],h=h%t;if(n=(n+1)%t,n===i&&(i=(i+1)%t),l-o<e)return;const g=u&&l-u;return g?Math.round(p*1e3/g):void 0}}function cs(t,e){let r=0,s=1e3/e,n,i;const o=(c,l=Date.now())=>{r=l,n=null,i&&(clearTimeout(i),i=null),t.apply(null,c)};return[(...c)=>{const l=Date.now(),u=l-r;u>=s?o(c,l):(n=c,i||(i=setTimeout(()=>{i=null,o(n)},s-u)))},()=>n&&o(n)]}const he=(t,e,r=3)=>{let s=0;const n=os(50,250);return cs(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-s,u=n(l),h=o<=c;s=o;const p={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(p)},r)},gt=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},mt=t=>(...e)=>a.asap(()=>t(...e)),as=x.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,x.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,ls=x.hasStandardBrowserEnv?{write(t,e,r,s,n,i){const o=[t+"="+encodeURIComponent(e)];a.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),a.isString(s)&&o.push("path="+s),a.isString(n)&&o.push("domain="+n),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 us(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hs(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bt(t,e,r){let s=!us(e);return t&&(s||r==!1)?hs(t,e):e}const yt=t=>t instanceof A?{...t}:t;function q(t,e){e=e||{};const r={};function s(u,h,p,g){return a.isPlainObject(u)&&a.isPlainObject(h)?a.merge.call({caseless:g},u,h):a.isPlainObject(h)?a.merge({},h):a.isArray(h)?h.slice():h}function n(u,h,p,g){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u,p,g)}else return s(u,h,p,g)}function i(u,h){if(!a.isUndefined(h))return s(void 0,h)}function o(u,h){if(a.isUndefined(h)){if(!a.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function c(u,h,p){if(p in e)return s(u,h);if(p in t)return s(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,p)=>n(yt(u),yt(h),p,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){const h=l[u]||n,p=h(t[u],e[u],u);a.isUndefined(p)&&h!==c||(r[u]=p)}),r}const _t=t=>{const e=q({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:i,headers:o,auth:c}=e;e.headers=o=A.from(o),e.url=at(bt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(r)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...h]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(x.hasStandardBrowserEnv&&(s&&a.isFunction(s)&&(s=s(e)),s||s!==!1&&as(e.url))){const u=n&&i&&ls.read(i);u&&o.set(n,u)}return e},ds=typeof XMLHttpRequest<"u",fs=ds&&function(t){return new Promise(function(e,r){const s=_t(t);let n=s.data;const i=A.from(s.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=s,u,h,p,g,d;function y(){g&&g(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function S(){if(!f)return;const _=A.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),T={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:t,request:f};pt(function(L){e(L),y()},function(L){r(L),y()},T),f=null}"onloadend"in f?f.onloadend=S:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(S)},f.onabort=function(){f&&(r(new m("Request aborted",m.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||ut;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new m(_,T.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,f)),f=null},n===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(_,T){f.setRequestHeader(T,_)}),a.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),o&&o!=="json"&&(f.responseType=s.responseType),l&&([p,d]=he(l,!0),f.addEventListener("progress",p)),c&&f.upload&&([h,g]=he(c),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=_=>{f&&(r(!_||_.type?new H(null,t,f):_),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=is(s.url);if(w&&x.protocols.indexOf(w)===-1){r(new m("Unsupported protocol "+w+":",m.ERR_BAD_REQUEST,t));return}f.send(n||null)})},ps=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,n;const i=function(u){if(!n){n=!0,c();const h=u instanceof Error?u:this.reason;s.abort(h instanceof m?h:new H(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,i(new m(`timeout ${e} of ms exceeded`,m.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}=s;return l.unsubscribe=()=>a.asap(c),l}},gs=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,n;for(;s<r;)n=s+e,yield t.slice(s,n),s=n},ms=async function*(t,e){for await(const r of bs(t))yield*gs(r,e)},bs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},wt=(t,e,r,s)=>{const n=ms(t,e);let i=0,o,c=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await n.next();if(u){c(),l.close();return}let p=h.byteLength;if(r){let g=i+=p;r(g)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),n.return()}},{highWaterMark:2})},de=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vt=de&&typeof ReadableStream=="function",ys=de&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),St=(t,...e)=>{try{return!!t(...e)}catch{return!1}},_s=vt&&St(()=>{let t=!1;const e=new Request(x.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Et=64*1024,ke=vt&&St(()=>a.isReadableStream(new Response("").body)),fe={stream:ke&&(t=>t.body)};de&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!fe[e]&&(fe[e]=a.isFunction(t[e])?r=>r[e]():(r,s)=>{throw new m(`Response type '${e}' is not supported`,m.ERR_NOT_SUPPORT,s)})})})(new Response);const ws=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(x.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await ys(t)).byteLength},vs=async(t,e)=>a.toFiniteNumber(t.getContentLength())??ws(e),Ss=de&&(async t=>{let{url:e,method:r,data:s,signal:n,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:h,withCredentials:p="same-origin",fetchOptions:g}=_t(t);u=u?(u+"").toLowerCase():"text";let d=ps([n,i&&i.toAbortSignal()],o),y;const f=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let S;try{if(l&&_s&&r!=="get"&&r!=="head"&&(S=await vs(h,s))!==0){let O=new Request(e,{method:"POST",body:s,duplex:"half"}),I;if(a.isFormData(s)&&(I=O.headers.get("content-type"))&&h.setContentType(I),O.body){const[z,F]=gt(S,he(mt(l)));s=wt(O.body,Et,z,F)}}a.isString(p)||(p=p?"include":"omit");const w="credentials"in Request.prototype;y=new Request(e,{...g,signal:d,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:w?p:void 0});let _=await fetch(y);const T=ke&&(u==="stream"||u==="response");if(ke&&(c||T&&f)){const O={};["status","statusText","headers"].forEach(U=>{O[U]=_[U]});const I=a.toFiniteNumber(_.headers.get("content-length")),[z,F]=c&&gt(I,he(mt(c),!0))||[];_=new Response(wt(_.body,Et,z,()=>{F&&F(),f&&f()}),O)}u=u||"text";let L=await fe[a.findKey(fe,u)||"text"](_,t);return!T&&f&&f(),await new Promise((O,I)=>{pt(O,I,{data:L,headers:A.from(_.headers),status:_.status,statusText:_.statusText,config:t,request:y})})}catch(w){throw f&&f(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,t,y),{cause:w.cause||w}):m.from(w,w&&w.code,t,y)}}),Pe={http:Fr,xhr:fs,fetch:Ss};a.forEach(Pe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const xt=t=>`- ${t}`,Es=t=>a.isFunction(t)||t===null||t===!1,Ot={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let r,s;const n={};for(let i=0;i<e;i++){r=t[i];let o;if(s=r,!Es(r)&&(s=Pe[(o=String(r)).toLowerCase()],s===void 0))throw new m(`Unknown adapter '${o}'`);if(s)break;n[o||"#"+i]=s}if(!s){const i=Object.entries(n).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
4
+ `+i.map(xt).join(`
5
+ `):" "+xt(i[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Pe};function je(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new H(null,t)}function Rt(t){return je(t),t.headers=A.from(t.headers),t.data=Te.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ot.getAdapter(t.adapter||Q.adapter)(t).then(function(e){return je(t),e.data=Te.call(t,t.transformResponse,e),e.headers=A.from(e.headers),e},function(e){return ft(e)||(je(t),e&&e.response&&(e.response.data=Te.call(t,t.transformResponse,e.response),e.response.headers=A.from(e.response.headers))),Promise.reject(e)})}const At="1.9.0",pe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{pe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ct={};pe.transitional=function(t,e,r){function s(n,i){return"[Axios v"+At+"] Transitional option '"+n+"'"+i+(r?". "+r:"")}return(n,i,o)=>{if(t===!1)throw new m(s(i," has been removed"+(e?" in "+e:"")),m.ERR_DEPRECATED);return e&&!Ct[i]&&(Ct[i]=!0,console.warn(s(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,i,o):!0}},pe.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xs(t,e,r){if(typeof t!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let n=s.length;for(;n-- >0;){const i=s[n],o=e[i];if(o){const c=t[i],l=c===void 0||o(c,i,t);if(l!==!0)throw new m("option "+i+" must be "+l,m.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const ge={assertOptions:xs,validators:pe},N=ge.validators;let D=class{constructor(t){this.defaults=t||{},this.interceptors={request:new lt,response:new lt}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const n=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+n):r.stack=n}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=q(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:n}=e;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?e.paramsSerializer={serialize:s}:ge.assertOptions(s,{encode:N.function,serialize:N.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ge.assertOptions(e,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=n&&a.merge(n.common,n[e.method]);n&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete n[d]}),e.headers=A.concat(i,n);const o=[];let c=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(c=c&&d.synchronous,o.unshift(d.fulfilled,d.rejected))});const l=[];this.interceptors.response.forEach(function(d){l.push(d.fulfilled,d.rejected)});let u,h=0,p;if(!c){const d=[Rt.bind(this),void 0];for(d.unshift.apply(d,o),d.push.apply(d,l),p=d.length,u=Promise.resolve(e);h<p;)u=u.then(d[h++],d[h++]);return u}p=o.length;let g=e;for(h=0;h<p;){const d=o[h++],y=o[h++];try{g=d(g)}catch(f){y.call(this,f);break}}try{u=Rt.call(this,g)}catch(d){return Promise.reject(d)}for(h=0,p=l.length;h<p;)u=u.then(l[h++],l[h++]);return u}getUri(t){t=q(this.defaults,t);const e=bt(t.baseURL,t.url,t.allowAbsoluteUrls);return at(e,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){D.prototype[t]=function(e,r){return this.request(q(r||{},{method:t,url:e,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function e(r){return function(s,n,i){return this.request(q(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:n}))}}D.prototype[t]=e(),D.prototype[t+"Form"]=e(!0)});let Os=class Xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const s=this;this.promise.then(n=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](n);s._listeners=null}),this.promise.then=n=>{let i;const o=new Promise(c=>{s.subscribe(c),i=c}).then(n);return o.cancel=function(){s.unsubscribe(i)},o},e(function(n,i,o){s.reason||(s.reason=new H(n,i,o),r(s.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Xt(function(r){e=r}),cancel:e}}};function Rs(t){return function(e){return t.apply(null,e)}}function As(t){return a.isObject(t)&&t.isAxiosError===!0}const Ne={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(Ne).forEach(([t,e])=>{Ne[e]=t});function Tt(t){const e=new D(t),r=Ve(D.prototype.request,e);return a.extend(r,D.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return Tt(q(t,s))},r}const v=Tt(Q);v.Axios=D,v.CanceledError=H,v.CancelToken=Os,v.isCancel=ft,v.VERSION=At,v.toFormData=le,v.AxiosError=m,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=Rs,v.isAxiosError=As,v.mergeConfig=q,v.AxiosHeaders=A,v.formToJSON=t=>ht(a.isHTMLForm(t)?new FormData(t):t),v.getAdapter=Ot.getAdapter,v.HttpStatusCode=Ne,v.default=v;const{Axios:Vn,AxiosError:Kn,CanceledError:Xn,isCancel:Gn,CancelToken:Qn,VERSION:Yn,all:Zn,Cancel:ei,isAxiosError:ti,spread:ri,toFormData:si,AxiosHeaders:ni,HttpStatusCode:ii,formToJSON:oi,getAdapter:ci,mergeConfig:ai}=v,Ie=v.create({baseURL:location.origin,timeout:6e4,params:{}});Ie.interceptors.response.use(t=>t,t=>{var e,r,s,n,i,o,c,l,u,h,p;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(y){y&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let g=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(g+=`${t.response.statusText} `),(s=(r=t.response)==null?void 0:r.config)!=null&&s.data&&(g+=`${t.response.config.data} `),(i=(n=t.response)==null?void 0:n.data)!=null&&i.message?g+=`${t.response.data.message}`:(c=(o=t.response)==null?void 0:o.data)!=null&&c.exception?g+=`${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&&(g+=`${t.response.data.error.class} `),g+=`${t.response.data.error.message}`):g+=`${(p=t.response)==null?void 0:p.data}`;const{$cosmosNotify:d}=window;throw d&&d.serious({title:"Network error",body:g}),t}else throw t});const me=async function(t,e,{data:r,params:s={},headers:n,noAuth:i=!1,noScope:o=!1,onUploadProgress:c=!1}={}){if(!i){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}n.Authorization=localStorage.openc3Token}return n.manual=!0,!o&&!s.scope&&(s.scope=window.openc3Scope),Ie({method:t,url:e,data:r,params:s,headers:n,onUploadProgress:c})},Le={Accept:"application/json"},kt={...Le,"Content-Type":"application/json"},li=ve("l",{get:function(t,{params:e,headers:r=Le,noScope:s,noAuth:n,onUploadProgress:i}={}){return me("get",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:i})},put:function(t,{data:e,params:r,headers:s=kt,noScope:n,noAuth:i,onUploadProgress:o}={}){return me("put",t,{data:e,params:r,headers:s,noScope:n,noAuth:i,onUploadProgress:o})},post:function(t,{data:e,params:r,headers:s=kt,noScope:n,noAuth:i,onUploadProgress:o}={}){return me("post",t,{data:e,params:r,headers:s,noScope:n,noAuth:i,onUploadProgress:o})},delete:function(t,{params:e,headers:r=Le,noScope:s,noAuth:n,onUploadProgress:i}={}){return me("delete",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:i})}});let be=()=>({emit(t,...e){for(let r=this.events[t]||[],s=0,n=r.length;s<n;s++)r[s](...e)},events:{},on(t,e){var r;return((r=this.events)[t]||(r[t]=[])).push(e),()=>{var s;this.events[t]=(s=this.events[t])==null?void 0:s.filter(n=>e!==n)}}});class Z extends Error{constructor(e,r){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=r,this.name="ReasonError"}}class Ue extends Z{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Cs extends Z{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class P extends Z{constructor(e,r){r?super(e,r):super("Disconnected",e),this.name="DisconnectedError"}}class Ts extends P{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Pt(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let r=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${r}`}).join(",")}}`:""}class ks{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,r){if(!this._info)return this._info={id:e,info:r},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((r,{id:s,info:n})=>(r[s]=n,r),{})}}const B=Symbol("state");class jt{constructor(e={}){this.emitter=be(),this.params=Object.freeze(e),this.presence=new ks(this),this.initialConnect=!0,this[B]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Pt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[B]}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[B]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[B]="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[B]="connected";let e=!0,r=!0;this.initialConnect=!1,this.emit("connect",{reconnect:r,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[B]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[B]="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,r){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,r)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(r){let s=this.receiver?this.receiver.logger:null;s&&s.warn("whisper failed: ",r)}}receive(e,r){this.emit("message",e,r)}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}emit(e,...r){return this.emitter.emit(e,...r)}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,r)=>{let s=[()=>delete this._pendingSubscribe];s.push(this.on("connect",()=>{s.forEach(n=>n()),e()})),s.push(this.on("close",n=>{s.forEach(i=>i()),r(n||new Z("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Ps{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 r=this.channels.indexOf(e);r>-1&&this.channels.splice(r,1)}notify(e,...r){this.state=e==="restored"?"connected":e,r.length===1?this.channels.forEach(s=>s[e](r[0])):this.channels.forEach(s=>s[e]())}pending(e){this._checkIntent(e);let r=this._pendings[0];return!r||r.intent!==e?Promise.resolve():r.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 r,s={promise:new Promise(i=>{r=i}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(s),1),r(s)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(s),n&&await n.promise,this.gvl&&await this.gvl.acquire(s,e),s.acquired=!0,s}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 r=this._pendingTop;return!r||r.acquired||r.intent!==e?!1:(this._pendings.pop(),r.canceled=!0,!0)}}class js{constructor(){this.queue=[]}async acquire(e,r){r==="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 Ns{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new js),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:r,unsubscribe:s}){let n=this._subscriptions[e]=new Ps(e);return n.remoteId=this._localToRemote[e],n.subscriber=r,n.unsubscriber=s,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,r){this._localToRemote[e]=r;let s=this.get(e);s&&(s.remoteId=r)}}class Is{constructor(e={}){this.subscriptions=new Ns(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,r){this._remoteToLocal[r]=e,this.subscriptions.storeRemoteId(e,r),this.flush(r)}unsubscribe(e){let r=this.subscriptions.get(e);if(!r)return;let s=r.remoteId;s&&delete this._remoteToLocal[s],this.subscriptions.remove(e)}transmit(e,r,s){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,r,s]);return}let i=this.subscriptions.get(n);i&&i.channels.forEach(o=>{o.receive(r,s)})}notify(e,r,s){let n=this._remoteToLocal[e];if(!n)return;let i=this.subscriptions.get(n);i&&i.channels.forEach(o=>o.emit(r,s))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let r=[];for(let s of this._pendingMessages)s[0]===e?this.transmit(s[0],s[1],s[2]):r.push(s);this._pendingMessages=r}}const Nt={debug:0,info:1,warn:2,error:3};class It{constructor(e){this.level=e||"warn"}log(e,r,s){Nt[e]<Nt[this.level]||this.writeLogEntry(e,r,s)}writeLogEntry(){throw Error("Not implemented")}debug(e,r){this.log("debug",e,r)}info(e,r){this.log("info",e,r)}warn(e,r){this.log("warn",e,r)}error(e,r){this.log("error",e,r)}}class ee extends It{writeLogEntry(){}}class Ls{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let Us=0;class Lt{constructor(e={}){let{logger:r}=e;this.logger=r||new ee,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,r){let s={channel:e};r&&Object.assign(s,r);let n=Pt(s);if(this.pendingUnsubscriptions[n]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,n),new Promise(c=>{setTimeout(()=>{c(this.subscribe(e,r))},o)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let i=this.subscribeRetryInterval;return new Promise((o,c)=>{let l=++Us;this.pendingSubscriptions[n]={resolve:o,reject:c,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,i)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${s}ms, retrying subscribe`,r),this.cable.send(this.buildSubscribeRequest(r)),this.maybeExpireSubscribe(e,r,s))},s)}maybeExpireSubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(delete this.pendingSubscriptions[r],n.reject(new Cs(`Haven't received subscription ack in ${s*2}ms for ${r}`)))},s)}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,r,s){return r==="$whisper"?this.whisper(e,s):(s||(s={}),s.action=r,this.cable.send({command:"message",identifier:e,data:JSON.stringify(s)}),Promise.resolve())}whisper(e,r){return this.cable.send({command:"whisper",identifier:e,data:r}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n,reason:i,reconnect:o}=e;if(r==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="welcome"){let c=e.sid;return c&&this.cable.setSessionId(c),this.cable.connected()}if(r==="disconnect"){let c=new P(i);this.reset(c),o===!1?this.cable.closed(c):this.cable.disconnected(c);return}if(r==="confirm_subscription"){let c=this.pendingSubscriptions[s];if(!c){this.logger.error("subscription not found, unsubscribing",{type:r,identifier:s}),this.unsubscribe(s);return}return delete this.pendingSubscriptions[s],c.resolve(s)}if(r==="reject_subscription"){let c=this.pendingSubscriptions[s];return c?(delete this.pendingSubscriptions[s],c.reject(new Ue)):this.logger.error("subscription not found",{type:r,identifier:s})}if(n)return{identifier:s,message:n};this.logger.warn(`unknown message type: ${r}`,{message:e})}reset(e){for(let r in this.pendingSubscriptions)this.pendingSubscriptions[r].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Ut=()=>Date.now()/1e3|0;class Fs extends Lt{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=Ut()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let r in this.pendingPresence)this.pendingPresence[r].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n}=e;if(r==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(r==="reject_subscription")return super.receive(e);if(r==="confirm_subscription")return this.subscriptionStreams[s]||(this.subscriptionStreams[s]=new Set),super.receive(e);if(r==="ping")return this.restoreSince&&(this.restoreSince=Ut()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",s);return}if(r==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",s);return}if(r==="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(r==="presence"){let i=n.type;if(i==="info"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.resolve(n))}else if(i==="error"){let o=this.pendingPresence[s];o&&(delete this.pendingPresence[s],o.reject(new Error("failed to retrieve presence")))}return{type:r,identifier:s,message:n}}if(n){let i=this.trackStreamPosition(s,e.stream_id,e.epoch,e.offset);return{identifier:s,message:n,meta:i}}this.logger.warn(`unknown message type: ${r}`,{message:e})}perform(e,r,s){switch(r){case"$presence:join":return this.join(e,s);case"$presence:leave":return this.leave(e,s);case"$presence:info":return this.presence(e,s)}return super.perform(e,r,s)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let r=super.buildSubscribeRequest(e),s=this.historyRequestFor(e);s&&(r.history=s,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(r.presence=n),r}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let r={},s=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let i=this.streamsPositions[n];i&&(s=!0,r[n]=i)}if(!(!s&&!this.restoreSince))return{since:this.restoreSince,streams:r}}trackStreamPosition(e,r,s,n){if(!(!r||!s))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(r),this.streamsPositions[r]={epoch:s,offset:n},{stream:r,epoch:s,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,r){return this.presenceInfo[e]=r,this.cable.send({command:"join",identifier:e,presence:r}),Promise.resolve()}async leave(e,r){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:r}),Promise.resolve()}presence(e,r){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((s,n)=>{this.pendingPresence[e]={resolve:s,reject:n},this.cable.send({command:"presence",identifier:e,data:r})})}}class $s extends Z{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Fe extends jt{constructor(e,r){super(r),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}se(Fe,"identifier","__ghost__");const qs="$pubsub";class $e extends jt{async perform(e,r){if(e.startsWith("$"))return super.perform(e,r);throw Error("not implemented")}}se($e,"identifier",qs);const M=Symbol("state");let Ds=class{constructor({transport:t,protocol:e,encoder:r,logger:s,lazy:n,hubOptions:i,performFailures:o,transportConfigurator:c}){this.emitter=be(),this.transport=t,this.encoder=r,this.logger=s||new ee,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new Is(i||{}),this[M]="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,n===!1&&this.connect().catch(()=>{})}get state(){return this[M]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[M]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(r){this.handleClose(r)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[M]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new P("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[M]="connected",this.hub.subscriptions.all().forEach(s=>{t&&s.remoteId&&t.includes(s.remoteId)?s.notify("restored"):(s.notify("disconnected",new P("recovery_failed")),this._resubscribe(s))});let e=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:r})}notify(t,e,r){e&&typeof e!="string"&&(r=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:r}):this.emit("info",{type:t,data:r})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new P(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[M]="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 P?t:new P(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[M]="closed";let r=e||new P("cable_closed");this.hub.subscriptions.all().forEach(s=>s.notify("disconnected",r)),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 r=this.protocol.receive(e);if(r){this.logger.debug("processed incoming message",r);let{type:s,identifier:n,message:i,meta:o}=r;s?this.hub.notify(n,s,i):this.hub.transmit(n,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 $e({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new $e({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let r,s;return typeof t=="string"&&(s=t,t=Fe),r=s?new t(s,e):new t(e),this.subscribe(r)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let r=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:s=>this._subscribe(s,t.channelId,t.params),unsubscribe:s=>this._unsubscribe(s)});return r.add(t),r.intent==="subscribed"&&r.state==="connected"&&t.connected(),r.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,r){let s=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s});return}this.logger.debug("acquiring subscribe lock",{identifier:s});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:s}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:s}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:s}),t.notify("connected"),n.release();return}let i={identifier:e,params:r};this.logger.debug("subscribing",i);try{let o=await this.protocol.subscribe(e,r);this.hub.subscribe(s,o),this.logger.debug("subscribed",{...i,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof Ue&&this.logger.warn("rejected",i),o instanceof P){this.logger.debug("disconnected during subscription; will retry on connect",i),n.release();return}this.logger.error("failed to subscribe",{error:o,...i})}t.close(o),this.hub.unsubscribe(s)}n.release()}unsubscribe(t){let e=t.identifier,r=this.hub.subscriptions.get(e);if(!r)throw Error(`Subscription not found: ${e}`);r.remove(t),t.closed(),r.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let r=await t.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),r.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}),r.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),r.release();return}let s=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:s}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),r.release();return}try{await this.protocol.unsubscribe(s),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof P?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",r.release()}async perform(t,e,r){if(this.performFailures==="throw")return this._perform(t,e,r);try{return await this._perform(t,e,r)}catch(s){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:s});return}}async _perform(t,e,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new $s;let s=this.hub.subscriptions.get(t);if(!s)throw Error(`Subscription not found: ${t}`);if(await s.pending("subscribed"),s.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=s.remoteId,i={id:n,action:e,payload:r};this.logger.debug("perform",i);try{let o=await this.protocol.perform(n,e,r);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 r=this.emitter.on(t,(...s)=>{r(),e(...s)});return r}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(s=>s()),t()})),r.push(this.on("close",s=>{r.forEach(n=>n()),e(s)})),r.push(this.on("disconnect",s=>{r.forEach(n=>n()),e(s)}))}),this._pendingConnect)}};const Bs={maxMissingPings:2,maxReconnectAttempts:1/0},V=()=>Date.now(),Ft=(t,e)=>{e=e||{};let{backoffRate:r,jitterRatio:s,maxInterval:n}=e;return r=r||2,s===void 0&&(s=.5),i=>{let o=t*r**i,c=o*r,l=o+(c-o)*Math.random(),u=2*(Math.random()-.5)*s;return l=l*(1+u),n&&n<l&&(l=n),l}};let $t=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Bs,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 ee,this.state="pending_connect",this.attempts=0,this.disconnectedAt=V()}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=V(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=V(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=V(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=V()})),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=V()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Ts))}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 Ms{constructor(e,r={}){this.transports=e,this.transport=null,this.emitter=be(),this.unbind=[],this.logger=r.logger||new ee}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let r=this.transports[e];try{this.transport=r,this.resetListeners(),this.logger.debug(`Trying to connect via ${r.displayName()}`),await r.open(),this.logger.debug(`Connected via ${r.displayName()}`);return}catch(s){this.logger.debug(`Failed to connect via ${r.displayName()}: ${s.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,r){this.transports.forEach(s=>{s.setParam(e,r)})}setToken(e,r){this.transports.forEach(s=>{s.setToken(e,r)})}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 zs{constructor(e,r={}){this.url=e;let s=r.websocketImplementation;if(s)this.Impl=s;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=be();let{format:n,subprotocol:i,authStrategy:o}=r;this.format=n||"text",this.connectionOptions=r.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((r,s)=>{let n=[];n.push(this.once("open",()=>{n.forEach(i=>i()),r()})),n.push(this.once("close",()=>{n.forEach(i=>i()),s(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,r){let s=new URL(this.url);s.searchParams.set(e,r);let n=`${s.protocol}//${s.host}${s.pathname}?${s.searchParams}`;this.setURL(n)}setToken(e,r="jid"){if(this.authStrategy==="param")this.setParam(r,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let s=`x-${r}`.toLowerCase();s=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===s)||s,this.connectionOptions.headers[s]=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,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}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 r=e.data;this.format==="binary"&&(r=new Uint8Array(r)),this.emitter.emit("data",r)},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 qt={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Js(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({},qt,e);let{protocol:r,websocketImplementation:s,websocketFormat:n,websocketOptions:i,websocketAuthStrategy:o,fallbacks:c,logLevel:l,logger:u,transport:h,encoder:p,lazy:g,monitor:d,pingInterval:y,reconnectStrategy:f,maxMissingPings:S,maxReconnectAttempts:w,subprotocol:_,tokenRefresher:T,historyTimestamp:L,protocolOptions:O,concurrentSubscribes:I,performFailures:z,transportConfigurator:F,auth:U}=e;if(u=u||new ee(l),typeof r=="string"){_=_||r;let K=r.substring(0,r.lastIndexOf("-")),C=r.substring(r.lastIndexOf("-")+1);if(O=O||{},K==="actioncable-v1")r=new Lt({logger:u,...O});else if(K==="actioncable-v1-ext")r=new Fs({logger:u,historyTimestamp:L,...O});else throw Error(`Protocol is not supported yet: ${r}`);if(C==="json")p=p||new Ls,n=n||"text";else if(C==="msgpack"){if(n="binary",!p)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(C==="protobuf"){if(n=n||"binary",!p)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: ${r}`)}if(!r)throw Error("Protocol must be specified");h=h||new zs(t,{websocketImplementation:s,websocketOptions:i,subprotocol:_,authStrategy:o,format:n}),c&&(h=new Ms([h,...c],{logger:u})),U&&U.token&&h.setToken(U.token,U.param||"jid"),f=f||Ft(y),d!==!1&&(d=d||new $t({pingInterval:y,reconnectStrategy:f,maxMissingPings:S,maxReconnectAttempts:w,logger:u}));let We={concurrentSubscribes:I},j=new Ds({protocol:r,transport:h,encoder:p,logger:u,lazy:g,hubOptions:We,performFailures:z,transportConfigurator:F});return d&&(d.watch(j),j.monitor=d),T&&Ws(j,async()=>{try{await T(h)}catch(K){return u.error("Failed to refresh authentication token: "+K),!1}return j.connect().catch(()=>{}),!0}),j}function Ws(t,e){let r=!1;t.on("connect",()=>r=!1),t.on("close",async s=>{if(s){if(r){t.logger.warn("Token auto-refresh is disabled",s);return}s.reason==="token_expired"&&(r=!0,await e())}})}class Hs{constructor(e){this.channel=e}notify(e,...r){typeof this[e]=="function"&&this[e](...r)}perform(e,r={}){this.channel.perform(e,r)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Vs extends Fe{constructor(e,r,s){super(e,r),this.subscription=new Hs(this),Object.assign(this.subscription,s),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof Ue?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Ks{constructor(e){this.cable=e}create(e,r){let s,n;typeof e=="object"?(s=e.channel,delete e.channel,n=e):(s=e,n={});let i=new Vs(s,n,r);return i.subscription.notify("initialized"),this.cable.subscribe(i),i.subscription}findAll(e){return this.cable.hub.channels.filter(r=>r.identifier===e).map(r=>r.subscription)}}class Xs{constructor(e){this.cable=e,this.subscriptions=new Ks(e)}}class Gs extends It{writeLogEntry(e,r,s){s?console[e](r,s):console[e](r)}}class Qs extends $t{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")},r=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},s=()=>this.disconnect(new P("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",r,!1),window.addEventListener("resume",r,!1),window.addEventListener("freeze",s,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",r,!1),window.removeEventListener("online",r,!1),window.removeEventListener("resume",r,!1),window.removeEventListener("freeze",s,!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 Ys=["cable","action-cable"],Zs="/cable",ye=(t,e)=>{for(let r of Ys){let s=t.head.querySelector(`meta[name='${r}-${e}']`);if(s)return s.getAttribute("content")}},Dt=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,en=()=>{if(typeof document<"u"&&document.head){let t=ye(document,"url");if(t)return Dt(t)}return Dt(Zs)},tn=()=>{if(typeof document<"u"&&document.head){let t=ye(document,"history-timestamp");if(t)return t|0}},rn=()=>{if(typeof document<"u"&&document.head)return ye(document,"token")},sn=()=>{if(typeof document<"u"&&document.head)return ye(document,"token-param")};function nn(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||en(),e=e||{},e.historyTimestamp||(e.historyTimestamp=tn());let r=rn();if(r){let u=sn();e.auth=Object.assign({token:r,param:u},e.auth||{})}e=Object.assign({},qt,e);let{logLevel:s,logger:n,pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new Gs(s),o=e.reconnectStrategy=e.reconnectStrategy||Ft(i),e.monitor!==!1&&(e.monitor=e.monitor||new Qs({pingInterval:i,reconnectStrategy:o,maxMissingPings:c,maxReconnectAttempts:l,logger:n})),Js(t,e)}function on(t,e){let r=nn(t,e);return new Xs(r)}class cn{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,r,s={},n={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=on(o)}return this._cable.subscriptions.create({channel:e,...n},s)})}recordPing(){}}ve("d",cn);function qe(t){return an.test(t)}const an=/^-?[0-9]+$/;function Bt(t){return ln.test(t)}const ln=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Mt(t,e){const r=Number.parseFloat(t),s=String(r),n=zt(t),i=zt(s);return!!(n===i||(e==null?void 0:e.approx)===!0&&!qe(t)&&i.length>=14&&n.startsWith(i.substring(0,14)))}let te=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function un(t){if(Mt(t,{approx:!1}))return;if(qe(t))return te.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?te.underflow:te.truncate_float:te.overflow}function zt(t){return t.replace(hn,"").replace(fn,"").replace(pn,"").replace(dn,"")}const hn=/[eE][+-]?\d+$/,dn=/^-?(0*)?/,fn=/\./,pn=/0+$/;class gn{constructor(e){if(se(this,"isLosslessNumber",!0),!Bt(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=un(this.value);if(e===void 0||e===te.truncate_float)return Number.parseFloat(this.value);if(qe(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 mn(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function bn(t){return new gn(t)}function yn(t,e){return De({"":t},"",t,e)}function De(t,e,r,s){return Array.isArray(r)?s.call(t,e,wn(r,s)):r&&typeof r=="object"&&!mn(r)?s.call(t,e,_n(r,s)):s.call(t,e,r)}function _n(t,e){for(const r of Object.keys(t)){const s=De(t,r,t[r],e);s!==void 0?t[r]=s:delete t[r]}return t}function wn(t,e){for(let r=0;r<t.length;r++)t[r]=De(t,String(r),t[r],e);return t}function vn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bn,s=0;const n=c();return y(n),S(),e?yn(n,e):n;function i(){if(t.charCodeAt(s)===An){s++,u();const b={};let E=!0;for(;s<t.length&&t.charCodeAt(s)!==Wt;){E?E=!1:(g(),u());const J=s,re=h();if(re===void 0){T();return}u(),d();const He=c();if(He===void 0){U();return}Object.prototype.hasOwnProperty.call(b,re)&&!Be(He,b[re])&&L(re,J+1),b[re]=He}return t.charCodeAt(s)!==Wt&&O(),s++,b}}function o(){if(t.charCodeAt(s)===Cn){s++,u();const b=[];let E=!0;for(;s<t.length&&t.charCodeAt(s)!==Ht;){E?E=!1:g();const J=c();f(J),b.push(J)}return t.charCodeAt(s)!==Ht&&I(),s++,b}}function c(){u();const b=h()??p()??i()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),b}function l(b,E){if(t.slice(s,s+b.length)===b)return s+=b.length,E}function u(){for(;Sn(t.charCodeAt(s));)s++}function h(){if(t.charCodeAt(s)===Me){s++;let b="";for(;s<t.length&&t.charCodeAt(s)!==Me;){if(t.charCodeAt(s)===Rn){const E=t[s+1],J=On[E];J!==void 0?(b+=J,s++):E==="u"?_e(t.charCodeAt(s+2))&&_e(t.charCodeAt(s+3))&&_e(t.charCodeAt(s+4))&&_e(t.charCodeAt(s+5))?(b+=String.fromCharCode(Number.parseInt(t.slice(s+2,s+6),16)),s+=5):We(s):F(s)}else xn(t.charCodeAt(s))?b+=t[s]:z(t[s]);s++}return _(),s++,b}}function p(){const b=s;if(t.charCodeAt(s)===Vt&&(s++,w(b)),t.charCodeAt(s)===ze)s++;else if(En(t.charCodeAt(s)))for(s++;we(t.charCodeAt(s));)s++;if(t.charCodeAt(s)===Un)for(s++,w(b);we(t.charCodeAt(s));)s++;if(t.charCodeAt(s)===Bn||t.charCodeAt(s)===Dn)for(s++,(t.charCodeAt(s)===Vt||t.charCodeAt(s)===Nn)&&s++,w(b);we(t.charCodeAt(s));)s++;if(s>b)return r(t.slice(b,s))}function g(){if(t.charCodeAt(s)!==Ln)throw new SyntaxError(`Comma ',' expected after value ${C()}`);s++}function d(){if(t.charCodeAt(s)!==Fn)throw new SyntaxError(`Colon ':' expected after property name ${C()}`);s++}function y(b){if(b===void 0)throw new SyntaxError(`JSON value expected ${C()}`)}function f(b){if(b===void 0)throw new SyntaxError(`Array item expected ${C()}`)}function S(){if(s<t.length)throw new SyntaxError(`Expected end of input ${C()}`)}function w(b){if(!we(t.charCodeAt(s))){const E=t.slice(b,s);throw new SyntaxError(`Invalid number '${E}', expecting a digit ${C()}`)}}function _(){if(t.charCodeAt(s)!==Me)throw new SyntaxError(`End of string '"' expected ${C()}`)}function T(){throw new SyntaxError(`Quoted object key expected ${C()}`)}function L(b,E){throw new SyntaxError(`Duplicate key '${b}' encountered at position ${E}`)}function O(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${C()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${C()}`)}function z(b){throw new SyntaxError(`Invalid character '${b}' ${j()}`)}function F(b){const E=t.slice(b,b+2);throw new SyntaxError(`Invalid escape character '${E}' ${j()}`)}function U(){throw new SyntaxError(`Object value expected after ':' ${j()}`)}function We(b){const E=t.slice(b,b+6);throw new SyntaxError(`Invalid unicode character '${E}' ${j()}`)}function j(){return`at position ${s}`}function K(){return s<t.length?`but got '${t[s]}'`:"but reached end of input"}function C(){return`${K()} ${j()}`}}function Sn(t){return t===Tn||t===kn||t===Pn||t===jn}function _e(t){return t>=ze&&t<=Je||t>=$n&&t<=Mn||t>=qn&&t<=zn}function we(t){return t>=ze&&t<=Je}function En(t){return t>=In&&t<=Je}function xn(t){return t>=32&&t<=1114111}function Be(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>Be(r,e[s])):Jt(t)&&Jt(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(r=>Be(t[r],e[r])):!1}function Jt(t){return typeof t=="object"&&t!==null}const On={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
7
+ `,r:"\r",t:" "},Rn=92,An=123,Wt=125,Cn=91,Ht=93,Tn=32,kn=10,Pn=9,jn=13,Me=34,Nn=43,Vt=45,ze=48,In=49,Je=57,Ln=44,Un=46,Fn=58,$n=65,qn=97,Dn=69,Bn=101,Mn=70,zn=102;function Kt(t,e,r,s){return n(t);function n(l,u){if(Array.isArray(s)){const h=s.find(p=>p.test(l));if(h){const p=h.stringify(l);if(typeof p!="string"||!Bt(p))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${p})`);return p}}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 p=0;p<l.length;p++){const g=l[p];typeof g<"u"&&typeof g!="function"?h+=n(g):h+="null",p<l.length-1&&(h+=",")}return h+="]",h}function o(l,u){if(typeof l.toJSON=="function")return Kt(l.toJSON(),e,r,void 0);const h=Array.isArray(e)?e.map(String):Object.keys(l);if(h.length===0)return"{}";let p=!0,g="{";for(const d of h){const y=l[d];if(c(d,y)){p?p=!1:g+=",";const f=JSON.stringify(d);g+=`${f}:`,g+=n(y)}}return g+="}",g}function c(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Jn(t){return Mt(t)?parseFloat(t):BigInt(t)}class Wn{constructor(){se(this,"id",1)}async exec(e,r,s={},n={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return s.scope=window.openc3Scope,n.manual=!0,(await Ie.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:r,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:i,transformRequest:[(o,c)=>Kt(o)],transformResponse:[o=>vn(o,void 0,Jn)]})).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.name="Unknown error",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,r){return this.exec("map_target_to_interface",[e,r])}connect_interface(e,...r){return r.length>0?this.exec("connect_interface",[e,...r]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,r,...s){return this.exec("interface_cmd",[e,r,...s])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,r,s){return this.exec("get_item",[e,r,s])}get_param(e,r,s){return this.exec("get_param",[e,r,s])}get_parameter(e,r,s){return this.exec("get_param",[e,r,s])}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,r){return this.exec("get_tlm",[e,r])}get_telemetry(e,r){return this.exec("get_tlm",[e,r])}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,r=!1){return this.exec("get_all_tlm_names",[e],{hidden:r})}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,r,s,n=30){const i=await this.exec("get_tlm_packet",[e,r],{type:s,stale_time:n});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,r){return this.exec("get_packet_derived_items",[e,r])}get_tlm_buffer(e,r){return this.exec("get_tlm_buffer",[e,r])}async get_tlm_values(e,r=30,s=null){let n={stale_time:r};s!==null&&(n.cache_timeout=s);const i=await this.exec("get_tlm_values",[e],n,{},1e4);let o=i[0].length,c=null;for(let l=0;l<o;l++)c=this.decode_openc3_type(i[0][l]),c!==null&&(i[0][l]=c);return i}get_limits(e,r,s){return this.exec("get_limits",[e,r,s])}async tlm(e,r,s,n="CONVERTED"){let i=null;if(r===void 0)i=await this.exec("tlm",[e]);else if(s===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(r))i=await this.exec("tlm",[e],{type:r});else{let c=new Error;throw c.name="TypeError",c.message=`Invalid data type ${r}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,c}else i=await this.exec("tlm",[e,r,s],{type:n});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,r,s=null,n="CONVERTED"){await this.exec("inject_tlm",[e,r,s],{type:n})}set_tlm(e,r,s,n){return this.exec("set_tlm",[e,r,s],{type:n})}override_tlm(e,r,s,n){return this.exec("override_tlm",[e,r,s],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,r,s,n){return this.exec("normalize_tlm",[e,r,s],{type:n})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,r=!1){return this.exec("get_all_cmd_names",[e],{hidden:r})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,r){return this.exec("get_cmd",[e,r])}get_command(e,r){return this.exec("get_cmd",[e,r])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,r,s,n="CONVERTED"){return this.exec("get_cmd_value",[e,r,s,n])}get_cmd_buffer(e,r){return this.exec("get_cmd_buffer",[e,r])}_cmd(e,r,s,n,i){let o=null;for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&(o=this.encode_openc3_type(n[c]),o!==null&&(n[c]=o));return this.exec(e,[r,s,n],{},i)}get_cmd_hazardous(e,r,s,n={}){return r===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,r,s,n)}cmd(e,r,s,n={}){return r===void 0?this.exec("cmd",e,{},n):this._cmd("cmd",e,r,s,n)}cmd_no_range_check(e,r,s,n={}){return r===void 0?this.exec("cmd_no_range_check",e,{},n):this._cmd("cmd_no_range_check",e,r,s,n)}cmd_raw(e,r,s,n={}){return r===void 0?this.exec("cmd_raw",e,{},n):this._cmd("cmd_raw",e,r,s,n)}cmd_raw_no_range_check(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_range_check",e,{},n):this._cmd("cmd_raw_no_range_check",e,r,s,n)}cmd_no_hazardous_check(e,r,s,n={}){return r===void 0?this.exec("cmd_no_hazardous_check",e,{},n):this._cmd("cmd_no_hazardous_check",e,r,s,n)}cmd_no_checks(e,r,s,n={}){return r===void 0?this.exec("cmd_no_checks",e,{},n):this._cmd("cmd_no_checks",e,r,s,n)}cmd_raw_no_hazardous_check(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},n):this._cmd("cmd_raw_no_hazardous_check",e,r,s,n)}cmd_raw_no_checks(e,r,s,n={}){return r===void 0?this.exec("cmd_raw_no_checks",e,{},n):this._cmd("cmd_raw_no_checks",e,r,s,n)}build_cmd(e,r,s){return r===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,r,s)}build_command(e,r,s){return r===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,r,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,r){return this.exec("send_raw",[e,r])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,r){return this.exec("load_config",[e,r])}save_config(e,r,s){return this.exec("save_config",[e,r,s])}delete_config(e,r){return this.exec("delete_config",[e,r])}enable_limits(e,r,s){return this.exec("enable_limits",[e,r,s])}disable_limits(e,r,s){return this.exec("disable_limits",[e,r,s])}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){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,r){return this.exec("set_setting",[e,r])}update_news(){return this.exec("update_news",[])}save_setting(e,r){return this.exec("set_setting",[e,r])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r),n=new Uint8Array(s);return Array.from(n).map(i=>i.toString(16).padStart(2,"0")).join("")}}}ve("p",Wn)}}});
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.3.0
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Melton
@@ -22,83 +22,83 @@ files:
22
22
  - README.md
23
23
  - Rakefile
24
24
  - plugin.txt
25
- - tools/cmdtlmserver/ArrayWidget-BbsN1dzF-ee2cfc7dad123cfaccf5.js
26
- - tools/cmdtlmserver/ArrayplotWidget-CCKEyYIx-a00019e86008704efc46.js
27
- - tools/cmdtlmserver/BarColumn-C6p07yWK-a95a551de7a97b26a986.js
28
- - tools/cmdtlmserver/BlockWidget-DlCHbqZX-c390667024b5d4780d6b.js
29
- - tools/cmdtlmserver/ButtonWidget-CtfJzCBR-9a325bb9d73eea161bde.js
30
- - tools/cmdtlmserver/CanvasWidget-CqRlXc4r-fecb24efdf6f68a33ad2.js
31
- - tools/cmdtlmserver/CanvasdotWidget--Xr_KsZs-840bf70c26d7888f4d66.js
32
- - tools/cmdtlmserver/CanvasimageWidget-BPlj5QYK-148404626d26f39ae7a4.js
33
- - tools/cmdtlmserver/CanvasimagevalueWidget-DVFGLt8f-228223ab8bc7ab0b61c6.js
34
- - tools/cmdtlmserver/CanvaslabelWidget-CYNqmyP0-c9c9beb56e22552527cb.js
35
- - tools/cmdtlmserver/CanvaslabelvalueWidget-B7yIDmsn-725d0c4e2daf6bda08ec.js
36
- - tools/cmdtlmserver/CanvaslineWidget-BICdxX0Q-7c180d081ca1a967d997.js
37
- - tools/cmdtlmserver/CanvaslinevalueWidget-Cq-Ddh0P-bdf272b782303e2bc8bb.js
38
- - tools/cmdtlmserver/CheckbuttonWidget-B74AWeaW-de22da2f691ae5858bbf.js
39
- - tools/cmdtlmserver/CmdPacketsTab-8938018b2c20935a31ff.js
40
- - tools/cmdtlmserver/CmdTlmServer-3100bab0f78a7952a5f1.js
41
- - tools/cmdtlmserver/ComboboxWidget-CtyKbEWb-7925168021879bcae865.js
42
- - tools/cmdtlmserver/DateWidget-BEVSczU8-95d14f0b9ce5fc0b69a3.js
43
- - tools/cmdtlmserver/DetailsDialog-DmEC5BTs-ae29c74b5a12a811ab58.js
44
- - tools/cmdtlmserver/DynamicWidget-CfMtj7H8-dda9e71246a61119ef51.js
45
- - tools/cmdtlmserver/FormatvalueWidget-DN12xymS-312eedcf339bb3a361e8.js
46
- - tools/cmdtlmserver/Graph-Bgo0cjl3-34cca1d79d056287c70c.js
47
- - tools/cmdtlmserver/GraphWidget-DurWDmpg-1d3f53de02fa1378a1c8.js
48
- - tools/cmdtlmserver/HorizontalWidget-Cd_wl1b3-b4a1220511cbad208895.js
49
- - tools/cmdtlmserver/HorizontalboxWidget-BcMTFBU--ebe35d30ef1038d848e8.js
50
- - tools/cmdtlmserver/HorizontallineWidget-CXFqHclf-fa0e898fc84d1495ab9f.js
51
- - tools/cmdtlmserver/IframeWidget-BPerHCCa-89189a6be7985eb8e47b.js
52
- - tools/cmdtlmserver/ImageLoader-4N-7Gj61-e6e724f54c4470cc6855.js
53
- - tools/cmdtlmserver/ImageviewerWidget-Cw_H_HmZ-79d50f4df25f701d60c0.js
54
- - tools/cmdtlmserver/InterfacesTab-2d486c0457a95cc3e028.js
55
- - tools/cmdtlmserver/LabelWidget-xrmcVeq8-870ee165781b2cf65c51.js
56
- - tools/cmdtlmserver/LabelledWidget-D48QoyMk-8ef3423e6396375a66e4.js
57
- - tools/cmdtlmserver/LabelprogressbarWidget-C_950t6g-2936a8a5b4b14474e12e.js
58
- - tools/cmdtlmserver/LabelsparklineWidget-0KXQyPoU-da36e09f571b80924e16.js
59
- - tools/cmdtlmserver/LabelvalueWidget-CQ06wWDK-1796e7cae5e984c98aaf.js
60
- - tools/cmdtlmserver/LabelvaluedescWidget-Bo8zT01X-80efb25b4bedad034d9d.js
61
- - tools/cmdtlmserver/LabelvaluelimitsbarWidget-BucTw8Yk-3294f1f5165c95dd609e.js
62
- - tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Dflb1hNd-a115105dee00eafa5323.js
63
- - tools/cmdtlmserver/LabelvaluerangebarWidget-D8cbfXFM-ed365f14f0ddd33fc1ee.js
64
- - tools/cmdtlmserver/Layout-Tf--nruw-77595e15c57a061b0dba.js
65
- - tools/cmdtlmserver/LedWidget-qH_FthkK-1cfbae497162dcc3aefa.js
66
- - tools/cmdtlmserver/LimitsbarWidget-B9lAB2RD-ba9cf8359583cfe6eeb1.js
67
- - tools/cmdtlmserver/LimitscolorWidget-c6Qa6su7-87921f3fb3e7afc5de79.js
68
- - tools/cmdtlmserver/LimitscolumnWidget-CcLs_443-604b2033bbe5db32cec6.js
69
- - tools/cmdtlmserver/LinegraphWidget-BSVYLFo1-e8a98958fba9fb2e2fb9.js
70
- - tools/cmdtlmserver/MatrixbycolumnsWidget-DXFpZTre-67f734ae3f31f19eb2a0.js
71
- - tools/cmdtlmserver/ProgressbarWidget-iYGw8-Dc-ebd0bd2f7dd1a5a808fc.js
72
- - tools/cmdtlmserver/RadiobuttonWidget-ytmoVZ3u-3a28b6b2ee47bb71a55d.js
73
- - tools/cmdtlmserver/RadiogroupWidget-CusMBhKH-2ab564c7e2c5bd9ce708.js
74
- - tools/cmdtlmserver/RangebarWidget-D_zGTtCa-8bfd7bef4ad63b9af243.js
75
- - tools/cmdtlmserver/RawDialog-9d64be002d16366306d0.js
76
- - tools/cmdtlmserver/RollupWidget-Dolsixyt-64fd8c2e5990b362afb3.js
77
- - tools/cmdtlmserver/RoutersTab-12cdceede3476c777ebf.js
78
- - tools/cmdtlmserver/ScrollwindowWidget-DV2nZuNi-622615ed3b3c3be199a7.js
79
- - tools/cmdtlmserver/SignalWidget-d9-6h85k-6fb4be9567110de7f7f2.js
80
- - tools/cmdtlmserver/SpacerWidget-BH0p2OLi-d2bd2a8e1f0b4014a44f.js
81
- - tools/cmdtlmserver/SparklineWidget-coxi9r2g-93d3a65c88c064975334.js
82
- - tools/cmdtlmserver/StatusTab-84eda227fff2c85ad6b1.js
83
- - tools/cmdtlmserver/TabbookWidget-B1XKplGH-e22ec8d6a5c838c7c5fd.js
84
- - tools/cmdtlmserver/TargetsTab-e4763d63ea20379aa310.js
85
- - tools/cmdtlmserver/TextboxWidget-C-_M2M4l-e87fb9cd37972bf5d25b.js
86
- - tools/cmdtlmserver/TextfieldWidget-C08N4JE8-1068f0ee1d4002e54079.js
87
- - tools/cmdtlmserver/TimeWidget-DtwdEcFg-5a3bc19e8ab2a1804ae7.js
88
- - tools/cmdtlmserver/TitleWidget-CT-aLcNb-f05601921aa733b9911e.js
89
- - tools/cmdtlmserver/TlmPacketsTab-e5b98e3e4c15475a7a17.js
90
- - tools/cmdtlmserver/Updater-30365f17f9b4eb94ca1e.js
91
- - tools/cmdtlmserver/VWidget-DQqb7NVW-4602918435743a49de41.js
92
- - tools/cmdtlmserver/ValueWidget-C6RanBj3-1821aa6088bd82d581f4.js
93
- - tools/cmdtlmserver/ValuelimitsbarWidget-B3bvjfxc-4f2349bfcb30c31119c1.js
94
- - tools/cmdtlmserver/ValuelimitscolumnWidget-QvhI6EcE-b0440ffbb0b94727592e.js
95
- - tools/cmdtlmserver/ValuerangebarWidget-Dt3K9BnC-5a6ec326052278b4ed3d.js
96
- - tools/cmdtlmserver/VerticalWidget-BIIViZgI-3d41ce14c58d12499a92.js
97
- - tools/cmdtlmserver/VerticalboxWidget-DY72fLHW-f459428e4aed8df3e9d9.js
98
- - tools/cmdtlmserver/Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js
99
- - tools/cmdtlmserver/main-3edbee545cea57a5f76d.js
25
+ - tools/cmdtlmserver/ArrayWidget-DAZApfkV-f88e557be03eaff0196a.js
26
+ - tools/cmdtlmserver/ArrayplotWidget-BfsxDplv-ba452c09191ab9d2c9eb.js
27
+ - tools/cmdtlmserver/BarColumn-q0nAsvrd-979fd197d5ebe0b26180.js
28
+ - tools/cmdtlmserver/BlockWidget-SDCUWcMQ-bf304a4da8db5487fae4.js
29
+ - tools/cmdtlmserver/ButtonWidget-BVMjwC19-ede0b497a027ec794404.js
30
+ - tools/cmdtlmserver/CanvasWidget-bVkufjRQ-9dcac9d39e370aa10c52.js
31
+ - tools/cmdtlmserver/CanvasdotWidget-DpniFfca-f90aa75b137ff18b3798.js
32
+ - tools/cmdtlmserver/CanvasimageWidget-DHOSz-dJ-5a5ba6522191031db873.js
33
+ - tools/cmdtlmserver/CanvasimagevalueWidget-zrURWWUL-74842a2e8e5704161b0c.js
34
+ - tools/cmdtlmserver/CanvaslabelWidget-D-XAMifp-ef701aeff5463ee972a8.js
35
+ - tools/cmdtlmserver/CanvaslabelvalueWidget-BsIdBtEb-fb59e3539c9504cab09e.js
36
+ - tools/cmdtlmserver/CanvaslineWidget-CA2aPGRg-49781b78cfbb16c58a8c.js
37
+ - tools/cmdtlmserver/CanvaslinevalueWidget-J7epKRlo-edd46a4b0deeef5ae0ed.js
38
+ - tools/cmdtlmserver/CheckbuttonWidget-ByH-PDRG-3155a1e301a42f78cfd7.js
39
+ - tools/cmdtlmserver/CmdPacketsTab-a7526cd69bdab193ee5c.js
40
+ - tools/cmdtlmserver/CmdTlmServer-309d57f324c500380120.js
41
+ - tools/cmdtlmserver/ComboboxWidget-Bdm_fMzW-35d26cf71d2c4968d59f.js
42
+ - tools/cmdtlmserver/DateWidget-BaQqthC7-cdd37a33ebab941131bd.js
43
+ - tools/cmdtlmserver/DetailsDialog-C5jf8o0K-6c95c0f291529e1685c1.js
44
+ - tools/cmdtlmserver/DynamicWidget-CfMtj7H8-2cf72b6eea3dd0c269ee.js
45
+ - tools/cmdtlmserver/FormatvalueWidget--H5B9i_Y-ea7b65d27cda96da7981.js
46
+ - tools/cmdtlmserver/Graph-M382Zo8o-85a1f138f1c956abdd93.js
47
+ - tools/cmdtlmserver/GraphWidget-_YOGDD1U-ab62f3ec1ddfc73d8261.js
48
+ - tools/cmdtlmserver/HorizontalWidget-D_gzrOWs-fdee514a9c5af4e3291e.js
49
+ - tools/cmdtlmserver/HorizontalboxWidget-GDcjO-UB-7c5f8b33fb5940c687c5.js
50
+ - tools/cmdtlmserver/HorizontallineWidget-DZvOYFxf-66653528e98b7e7a6854.js
51
+ - tools/cmdtlmserver/IframeWidget-CuUav9b3-f0fb66709947f9c31faa.js
52
+ - tools/cmdtlmserver/ImageLoader-3KLKJ5mV-6d450caf10714a1c2108.js
53
+ - tools/cmdtlmserver/ImageviewerWidget-BMZ6REN4-af83de8358d437aabaaa.js
54
+ - tools/cmdtlmserver/InterfacesTab-99bb37f3330ba2d25c87.js
55
+ - tools/cmdtlmserver/LabelWidget-oh6FIG6s-9270f681e463343ddbc3.js
56
+ - tools/cmdtlmserver/LabelledWidget-Bic36les-ef154fc814c821ffb0f2.js
57
+ - tools/cmdtlmserver/LabelprogressbarWidget-CqIiGoDb-84eeed45dde02cb11ba1.js
58
+ - tools/cmdtlmserver/LabelsparklineWidget-DLhmqO02-36d951bb7e324fe2527f.js
59
+ - tools/cmdtlmserver/LabelvalueWidget-BefwSSVq-4e84fe0e93bb57974749.js
60
+ - tools/cmdtlmserver/LabelvaluedescWidget-NxrCzznm-498585155de94a9d642a.js
61
+ - tools/cmdtlmserver/LabelvaluelimitsbarWidget-pq7qoolL-7fbe95c93b160ed39797.js
62
+ - tools/cmdtlmserver/LabelvaluelimitscolumnWidget-edkpogsl-4d1dd09c79a5c7f9f634.js
63
+ - tools/cmdtlmserver/LabelvaluerangebarWidget-DpJNv9dh-e87dc2ccc07c6045b227.js
64
+ - tools/cmdtlmserver/Layout-B0hvhBQO-6d8d3e486762393ef9be.js
65
+ - tools/cmdtlmserver/LedWidget--4eSxBnn-849d3f80225bb6ea4279.js
66
+ - tools/cmdtlmserver/LimitsbarWidget-BQaumgRt-b86ec2d9b3c30d9a79e0.js
67
+ - tools/cmdtlmserver/LimitscolorWidget-BBF9sRtF-f1dab8dc05417d5099ae.js
68
+ - tools/cmdtlmserver/LimitscolumnWidget-DZZtSoXw-b96074327af0a4eb8f1a.js
69
+ - tools/cmdtlmserver/LinegraphWidget-DTLZmyWs-76dc3e7fb815d8df3c63.js
70
+ - tools/cmdtlmserver/MatrixbycolumnsWidget-dpgZz4wR-899f52fcc1cf07680726.js
71
+ - tools/cmdtlmserver/ProgressbarWidget-7cYr8136-8a806c19acd9b2256deb.js
72
+ - tools/cmdtlmserver/RadiobuttonWidget-DTfn-7F2-44820ea50a2cf744199c.js
73
+ - tools/cmdtlmserver/RadiogroupWidget-DWvTpw94-686f3de581689bdf40ea.js
74
+ - tools/cmdtlmserver/RangebarWidget-CG2Y7eYp-c1a4a0e1ba7dc72e4ffc.js
75
+ - tools/cmdtlmserver/RawDialog-9d943e44f3112342601e.js
76
+ - tools/cmdtlmserver/RollupWidget-C6HKTfCR-e7ff42b2d6df403e4189.js
77
+ - tools/cmdtlmserver/RoutersTab-c8c4095e051bd4eac1a6.js
78
+ - tools/cmdtlmserver/ScrollwindowWidget-DvhBCYd2-2eda888b5878a3c9c43e.js
79
+ - tools/cmdtlmserver/SignalWidget-BZIoGjam-3f5bffb65296b2b4c9d3.js
80
+ - tools/cmdtlmserver/SpacerWidget-YBS8RZIE-ea53c28322ecfeaf856a.js
81
+ - tools/cmdtlmserver/SparklineWidget-BMhY9vYe-da8fa0c3c84c83859f98.js
82
+ - tools/cmdtlmserver/StatusTab-1c14fdf42c5eec6f89a0.js
83
+ - tools/cmdtlmserver/TabbookWidget-RfET19pq-2e5216e9a0e0355fdf93.js
84
+ - tools/cmdtlmserver/TargetsTab-4550f57bc831c1f7a7eb.js
85
+ - tools/cmdtlmserver/TextboxWidget-M8vFBSxS-ab8e94f59a6caf7ef59e.js
86
+ - tools/cmdtlmserver/TextfieldWidget-Dev7lCsT-57eee147afa6de319acc.js
87
+ - tools/cmdtlmserver/TimeWidget-CQzn13rQ-33c3d901e2ecc494bc4e.js
88
+ - tools/cmdtlmserver/TitleWidget-C4zbSian-94081f4edd1e63057002.js
89
+ - tools/cmdtlmserver/TlmPacketsTab-13c5610fdcc6520cc036.js
90
+ - tools/cmdtlmserver/Updater-6429d216c3370ebd6673.js
91
+ - tools/cmdtlmserver/VWidget-iASFPjdx-dec42be1780c3b23701d.js
92
+ - tools/cmdtlmserver/ValueWidget-BVI6uUVX-af1a23f95e0403600802.js
93
+ - tools/cmdtlmserver/ValuelimitsbarWidget-BiIcery0-6faa39be217cfac99fe0.js
94
+ - tools/cmdtlmserver/ValuelimitscolumnWidget-BiRI8GbI-ac216d8db3d2ba20fde8.js
95
+ - tools/cmdtlmserver/ValuerangebarWidget-CtMFQu9--e26b11738302a6d54bdb.js
96
+ - tools/cmdtlmserver/VerticalWidget-CRmcpQBn-9df168a6eea1affbbf4b.js
97
+ - tools/cmdtlmserver/VerticalboxWidget-C-qChjug-183c16ebf187f5b009d8.js
98
+ - tools/cmdtlmserver/Widget-CFEnOKms-581f43b2be218bd79d7d.js
99
+ - tools/cmdtlmserver/main-798cf58cd430cfe7259b.js
100
100
  - tools/cmdtlmserver/main.js
101
- - tools/cmdtlmserver/services-61aec8b87d81fdbc4b64.js
101
+ - tools/cmdtlmserver/services-389a1aae83969a37ebbc.js
102
102
  homepage: https://github.com/OpenC3/cosmos
103
103
  licenses:
104
104
  - AGPL-3.0-only
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.6.7
121
+ rubygems_version: 3.6.8
122
122
  specification_version: 4
123
123
  summary: OpenC3 COSMOS CmdTlmServer Tool
124
124
  test_files: []
@@ -1,2 +0,0 @@
1
- System.register(["./main-3edbee545cea57a5f76d.js","vue","./DetailsDialog-DmEC5BTs-ae29c74b5a12a811ab58.js","single-spa","./VWidget-DQqb7NVW-4602918435743a49de41.js","vue-router","vuex","vuetify","./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js"],function(P,z){"use strict";var u,a,m,h,s,p,g,o,w,f,v,y,x,C,V,k;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,C=e.toDisplayString},e=>{V=e.P},null,e=>{k=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:V},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[k],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 D=" ",W=`
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+=W):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},S={class:"block-widget-container"};function B(t,r,D,W,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),F=a("v-list-item"),M=a("v-list"),_=a("v-menu"),b=a("details-dialog");return h(),m("div",S,[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(_,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(M,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,N)=>(h(),v(F,{key:N,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(b,{"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 L=P("default",u(e,[["render",B],["__scopeId","data-v-4d4589c2"]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Layout-Tf--nruw-77595e15c57a061b0dba.js","vue","./main-3edbee545cea57a5f76d.js","./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.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,y,k,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const w=p("default",g(e,[["render",h],["__scopeId","data-v-47bdfc3c"]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","vue","./main-3edbee545cea57a5f76d.js","vue-router","single-spa","vuex","vuetify"],function(s,o){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,p,f,d,v){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const a=s("default",c(e,[["render",i]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","vue","./main-3edbee545cea57a5f76d.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,y,d,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-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","vue","./main-3edbee545cea57a5f76d.js","vue-router","single-spa","vuex","vuetify"],function(c,p){"use strict";var t,a,n,o,s,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,o=e.openBlock,s=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,y,k,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 h=c("default",r(e,[["render",i]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","./main-3edbee545cea57a5f76d.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,y){"use strict";var l,a,n,r,s,o,u;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.P},e=>{r=e.resolveComponent,s=e.createBlock,o=e.openBlock,u=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,f,v,t,b){const h=r("v-text-field");return o(),s(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:u(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const V=d("default",a(e,[["render",c]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","./ValueWidget-C6RanBj3-1821aa6088bd82d581f4.js","vue","./main-3edbee545cea57a5f76d.js","./DetailsDialog-DmEC5BTs-ae29c74b5a12a811ab58.js","single-spa","./VWidget-DQqb7NVW-4602918435743a49de41.js","vue-router","vuex","vuetify"],function(m,f){"use strict";var r,s,n,a,l,i,o,c,u;return{setters:[e=>{r=e.o},e=>{s=e.default},e=>{n=e.resolveComponent,a=e.createElementBlock,l=e.openBlock,i=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{u=e.d},null,null,null,null,null,null],execute:function(){const e={mixins:[r],components:{ValueWidget:s},computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(this.parameters[5],"ch",12)}};function p(t,h,y,V,W,g){const d=n("value-widget");return l(),a("div",{ref:"container",class:"d-flex flex-row",style:i(t.computedStyle)},[o(d,c(t.$attrs,{parameters:g.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const v=m("default",u(e,[["render",p]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./main-3edbee545cea57a5f76d.js","vue"],function(le,De){"use strict";var $,A,H,M,j,J,W,B,q,h,O,w,Q,i,b,I,s,S,ee,x,T,m,E,N,te,ie,Z,ae,se;return{setters:[p=>{$=p.d,A=p.P,H=p.B,M=p.m,j=p.D,J=p.F,W=p.l,B=p.$,q=p.c},p=>{h=p.resolveComponent,O=p.createElementBlock,w=p.openBlock,Q=p.withModifiers,i=p.createVNode,b=p.createBlock,I=p.createCommentVNode,s=p.withCtx,S=p.withDirectives,ee=p.normalizeClass,x=p.createElementVNode,T=p.mergeProps,m=p.createTextVNode,E=p.vShow,N=p.toDisplayString,te=p.normalizeProps,ie=p.guardReactiveProps,Z=p.withKeys,ae=p.Fragment,se=p.renderList}],execute:function(){const p={props:{modelValue:Boolean,title:{type:String,required:!0},legendPosition:{type:String,required:!0},items:{type:Array,required:!0},graphMinY:{type:Number},graphMaxY:{type:Number},lines:{type:Array,required:!0},colors:{type:Array,required:!0},startDateTime:{type:Number},endDateTime:{type:Number},timeZone:{type:String,required:!0}},mixins:[A],data:function(){return{tab:0,graph:{},legendPositions:["top","bottom","left","right"],startDate:null,startTime:null,endDate:null,endTime:null,lineHeaders:[{title:"Y Value",value:"yValue"},{title:"Color",value:"color"},{title:"Actions",value:"actions",sortable:!1}],itemHeaders:[{title:"Target Name",value:"targetName"},{title:"Packet Name",value:"packetName"},{title:"Item Name",value:"itemName"},{title:"Actions",value:"actions",sortable:!1}],rules:{date:t=>{if(!t)return!0;try{return B(q(t,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch{return"Invalid date (YYYY-MM-DD)"}},time:t=>{if(!t)return!0;try{return B(q(t,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch{return"Invalid time (HH:MM:SS)"}}}}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},editItems:function(){if(!this.items)return[];let t=0;return this.items.map(e=>(t+=1,{...e,itemId:t}))}},created(){if(this.graph={title:this.title,legendPosition:this.legendPosition,items:this.items,graphMinY:this.graphMinY,graphMaxY:this.graphMaxY,lines:[...this.lines]},this.startDateTime){let t=W(this.startDateTime/1e6);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}else{let t=new Date-36e5;this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}if(this.endDateTime){let t=W(this.endDateTime/1e6);this.endDate=this.formatDate(t,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone)}},methods:{closeOk(){this.startDate&&this.startTime?this.graph.startDateTime=this.startDate+" "+this.startTime:this.graph.startDateTime=null,this.endDate&&this.endTime?this.graph.endDateTime=this.endDate+" "+this.endTime:this.graph.endDateTime=null,this.$emit("ok",this.graph)},addLine(){this.graph.lines.push({yValue:0,color:"white"})},removeLine(t){let e=this.graph.lines.indexOf(t);this.graph.lines.splice(e,1)}}},re={class:"edit-box"},oe={class:"edit-box"},ne={class:"edit-box"},de={class:"edit-box"};function he(t,e,a,u,l,r){const n=h("v-spacer"),o=h("v-toolbar"),v=h("v-tab"),g=h("v-tabs"),y=h("v-text-field"),D=h("v-card-text"),_=h("v-col"),V=h("v-select"),f=h("v-row"),z=h("v-tabs-window-item"),U=h("v-btn"),P=h("v-list-item"),k=h("v-icon"),C=h("v-tooltip"),G=h("v-list"),L=h("v-data-table"),K=h("v-tabs-window"),F=h("v-card-actions"),d=h("v-card"),R=h("v-dialog");return w(),b(R,{modelValue:r.show,"onUpdate:modelValue":e[12]||(e[12]=c=>r.show=c),onKeydown:e[13]||(e[13]=Z(c=>t.$emit("cancel"),["esc"])),"max-width":"700"},{default:s(()=>[i(o,{height:"24"},{default:s(()=>[i(n),e[14]||(e[14]=x("span",null," Edit Graph ",-1)),i(n)]),_:1}),i(d,{class:"pa-3"},{default:s(()=>[i(g,{modelValue:t.tab,"onUpdate:modelValue":e[0]||(e[0]=c=>t.tab=c),class:"ml-3"},{default:s(()=>[i(v,{value:"0"},{default:s(()=>e[15]||(e[15]=[m(" Settings ")])),_:1}),i(v,{value:"1"},{default:s(()=>e[16]||(e[16]=[m(" Scale / Lines ")])),_:1}),i(v,{value:"2"},{default:s(()=>e[17]||(e[17]=[m(" Items ")])),_:1})]),_:1},8,["modelValue"]),i(K,{modelValue:t.tab,"onUpdate:modelValue":e[10]||(e[10]=c=>t.tab=c)},{default:s(()=>[i(z,{value:"0",eager:""},{default:s(()=>[x("div",re,[i(f,null,{default:s(()=>[i(_,null,{default:s(()=>[i(D,{class:"pa-0"},{default:s(()=>[i(y,{class:"pb-2",label:"Title",modelValue:t.graph.title,"onUpdate:modelValue":e[1]||(e[1]=c=>t.graph.title=c),"hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),i(_,null,{default:s(()=>[i(V,{label:"Legend Position","hide-details":"",items:t.legendPositions,modelValue:t.graph.legendPosition,"onUpdate:modelValue":e[2]||(e[2]=c=>t.graph.legendPosition=c),style:{"max-width":"280px"}},null,8,["items","modelValue"])]),_:1})]),_:1})]),x("div",oe,[i(D,{class:"pa-0"},{default:s(()=>e[18]||(e[18]=[m(" Select a start date/time for the graph. Leave blank for start now. ")])),_:1}),i(f,null,{default:s(()=>[i(_,null,{default:s(()=>[i(y,{label:"Start Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.startDate,"onUpdate:modelValue":e[3]||(e[3]=c=>t.startDate=c),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),i(_,null,{default:s(()=>[i(y,{label:"Start Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.startTime,"onUpdate:modelValue":e[4]||(e[4]=c=>t.startTime=c),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1}),i(D,{class:"pa-0"},{default:s(()=>e[19]||(e[19]=[m(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ")])),_:1}),i(f,null,{default:s(()=>[i(_,null,{default:s(()=>[i(y,{label:"End Date",name:`date${Date.now()}`,rules:[t.rules.date],modelValue:t.endDate,"onUpdate:modelValue":e[5]||(e[5]=c=>t.endDate=c),type:"date"},null,8,["name","rules","modelValue"])]),_:1}),i(_,null,{default:s(()=>[i(y,{label:"End Time",name:`time${Date.now()}`,rules:[t.rules.time],modelValue:t.endTime,"onUpdate:modelValue":e[6]||(e[6]=c=>t.endTime=c),type:"time",step:"1"},null,8,["name","rules","modelValue"])]),_:1})]),_:1})])]),_:1}),i(z,{value:"1",eager:""},{default:s(()=>[x("div",ne,[i(D,{class:"pa-0"},{default:s(()=>e[20]||(e[20]=[m(" Set a min or max Y value to override automatic scaling ")])),_:1}),i(f,{dense:""},{default:s(()=>[i(_,{class:"px-2"},{default:s(()=>[i(y,{"hide-details":"",label:"Min Y Axis (Optional)",modelValue:t.graph.graphMinY,"onUpdate:modelValue":e[7]||(e[7]=c=>t.graph.graphMinY=c),type:"number"},null,8,["modelValue"])]),_:1}),i(_,{class:"px-2"},{default:s(()=>[i(y,{"hide-details":"",label:"Max Y Axis (Optional)",modelValue:t.graph.graphMaxY,"onUpdate:modelValue":e[8]||(e[8]=c=>t.graph.graphMaxY=c),type:"number"},null,8,["modelValue"])]),_:1})]),_:1})]),x("div",de,[i(G,{density:"compact",class:"horizontal-lines"},{default:s(()=>[i(P,null,{default:s(()=>[e[22]||(e[22]=x("span",{style:{"padding-top":"5px"}}," Add horizontal lines to the graph ",-1)),i(n),i(U,{onClick:e[9]||(e[9]=c=>r.addLine())},{default:s(()=>e[21]||(e[21]=[m(" New Line ")])),_:1})]),_:1}),(w(!0),O(ae,null,se(t.graph.lines,(c,X)=>(w(),b(P,{key:X,value:c,color:"primary"},{default:s(()=>[i(f,null,{default:s(()=>[i(_,null,{default:s(()=>[i(y,{label:"Y Value",modelValue:c.yValue,"onUpdate:modelValue":Y=>c.yValue=Y},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),i(_,null,{default:s(()=>[i(V,{label:"Color","hide-details":"",items:a.colors,modelValue:c.color,"onUpdate:modelValue":Y=>c.color=Y},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024),i(_,null,{default:s(()=>[i(C,{text:"Remove",location:"top"},{activator:s(({props:Y})=>[i(k,T({ref_for:!0},Y,{style:{padding:"30px"},onClick:ke=>r.removeLine(c)}),{default:s(()=>e[23]||(e[23]=[m("mdi-delete")])),_:2},1040,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1})])]),_:1}),i(z,{value:"2",eager:""},{default:s(()=>[i(L,{"item-key":"itemId",class:"elevation-1 my-2","data-test":"edit-graph-items",headers:t.itemHeaders,items:r.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},{"item.actions":s(({item:c})=>[i(C,{text:"Remove",location:"top"},{activator:s(({props:X})=>[i(k,T(X,{onClick:Y=>t.$emit("remove",c)}),{default:s(()=>e[24]||(e[24]=[m(" mdi-delete ")])),_:2},1040,["onClick"])]),_:2},1024)]),"no-data":s(()=>e[25]||(e[25]=[x("span",null," Currently no items on this graph ",-1)])),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"]),i(F,{class:"px-2"},{default:s(()=>[i(n),i(U,{variant:"outlined",onClick:e[11]||(e[11]=c=>t.$emit("cancel"))},{default:s(()=>e[26]||(e[26]=[m(" Cancel ")])),_:1}),i(U,{variant:"flat",onClick:r.closeOk},{default:s(()=>e[27]||(e[27]=[m(" Ok ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ue=$(p,[["render",he]]),me={props:{modelValue:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},new J().get_item(this.item.targetName,this.item.packetName,this.item.itemName).then(t=>{for(const[e,a]of Object.entries(t.limits))Object.keys(a).includes("red_low")&&(this.limits[e]=Object.values(a));this.limitsName=Object.keys(this.limits).find(e=>this.limits[e]+""==this.editItem.limits+"")})}},ce={key:0},pe={class:"pa-3"};function ge(t,e,a,u,l,r){const n=h("v-card-title"),o=h("v-select"),v=h("v-card-text"),g=h("v-spacer"),y=h("v-btn"),D=h("v-card-actions"),_=h("v-card"),V=h("v-dialog");return w(),b(V,{modelValue:r.show,"onUpdate:modelValue":e[9]||(e[9]=f=>r.show=f),width:"400",onKeydown:e[10]||(e[10]=Z(f=>t.success(),["enter"]))},{default:s(()=>[i(_,null,{default:s(()=>[i(n,{class:"mb-2"},{default:s(()=>e[11]||(e[11]=[m("Edit Item")])),_:1}),i(v,null,{default:s(()=>[i(o,{variant:"outlined","hide-details":"",label:"Value Type",items:t.valueTypes,modelValue:t.editItem.valueType,"onUpdate:modelValue":e[0]||(e[0]=f=>t.editItem.valueType=f),class:"mb-2"},null,8,["items","modelValue"]),i(o,{variant:"outlined","hide-details":"",label:"Reduction",items:t.reduction,modelValue:t.editItem.reduced,"onUpdate:modelValue":e[1]||(e[1]=f=>t.editItem.reduced=f),class:"mb-2"},null,8,["items","modelValue"]),i(o,{variant:"outlined","hide-details":"",label:"Reduced Type",items:t.reducedTypes,disabled:t.editItem.reduced==="DECOM",modelValue:t.editItem.reducedType,"onUpdate:modelValue":e[2]||(e[2]=f=>t.editItem.reducedType=f),class:"mb-2"},null,8,["items","disabled","modelValue"]),i(o,{variant:"outlined","hide-details":"",label:"Color",items:a.colors,modelValue:t.editItem.color,"onUpdate:modelValue":[e[3]||(e[3]=f=>t.editItem.color=f),e[4]||(e[4]=f=>t.$emit("changeColor",f))],class:"mb-2"},null,8,["items","modelValue"]),r.limitsNames.length>1?(w(),O("div",ce,[i(o,{variant:"outlined","hide-details":"",label:"Display Limits",items:r.limitsNames,modelValue:t.limitsName,"onUpdate:modelValue":[e[5]||(e[5]=f=>t.limitsName=f),e[6]||(e[6]=f=>t.$emit("changeLimits",t.limits[t.limitsName]))]},null,8,["items","modelValue"]),x("div",pe,N(t.limitsName)+": "+N(t.limits[t.limitsName]),1)])):I("",!0)]),_:1}),i(D,{class:"px-2"},{default:s(()=>[i(g),i(y,{variant:"outlined",onClick:e[7]||(e[7]=f=>t.$emit("cancel"))},{default:s(()=>e[12]||(e[12]=[m(" Cancel ")])),_:1}),i(y,{variant:"flat",onClick:e[8]||(e[8]=f=>t.$emit("close",t.editItem))},{default:s(()=>e[13]||(e[13]=[m(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const fe=$(me,[["render",ge]]),ve={components:{GraphEditDialog:ue,GraphEditItemDialog:fe},props:{id:{type:Number,required:!0},selectedGraphId:{type:Number},state:{type:String,required:!0},startTime:{type:Number},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideToolbar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array},height:{type:Number},width:{type:Number},timeZone:{type:String,default:"local"}},mixins:[A],data(){return{lines:[],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",selectedItem:null,hideToolbarData:this.hideToolbar,showOverview:!this.hideOverview,hideOverviewData:this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,timeout:null,graphMinY:null,graphMaxY:null,graphStartDateTime:null,graphEndDateTime:null,indexes:{},items:this.initialItems||[],limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new j,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null}},created(){this.title=`Graph ${this.id}`;for(const[t,e]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(e)]=t+1,e.color===void 0&&(e.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:t,overviewSeries:e}=this.items.reduce((u,l)=>{const r={spanGaps:!0};return u.chartSeries.push({...r,item:l,label:this.formatLabel(l),stroke:(n,o)=>this.items[o-1].color,width:2,value:(n,o)=>typeof o=="string"||isNaN(o)?"NaN":o==null?"--":o.toFixed(3)}),u.overviewSeries.push({...r}),u},{chartSeries:[],overviewSeries:[]});let a={};if(this.sparkline)this.hideToolbarData=!0,this.hideOverviewData=!0,this.showOverview=!1,a={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new M(a,this.data,document.getElementById(`chart${this.id}`));else{let u=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone&&this.timeZone!=="local"&&(u=this.timeZone),a={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],tzDate:r=>M.tzDate(new Date(r*1e3),u),series:[{label:"Time",value:(r,n)=>n==null?"--":this.formatSeconds(n,this.timeZone)},...t],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(r,n,o)=>v=>{this.state==="pause"&&r.select.width===0&&this.$emit("start"),o(v)}}},hooks:{setScale:[(r,n)=>{if(n==="x"&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let o=Math.round(this.overview.valToPos(r.scales.x.min,"x")),v=Math.round(this.overview.valToPos(r.scales.x.max,"x"));this.overview.setSelect({left:o,width:v-o}),this.zoomChart=!1}}],setSelect:[r=>{this.state==="start"&&r.select.width>0&&this.$emit("pause")}],ready:[r=>{r.root.querySelector(".u-over").addEventListener("contextmenu",o=>{o.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=o.clientX,this.editGraphMenuY=o.clientY,this.editGraphMenu=!0});let n=r.root.querySelector(".u-legend");n.addEventListener("contextmenu",o=>{o.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=o.clientX,this.itemMenuY=o.clientY;let v=o.target.closest(".u-series"),g=Array.prototype.slice.call(n.childNodes[0].childNodes).indexOf(v),y=r.series[g];y.item?(this.selectedItem=y.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=o.clientX,this.legendMenuY=o.clientY,this.legendMenu=!0)}),n.querySelector("tbody").appendChild(this.$refs.info)}]}},this.graph=new M(a,this.data,document.getElementById(`chart${this.id}`));const l={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),tzDate:r=>M.tzDate(new Date(r*1e3),u),series:[...e],cursor:{y:!1,drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[r=>{if(!this.zoomChart){this.state==="start"&&r.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let n=r.posToVal(r.select.left,"x"),o=r.posToVal(r.select.left+r.select.width,"x");this.graph.setScale("x",{min:n,max:o}),this.zoomOverview=!1}}]}};this.hideOverview||(this.overview=new M(l,this.data,document.getElementById(`overview${this.id}`))),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.resize)}this.state!=="stop"&&this.startGraph()},beforeUnmount:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.resize)},watch:{state:function(t,e){switch(t){case"start":e==="stop"&&this.startGraph();break;case"stop":this.stopGraph();break}},data:function(t,e){this.dataChanged=!0},graphMinY:function(t,e){let a=parseFloat(t);isNaN(a)||(this.graphMinY=a),this.setGraphRange()},graphMaxY:function(t,e){let a=parseFloat(t);isNaN(a)||(this.graphMaxY=a),this.setGraphRange()},graphStartDateTime:function(t,e){t&&typeof t=="string"?(this.graphStartDateTime=this.parseDateTime(this.graphStartDateTime,this.timeZone)*1e6,this.graphStartDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphStartDateTime=null,this.needToUpdate=!0)},graphEndDateTime:function(t,e){t&&typeof t=="string"?(this.graphEndDateTime=this.parseDateTime(this.graphEndDateTime,this.timeZone)*1e6,this.graphEndDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphEndDateTime=null,this.needToUpdate=!0)}},methods:{startGraph:function(){this.subscribe(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},updateTimeout:function(){this.updateGraphData(),this.timeout=setTimeout(()=>{this.updateTimeout()},this.refreshIntervalMs)},updateGraphData:function(){if(this.state==="pause"||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);let t=this.data[0][this.data[0].length-1],e=this.data[0][this.data[0].length-this.pointsGraphed],a=this.data[0][0];a<t-this.secondsGraphed&&(a=t-this.secondsGraphed),e>a&&(a=e),this.graph.setScale("x",{min:a,max:t}),this.dataChanged=!1},formatLabel(t){if(t.valueType==="CONVERTED"&&t.reduced==="DECOM")return t.itemName;{let e="";return t.valueType!=="CONVERTED"&&(e+=t.valueType),t.reduced!=="DECOM"&&(e!==""&&(e+=" "),e+=`${t.reduced.split("_")[1]} ${t.reducedType}`),`${t.itemName} (${e})`}},moveLegend:function(t){switch(t){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=t,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(t){this.editGraph=!1,this.title=t.title,this.legendPosition=t.legendPosition,this.graphMinY=t.graphMinY,this.graphMaxY=t.graphMaxY,this.lines=[...t.lines],this.graphStartDateTime=t.startDateTime,this.graphEndDateTime=t.endDateTime,this.$nextTick(()=>{if(this.needToUpdate){if(this.subscription==null)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout(()=>{this.addItems(e)},0)}this.needToUpdate=!1}}),this.moveLegend(this.legendPosition),this.$emit("edit")},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let t=.1;(this.graphMinY||this.graphMinY===0||this.graphMaxY||this.graphMaxY===0)&&(t=0),this.graph.scales.y.range=(e,a,u)=>{let l=a;(this.graphMinY||this.graphMinY===0)&&(l=this.graphMinY);let r=u;return(this.graphMaxY||this.graphMaxY===0)&&(r=this.graphMaxY),M.rangeNum(l,r,t,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:t=>{t.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(t=>{this.subscription=t})},getSize:function(t){let e=0;const a=document.getElementById("openc3-nav-drawer");a&&(e=a.classList.contains("v-navigation-drawer--active")?a.clientWidth:0);let u=0;(this.legendPosition==="right"||this.legendPosition==="left")&&(u=document.getElementsByClassName("u-legend")[0].clientWidth);const l=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-e-u,r=Math.max(document.documentElement.clientHeight,window.innerHeight||0),n=document.getElementsByClassName("v-expansion-panel")[0];let o=100;t==="overview"?this.fullHeight&&!this.hideOverviewData?this.showOverview=!0:this.showOverview=!1:(o=r-n.clientHeight-o-250,this.fullHeight||(o=o/2+10));let v=l-70;return this.fullWidth||(v=v/2-12),{width:this.width||v,height:this.height||o}},getScales:function(){return{scales:{x:{range(t,e,a){return e==null?[1566453600,1566497660]:[e,a]}},y:{range(t,e,a){return e==null?[-100,100]:M.rangeNum(e,a,.1,!0)}}}}},getAxes:function(t){let e="rgba(255, 255, 255, .1)",a="white";return{axes:[{stroke:a,grid:{show:!0,stroke:e,width:2}},{size:80,stroke:a,grid:{show:t!=="overview",stroke:e,width:2},values(u,l){return(l.some(r=>r>=1e7)||l.every(r=>r<.01))&&(l=l.map(r=>r.toExponential(3))),l}}]}},closeEditItem:function(t){this.editItem=!1,(this.graphEndDateTime!==null&&this.selectedItem!==t||this.selectedItem.valueType!==t.valueType||this.selectedItem.reduced!==t.reduced||this.selectedItem.reducedType!==t.reducedType)&&this.changeItem(t)},changeColor:function(t){let e=this.subscriptionKey(this.selectedItem),a=this.indexes[e];this.items[a-1].color=t,this.selectedItem.color=t,this.graph.root.querySelectorAll(".u-marker")[a].style.borderColor=t},changeLimits:function(t){let e=this.subscriptionKey(this.selectedItem),a=this.indexes[e];this.items[a-1].limits=t,this.selectedItem.limits=t,this.limitsValues=t},linesPlugin:function(){return{hooks:{draw:t=>{const{ctx:e,bbox:a}=t,u=t.valToPos(t.scales.y.min,"y",!0),l=t.valToPos(t.scales.y.max,"y",!0),r=t.valToPos(this.limitsValues[0],"y",!0),n=t.valToPos(this.limitsValues[1],"y",!0),o=t.valToPos(this.limitsValues[2],"y",!0),v=t.valToPos(this.limitsValues[3],"y",!0);if(this.lines.forEach(g=>{t.scales.y.min<=g.yValue&&g.yValue<=t.scales.y.max&&(e.save(),e.beginPath(),e.strokeStyle=g.color,e.lineWidth=2,e.moveTo(a.left,t.valToPos(g.yValue,"y",!0)),e.lineTo(a.left+a.width,t.valToPos(g.yValue,"y",!0)),e.stroke(),e.restore())}),e.save(),e.beginPath(),e.fillStyle="rgba(255,0,0,0.15)",t.scales.y.min<this.limitsValues[0]){let g=r<l?l:r;e.fillRect(a.left,r,a.width,u-g)}if(t.scales.y.max>this.limitsValues[3]){let g=u<v?u:v;e.fillRect(a.left,l,a.width,g-l)}if(e.fillStyle="rgba(255,255,0,0.15)",t.scales.y.min<this.limitsValues[1]&&t.scales.y.max>this.limitsValues[0]){let g=n<l?l:n;e.fillRect(a.left,g,a.width,r-g)}if(t.scales.y.max>this.limitsValues[2]&&t.scales.y.min<this.limitsValues[3]){let g=u<v?u:v,y=u<o?u:o;e.fillRect(a.left,g,a.width,y-g)}if(e.fillStyle="rgba(0,255,0,0.15)",this.limitsValues.length===4){if(t.scales.y.min<this.limitsValues[2]&&t.scales.y.max>this.limitsValues[1]){let g=o<l?l:o,y=u<n?u:n;e.fillRect(a.left,g,a.width,y-g)}}else{const g=t.valToPos(this.limitsValues[4],"y",!0),y=t.valToPos(this.limitsValues[5],"y",!0);if(t.scales.y.min<this.limitsValues[4]&&t.scales.y.max>this.limitsValues[1]){let V=g<l?l:g;e.fillRect(a.left,V,a.width,n-V)}if(t.scales.y.max>this.limitsValues[5]&&t.scales.y.min<this.limitsValues[2]){let V=u<o?u:o,f=u<y?u:y;e.fillRect(a.left,V,a.width,f-V)}e.fillStyle="rgba(0,0,255,0.15)";let D=y<l?l:y,_=u<g?u:g;e.fillRect(a.left,D,a.width,_-D)}e.stroke(),e.restore()}}}},changeItem:function(t){this.removeItems([this.selectedItem]),this.selectedItem.valueType=t.valueType,this.selectedItem.reduced=t.reduced,this.selectedItem.reducedType=t.reducedType,setTimeout(()=>{this.addItems([this.selectedItem])},0)},addItems:function(t,e="CONVERTED"){t.forEach(a=>{a.valueType||(a.valueType=e),a.color||(a.color=this.colors[this.colorIndex]),a.limits||(a.limits=[]),a.limits.length>0&&(this.limitsValues=a.limits),this.colorIndex=(this.colorIndex+1)%this.colors.length,this.items.push(a);const u=this.data.length;this.graph.addSeries(this.createSeriesConfig(a),u),this.overview&&this.overview.addSeries(this.createOverviewSeriesConfig(),u),this.data.splice(u,0,Array(this.data[0].length)),this.indexes[this.subscriptionKey(a)]=u}),this.updateColorIndex(t),this.addItemsToSubscription(t),this.$emit("resize"),this.$emit("edit")},createSeriesConfig:function(t){return{spanGaps:!0,item:t,label:this.formatLabel(t),stroke:(e,a)=>this.items[a-1].color,width:2,value:(e,a)=>typeof a=="string"||isNaN(a)?"NaN":a==null?"--":Math.abs(a)<.01&&a!==0||Math.abs(a)>=1e7?a.toExponential(6):a.toFixed(6)}},createOverviewSeriesConfig:function(){return{spanGaps:!0,stroke:(t,e)=>this.items[e-1].color}},updateColorIndex:function(t){const e=t[t.length-1];if(e){const a=this.colors.indexOf(e.color);a!==-1&&(this.colorIndex=(a+1)%this.colors.length)}},addItemsToSubscription:function(t=this.items){let e=this.startTime;this.graphStartDateTime&&(e=this.graphStartDateTime),this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(a=>{a&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey),start_time:e,end_time:this.graphEndDateTime})})},clearAllData:function(){this.data[0]=[],this.clearData(this.items)},clearData:function(t){for(const e of t.map(this.subscriptionKey)){let a=this.indexes[e];this.data[a]=Array(this.data[0].length).fill(null),this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)}this.data.length===2&&(this.data[0]=[],this.graph.setData(this.data),this.overview&&this.overview.setData(this.data))},removeItems:function(t){this.removeItemsFromSubscription(t);for(const e of t.map(this.subscriptionKey)){const a=this.reorderIndexes(e);this.items.splice(a-1,1),this.data.splice(a,1),this.graph.delSeries(a),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(a),this.overview.setData(this.data))}this.data.length===1&&(this.data[0]=[],this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)),this.$emit("resize"),this.$emit("edit")},removeItemsFromSubscription:function(t=this.items){this.subscription&&this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t.map(this.subscriptionKey)})},reorderIndexes:function(t){let e=this.indexes[t];delete this.indexes[t];for(let a in this.indexes)this.indexes[a]>e&&(this.indexes[a]-=1);return e},received:function(t){this.cable.recordPing();for(let e=0;e<t.length;e++){let a=t[e].__time/1e9,u=this.data[0].length;if(u===0||a>this.data[0][u-1]){for(let l=0;l<this.data.length;l++)this.data[l].push(null);this.set_data_at_index(this.data[0].length-1,a,t[e])}else{let l=H(this.data[0],a,this.bs_comparator);if(l>=0){for(;l>=0;)a-=1e-5,l=H(this.data[0],a,this.bs_comparator);let r=-l-1;for(let n=0;n<this.data.length;n++)this.data[n].splice(r,0,null);this.set_data_at_index(r,a,t[e])}else{let r=-l-1;for(let n=0;n<this.data.length;n++)this.data[n].splice(r,0,null);this.set_data_at_index(r,a,t[e])}}}if(this.startTime==null&&this.data[0][0]){let e=this.data[0][0]*1e9;this.$emit("started",e)}this.dataChanged=!0},bs_comparator:function(t,e){return t-e},set_data_at_index:function(t,e,a){this.data[0][t]=e;for(const[u,l]of Object.entries(a)){if(u==="time")continue;let r=this.indexes[u];if(r){let n=this.data[r];if(l!=null&&l.raw)n[t]=null;else if(typeof l=="string"){if(n[t]=null,!u.includes("__RAW")){for(let o of this.items)if(this.subscriptionKey(o)===u){this.selectedItem=o;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else n[t]=l}}},subscriptionKey:function(t){let e=`${t.reduced}__TLM__${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`;return(t.reduced==="REDUCED_MINUTE"||t.reduced==="REDUCED_HOUR"||t.reduced==="REDUCED_DAY")&&(e+=`__${t.reducedType}`),e}}},ye={class:"mx-2"},we={class:"pa-1",id:"chart",ref:"chart"},xe=["id"],be=["id"],_e={key:5,class:"u-series",ref:"info"};function Te(t,e,a,u,l,r){const n=h("v-icon"),o=h("v-tooltip"),v=h("v-spacer"),g=h("v-toolbar"),y=h("v-expand-transition"),D=h("v-card"),_=h("graph-edit-dialog"),V=h("v-text-field"),f=h("v-row"),z=h("v-textarea"),U=h("v-btn"),P=h("v-dialog"),k=h("v-list-item-title"),C=h("v-list-item"),G=h("v-list"),L=h("v-menu"),K=h("graph-edit-item-dialog"),F=h("v-list-subheader");return w(),O("div",{onClick:e[21]||(e[21]=Q(d=>t.$emit("click"),["prevent"]))},[i(D,null,{default:s(()=>[S(i(g,{height:"24",class:ee(["pl-2 pr-2",a.selectedGraphId===a.id?"active":""])},{default:s(()=>[S(x("div",ye,[i(o,{text:"Errors",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:e[0]||(e[0]=R=>l.errorDialog=!0)}),{default:s(()=>e[22]||(e[22]=[m(" mdi-alert ")])),_:2},1040)]),_:1})],512),[[E,l.errors.length!==0]]),i(o,{text:"Edit",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:e[1]||(e[1]=R=>l.editGraph=!0),"data-test":"edit-graph-icon"}),{default:s(()=>e[23]||(e[23]=[m(" mdi-pencil ")])),_:2},1040)]),_:1}),i(v),x("span",null,N(l.title),1),i(v),S(x("div",null,[r.calcFullSize?(w(),b(o,{key:0,text:"Collapse",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.collapseAll,"data-test":"collapse-all"}),{default:s(()=>e[24]||(e[24]=[m(" mdi-arrow-collapse ")])),_:2},1040,["onClick"])]),_:1})):(w(),b(o,{key:1,text:"Expand",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.expandAll,"data-test":"expand-all"}),{default:s(()=>e[25]||(e[25]=[m(" mdi-arrow-expand ")])),_:2},1040,["onClick"])]),_:1}))],512),[[E,l.expand]]),S(x("div",null,[l.fullWidth?(w(),b(o,{key:0,text:"Collapse Width",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.collapseWidth,"data-test":"collapse-width"}),{default:s(()=>e[26]||(e[26]=[m(" mdi-arrow-collapse-horizontal ")])),_:2},1040,["onClick"])]),_:1})):(w(),b(o,{key:1,text:"Expand Width",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.expandWidth,"data-test":"expand-width"}),{default:s(()=>e[27]||(e[27]=[m(" mdi-arrow-expand-horizontal ")])),_:2},1040,["onClick"])]),_:1}))],512),[[E,l.expand]]),S(x("div",null,[l.fullHeight?(w(),b(o,{key:0,text:"Collapse Height",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.collapseHeight,"data-test":"collapse-height"}),{default:s(()=>e[28]||(e[28]=[m(" mdi-arrow-collapse-vertical ")])),_:2},1040,["onClick"])]),_:1})):(w(),b(o,{key:1,text:"Expand Height",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.expandHeight,"data-test":"expand-height"}),{default:s(()=>e[29]||(e[29]=[m(" mdi-arrow-expand-vertical ")])),_:2},1040,["onClick"])]),_:1}))],512),[[E,l.expand]]),l.expand?(w(),b(o,{key:0,text:"Minimize",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.minMaxTransition,"data-test":"minimize-screen-icon"}),{default:s(()=>e[30]||(e[30]=[m(" mdi-window-minimize ")])),_:2},1040,["onClick"])]),_:1})):(w(),b(o,{key:1,text:"Maximize",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:r.minMaxTransition,"data-test":"maximize-screen-icon"}),{default:s(()=>e[31]||(e[31]=[m(" mdi-window-maximize ")])),_:2},1040,["onClick"])]),_:1})),i(o,{text:"Close",location:"top"},{activator:s(({props:d})=>[i(n,T(d,{onClick:e[2]||(e[2]=R=>t.$emit("close-graph")),"data-test":"close-graph-icon"}),{default:s(()=>e[32]||(e[32]=[m(" mdi-close-box ")])),_:2},1040)]),_:1})]),_:1},8,["class"]),[[E,!l.hideToolbarData]]),i(y,null,{default:s(()=>[S(x("div",we,[x("div",{id:`chart${a.id}`},null,8,xe),e[33]||(e[33]=x("div",{id:"betweenCharts"},null,-1)),S(x("div",{id:`overview${a.id}`},null,8,be),[[E,l.showOverview]])],512),[[E,l.expand]])]),_:1})]),_:1}),l.editGraph?(w(),b(_,{key:0,modelValue:l.editGraph,"onUpdate:modelValue":e[3]||(e[3]=d=>l.editGraph=d),title:l.title,"legend-position":l.legendPosition,items:l.items,"graph-min-y":l.graphMinY,"graph-max-y":l.graphMaxY,lines:l.lines,colors:l.colors,"start-date-time":l.graphStartDateTime,"end-date-time":l.graphEndDateTime,"time-zone":a.timeZone,onRemove:e[4]||(e[4]=d=>r.removeItems([d])),onOk:r.editGraphClose,onCancel:e[5]||(e[5]=d=>l.editGraph=!1)},null,8,["modelValue","title","legend-position","items","graph-min-y","graph-max-y","lines","colors","start-date-time","end-date-time","time-zone","onOk"])):I("",!0),i(P,{modelValue:l.errorDialog,"onUpdate:modelValue":e[7]||(e[7]=d=>l.errorDialog=d),"max-width":"600"},{default:s(()=>[i(g,{height:"24"},{default:s(()=>[i(v),e[34]||(e[34]=x("span",null," Errors ",-1)),i(v)]),_:1}),i(D,{class:"pa-3"},{default:s(()=>[i(f,{dense:""},{default:s(()=>[i(V,{readonly:"","hide-details":"",modelValue:l.title,"onUpdate:modelValue":e[6]||(e[6]=d=>l.title=d),class:"pb-2",label:"Graph Title"},null,8,["modelValue"])]),_:1}),i(f,{class:"my-3"},{default:s(()=>[i(z,{readonly:"",rows:"8",value:r.error},null,8,["value"])]),_:1}),i(f,null,{default:s(()=>[i(U,{block:"",onClick:r.clearErrors},{default:s(()=>e[35]||(e[35]=[m(" Clear ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),l.editGraphMenu?(w(),b(L,{key:1,modelValue:l.editGraphMenu,"onUpdate:modelValue":e[9]||(e[9]=d=>l.editGraphMenu=d),target:[l.editGraphMenuX,l.editGraphMenuY],absolute:"","offset-y":""},{default:s(()=>[i(G,null,{default:s(()=>[i(C,{onClick:e[8]||(e[8]=d=>l.editGraph=!0)},{default:s(()=>[i(k,{style:{cursor:"pointer"}},{default:s(()=>[m(" Edit "+N(l.title),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):I("",!0),l.editItem?(w(),b(K,{key:2,modelValue:l.editItem,"onUpdate:modelValue":e[10]||(e[10]=d=>l.editItem=d),colors:l.colors,item:l.selectedItem,onChangeColor:r.changeColor,onChangeLimits:r.changeLimits,onCancel:e[11]||(e[11]=d=>l.editItem=!1),onClose:r.closeEditItem},null,8,["modelValue","colors","item","onChangeColor","onChangeLimits","onClose"])):I("",!0),l.itemMenu?(w(),b(L,{key:3,modelValue:l.itemMenu,"onUpdate:modelValue":e[15]||(e[15]=d=>l.itemMenu=d),target:[l.itemMenuX,l.itemMenuY],absolute:"","offset-y":""},{default:s(()=>[i(G,{nav:"",density:"compact"},{default:s(()=>[i(F,null,{default:s(()=>[m(N(l.selectedItem.targetName)+" "+N(l.selectedItem.packetName)+" "+N(l.selectedItem.itemName),1)]),_:1}),i(C,{onClick:e[12]||(e[12]=d=>l.editItem=!0)},{prepend:s(()=>[i(n,{icon:"mdi-pencil"})]),default:s(()=>[i(k,null,{default:s(()=>e[36]||(e[36]=[m(" Edit ")])),_:1})]),_:1}),i(C,{onClick:e[13]||(e[13]=d=>r.clearData([l.selectedItem]))},{prepend:s(()=>[i(n,{icon:"mdi-eraser"})]),default:s(()=>[i(k,null,{default:s(()=>e[37]||(e[37]=[m(" Clear ")])),_:1})]),_:1}),i(C,{onClick:e[14]||(e[14]=d=>r.removeItems([l.selectedItem]))},{prepend:s(()=>[i(n,{icon:"mdi-delete"})]),default:s(()=>[i(k,null,{default:s(()=>e[38]||(e[38]=[m(" Delete ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):I("",!0),l.legendMenu?(w(),b(L,{key:4,modelValue:l.legendMenu,"onUpdate:modelValue":e[20]||(e[20]=d=>l.legendMenu=d),target:[l.legendMenuX,l.legendMenuY],absolute:"","offset-y":""},{default:s(()=>[i(G,null,{default:s(()=>[i(C,{onClick:e[16]||(e[16]=d=>r.moveLegend("top"))},{default:s(()=>[i(k,{style:{cursor:"pointer"}},{default:s(()=>e[39]||(e[39]=[m(" Legend Top ")])),_:1})]),_:1}),i(C,{onClick:e[17]||(e[17]=d=>r.moveLegend("bottom"))},{default:s(()=>[i(k,{style:{cursor:"pointer"}},{default:s(()=>e[40]||(e[40]=[m(" Legend Bottom ")])),_:1})]),_:1}),i(C,{onClick:e[18]||(e[18]=d=>r.moveLegend("left"))},{default:s(()=>[i(k,{style:{cursor:"pointer"}},{default:s(()=>e[41]||(e[41]=[m(" Legend Left ")])),_:1})]),_:1}),i(C,{onClick:e[19]||(e[19]=d=>r.moveLegend("right"))},{default:s(()=>[i(k,{style:{cursor:"pointer"}},{default:s(()=>e[42]||(e[42]=[m(" Legend RIght ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):I("",!0),a.sparkline?I("",!0):(w(),O("div",_e,[i(o,{text:"Click item to toggle, Right click to edit",location:"top"},{activator:s(({props:d})=>[i(n,te(ie(d)),{default:s(()=>e[43]||(e[43]=[m(" mdi-information-variant-circle ")])),_:2},1040)]),_:1})],512))])}const Ve=le("S",$(ve,[["render",Te],["__scopeId","data-v-51bcc3ba"]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./LabelWidget-xrmcVeq8-870ee165781b2cf65c51.js","./HorizontallineWidget-CXFqHclf-fa0e898fc84d1495ab9f.js","./HorizontalWidget-Cd_wl1b3-b4a1220511cbad208895.js","./Layout-Tf--nruw-77595e15c57a061b0dba.js","vue","./main-3edbee545cea57a5f76d.js","./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","vue-router","single-spa","vuex","vuetify"],function(m,h){"use strict";var r,l,a,o,n,c,s,g,d,i,u,p;return{setters:[e=>{r=e.default},e=>{l=e.default},e=>{a=e.default},e=>{o=e.r},e=>{n=e.resolveComponent,c=e.createElementBlock,s=e.openBlock,g=e.createBlock,d=e.createCommentVNode,i=e.createVNode,u=e.mergeProps},e=>{p=e.d},null,null,null,null,null],execute:function(){const e={mixins:[o],components:{LabelWidget:r,HorizontalLineWidget:l,HorizontalWidget:a},created(){this.labelSettings=[...this.appliedSettings],this.labelSettings.find(t=>t[0]==="0"&&t[1]==="RAW"&&t[2]==="font-weight")||this.labelSettings.push(["0","RAW","font-weight","bold"])}};function f(t,S,z,j,k,V){const w=n("label-widget"),W=n("horizontal-line-widget"),b=n("horizontal-widget");return s(),c("div",null,[t.parameters.length>0?(s(),g(w,{key:0,parameters:t.parameters.slice(0,1),settings:[...t.labelSettings],"widget-index":0},null,8,["parameters","settings"])):d("",!0),i(W,{settings:[...t.appliedSettings],"widget-index":1},null,8,["settings"]),i(b,u(t.listeners,{parameters:t.parameters.slice(1),settings:t.appliedSettings,widgets:t.widgets,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"screen-id":t.screenId}),null,16,["parameters","settings","widgets","screen-values","screen-time-zone","screen-id"])])}const v=m("default",p(e,[["render",f]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-oyqWpFXJ-18d727bbb6fbb5d9c2da.js","vue","./main-3edbee545cea57a5f76d.js","vue-router","single-spa","vuex","vuetify"],function(o,i){"use strict";var t,n,l,r,u;return{setters:[e=>{t=e.o},e=>{n=e.createElementBlock,l=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[t]};function c(s,m,y,f,p,d){return l(),n("hr",{style:r(s.computedStyle)},null,4)}const a=o("default",u(e,[["render",c]]))}}});