openc3-cosmos-tool-dataextractor 6.2.1 → 6.3.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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/{ArrayWidget-BxEO5hEG-cff7ca3850b9ee7ccf04.js → ArrayWidget-BbsN1dzF-628a48ddd546df4070b8.js} +2 -2
  3. data/tools/dataextractor/{ArrayplotWidget-B_VPoV4v-1a0f1b5080e44aa5c096.js → ArrayplotWidget-CCKEyYIx-6d07173fd12d80f35735.js} +1 -1
  4. data/tools/dataextractor/{BarColumn-C9dkpg2O-e915b0015c4639a654fe.js → BarColumn-C6p07yWK-666779db0750c1ebadc7.js} +1 -1
  5. data/tools/dataextractor/BlockWidget-DlCHbqZX-a9ca769b5e3b0bbd2acd.js +2 -0
  6. data/tools/dataextractor/{ButtonWidget-B6HM0Doo-7d8717e3caf76d83a127.js → ButtonWidget-CtfJzCBR-b62197faa48980332a1b.js} +2 -2
  7. data/tools/dataextractor/{CanvasWidget-DZQGG-yQ-d106052104943a68ea44.js → CanvasWidget-CqRlXc4r-cc8a34038ec4ce526bbb.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget--Xr_KsZs-fc510ab7ffa5ba439b7e.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-mhcPpAuN-7c9e05e2f29b16dbadeb.js → CanvasimageWidget-BPlj5QYK-13ec8a713665ade1263b.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-Cx-dH8Gc-c34adb3d02924d6c61f3.js → CanvasimagevalueWidget-DVFGLt8f-4f5633dad3b3f200d408.js} +1 -1
  11. data/tools/dataextractor/CanvaslabelWidget-CYNqmyP0-3b7e407138f6e4c9c667.js +1 -0
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-CwmYDCjr-1b448c5e0fbe1044b8b8.js → CanvaslabelvalueWidget-B7yIDmsn-1c9f0643ba0bb5117824.js} +1 -1
  13. data/tools/dataextractor/CanvaslineWidget-BICdxX0Q-f07fa9e5f0aa6c62ab9a.js +1 -0
  14. data/tools/dataextractor/{CanvaslinevalueWidget-C3sJnjLQ-fa88c024b2fb2b17bf0f.js → CanvaslinevalueWidget-Cq-Ddh0P-b66d8eab8af27044de3b.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-B74AWeaW-12ebd110293e4a41143b.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-CtyKbEWb-ccb870848170163c2174.js +1 -0
  17. data/tools/dataextractor/DataExtractor-3a2f72df0ddc4eb477a2.js +11 -0
  18. data/tools/dataextractor/DateWidget-BEVSczU8-d2a4af6d923392d456b3.js +1 -0
  19. data/tools/dataextractor/{DetailsDialog-BvbziA7Y-6f28f469c84c419861f3.js → DetailsDialog-DmEC5BTs-eb9aed44a991afc3bbd8.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-gFSYxzvT-f7399446b14ea744c31b.js → DynamicWidget-CfMtj7H8-1a77514dc9d10eb950e7.js} +1 -1
  21. data/tools/dataextractor/{FormatvalueWidget-CGpnTqVH-133f72da868ac7cd14d0.js → FormatvalueWidget-DN12xymS-ef1e3c5ecc7a5a285a26.js} +1 -1
  22. data/tools/dataextractor/Graph-Bgo0cjl3-2b4dd670dc45a476ee78.js +1 -0
  23. data/tools/dataextractor/{GraphWidget-Dycey-mj-6ca9be03ea82af2b5d4e.js → GraphWidget-DurWDmpg-5b6e88746fce404d63a0.js} +1 -1
  24. data/tools/dataextractor/{HorizontalWidget-D31NRWy5-abb5486e97e92156b945.js → HorizontalWidget-Cd_wl1b3-2f082f91f0835a47015b.js} +1 -1
  25. data/tools/dataextractor/HorizontalboxWidget-BcMTFBU--14c23f049b7ed4ccc5ab.js +1 -0
  26. data/tools/dataextractor/HorizontallineWidget-CXFqHclf-a2512d54d0d2c3500a11.js +1 -0
  27. data/tools/dataextractor/{IframeWidget-Ctj8OIcG-3fa9a0aed15ac7ca4499.js → IframeWidget-BPerHCCa-f7a47f06474527899267.js} +1 -1
  28. data/tools/dataextractor/{ImageLoader-BrNrCBvi-7d064e1a7e37df0d9145.js → ImageLoader-4N-7Gj61-65f0c4c60a0db7228d1f.js} +1 -1
  29. data/tools/dataextractor/ImageviewerWidget-Cw_H_HmZ-9b9fd53a83e5fbc5b12e.js +1 -0
  30. data/tools/dataextractor/{LabelWidget-t7I87dp7-be8d95e335f177fb8025.js → LabelWidget-xrmcVeq8-c47a9602ad0c744aeb10.js} +1 -1
  31. data/tools/dataextractor/LabelledWidget-D48QoyMk-6660043023148d5c0d1a.js +1 -0
  32. data/tools/dataextractor/LabelprogressbarWidget-C_950t6g-befc074698021ffa9172.js +1 -0
  33. data/tools/dataextractor/LabelsparklineWidget-0KXQyPoU-74cddf59c2c771df382d.js +1 -0
  34. data/tools/dataextractor/{LabelvalueWidget-Zx_yHCtl-8904e0b872333a7a4de8.js → LabelvalueWidget-CQ06wWDK-486bd30e375d042c1289.js} +1 -1
  35. data/tools/dataextractor/{LabelvaluedescWidget-BBSBh4vI-f61d4914308c35710de2.js → LabelvaluedescWidget-Bo8zT01X-e03b7c1c127057f3fe78.js} +1 -1
  36. data/tools/dataextractor/{LabelvaluelimitsbarWidget-CZueHYWG-7d2b7e8a4dd3d09f62c8.js → LabelvaluelimitsbarWidget-BucTw8Yk-ea967c7ba4a792eb5468.js} +1 -1
  37. data/tools/dataextractor/LabelvaluelimitscolumnWidget-Dflb1hNd-7f5dac37c7ec8f61ef8e.js +1 -0
  38. data/tools/dataextractor/{LabelvaluerangebarWidget-BhYTBgDq-1089526f49fd42b3b3d7.js → LabelvaluerangebarWidget-D8cbfXFM-9128a18699d726c439ee.js} +1 -1
  39. data/tools/dataextractor/{Layout-Bh7VzCZd-9d511d8c9e675f1f6ce0.js → Layout-Tf--nruw-e0fb5c4a18d72cae5c50.js} +1 -1
  40. data/tools/dataextractor/LedWidget-qH_FthkK-ece988250c3189416a21.js +1 -0
  41. data/tools/dataextractor/{LimitsbarWidget-Djui0IpK-db0193320b35f112151c.js → LimitsbarWidget-B9lAB2RD-3226e71ad4e06e0e9eca.js} +1 -1
  42. data/tools/dataextractor/{LimitscolorWidget-DdmvKzmx-760ce99153e4d9581716.js → LimitscolorWidget-c6Qa6su7-4b9cde7c85872dfec2db.js} +1 -1
  43. data/tools/dataextractor/{LimitscolumnWidget-Cc19IEjq-cd491faf213ea1abfafc.js → LimitscolumnWidget-CcLs_443-ba56814a39c38b383dd5.js} +1 -1
  44. data/tools/dataextractor/LinegraphWidget-BSVYLFo1-df1516ad12d88b461964.js +1 -0
  45. data/tools/dataextractor/{MatrixbycolumnsWidget-DnExVRF8-6415b265537125ac5090.js → MatrixbycolumnsWidget-DXFpZTre-a749cd15bb52f20353f3.js} +1 -1
  46. data/tools/dataextractor/{ProgressbarWidget-DIfqhHRE-f898635d07dbd7bb26f1.js → ProgressbarWidget-iYGw8-Dc-e42caf175eaeff2e212e.js} +1 -1
  47. data/tools/dataextractor/RadiobuttonWidget-ytmoVZ3u-a307a81d9589861226e8.js +1 -0
  48. data/tools/dataextractor/{RadiogroupWidget-Ci9sCX39-ac5543ac8838e936897d.js → RadiogroupWidget-CusMBhKH-7c82298ba1a712f210b4.js} +1 -1
  49. data/tools/dataextractor/{RangebarWidget-CN0YuHqy-ecf2cf2b720f8a1b38d1.js → RangebarWidget-D_zGTtCa-e66a9c439a91bed0b0c7.js} +1 -1
  50. data/tools/dataextractor/{RollupWidget-y4jBtJB2-c297ecc93c73adbdf7eb.js → RollupWidget-Dolsixyt-2493294ecfa94079df20.js} +1 -1
  51. data/tools/dataextractor/ScrollwindowWidget-DV2nZuNi-54a46846281b0967b8b8.js +1 -0
  52. data/tools/dataextractor/{SignalWidget-DQ5Uc2uV-505177e74bd46a7f89da.js → SignalWidget-d9-6h85k-468b4d34addbe7498066.js} +1 -1
  53. data/tools/dataextractor/SpacerWidget-BH0p2OLi-f42710f2c84606ec53d6.js +1 -0
  54. data/tools/dataextractor/{SparklineWidget-CZtvu2ss-b6f36a98829c8b227f43.js → SparklineWidget-coxi9r2g-58a96ed103dcfdb4bade.js} +1 -1
  55. data/tools/dataextractor/TabbookWidget-B1XKplGH-adf7286fe28719f57824.js +1 -0
  56. data/tools/dataextractor/TextboxWidget-C-_M2M4l-8ed8ddd370d8e0864684.js +1 -0
  57. data/tools/dataextractor/{TextfieldWidget-Df0ANSiU-5d9e393b632b17b1c155.js → TextfieldWidget-C08N4JE8-6073a109b175a670e266.js} +1 -1
  58. data/tools/dataextractor/TimeWidget-DtwdEcFg-aeffc1cf1e8c43c5c052.js +1 -0
  59. data/tools/dataextractor/TitleWidget-CT-aLcNb-2e40d7e7ae13d185702f.js +1 -0
  60. data/tools/dataextractor/{VWidget-C4spAawK-d329ea59a07128fa2516.js → VWidget-DQqb7NVW-2ccf683b4c5d0670d169.js} +1 -1
  61. data/tools/dataextractor/ValueWidget-C6RanBj3-933edfabb47637a3fb48.js +1 -0
  62. data/tools/dataextractor/ValuelimitsbarWidget-B3bvjfxc-90b60fcb425c27997078.js +1 -0
  63. data/tools/dataextractor/ValuelimitscolumnWidget-QvhI6EcE-6a33927ea8fee21f5292.js +1 -0
  64. data/tools/dataextractor/ValuerangebarWidget-Dt3K9BnC-84d4b57c74377c7f618b.js +1 -0
  65. data/tools/dataextractor/{VerticalWidget-D8jUFxjS-daaee1e00ea12c835005.js → VerticalWidget-BIIViZgI-40095036eddbfecee85d.js} +1 -1
  66. data/tools/dataextractor/VerticalboxWidget-DY72fLHW-7570ee4c3a4582b87ab2.js +1 -0
  67. data/tools/dataextractor/{Widget-fRCERxGf-df12e3253f20a90277af.js → Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js} +1 -1
  68. data/tools/dataextractor/main-dcd08bcf7c907cfa4b1a.js +1497 -0
  69. data/tools/dataextractor/main.js +1 -1
  70. metadata +70 -73
  71. data/tools/dataextractor/BlockWidget-CuefOin6-1cda113a635c90beff7b.js +0 -2
  72. data/tools/dataextractor/CanvasdotWidget-6wuCSnw_-60891d8c557da28d9a53.js +0 -1
  73. data/tools/dataextractor/CanvaslabelWidget-CQZCeohU-fd94b94efcad23998053.js +0 -1
  74. data/tools/dataextractor/CanvaslineWidget-nTP3fJB4-334a2467ab9208f4b2bf.js +0 -1
  75. data/tools/dataextractor/CheckbuttonWidget-5-8YDsQL-70db11c5aff3d025127a.js +0 -1
  76. data/tools/dataextractor/ComboboxWidget-DzBL8h9f-d391499fa8f52735d75c.js +0 -1
  77. data/tools/dataextractor/DataExtractor-927bd22de5c0ae5dfab1.js +0 -11
  78. data/tools/dataextractor/DateWidget-CW7Od7lB-9d5e7143d42b1f4bd25c.js +0 -1
  79. data/tools/dataextractor/Graph-3rkhFP3G-41ad5f169518a05ffe96.js +0 -1
  80. data/tools/dataextractor/HorizontalboxWidget-Br8dSVHD-c420743c2d257929ff8d.js +0 -1
  81. data/tools/dataextractor/HorizontallineWidget-CbxREBYI-926edb6dc5e948139aee.js +0 -1
  82. data/tools/dataextractor/ImageviewerWidget-XrsqxmLo-37701b7c28c33e3f26de.js +0 -1
  83. data/tools/dataextractor/LabelledWidget-C7TDf92M-386cc966e7a7bee61f06.js +0 -1
  84. data/tools/dataextractor/LabelprogressbarWidget-wwLURt1u-d6fc575b7cd39195f08f.js +0 -1
  85. data/tools/dataextractor/LabelsparklineWidget-B3awLUyP-250f74c0fab15bc71c74.js +0 -1
  86. data/tools/dataextractor/LabelvaluelimitscolumnWidget-BTvzyQMq-e607c4afced043113273.js +0 -1
  87. data/tools/dataextractor/LedWidget-CxJjJBBS-5cddf2ea29269426c967.js +0 -1
  88. data/tools/dataextractor/LinegraphWidget-BtieJxeL-7a31a2e3d2503e30b17c.js +0 -1
  89. data/tools/dataextractor/RadiobuttonWidget-QzIkNP7m-5dc15db55d10e7efc245.js +0 -1
  90. data/tools/dataextractor/ScrollwindowWidget-CBzYk4Y3-d5486f7af2d655a2e3d6.js +0 -1
  91. data/tools/dataextractor/SpacerWidget-6rsc_dSM-37b0ea34ba0bcaf1a3ac.js +0 -1
  92. data/tools/dataextractor/TabbookWidget-DNALU0jl-55f5bbf0abc3530b2337.js +0 -1
  93. data/tools/dataextractor/TextboxWidget-5hqPj74D-ea225beadf896f45d134.js +0 -1
  94. data/tools/dataextractor/TimeWidget-C6XQMUG2-5ce11fe0b79e651b7878.js +0 -1
  95. data/tools/dataextractor/TitleWidget-B9SPUlbW-a14570807f6ff01ac08b.js +0 -1
  96. data/tools/dataextractor/ValueWidget-D4RrYVEK-4a4dbf955a579d97b92f.js +0 -1
  97. data/tools/dataextractor/ValuelimitsbarWidget-Bc9_Vj_f-069638962579444e0cd2.js +0 -1
  98. data/tools/dataextractor/ValuelimitscolumnWidget-DHKIL7sf-1637be45741a8217eef8.js +0 -1
  99. data/tools/dataextractor/ValuerangebarWidget-CecQRIok-afbe3fc59a25b50dc045.js +0 -1
  100. data/tools/dataextractor/VerticalboxWidget-B4eGUSYH-22ef65ab4ff72ecbb575.js +0 -1
  101. data/tools/dataextractor/main-709b563160893769eb97.js +0 -1421
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4ae9adc1d06feeafda178f4111ca440116b946b65497b9337745c20a384355b
4
- data.tar.gz: 7d6708c68a853b6f9bf6ebf4988b5f57c0f7d99455bd24b0bd2d747f810d249f
3
+ metadata.gz: ee382199726db694812e945bdcdfe42ea11da204728f2b5472caed301f704e83
4
+ data.tar.gz: 5068830067ca6b3d95f39818a72a9df5153abc98138a0ad3ef4e9ac5fd7ee244
5
5
  SHA512:
6
- metadata.gz: 7eb759fc3a597ed93ace27e7e7d4102f72ec0590f93956101dfc1c2a202c8e4aa554ed5facbb5c5e96556b24ec3825f4c47ed40c9fe20c92f1bbda7d35abc223
7
- data.tar.gz: d539d22881683021451a5b59a34615d058719ea79cd0f7ee25210bc80f15c91802f54b73094e7a6ecbc9bc7389bd0275bfba92ebcab85633e968dbd797c339dc
6
+ metadata.gz: b926987563cd79a127075e7e91d47360dd1464901f4c785ec99ac2f9393275d8db2a32d517e535ee26170cf3fc6dd93acab75054818be64b54cc014a3022be9a
7
+ data.tar.gz: e6c8e752fb554857281aa44eabca6869ec9655342e342227cd4f036ef9d1f339ab29821d31c5a98cbb0643553919a945ec289ef6aa7b1decc4cfb8978aa25c40
@@ -1,2 +1,2 @@
1
- System.register(["./main-709b563160893769eb97.js","vue","./DetailsDialog-BvbziA7Y-6f28f469c84c419861f3.js","single-spa","./VWidget-C4spAawK-d329ea59a07128fa2516.js","vue-router","vuex","vuetify","./Widget-fRCERxGf-df12e3253f20a90277af.js"],function(B,N){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.s},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
2
- `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},S={class:"array-widget-container"};function _(e,r,s,k,D,o){const m=a("v-textarea"),z=a("v-list-item-title"),L=a("v-list-item"),M=a("v-list"),R=a("v-menu"),A=a("details-dialog");return u(),c("div",S,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(R,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(M,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,E)=>(u(),v(L,{key:E,onClick:w(n.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(A,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const P=B("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
1
+ System.register(["./main-dcd08bcf7c907cfa4b1a.js","vue","./DetailsDialog-DmEC5BTs-eb9aed44a991afc3bbd8.js","single-spa","./VWidget-DQqb7NVW-2ccf683b4c5d0670d169.js","vue-router","vuex","vuetify","./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js"],function(B,T){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
2
+ `,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},S={class:"array-widget-container"};function _(e,r,s,k,D,o){const m=a("v-textarea"),z=a("v-list-item-title"),L=a("v-list-item"),M=a("v-list"),N=a("v-menu"),E=a("details-dialog");return u(),c("div",S,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(N,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(M,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,P)=>(u(),v(L,{key:P,onClick:w(n.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(E,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const W=B("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
@@ -1 +1 @@
1
- System.register(["./main-709b563160893769eb97.js","./GraphWidget-Dycey-mj-6ca9be03ea82af2b5d4e.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-fRCERxGf-df12e3253f20a90277af.js"],function(m,y){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.s,l=s.A,h=s.R},s=>{d=s._},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},mixins:[d],created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{class:"pa-1",id:`chart${e.id}`},null,8,b)}const x=m("default",c(s,[["render",g]]))}}});
1
+ System.register(["./main-dcd08bcf7c907cfa4b1a.js","./GraphWidget-DurWDmpg-5b6e88746fce404d63a0.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js"],function(m,y){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.m,h=s.D},s=>{d=s._},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},mixins:[d],created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},g=["id"];function b(e,t,n,r,i,a){return p(),u("div",{class:"pa-1",id:`chart${e.id}`},null,8,g)}const _=m("default",c(s,[["render",b]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-fRCERxGf-df12e3253f20a90277af.js","./main-709b563160893769eb97.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.O}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","./main-dcd08bcf7c907cfa4b1a.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.F}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
@@ -0,0 +1,2 @@
1
+ System.register(["./main-dcd08bcf7c907cfa4b1a.js","vue","./DetailsDialog-DmEC5BTs-eb9aed44a991afc3bbd8.js","single-spa","./VWidget-DQqb7NVW-2ccf683b4c5d0670d169.js","vue-router","vuex","vuetify","./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.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 _(t,r,D,W,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),B=a("v-list-item"),F=a("v-list"),M=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(M,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(F,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,N)=>(h(),v(B,{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",_],["__scopeId","data-v-4d4589c2"]]))}}});
@@ -1,2 +1,2 @@
1
- System.register(["./main-709b563160893769eb97.js","vue","single-spa","./Widget-fRCERxGf-df12e3253f20a90277af.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var s,E$1,EA,OA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{s=e.s,E$1=e.E,EA=e.a,OA=e.O},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},watch:{modelValue:function(e,t){e?(EA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(r=>{r.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?EA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(r=>{r.data.status!=="WAITING"&&(this.$emit("status",r.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},methods:{async approve(){if(this.canApprove)await EA.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();E$1.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await EA.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await E$1.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await E$1.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,r,p,a,l){const c=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),n=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),v=resolveComponent("v-card-text"),u=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{persistent:r.persistent,modelValue:l.show,"onUpdate:modelValue":t[3]||(t[3]=d=>l.show=d),width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(c),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(c)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(m,{type:"error",modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=d=>a.error=d),dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(n,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(r.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(n,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(r.cmdString),1)]),_:1}),createVNode(n,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(r.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(n,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=d=>a.username=d),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(n,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=d=>a.password=d),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(n,{class:"pt-2"},{default:withCtx(()=>[createVNode(c),createVNode(C,{type:"submit",onClick:withModifiers(l.reject,["prevent"]),class:"mx-2",color:"secondary",outlined:"",disabled:l.disableButtons,"data-test":"reject"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Reject ")])),_:1},8,["onClick","disabled"]),createVNode(C,{type:"submit",onClick:withModifiers(l.approve,["prevent"]),class:"mx-2",color:"primary",disabled:l.disableButtons,"data-test":"approve"},{default:withCtx(()=>t[6]||(t[6]=[createTextVNode(" Approve ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["persistent","modelValue"])}const N=s(S,[["render",E],["__scopeId","data-v-edfbf188"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new OA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
2
- `).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,r={}){let p=[];for(const a in r)p.push({key:a,value:r[a],readonly:!1});EA.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,r,p,a,l){const c=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),m=resolveComponent("v-row"),n=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(c,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:l.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(l.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>t[2]||(t[2]=[createTextVNode("Hazardous")])),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(n),createVNode(c,{onClick:l.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>t[4]||(t[4]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(c,{onClick:l.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",s(_sfc_main,[["render",_sfc_render]]))}}});
1
+ System.register(["./main-dcd08bcf7c907cfa4b1a.js","vue","single-spa","./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,E$1,OA,FA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,E$1=e.E,OA=e.O,FA=e.F},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},watch:{modelValue:function(e,t){e?(OA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?OA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},methods:{async approve(){if(this.canApprove)await OA.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();E$1.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await OA.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await E$1.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await E$1.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,p,a,r){const n=resolveComponent("v-spacer"),V=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),f=resolveComponent("v-container"),v=resolveComponent("v-card-text"),u=resolveComponent("v-card"),w=resolveComponent("v-dialog");return openBlock(),createBlock(w,{persistent:s.persistent,modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(V,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(f,{fluid:""},{default:withCtx(()=>[createVNode(m,{type:"error",modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",onClick:withModifiers(r.reject,["prevent"]),class:"mx-2",color:"secondary",outlined:"",disabled:r.disableButtons,"data-test":"reject"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Reject ")])),_:1},8,["onClick","disabled"]),createVNode(C,{type:"submit",onClick:withModifiers(r.approve,["prevent"]),class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve"},{default:withCtx(()=>t[6]||(t[6]=[createTextVNode(" Approve ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["persistent","modelValue"])}const N=d(S,[["render",E],["__scopeId","data-v-edfbf188"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new FA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
2
+ `).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});OA.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,p,a,r){const n=resolveComponent("v-btn"),V=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),f=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(f,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(V,null,{default:withCtx(()=>t[2]||(t[2]=[createTextVNode("Hazardous")])),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:r.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>t[4]||(t[4]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:r.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
@@ -1 +1 @@
1
- System.register(["./Layout-Bh7VzCZd-9d511d8c9e675f1f6ce0.js","vue","./main-709b563160893769eb97.js","./Widget-fRCERxGf-df12e3253f20a90277af.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.s},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},h=["width","height"];function d(r,k,y,B,x,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,h)}const w=p("default",g(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
1
+ System.register(["./Layout-Tf--nruw-e0fb5c4a18d72cae5c50.js","vue","./main-dcd08bcf7c907cfa4b1a.js","./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.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"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.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 +1 @@
1
- System.register(["./Widget-fRCERxGf-df12e3253f20a90277af.js","./ImageLoader-BrNrCBvi-7d064e1a7e37df0d9145.js","vue","./main-709b563160893769eb97.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var s,i,n,a,l,c,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.s},null,null,null,null],execute:function(){const e={mixins:[s,i],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function g(t,o,y,k,N,r){return t.imageUrl?(l(),n("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...p)=>r.clickHandler&&r.clickHandler(...p))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",g]]))}}});
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","./ImageLoader-4N-7Gj61-65f0c4c60a0db7228d1f.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.o},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[i,n],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,N,r){return t.imageUrl?(l(),s("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-fRCERxGf-df12e3253f20a90277af.js","./ImageLoader-BrNrCBvi-7d064e1a7e37df0d9145.js","vue","./main-709b563160893769eb97.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,g,o,f,u,c,p;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,g=t.createCommentVNode,o=t.Fragment,f=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{p=t.s},null,null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return n(),l("g",null,[(n(!0),l(o,null,f(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):g("",!0)])}const $=v("default",p(t,[["render",k]]))}}});
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","./ImageLoader-4N-7Gj61-65f0c4c60a0db7228d1f.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,o,g,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,o=t.createCommentVNode,g=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,$,a){return n(),l("g",null,[(n(!0),l(g,null,p(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):o("",!0)])}const N=v("default",f(t,[["render",k]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.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 +1 @@
1
- System.register(["./Widget-fRCERxGf-df12e3253f20a90277af.js","vue","./main-709b563160893769eb97.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.s},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,f,h,d,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,d,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,a,c;return{setters:[e=>{l=e.o},e=>{n=e.createElementBlock,s=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},o=["x1","y1","x2","y2"];function u(t,r,d,k,x,m){return s(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,o)}const y=i("default",c(e,[["render",u]]))}}});
@@ -1 +1 @@
1
- System.register(["./Widget-fRCERxGf-df12e3253f20a90277af.js","vue","./main-709b563160893769eb97.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))}}});
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.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]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","vue","./main-dcd08bcf7c907cfa4b1a.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,o,r,u;return{setters:[e=>{l=e.o},e=>{n=e.resolveComponent,s=e.createBlock,o=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,k){const d=n("v-select");return o(),s(d,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=v=>t.value=v),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
@@ -0,0 +1,11 @@
1
+ System.register(["./main-dcd08bcf7c907cfa4b1a.js","vue","vue-router","single-spa","vuex","vuetify"],function(yn,_s){"use strict";var ot,at,ct,lt,ut,dt,ht,x,F,k,ft,h,m,W,z,K,ie,ce,N,G,je,re,Ue,pt,Le;return{setters:[O=>{ot=O.d,at=O._,ct=O.a,lt=O.P,ut=O.k,dt=O.b,ht=O.y},O=>{x=O.resolveComponent,F=O.createBlock,k=O.openBlock,ft=O.Teleport,h=O.createVNode,m=O.withCtx,W=O.createElementVNode,z=O.toDisplayString,K=O.createElementBlock,ie=O.Fragment,ce=O.renderList,N=O.createTextVNode,G=O.mergeProps,je=O.createSlots,re=O.createCommentVNode,Ue=O.normalizeStyle,pt=O.withModifiers,Le=O.withKeys},null,null,null,null],execute:function(){var O=document.createElement("style");O.textContent=`.title-font[data-v-fe8f606e]{font-size:1.125rem}.v-progress-linear__determinate[data-v-fe8f606e]{transition:none!important}
2
+ /*$vite$:1*/`,document.head.appendChild(O);const _n={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},wn={class:"app-title mr-2"};function vn(t,e,n,i,r,s){const o=x("v-col"),a=x("v-row"),c=x("v-icon"),l=x("v-btn"),d=x("v-divider"),g=x("v-list-item-title"),y=x("v-list-item"),f=x("v-list"),v=x("v-menu"),p=x("v-radio"),S=x("v-list-item-action"),T=x("v-radio-group"),C=x("v-checkbox");return k(),F(ft,{to:"#openc3-menu"},[h(a,{"no-gutters":""},{default:m(()=>[h(o,{"align-self":"end"},{default:m(()=>[W("span",wn,z(n.title),1)]),_:1})]),_:1}),h(a,{dense:"",class:"flex-nowrap"},{default:m(()=>[(k(!0),K(ie,null,ce(n.menus,(R,j)=>(k(),F(v,{ref_for:!0,ref:"topmenu",key:j},{activator:m(({props:_})=>[h(l,G({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button",text:R.label,"data-test":s.formatDT(`${n.title} ${R.label}`)}),{append:m(()=>[h(c,{class:"menu-button-icon"},{default:m(()=>e[0]||(e[0]=[N(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:m(()=>[h(f,null,{default:m(()=>[(k(!0),K(ie,null,ce(R.items,(_,P)=>(k(),K(ie,null,[_.divider?(k(),F(d,{key:P+"-divider"})):_.subMenu&&_.subMenu.length>0?(k(),K("div",{key:P+"-submenu"},[(k(),F(v,{"open-on-hover":"",location:"right",key:P},{activator:m(({props:A})=>[(k(),F(y,G({ref_for:!0},A,{disabled:_.disabled,key:P}),je({append:m(()=>[h(c,null,{default:m(()=>e[1]||(e[1]=[N(" mdi-chevron-right ")])),_:1})]),default:m(()=>[!_.radio&&!_.checkbox?(k(),F(g,{key:0,style:Ue("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:m(()=>[N(z(_.label),1)]),_:2},1032,["style"])):re("",!0)]),_:2},[_.icon?{name:"prepend",fn:m(()=>[h(c,{disabled:_.disabled},{default:m(()=>[N(z(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:m(()=>[h(f,null,{default:m(()=>[(k(!0),K(ie,null,ce(_.subMenu,(A,U)=>(k(),F(y,{key:U,"prepend-icon":A.icon,onClick:q=>s.subMenuClick(A)},{default:m(()=>[h(g,null,{default:m(()=>[N(z(A.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(k(),F(T,{"model-value":_.value,"onUpdate:modelValue":_.command,key:P+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:m(()=>[(k(!0),K(ie,null,ce(_.choices,(A,U)=>(k(),F(y,{key:U+"-choice"},{default:m(()=>[h(S,{class:"list-action"},{default:m(()=>[h(p,{color:"secondary",label:A.label,value:A.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(k(),F(y,{onClick:A=>_.command(_),disabled:_.disabled,"data-test":s.formatDT(`${n.title} ${R.label} ${_.label}`),key:P+"-list"},je({default:m(()=>[_.checkbox?(k(),F(S,{key:0,class:"list-action"},{default:m(()=>[h(C,{modelValue:_.checked,"onUpdate:modelValue":A=>_.checked=A,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):re("",!0),!_.radio&&!_.checkbox?(k(),F(g,{key:1,style:Ue("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:m(()=>[N(z(_.label),1)]),_:2},1032,["style"])):re("",!0)]),_:2},[_.icon?{name:"prepend",fn:m(()=>[h(c,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const En=ot(_n,[["render",vn],["__scopeId","data-v-4d454b93"]]);var Tn=Object.defineProperty,Sn=(t,e,n)=>e in t?Tn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ye=(t,e,n)=>Sn(t,typeof e!="symbol"?e+"":e,n);function mt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Cn}=Object.prototype,{getPrototypeOf:Fe}=Object,_e=(t=>e=>{const n=Cn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$=t=>(t=t.toLowerCase(),e=>_e(e)===t),we=t=>e=>typeof e===t,{isArray:se}=Array,le=we("undefined");function xn(t){return t!==null&&!le(t)&&t.constructor!==null&&!le(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const gt=$("ArrayBuffer");function On(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&gt(t.buffer),e}const Rn=we("string"),V=we("function"),bt=we("number"),ve=t=>t!==null&&typeof t=="object",kn=t=>t===!0||t===!1,Ee=t=>{if(_e(t)!=="object")return!1;const e=Fe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},An=$("Date"),Dn=$("File"),Pn=$("Blob"),In=$("FileList"),Nn=t=>ve(t)&&V(t.pipe),jn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=_e(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},Un=$("URLSearchParams"),[Ln,Fn,Mn,Vn]=["ReadableStream","Request","Response","Headers"].map($),qn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,r;if(typeof t!="object"&&(t=[t]),se(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(i=0;i<o;i++)a=s[i],e.call(null,t[a],a,t)}}function yt(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const X=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_t=t=>!le(t)&&t!==X;function Me(){const{caseless:t}=_t(this)&&this||{},e={},n=(i,r)=>{const s=t&&yt(e,r)||r;Ee(e[s])&&Ee(i)?e[s]=Me(e[s],i):Ee(i)?e[s]=Me({},i):se(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&ue(arguments[i],n);return e}const Bn=(t,e,n,{allOwnKeys:i}={})=>(ue(e,(r,s)=>{n&&V(r)?t[s]=mt(r,n):t[s]=r},{allOwnKeys:i}),t),$n=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hn=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},zn=(t,e,n,i)=>{let r,s,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],(!i||i(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Fe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Jn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},Wn=t=>{if(!t)return null;if(se(t))return t;let e=t.length;if(!bt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Fe(Uint8Array)),Zn=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},Gn=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Xn=$("HTMLFormElement"),Qn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),wt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Yn=$("RegExp"),vt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};ue(n,(r,s)=>{let o;(o=e(r,s,t))!==!1&&(i[s]=o||r)}),Object.defineProperties(t,i)},ei=t=>{vt(t,(e,n)=>{if(V(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(V(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ti=(t,e)=>{const n={},i=r=>{r.forEach(s=>{n[s]=!0})};return se(t)?i(t):i(String(t).split(e)),n},ni=()=>{},ii=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ri(t){return!!(t&&V(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const si=t=>{const e=new Array(10),n=(i,r)=>{if(ve(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=se(i)?[]:{};return ue(i,(o,a)=>{const c=n(o,r+1);!le(c)&&(s[a]=c)}),e[r]=void 0,s}}return i};return n(t,0)},oi=$("AsyncFunction"),ai=t=>t&&(ve(t)||V(t))&&V(t.then)&&V(t.catch),Et=((t,e)=>t?setImmediate:e?((n,i)=>(X.addEventListener("message",({source:r,data:s})=>{r===X&&s===n&&i.length&&i.shift()()},!1),r=>{i.push(r),X.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(X.postMessage)),ci=typeof queueMicrotask<"u"?queueMicrotask.bind(X):typeof process<"u"&&process.nextTick||Et,u={isArray:se,isArrayBuffer:gt,isBuffer:xn,isFormData:jn,isArrayBufferView:On,isString:Rn,isNumber:bt,isBoolean:kn,isObject:ve,isPlainObject:Ee,isReadableStream:Ln,isRequest:Fn,isResponse:Mn,isHeaders:Vn,isUndefined:le,isDate:An,isFile:Dn,isBlob:Pn,isRegExp:Yn,isFunction:V,isStream:Nn,isURLSearchParams:Un,isTypedArray:Kn,isFileList:In,forEach:ue,merge:Me,extend:Bn,trim:qn,stripBOM:$n,inherits:Hn,toFlatObject:zn,kindOf:_e,kindOfTest:$,endsWith:Jn,toArray:Wn,forEachEntry:Zn,matchAll:Gn,isHTMLForm:Xn,hasOwnProperty:wt,hasOwnProp:wt,reduceDescriptors:vt,freezeMethods:ei,toObjectSet:ti,toCamelCase:Qn,noop:ni,toFiniteNumber:ii,findKey:yt,global:X,isContextDefined:_t,isSpecCompliantForm:ri,toJSONObject:si,isAsyncFn:oi,isThenable:ai,setImmediate:Et,asap:ci};function E(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}u.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const Tt=E.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(E,St),Object.defineProperty(Tt,"isAxiosError",{value:!0}),E.from=(t,e,n,i,r,s)=>{const o=Object.create(Tt);return u.toFlatObject(t,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),E.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const li=null;function Ve(t){return u.isPlainObject(t)||u.isArray(t)}function Ct(t){return u.endsWith(t,"[]")?t.slice(0,-2):t}function xt(t,e,n){return t?t.concat(e).map(function(i,r){return i=Ct(i),!n&&r?"["+i+"]":i}).join(n?".":""):e}function ui(t){return u.isArray(t)&&!t.some(Ve)}const di=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Te(t,e,n){if(!u.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=u.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,v){return!u.isUndefined(v[f])});const i=n.metaTokens,r=n.visitor||l,s=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(r))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(u.isDate(f))return f.toISOString();if(!a&&u.isBlob(f))throw new E("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(f)||u.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,v,p){let S=f;if(f&&!p&&typeof f=="object"){if(u.endsWith(v,"{}"))v=i?v:v.slice(0,-2),f=JSON.stringify(f);else if(u.isArray(f)&&ui(f)||(u.isFileList(f)||u.endsWith(v,"[]"))&&(S=u.toArray(f)))return v=Ct(v),S.forEach(function(T,C){!(u.isUndefined(T)||T===null)&&e.append(o===!0?xt([v],C,s):o===null?v:v+"[]",c(T))}),!1}return Ve(f)?!0:(e.append(xt(p,v,s),c(f)),!1)}const d=[],g=Object.assign(di,{defaultVisitor:l,convertValue:c,isVisitable:Ve});function y(f,v){if(!u.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(f),u.forEach(f,function(p,S){(!(u.isUndefined(p)||p===null)&&r.call(e,p,u.isString(S)?S.trim():S,v,g))===!0&&y(p,v?v.concat(S):[S])}),d.pop()}}if(!u.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function qe(t,e){this._pairs=[],t&&Te(t,this,e)}const Rt=qe.prototype;Rt.append=function(t,e){this._pairs.push([t,e])},Rt.toString=function(t){const e=t?function(n){return t.call(this,n,Ot)}:Ot;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function hi(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kt(t,e,n){if(!e)return t;const i=n&&n.encode||hi;u.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(r?s=r(e,n):s=u.isURLSearchParams(e)?e.toString():new qe(e,n).toString(i),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class At{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){u.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fi=typeof URLSearchParams<"u"?URLSearchParams:qe,pi=typeof FormData<"u"?FormData:null,mi=typeof Blob<"u"?Blob:null,gi={isBrowser:!0,classes:{URLSearchParams:fi,FormData:pi,Blob:mi},protocols:["http","https","file","blob","url","data"]},Be=typeof window<"u"&&typeof document<"u",$e=typeof navigator=="object"&&navigator||void 0,bi=Be&&(!$e||["ReactNative","NativeScript","NS"].indexOf($e.product)<0),yi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_i=Be&&window.location.href||"http://localhost",wi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Be,hasStandardBrowserEnv:bi,hasStandardBrowserWebWorkerEnv:yi,navigator:$e,origin:_i},Symbol.toStringTag,{value:"Module"})),L={...wi,...gi};function vi(t,e){return Te(t,new L.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,s){return L.isNode&&u.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Ei(t){return u.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ti(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}function Pt(t){function e(n,i,r,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&u.isArray(r)?r.length:o,c?(u.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!a):((!r[o]||!u.isObject(r[o]))&&(r[o]=[]),e(n,i,r[o],s)&&u.isArray(r[o])&&(r[o]=Ti(r[o])),!a)}if(u.isFormData(t)&&u.isFunction(t.entries)){const n={};return u.forEachEntry(t,(i,r)=>{e(Ei(i),r,n,0)}),n}return null}function Si(t,e,n){if(u.isString(t))try{return(e||JSON.parse)(t),u.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const de={transitional:Dt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=u.isObject(t);if(r&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return i?JSON.stringify(Pt(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return vi(t,this.formSerializer).toString();if((s=u.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Te(s?{"files[]":t}:t,o&&new o,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Si(t)):t}],transformResponse:[function(t){const e=this.transitional||de.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(n&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(r)throw s.name==="SyntaxError"?E.from(s,E.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],t=>{de.headers[t]={}});const Ci=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xi=t=>{const e={};let n,i,r;return t&&t.split(`
3
+ `).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),i=s.substring(r+1).trim(),!(!n||e[n]&&Ci[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},It=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function Se(t){return t===!1||t==null?t:u.isArray(t)?t.map(Se):String(t)}function Oi(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const Ri=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function He(t,e,n,i,r){if(u.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!u.isString(e)){if(u.isString(i))return e.indexOf(i)!==-1;if(u.isRegExp(i))return i.test(e)}}function ki(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function Ai(t,e){const n=u.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,s,o){return this[i].call(this,e,r,s,o)},configurable:!0})})}let M=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(o,a,c){const l=he(a);if(!l)throw new Error("header name must be a non-empty string");const d=u.findKey(i,l);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||a]=Se(o))}const s=(o,a)=>u.forEach(o,(c,l)=>r(c,l,a));if(u.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(u.isString(t)&&(t=t.trim())&&!Ri(t))s(xi(t),e);else if(u.isHeaders(t))for(const[o,a]of t.entries())r(a,o,n);else t!=null&&r(e,t,n);return this}get(t,e){if(t=he(t),t){const n=u.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return Oi(i);if(u.isFunction(e))return e.call(this,i,n);if(u.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=he(t),t){const n=u.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||He(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function r(s){if(s=he(s),s){const o=u.findKey(n,s);o&&(!e||He(n,n[o],o,e))&&(delete n[o],i=!0)}}return u.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];(!t||He(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return u.forEach(this,(i,r)=>{const s=u.findKey(n,r);if(s){e[s]=Se(i),delete e[r];return}const o=t?ki(r):String(r).trim();o!==r&&delete e[r],e[o]=Se(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return u.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&u.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
4
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const e=(this[It]=this[It]={accessors:{}}).accessors,n=this.prototype;function i(r){const s=he(r);e[s]||(Ai(n,r),e[s]=!0)}return u.isArray(t)?t.forEach(i):i(t),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(M.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),u.freezeMethods(M);function ze(t,e){const n=this||de,i=e||n,r=M.from(i.headers);let s=i.data;return u.forEach(t,function(o){s=o.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Nt(t){return!!(t&&t.__CANCEL__)}function oe(t,e,n){E.call(this,t??"canceled",E.ERR_CANCELED,e,n),this.name="CanceledError"}u.inherits(oe,E,{__CANCEL__:!0});function jt(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Di(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Pi(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,s=0,o;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),l=i[s];o||(o=c),n[r]=a,i[r]=c;let d=s,g=0;for(;d!==r;)g+=n[d++],d=d%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),c-o<e)return;const y=l&&c-l;return y?Math.round(g*1e3/y):void 0}}function Ii(t,e){let n=0,i=1e3/e,r,s;const o=(a,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),t.apply(null,a)};return[(...a)=>{const c=Date.now(),l=c-n;l>=i?o(a,c):(r=a,s||(s=setTimeout(()=>{s=null,o(r)},i-l)))},()=>r&&o(r)]}const Ce=(t,e,n=3)=>{let i=0;const r=Pi(50,250);return Ii(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-i,l=r(c),d=o<=a;i=o;const g={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(g)},n)},Ut=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Lt=t=>(...e)=>u.asap(()=>t(...e)),Ni=L.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,L.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,ji=L.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const o=[t+"="+encodeURIComponent(e)];u.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),u.isString(i)&&o.push("path="+i),u.isString(r)&&o.push("domain="+r),s===!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 Ui(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Li(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ft(t,e,n){let i=!Ui(e);return t&&(i||n==!1)?Li(t,e):e}const Mt=t=>t instanceof M?{...t}:t;function Q(t,e){e=e||{};const n={};function i(l,d,g,y){return u.isPlainObject(l)&&u.isPlainObject(d)?u.merge.call({caseless:y},l,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function r(l,d,g,y){if(u.isUndefined(d)){if(!u.isUndefined(l))return i(void 0,l,g,y)}else return i(l,d,g,y)}function s(l,d){if(!u.isUndefined(d))return i(void 0,d)}function o(l,d){if(u.isUndefined(d)){if(!u.isUndefined(l))return i(void 0,l)}else return i(void 0,d)}function a(l,d,g){if(g in e)return i(l,d);if(g in t)return i(void 0,l)}const c={url:s,method:s,data:s,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:a,headers:(l,d,g)=>r(Mt(l),Mt(d),g,!0)};return u.forEach(Object.keys(Object.assign({},t,e)),function(l){const d=c[l]||r,g=d(t[l],e[l],l);u.isUndefined(g)&&d!==a||(n[l]=g)}),n}const Vt=t=>{const e=Q({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=M.from(o),e.url=kt(Ft(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(u.isFormData(n)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...d]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...d].join("; "))}}if(L.hasStandardBrowserEnv&&(i&&u.isFunction(i)&&(i=i(e)),i||i!==!1&&Ni(e.url))){const l=r&&s&&ji.read(s);l&&o.set(r,l)}return e},Fi=typeof XMLHttpRequest<"u",Mi=Fi&&function(t){return new Promise(function(e,n){const i=Vt(t);let r=i.data;const s=M.from(i.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=i,l,d,g,y,f;function v(){y&&y(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function S(){if(!p)return;const C=M.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:C,config:t,request:p};jt(function(j){e(j),v()},function(j){n(j),v()},R),p=null}"onloadend"in p?p.onloadend=S:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(S)},p.onabort=function(){p&&(n(new E("Request aborted",E.ECONNABORTED,t,p)),p=null)},p.onerror=function(){n(new E("Network Error",E.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||Dt;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),n(new E(C,R.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,p)),p=null},r===void 0&&s.setContentType(null),"setRequestHeader"in p&&u.forEach(s.toJSON(),function(C,R){p.setRequestHeader(R,C)}),u.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),o&&o!=="json"&&(p.responseType=i.responseType),c&&([g,f]=Ce(c,!0),p.addEventListener("progress",g)),a&&p.upload&&([d,y]=Ce(a),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(l=C=>{p&&(n(!C||C.type?new oe(null,t,p):C),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=Di(i.url);if(T&&L.protocols.indexOf(T)===-1){n(new E("Unsupported protocol "+T+":",E.ERR_BAD_REQUEST,t));return}p.send(r||null)})},Vi=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const s=function(l){if(!r){r=!0,a();const d=l instanceof Error?l:this.reason;i.abort(d instanceof E?d:new oe(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,s(new E(`timeout ${e} of ms exceeded`,E.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));const{signal:c}=i;return c.unsubscribe=()=>u.asap(a),c}},qi=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},Bi=async function*(t,e){for await(const n of $i(t))yield*qi(n,e)},$i=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},qt=(t,e,n,i)=>{const r=Bi(t,e);let s=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await r.next();if(l){a(),c.close();return}let g=d.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},xe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bt=xe&&typeof ReadableStream=="function",Hi=xe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),$t=(t,...e)=>{try{return!!t(...e)}catch{return!1}},zi=Bt&&$t(()=>{let t=!1;const e=new Request(L.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ht=64*1024,Je=Bt&&$t(()=>u.isReadableStream(new Response("").body)),Oe={stream:Je&&(t=>t.body)};xe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Oe[e]&&(Oe[e]=u.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new E(`Response type '${e}' is not supported`,E.ERR_NOT_SUPPORT,i)})})})(new Response);const Ji=async t=>{if(t==null)return 0;if(u.isBlob(t))return t.size;if(u.isSpecCompliantForm(t))return(await new Request(L.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(u.isArrayBufferView(t)||u.isArrayBuffer(t))return t.byteLength;if(u.isURLSearchParams(t)&&(t=t+""),u.isString(t))return(await Hi(t)).byteLength},Wi=async(t,e)=>u.toFiniteNumber(t.getContentLength())??Ji(e),Ki=xe&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:g="same-origin",fetchOptions:y}=Vt(t);l=l?(l+"").toLowerCase():"text";let f=Vi([r,s&&s.toAbortSignal()],o),v;const p=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let S;try{if(c&&zi&&n!=="get"&&n!=="head"&&(S=await Wi(d,i))!==0){let _=new Request(e,{method:"POST",body:i,duplex:"half"}),P;if(u.isFormData(i)&&(P=_.headers.get("content-type"))&&d.setContentType(P),_.body){const[A,U]=Ut(S,Ce(Lt(c)));i=qt(_.body,Ht,A,U)}}u.isString(g)||(g=g?"include":"omit");const T="credentials"in Request.prototype;v=new Request(e,{...y,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:T?g:void 0});let C=await fetch(v);const R=Je&&(l==="stream"||l==="response");if(Je&&(a||R&&p)){const _={};["status","statusText","headers"].forEach(q=>{_[q]=C[q]});const P=u.toFiniteNumber(C.headers.get("content-length")),[A,U]=a&&Ut(P,Ce(Lt(a),!0))||[];C=new Response(qt(C.body,Ht,A,()=>{U&&U(),p&&p()}),_)}l=l||"text";let j=await Oe[u.findKey(Oe,l)||"text"](C,t);return!R&&p&&p(),await new Promise((_,P)=>{jt(_,P,{data:j,headers:M.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:v})})}catch(T){throw p&&p(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,t,v),{cause:T.cause||T}):E.from(T,T&&T.code,t,v)}}),We={http:li,xhr:Mi,fetch:Ki};u.forEach(We,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const zt=t=>`- ${t}`,Zi=t=>u.isFunction(t)||t===null||t===!1,Jt={getAdapter:t=>{t=u.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){n=t[s];let o;if(i=n,!Zi(n)&&(i=We[(o=String(n)).toLowerCase()],i===void 0))throw new E(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+s]=i}if(!i){const s=Object.entries(r).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
5
+ `+s.map(zt).join(`
6
+ `):" "+zt(s[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:We};function Ke(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oe(null,t)}function Wt(t){return Ke(t),t.headers=M.from(t.headers),t.data=ze.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jt.getAdapter(t.adapter||de.adapter)(t).then(function(e){return Ke(t),e.data=ze.call(t,t.transformResponse,e),e.headers=M.from(e.headers),e},function(e){return Nt(e)||(Ke(t),e&&e.response&&(e.response.data=ze.call(t,t.transformResponse,e.response),e.response.headers=M.from(e.response.headers))),Promise.reject(e)})}const Kt="1.8.4",Re={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Re[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Zt={};Re.transitional=function(t,e,n){function i(r,s){return"[Axios v"+Kt+"] Transitional option '"+r+"'"+s+(n?". "+n:"")}return(r,s,o)=>{if(t===!1)throw new E(i(s," has been removed"+(e?" in "+e:"")),E.ERR_DEPRECATED);return e&&!Zt[s]&&(Zt[s]=!0,console.warn(i(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,s,o):!0}},Re.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Gi(t,e,n){if(typeof t!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new E("option "+s+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+s,E.ERR_BAD_OPTION)}}const ke={assertOptions:Gi,validators:Re},J=ke.validators;let Y=class{constructor(t){this.defaults=t,this.interceptors={request:new At,response:new At}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
7
+ `+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Q(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&ke.assertOptions(n,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean)},!1),i!=null&&(u.isFunction(i)?e.paramsSerializer={serialize:i}:ke.assertOptions(i,{encode:J.function,serialize:J.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ke.assertOptions(e,{baseUrl:J.spelling("baseURL"),withXsrfToken:J.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&u.merge(r.common,r[e.method]);r&&u.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),e.headers=M.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(e)===!1||(a=a&&f.synchronous,o.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let l,d=0,g;if(!a){const f=[Wt.bind(this),void 0];for(f.unshift.apply(f,o),f.push.apply(f,c),g=f.length,l=Promise.resolve(e);d<g;)l=l.then(f[d++],f[d++]);return l}g=o.length;let y=e;for(d=0;d<g;){const f=o[d++],v=o[d++];try{y=f(y)}catch(p){v.call(this,p);break}}try{l=Wt.call(this,y)}catch(f){return Promise.reject(f)}for(d=0,g=c.length;d<g;)l=l.then(c[d++],c[d++]);return l}getUri(t){t=Q(this.defaults,t);const e=Ft(t.baseURL,t.url,t.allowAbsoluteUrls);return kt(e,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){Y.prototype[t]=function(e,n){return this.request(Q(n||{},{method:t,url:e,data:(n||{}).data}))}}),u.forEach(["post","put","patch"],function(t){function e(n){return function(i,r,s){return this.request(Q(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Y.prototype[t]=e(),Y.prototype[t+"Form"]=e(!0)});let Xi=class bn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const o=new Promise(a=>{i.subscribe(a),s=a}).then(r);return o.cancel=function(){i.unsubscribe(s)},o},e(function(r,s,o){i.reason||(i.reason=new oe(r,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new bn(function(n){e=n}),cancel:e}}};function Qi(t){return function(e){return t.apply(null,e)}}function Yi(t){return u.isObject(t)&&t.isAxiosError===!0}const Ze={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(Ze).forEach(([t,e])=>{Ze[e]=t});function Gt(t){const e=new Y(t),n=mt(Y.prototype.request,e);return u.extend(n,Y.prototype,e,{allOwnKeys:!0}),u.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Gt(Q(t,i))},n}const D=Gt(de);D.Axios=Y,D.CanceledError=oe,D.CancelToken=Xi,D.isCancel=Nt,D.VERSION=Kt,D.toFormData=Te,D.AxiosError=E,D.Cancel=D.CanceledError,D.all=function(t){return Promise.all(t)},D.spread=Qi,D.isAxiosError=Yi,D.mergeConfig=Q,D.AxiosHeaders=M,D.formToJSON=t=>Pt(u.isHTMLForm(t)?new FormData(t):t),D.getAdapter=Jt.getAdapter,D.HttpStatusCode=Ze,D.default=D;const{Axios:ws,AxiosError:vs,CanceledError:Es,isCancel:Ts,CancelToken:Ss,VERSION:Cs,all:xs,Cancel:Os,isAxiosError:Rs,spread:ks,toFormData:As,AxiosHeaders:Ds,HttpStatusCode:Ps,formToJSON:Is,getAdapter:Ns,mergeConfig:js}=D,Xt=D.create({baseURL:location.origin,timeout:6e4,params:{}});Xt.interceptors.response.use(t=>t,t=>{var e,n,i,r,s,o,a,c,l,d,g;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(v){v&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let y=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(y+=`${t.response.statusText} `),(i=(n=t.response)==null?void 0:n.config)!=null&&i.data&&(y+=`${t.response.config.data} `),(s=(r=t.response)==null?void 0:r.data)!=null&&s.message?y+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?y+=`${t.response.data.exception}`:(d=(l=(c=t.response)==null?void 0:c.data)==null?void 0:l.error)!=null&&d.message?(t.response.data.error.class&&(y+=`${t.response.data.error.class} `),y+=`${t.response.data.error.message}`):y+=`${(g=t.response)==null?void 0:g.data}`;const{$cosmosNotify:f}=window;throw f&&f.serious({title:"Network error",body:y}),t}else throw t});let Ae=()=>({emit(t,...e){for(let n=this.events[t]||[],i=0,r=n.length;i<r;i++)n[i](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(r=>e!==r)}}});class fe extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class Ge extends fe{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class er extends fe{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class H extends fe{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class tr extends H{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Qt(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class nr{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:i,info:r})=>(n[i]=r,n),{})}}const ee=Symbol("state");class Yt{constructor(e={}){this.emitter=Ae(),this.params=Object.freeze(e),this.presence=new nr(this),this.initialConnect=!0,this[ee]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Qt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ee]}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[ee]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ee]="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[ee]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ee]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ee]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let i=this.receiver?this.receiver.logger:null;i&&i.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...r)=>{i(),n(...r)});return i}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let i=[()=>delete this._pendingSubscribe];i.push(this.on("connect",()=>{i.forEach(r=>r()),e()})),i.push(this.on("close",r=>{i.forEach(s=>s()),n(r||new fe("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class ir{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(i=>i[e](n[0])):this.channels.forEach(i=>i[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,i={promise:new Promise(s=>{n=s}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(i),1),n(i)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(i),r&&await r.promise,this.gvl&&await this.gvl.acquire(i,e),i.acquired=!0,i}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class rr{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class sr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new rr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:i}){let r=this._subscriptions[e]=new ir(e);return r.remoteId=this._localToRemote[e],r.subscriber=n,r.unsubscriber=i,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let i=this.get(e);i&&(i.remoteId=n)}}class or{constructor(e={}){this.subscriptions=new sr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let i=n.remoteId;i&&delete this._remoteToLocal[i],this.subscriptions.remove(e)}transmit(e,n,i){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,n,i]);return}let s=this.subscriptions.get(r);s&&s.channels.forEach(o=>{o.receive(n,i)})}notify(e,n,i){let r=this._remoteToLocal[e];if(!r)return;let s=this.subscriptions.get(r);s&&s.channels.forEach(o=>o.emit(n,i))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let i of this._pendingMessages)i[0]===e?this.transmit(i[0],i[1],i[2]):n.push(i);this._pendingMessages=n}}const en={debug:0,info:1,warn:2,error:3};class tn{constructor(e){this.level=e||"warn"}log(e,n,i){en[e]<en[this.level]||this.writeLogEntry(e,n,i)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class pe extends tn{writeLogEntry(){}}class ar{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let cr=0;class nn{constructor(e={}){let{logger:n}=e;this.logger=n||new pe,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let i={channel:e};n&&Object.assign(i,n);let r=Qt(i);if(this.pendingUnsubscriptions[r]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,r),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let s=this.subscribeRetryInterval;return new Promise((o,a)=>{let c=++cr;this.pendingSubscriptions[r]={resolve:o,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(c,r,s)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,i){setTimeout(()=>{let r=this.pendingSubscriptions[n];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${i}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,i))},i)}maybeExpireSubscribe(e,n,i){setTimeout(()=>{let r=this.pendingSubscriptions[n];r&&r.id===e&&(delete this.pendingSubscriptions[n],r.reject(new er(`Haven't received subscription ack in ${i*2}ms for ${n}`)))},i)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,i){return n==="$whisper"?this.whisper(e,i):(i||(i={}),i.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(i)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:r,reason:s,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(n==="disconnect"){let a=new H(s);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(n==="confirm_subscription"){let a=this.pendingSubscriptions[i];if(!a){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:i}),this.unsubscribe(i);return}return delete this.pendingSubscriptions[i],a.resolve(i)}if(n==="reject_subscription"){let a=this.pendingSubscriptions[i];return a?(delete this.pendingSubscriptions[i],a.reject(new Ge)):this.logger.error("subscription not found",{type:n,identifier:i})}if(r)return{identifier:i,message:r};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const rn=()=>Date.now()/1e3|0;class lr extends nn{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=rn()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:r}=e;if(n==="disconnect"||n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[i]||(this.subscriptionStreams[i]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=rn()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",i);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",i);return}if(n==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let s=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of s)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(s)}return this.cable.connected(this.sessionId)}if(n==="presence"){let s=r.type;if(s==="info"){let o=this.pendingPresence[i];o&&(delete this.pendingPresence[i],o.resolve(r))}else if(s==="error"){let o=this.pendingPresence[i];o&&(delete this.pendingPresence[i],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:i,message:r}}if(r){let s=this.trackStreamPosition(i,e.stream_id,e.epoch,e.offset);return{identifier:i,message:r,meta:s}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,i){switch(n){case"$presence:join":return this.join(e,i);case"$presence:leave":return this.leave(e,i);case"$presence:info":return this.presence(e,i)}return super.perform(e,n,i)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),i=this.historyRequestFor(e);i&&(n.history=i,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(n.presence=r),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},i=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let s=this.streamsPositions[r];s&&(i=!0,n[r]=s)}if(!(!i&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,i,r){if(!(!n||!i))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:i,offset:r},{stream:n,epoch:i,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((i,r)=>{this.pendingPresence[e]={resolve:i,reject:r},this.cable.send({command:"presence",identifier:e,data:n})})}}class ur extends fe{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Xe extends Yt{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}ye(Xe,"identifier","__ghost__");const dr="$pubsub";class Qe extends Yt{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}ye(Qe,"identifier",dr);const te=Symbol("state");let hr=class{constructor({transport:t,protocol:e,encoder:n,logger:i,lazy:r,hubOptions:s,performFailures:o,transportConfigurator:a}){this.emitter=Ae(),this.transport=t,this.encoder=n,this.logger=i||new pe,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new or(s||{}),this[te]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,r===!1&&this.connect().catch(()=>{})}get state(){return this[te]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[te]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[te]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new H("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[te]="connected",this.hub.subscriptions.all().forEach(i=>{t&&i.remoteId&&t.includes(i.remoteId)?i.notify("restored"):(i.notify("disconnected",new H("recovery_failed")),this._resubscribe(i))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new H(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[te]="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 H?t:new H(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[te]="closed";let n=e||new H("cable_closed");this.hub.subscriptions.all().forEach(i=>i.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:i,identifier:r,message:s,meta:o}=n;i?this.hub.notify(r,i,s):this.hub.transmit(r,s,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 Qe({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Qe({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,i;return typeof t=="string"&&(i=t,t=Xe),n=i?new t(i,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:i=>this._subscribe(i,t.channelId,t.params),unsubscribe:i=>this._unsubscribe(i)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let i=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i});return}this.logger.debug("acquiring subscribe lock",{identifier:i});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:i}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:i}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),r.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:i}),t.notify("connected"),r.release();return}let s={identifier:e,params:n};this.logger.debug("subscribing",s);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(i,o),this.logger.debug("subscribed",{...s,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof Ge&&this.logger.warn("rejected",s),o instanceof H){this.logger.debug("disconnected during subscription; will retry on connect",s),r.release();return}this.logger.error("failed to subscribe",{error:o,...s})}t.close(o),this.hub.unsubscribe(i)}r.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let i=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:i}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(i),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof H?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:r}):this.logger.error("unsubscribe failed",{id:e,error:r}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(i){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:i});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new ur;let i=this.hub.subscriptions.get(t);if(!i)throw Error(`Subscription not found: ${t}`);if(await i.pending("subscribed"),i.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=i.remoteId,s={id:r,action:e,payload:n};this.logger.debug("perform",s);try{let o=await this.protocol.perform(r,e,n);return o&&this.logger.debug("perform result",{message:o,request:s}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:s}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...i)=>{n(),e(...i)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(i=>i()),t()})),n.push(this.on("close",i=>{n.forEach(r=>r()),e(i)})),n.push(this.on("disconnect",i=>{n.forEach(r=>r()),e(i)}))}),this._pendingConnect)}};const fr={maxMissingPings:2,maxReconnectAttempts:1/0},ae=()=>Date.now(),sn=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:i,maxInterval:r}=e;return n=n||2,i===void 0&&(i=.5),s=>{let o=t*n**s,a=o*n,c=o+(a-o)*Math.random(),l=2*(Math.random()-.5)*i;return c=c*(1+l),r&&r<c&&(c=r),c}};let on=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},fr,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 pe,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ae()}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=ae(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ae(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ae(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ae()})),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=ae()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new tr))}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 pr{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Ae(),this.unbind=[],this.logger=n.logger||new pe}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(i){this.logger.debug(`Failed to connect via ${n.displayName()}: ${i.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(i=>{i.setParam(e,n)})}setToken(e,n){this.transports.forEach(i=>{i.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...r)=>{i(),n(...r)});return i}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 mr{constructor(e,n={}){this.url=e;let i=n.websocketImplementation;if(i)this.Impl=i;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ae();let{format:r,subprotocol:s,authStrategy:o}=n;this.format=r||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=s}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,i)=>{let r=[];r.push(this.once("open",()=>{r.forEach(s=>s()),n()})),r.push(this.once("close",()=>{r.forEach(s=>s()),i(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let i=new URL(this.url);i.searchParams.set(e,n);let r=`${i.protocol}//${i.host}${i.pathname}?${i.searchParams}`;this.setURL(r)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let i=`x-${n}`.toLowerCase();i=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===i)||i,this.connectionOptions.headers[i]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...r)=>{i(),n(...r)});return i}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const an={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function gr(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({},an,e);let{protocol:n,websocketImplementation:i,websocketFormat:r,websocketOptions:s,websocketAuthStrategy:o,fallbacks:a,logLevel:c,logger:l,transport:d,encoder:g,lazy:y,monitor:f,pingInterval:v,reconnectStrategy:p,maxMissingPings:S,maxReconnectAttempts:T,subprotocol:C,tokenRefresher:R,historyTimestamp:j,protocolOptions:_,concurrentSubscribes:P,performFailures:A,transportConfigurator:U,auth:q}=e;if(l=l||new pe(c),typeof n=="string"){C=C||n;let Z=n.substring(0,n.lastIndexOf("-")),b=n.substring(n.lastIndexOf("-")+1);if(_=_||{},Z==="actioncable-v1")n=new nn({logger:l,..._});else if(Z==="actioncable-v1-ext")n=new lr({logger:l,historyTimestamp:j,..._});else throw Error(`Protocol is not supported yet: ${n}`);if(b==="json")g=g||new ar,r=r||"text";else if(b==="msgpack"){if(r="binary",!g)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(b==="protobuf"){if(r=r||"binary",!g)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");d=d||new mr(t,{websocketImplementation:i,websocketOptions:s,subprotocol:C,authStrategy:o,format:r}),a&&(d=new pr([d,...a],{logger:l})),q&&q.token&&d.setToken(q.token,q.param||"jid"),p=p||sn(v),f!==!1&&(f=f||new on({pingInterval:v,reconnectStrategy:p,maxMissingPings:S,maxReconnectAttempts:T,logger:l}));let ge={concurrentSubscribes:P},B=new hr({protocol:n,transport:d,encoder:g,logger:l,lazy:y,hubOptions:ge,performFailures:A,transportConfigurator:U});return f&&(f.watch(B),B.monitor=f),R&&br(B,async()=>{try{await R(d)}catch(Z){return l.error("Failed to refresh authentication token: "+Z),!1}return B.connect().catch(()=>{}),!0}),B}function br(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async i=>{if(i){if(n){t.logger.warn("Token auto-refresh is disabled",i);return}i.reason==="token_expired"&&(n=!0,await e())}})}class yr{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class _r extends Xe{constructor(e,n,i){super(e,n),this.subscription=new yr(this),Object.assign(this.subscription,i),this.on("connect",({reconnect:r})=>this.subscription.notify("connected",{reconnected:r})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",r=>this.subscription.notify("received",r)),this.on("close",r=>{r&&r instanceof Ge?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class wr{constructor(e){this.cable=e}create(e,n){let i,r;typeof e=="object"?(i=e.channel,delete e.channel,r=e):(i=e,r={});let s=new _r(i,r,n);return s.subscription.notify("initialized"),this.cable.subscribe(s),s.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class vr{constructor(e){this.cable=e,this.subscriptions=new wr(e)}}class Er extends tn{writeLogEntry(e,n,i){i?console[e](n,i):console[e](n)}}class Tr extends on{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},i=()=>this.disconnect(new H("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",i,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",i,!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 Sr=["cable","action-cable"],Cr="/cable",De=(t,e)=>{for(let n of Sr){let i=t.head.querySelector(`meta[name='${n}-${e}']`);if(i)return i.getAttribute("content")}},cn=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,xr=()=>{if(typeof document<"u"&&document.head){let t=De(document,"url");if(t)return cn(t)}return cn(Cr)},Or=()=>{if(typeof document<"u"&&document.head){let t=De(document,"history-timestamp");if(t)return t|0}},Rr=()=>{if(typeof document<"u"&&document.head)return De(document,"token")},kr=()=>{if(typeof document<"u"&&document.head)return De(document,"token-param")};function Ar(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||xr(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Or());let n=Rr();if(n){let l=kr();e.auth=Object.assign({token:n,param:l},e.auth||{})}e=Object.assign({},an,e);let{logLevel:i,logger:r,pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:c}=e;return r=e.logger=e.logger||new Er(i),o=e.reconnectStrategy=e.reconnectStrategy||sn(s),e.monitor!==!1&&(e.monitor=e.monitor||new Tr({pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:c,logger:r})),gr(t,e)}function Dr(t,e){let n=Ar(t,e);return new vr(n)}class Pr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,i={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(s=>{if(s&&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=Dr(o)}return this._cable.subscriptions.create({channel:e,...r},i)})}recordPing(){}}function Ye(t){return Ir.test(t)}const Ir=/^-?[0-9]+$/;function ln(t){return Nr.test(t)}const Nr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function un(t,e){const n=Number.parseFloat(t),i=String(n),r=dn(t),s=dn(i);return!!(r===s||(e==null?void 0:e.approx)===!0&&!Ye(t)&&s.length>=14&&r.startsWith(s.substring(0,14)))}let me=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function jr(t){if(un(t,{approx:!1}))return;if(Ye(t))return me.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?me.underflow:me.truncate_float:me.overflow}function dn(t){return t.replace(Ur,"").replace(Fr,"").replace(Mr,"").replace(Lr,"")}const Ur=/[eE][+-]?\d+$/,Lr=/^-?(0*)?/,Fr=/\./,Mr=/0+$/;class Vr{constructor(e){if(ye(this,"isLosslessNumber",!0),!ln(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=jr(this.value);if(e===void 0||e===me.truncate_float)return Number.parseFloat(this.value);if(Ye(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 qr(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function Br(t){return new Vr(t)}function $r(t,e){return et({"":t},"",t,e)}function et(t,e,n,i){return Array.isArray(n)?i.call(t,e,zr(n,i)):n&&typeof n=="object"&&!qr(n)?i.call(t,e,Hr(n,i)):i.call(t,e,n)}function Hr(t,e){for(const n of Object.keys(t)){const i=et(t,n,t[n],e);i!==void 0?t[n]=i:delete t[n]}return t}function zr(t,e){for(let n=0;n<t.length;n++)t[n]=et(t,String(n),t[n],e);return t}function Jr(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Br,i=0;const r=a();return v(r),S(),e?$r(r,e):r;function s(){if(t.charCodeAt(i)===Qr){i++,l();const w={};let I=!0;for(;i<t.length&&t.charCodeAt(i)!==fn;){I?I=!1:(y(),l());const ne=i,be=d();if(be===void 0){R();return}l(),f();const st=a();if(st===void 0){q();return}Object.prototype.hasOwnProperty.call(w,be)&&!tt(st,w[be])&&j(be,ne+1),w[be]=st}return t.charCodeAt(i)!==fn&&_(),i++,w}}function o(){if(t.charCodeAt(i)===Yr){i++,l();const w=[];let I=!0;for(;i<t.length&&t.charCodeAt(i)!==pn;){I?I=!1:y();const ne=a();p(ne),w.push(ne)}return t.charCodeAt(i)!==pn&&P(),i++,w}}function a(){l();const w=d()??g()??s()??o()??c("true",!0)??c("false",!1)??c("null",null);return l(),w}function c(w,I){if(t.slice(i,i+w.length)===w)return i+=w.length,I}function l(){for(;Wr(t.charCodeAt(i));)i++}function d(){if(t.charCodeAt(i)===nt){i++;let w="";for(;i<t.length&&t.charCodeAt(i)!==nt;){if(t.charCodeAt(i)===Xr){const I=t[i+1],ne=Gr[I];ne!==void 0?(w+=ne,i++):I==="u"?Pe(t.charCodeAt(i+2))&&Pe(t.charCodeAt(i+3))&&Pe(t.charCodeAt(i+4))&&Pe(t.charCodeAt(i+5))?(w+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):ge(i):U(i)}else Zr(t.charCodeAt(i))?w+=t[i]:A(t[i]);i++}return C(),i++,w}}function g(){const w=i;if(t.charCodeAt(i)===mn&&(i++,T(w)),t.charCodeAt(i)===it)i++;else if(Kr(t.charCodeAt(i)))for(i++;Ie(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===as)for(i++,T(w);Ie(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===hs||t.charCodeAt(i)===ds)for(i++,(t.charCodeAt(i)===mn||t.charCodeAt(i)===rs)&&i++,T(w);Ie(t.charCodeAt(i));)i++;if(i>w)return n(t.slice(w,i))}function y(){if(t.charCodeAt(i)!==os)throw new SyntaxError(`Comma ',' expected after value ${b()}`);i++}function f(){if(t.charCodeAt(i)!==cs)throw new SyntaxError(`Colon ':' expected after property name ${b()}`);i++}function v(w){if(w===void 0)throw new SyntaxError(`JSON value expected ${b()}`)}function p(w){if(w===void 0)throw new SyntaxError(`Array item expected ${b()}`)}function S(){if(i<t.length)throw new SyntaxError(`Expected end of input ${b()}`)}function T(w){if(!Ie(t.charCodeAt(i))){const I=t.slice(w,i);throw new SyntaxError(`Invalid number '${I}', expecting a digit ${b()}`)}}function C(){if(t.charCodeAt(i)!==nt)throw new SyntaxError(`End of string '"' expected ${b()}`)}function R(){throw new SyntaxError(`Quoted object key expected ${b()}`)}function j(w,I){throw new SyntaxError(`Duplicate key '${w}' encountered at position ${I}`)}function _(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${b()}`)}function P(){throw new SyntaxError(`Array item or end of array ']' expected ${b()}`)}function A(w){throw new SyntaxError(`Invalid character '${w}' ${B()}`)}function U(w){const I=t.slice(w,w+2);throw new SyntaxError(`Invalid escape character '${I}' ${B()}`)}function q(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function ge(w){const I=t.slice(w,w+6);throw new SyntaxError(`Invalid unicode character '${I}' ${B()}`)}function B(){return`at position ${i}`}function Z(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function b(){return`${Z()} ${B()}`}}function Wr(t){return t===es||t===ts||t===ns||t===is}function Pe(t){return t>=it&&t<=rt||t>=ls&&t<=fs||t>=us&&t<=ps}function Ie(t){return t>=it&&t<=rt}function Kr(t){return t>=ss&&t<=rt}function Zr(t){return t>=32&&t<=1114111}function tt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,i)=>tt(n,e[i])):hn(t)&&hn(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>tt(t[n],e[n])):!1}function hn(t){return typeof t=="object"&&t!==null}const Gr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
8
+ `,r:"\r",t:" "},Xr=92,Qr=123,fn=125,Yr=91,pn=93,es=32,ts=10,ns=9,is=13,nt=34,rs=43,mn=45,it=48,ss=49,rt=57,os=44,as=46,cs=58,ls=65,us=97,ds=69,hs=101,fs=70,ps=102;function gn(t,e,n,i){return r(t);function r(c,l){if(Array.isArray(i)){const d=i.find(g=>g.test(c));if(d){const g=d.stringify(c);if(typeof g!="string"||!ln(g))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${g})`);return g}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return s(c);if(c&&typeof c=="object")return o(c)}function s(c,l){if(c.length===0)return"[]";let d="[";for(let g=0;g<c.length;g++){const y=c[g];typeof y<"u"&&typeof y!="function"?d+=r(y):d+="null",g<c.length-1&&(d+=",")}return d+="]",d}function o(c,l){if(typeof c.toJSON=="function")return gn(c.toJSON(),e,n,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let g=!0,y="{";for(const f of d){const v=c[f];if(a(f,v)){g?g=!1:y+=",";const p=JSON.stringify(f);y+=`${p}:`,y+=r(v)}}return y+="}",y}function a(c,l){return typeof l<"u"&&typeof l!="function"&&typeof l!="symbol"}}function ms(t){return un(t)?parseFloat(t):BigInt(t)}class gs{constructor(){ye(this,"id",1)}async exec(e,n,i={},r={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return i.scope=window.openc3Scope,r.manual=!0,(await Xt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:s,transformRequest:[(o,a)=>gn(o)],transformResponse:[o=>Jr(o,void 0,ms)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...i){return this.exec("interface_cmd",[e,n,...i])}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,n,i){return this.exec("get_item",[e,n,i])}get_param(e,n,i){return this.exec("get_param",[e,n,i])}get_parameter(e,n,i){return this.exec("get_param",[e,n,i])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,i,r=30){const s=await this.exec("get_tlm_packet",[e,n],{type:i,stale_time:r});if(s!=null){let o=s.length,a=null;for(let c=0;c<o;c++)a=this.decode_openc3_type(s[c][1]),a!==null&&(s[c][1]=a)}return s}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,i=null){let r={stale_time:n};i!==null&&(r.cache_timeout=i);const s=await this.exec("get_tlm_values",[e],r,{},1e4);let o=s[0].length,a=null;for(let c=0;c<o;c++)a=this.decode_openc3_type(s[0][c]),a!==null&&(s[0][c]=a);return s}get_limits(e,n,i){return this.exec("get_limits",[e,n,i])}async tlm(e,n,i,r="CONVERTED"){let s=null;if(n===void 0)s=await this.exec("tlm",[e]);else if(i===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))s=await this.exec("tlm",[e],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[e,n,i],{type:r});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(e,n,i=null,r="CONVERTED"){await this.exec("inject_tlm",[e,n,i],{type:r})}set_tlm(e,n,i,r){return this.exec("set_tlm",[e,n,i],{type:r})}override_tlm(e,n,i,r){return this.exec("override_tlm",[e,n,i],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,i,r){return this.exec("normalize_tlm",[e,n,i],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,i,r="CONVERTED"){return this.exec("get_cmd_value",[e,n,i,r])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,i,r,s){let o=null;for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o=this.encode_openc3_type(r[a]),o!==null&&(r[a]=o));return this.exec(e,[n,i,r],{},s)}get_cmd_hazardous(e,n,i,r={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,n,i,r)}cmd(e,n,i,r={}){return n===void 0?this.exec("cmd",e,{},r):this._cmd("cmd",e,n,i,r)}cmd_no_range_check(e,n,i,r={}){return n===void 0?this.exec("cmd_no_range_check",e,{},r):this._cmd("cmd_no_range_check",e,n,i,r)}cmd_raw(e,n,i,r={}){return n===void 0?this.exec("cmd_raw",e,{},r):this._cmd("cmd_raw",e,n,i,r)}cmd_raw_no_range_check(e,n,i,r={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},r):this._cmd("cmd_raw_no_range_check",e,n,i,r)}cmd_no_hazardous_check(e,n,i,r={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},r):this._cmd("cmd_no_hazardous_check",e,n,i,r)}cmd_no_checks(e,n,i,r={}){return n===void 0?this.exec("cmd_no_checks",e,{},r):this._cmd("cmd_no_checks",e,n,i,r)}cmd_raw_no_hazardous_check(e,n,i,r={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},r):this._cmd("cmd_raw_no_hazardous_check",e,n,i,r)}cmd_raw_no_checks(e,n,i,r={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},r):this._cmd("cmd_raw_no_checks",e,n,i,r)}build_cmd(e,n,i){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i)}build_command(e,n,i){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,i){return this.exec("save_config",[e,n,i])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,i){return this.exec("enable_limits",[e,n,i])}disable_limits(e,n,i){return this.exec("disable_limits",[e,n,i])}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,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n),r=new Uint8Array(i);return Array.from(r).map(s=>s.toString(16).padStart(2,"0")).join("")}}}let Ne=[];const bs={components:{OpenConfigDialog:ht,SaveConfigDialog:dt,TargetPacketItemChooser:ut,TopBar:En},mixins:[ct,lt],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new Pr,subscription:null}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},computed:{menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},async created(){this.api=new gs,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,n=>{this.applyConfig(n),this.startDate=n.startDate,this.startTime=n.startTime,this.endTime=n.endTime,this.endDate=n.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
9
+ continue to stream in real-time until
10
+ ${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Ne=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,n)=>{let i=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(i=i+"__"+e.reducedType);let r=String(n);this.keyMap[r]=i,t.push([i,r])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let r of t){let s=Object.keys(r);s.forEach(e.add,e),this.itemsReceived+=s.length-2,this.totalItemsReceived+=s.length-2}e.delete("__type"),e.delete("__time"),this.buildHeaders([...e]),Ne.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET")),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[n,i,r,s,o,a,c]=e.split("__");let l=o;this.columnMode==="full"&&(l=r+" "+s+" "+o),n&&n!=="DECOM"&&(l=l+" {"+n+"}"),a&&a!=="CONVERTED"&&(l=l+" ("+a+")"),c&&(l=l+" ["+c+"]"),this.columnHeaders.push(l)})},createFile:async function(){let t=Ne.flat(),e=this.columnHeaders,n=this.columnMap,i=[];this.resetPerFileVars();let r="";this.matlabHeader&&(r+="% "),r+=e.join(this.delimiter),i.push(r),await this.yieldToMain(),t.sort((f,v)=>f.__time-v.__time),await this.yieldToMain();let s=[],o=[],a=null,c=0;for(let f of t){let v=!1;this.fillDown&&a?o=[...a]:o=[];let p="";if(Object.keys(f).forEach(S=>{if(S.slice(0,2)==="__")return;p=S;let T=n[S];if(typeof f[S]=="object")if(f[S]===null)o[T]="";else if(Array.isArray(f[S]))o[T]='"['+f[S]+']"';else{let C=f[S].raw;if(Array.isArray(C)){let R="";C.forEach(j=>{R+=j.toString(16)}),o[T]=R}else o[T]="'"+C+"'"}else o[T]=f[S];this.uniqueOnly&&s[T]!==o[T]&&(v=!0),s[T]=o[T]}),this.fillDown&&(a=[...o]),!this.uniqueOnly||v){if(this.columnMode==="normal"){p=this.keyMap[p];const[S,T,C,R,j,_,P]=p.split("__");o[0]=new Date(f.__time/1e6).toISOString(),o[1]=C,o[2]=R}i.push(o.join(this.delimiter))}c+=1,c%1e3==0&&await this.yieldToMain()}let l=".csv",d="text/csv";this.delimiter===" "&&(l=".txt",d="text/tab-separated-values"),await this.yieldToMain();const g=new Blob([i.join(`
11
+ `)],{type:d});await this.yieldToMain();const y=document.createElement("a");y.href=URL.createObjectURL(g),y.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+l),y.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Ne.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function ys(t,e,n,i,r,s){const o=x("top-bar"),a=x("v-text-field"),c=x("v-col"),l=x("v-row"),d=x("v-radio"),g=x("v-radio-group"),y=x("target-packet-item-chooser"),f=x("v-container"),v=x("v-progress-circular"),p=x("v-spacer"),S=x("v-btn"),T=x("v-tooltip"),C=x("v-toolbar"),R=x("v-card-title"),j=x("v-icon"),_=x("v-select"),P=x("v-card-text"),A=x("v-card-actions"),U=x("v-card"),q=x("v-dialog"),ge=x("v-data-table"),B=x("open-config-dialog"),Z=x("save-config-dialog");return k(),K("div",null,[h(o,{menus:s.menus,title:r.title},null,8,["menus","title"]),h(U,null,{default:m(()=>[h(f,null,{default:m(()=>[h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=b=>r.startDate=b),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),h(c,null,{default:m(()=>[h(a,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=b=>r.startTime=b),label:"Start Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),h(c,null,{default:m(()=>[h(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=b=>r.endDate=b),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),h(c,null,{default:m(()=>[h(a,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=b=>r.endTime=b),label:"End Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(l,{"no-gutters":""},{default:m(()=>[h(c,null,{default:m(()=>[h(g,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=b=>r.cmdOrTlm=b),inline:"","hide-details":"",class:"mt-0"},{default:m(()=>[h(d,{label:"Command",value:"cmd","data-test":"cmd-radio"}),h(d,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(y,{onAddItem:e[5]||(e[5]=b=>s.addItem(b)),"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":""},null,8,["mode"])]),_:1})]),_:1})]),_:1}),h(C,{class:"pl-3"},{default:m(()=>[h(v,{"model-value":r.progress},null,8,["model-value"]),N("   Processed: "+z(r.totalPacketsReceived)+" packets, "+z(r.totalItemsReceived)+" items ",1),h(p),h(S,{class:"bg-primary",onClick:s.processItems,disabled:r.items.length<1},{default:m(()=>[N(z(r.processButtonText),1)]),_:1},8,["onClick","disabled"]),h(p),h(T,{location:"top"},{activator:m(({props:b})=>[h(S,G({icon:"mdi-pencil",variant:"text",onClick:e[6]||(e[6]=w=>r.editAll=!0)},b,{disabled:r.items.length<1,"data-test":"editAll"}),null,16,["disabled"])]),default:m(()=>[e[18]||(e[18]=W("span",null," Edit All Items ",-1))]),_:1}),h(T,{location:"top"},{activator:m(({props:b})=>[h(S,G({icon:"mdi-delete",variant:"text",onClick:s.deleteAll},b,{disabled:r.items.length<1,"data-test":"delete-all"}),null,16,["onClick","disabled"])]),default:m(()=>[e[19]||(e[19]=W("span",null,"Delete All Items",-1))]),_:1})]),_:1}),h(U,{width:"100%"},{default:m(()=>[h(R,null,{default:m(()=>[e[20]||(e[20]=N(" Items ")),h(p),h(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=b=>r.search=b),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),h(ge,{headers:r.headers,items:r.items,search:r.search,"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=b=>r.itemsPerPage=b),"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":m(({item:b})=>[h(T,{location:"top"},{activator:m(({props:w})=>[h(j,G({onClick:pt(I=>b.edit=!0,["stop"])},w,{"data-test":"edit-row"}),{default:m(()=>e[21]||(e[21]=[N(" mdi-pencil ")])),_:2},1040,["onClick"])]),default:m(()=>[e[22]||(e[22]=W("span",null,"Edit Item",-1))]),_:2},1024),h(q,{modelValue:b.edit,"onUpdate:modelValue":w=>b.edit=w,onKeydown:Le(w=>b.edit=!1,["esc"]),"max-width":"600"},{default:m(()=>[h(U,null,{default:m(()=>[h(C,{height:"24"},{default:m(()=>[h(p),e[23]||(e[23]=W("span",null," DataExtractor: Edit Item Mode ",-1)),h(p)]),_:1}),h(P,null,{default:m(()=>[h(l,{class:"mt-3 title-font"},{default:m(()=>[h(c,null,{default:m(()=>[N(z(s.getItemLabel(b)),1)]),_:2},1024)]),_:2},1024),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.modes,label:"Mode",variant:"outlined",modelValue:b.mode,"onUpdate:modelValue":w=>b.mode=w},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined",modelValue:b.valueType,"onUpdate:modelValue":w=>b.valueType=w},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined",modelValue:b.reducedType,"onUpdate:modelValue":w=>b.reducedType=w},null,8,["items","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),h(A,{class:"px-2"},{default:m(()=>[h(p),h(S,{variant:"flat",onClick:w=>b.edit=!1},{default:m(()=>e[24]||(e[24]=[N(" Close ")])),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":m(({item:b})=>[h(T,{location:"top"},{activator:m(({props:w})=>[h(j,G({onClick:I=>s.deleteItem(b)},w,{"data-test":"delete-row"}),{default:m(()=>e[25]||(e[25]=[N(" mdi-delete ")])),_:2},1040,["onClick"])]),default:m(()=>[e[26]||(e[26]=W("span",null," Delete Item ",-1))]),_:2},1024)]),_:1},8,["headers","items","search","items-per-page"])]),_:1})]),_:1}),h(q,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=b=>r.editAll=b),onKeydown:e[15]||(e[15]=Le(b=>r.editAll=!r.editAll,["esc"])),"max-width":"600"},{default:m(()=>[h(U,null,{default:m(()=>[h(C,{height:"24"},{default:m(()=>[h(p),e[27]||(e[27]=W("span",null," DataExtractor: Edit All Items",-1)),h(p)]),_:1}),h(P,null,{default:m(()=>[h(l,{class:"mt-3"},{default:m(()=>[h(c,null,{default:m(()=>e[28]||(e[28]=[N(" This will change all items to the following data type! ")])),_:1})]),_:1}),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.modes,label:"Mode",variant:"outlined",modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=b=>r.allItemMode=b)},null,8,["items","modelValue"])]),_:1})]),_:1}),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined",modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=b=>r.allItemValueType=b)},null,8,["items","modelValue"])]),_:1})]),_:1}),h(l,null,{default:m(()=>[h(c,null,{default:m(()=>[h(_,{"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined",modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=b=>r.allItemReducedType=b)},null,8,["items","modelValue"])]),_:1})]),_:1})]),_:1}),h(A,{class:"px-2"},{default:m(()=>[h(p),h(S,{variant:"outlined",onClick:e[12]||(e[12]=b=>r.editAll=!r.editAll)},{default:m(()=>e[29]||(e[29]=[N(" Cancel ")])),_:1}),h(S,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=b=>s.editAllItems())},{default:m(()=>e[30]||(e[30]=[N(" Ok ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(k(),F(B,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=b=>r.openConfig=b),configKey:r.configKey,onSuccess:s.openConfiguration},null,8,["modelValue","configKey","onSuccess"])):re("",!0),r.saveConfig?(k(),F(Z,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=b=>r.saveConfig=b),configKey:r.configKey,onSuccess:s.saveConfiguration},null,8,["modelValue","configKey","onSuccess"])):re("",!0)])}const Us=yn("default",at(bs,[["render",ys],["__scopeId","data-v-fe8f606e"]]))}}});
@@ -0,0 +1 @@
1
+ System.register(["./Widget-oyqWpFXJ-f11fcd2e7eea303bb0c1.js","./main-dcd08bcf7c907cfa4b1a.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]]))}}});