openc3-cosmos-tool-limitsmonitor 6.5.1 → 6.7.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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/tools/limitsmonitor/{ArrayWidget-Ck6pzAyW-5c7c406dac0bbd223e3f.js → ArrayWidget-BSG8KEtf-5f0df4036ee67158e3cd.js} +2 -2
  3. data/tools/limitsmonitor/ArrayplotWidget-WVu76Kqn-3a311c357e87f4f34d5e.js +1 -0
  4. data/tools/limitsmonitor/{BarColumn-Bgz2YJ59-792ea8cf842da7644a1b.js → BarColumn-Cflh9pUz-72d77005b1381ec6b473.js} +1 -1
  5. data/tools/limitsmonitor/BlockWidget-B7ryWGCq-b992121f106cab0b8f7a.js +2 -0
  6. data/tools/limitsmonitor/{ButtonWidget-D_tupiPB-362cb1c7d5dce956a6d2.js → ButtonWidget-BKih3ix9-ceef7e8b29bcd8e6a49f.js} +2 -2
  7. data/tools/limitsmonitor/CanvasWidget-DT9xMSfb-51dafda176624d985542.js +1 -0
  8. data/tools/limitsmonitor/CanvasdotWidget-7H5Hvcn--72788fd7d3e5915b297c.js +1 -0
  9. data/tools/limitsmonitor/{CanvasimageWidget-CNJlzLqo-fd6289878df859ef7709.js → CanvasimageWidget-BbWYx6Gj-c0c36bee214f5bfdc4de.js} +1 -1
  10. data/tools/limitsmonitor/{CanvasimagevalueWidget-DudwwOD6-dfe96b18b7b1c29ac418.js → CanvasimagevalueWidget-Blvoe2X4-543f5bba4f1238823190.js} +1 -1
  11. data/tools/limitsmonitor/{CanvaslabelWidget-BZQp16dH-f434ba64276828aeb75e.js → CanvaslabelWidget-BPx_Rm4o-7745db37bca6dee5d238.js} +1 -1
  12. data/tools/limitsmonitor/{CanvaslabelvalueWidget-CHS36Te9-4f8ec404ad262786cfc6.js → CanvaslabelvalueWidget-DzdWvL0W-4cf7b2a1d8a89fcab972.js} +1 -1
  13. data/tools/limitsmonitor/{CanvaslineWidget-nhKEAGhs-69aa63a13dc47e2e1cf4.js → CanvaslineWidget-CqskilGk-eb9c5049c4d025bf0538.js} +1 -1
  14. data/tools/limitsmonitor/{CanvaslinevalueWidget-DsyIDkJy-4a51e1d8e3d6e8319f7a.js → CanvaslinevalueWidget-C0JIKdvZ-ea5406a829856da1b461.js} +1 -1
  15. data/tools/limitsmonitor/{CheckbuttonWidget-DCam7Jd0-63f6c74b5b2fd960b36b.js → CheckbuttonWidget-C9FbJx2v-5408cffd80d02ff1d8f4.js} +1 -1
  16. data/tools/limitsmonitor/{ComboboxWidget-ZX-k-_aK-15e03382c68d4d9f6f61.js → ComboboxWidget-BbNKT0s8-d29e533b3adae306567f.js} +1 -1
  17. data/tools/limitsmonitor/{DateWidget-DuJ5uC2t-4f8c6fffd57c1b9d6341.js → DateWidget-CBMsdRUE-faa2791fd6e673cefd61.js} +1 -1
  18. data/tools/limitsmonitor/DetailsDialog-DRVahE5z-5bffe02b15c2f9293811.js +1 -0
  19. data/tools/limitsmonitor/{DynamicWidget-CfMtj7H8-fdace4fceb06b330b1a9.js → DynamicWidget-CfMtj7H8-4447140b6f31aba6aa5b.js} +1 -1
  20. data/tools/limitsmonitor/{FormatvalueWidget-DYICPNcx-83b58d31b24e5e79278e.js → FormatvalueWidget-BLWsqhIZ-f36530b9f41f21d0cda6.js} +1 -1
  21. data/tools/limitsmonitor/Graph-BiU56Qj2-63e90d160a75f5d89206.js +1 -0
  22. data/tools/limitsmonitor/GraphWidget-Ga0AEfrJ-59925e65c6f97fdac462.js +1 -0
  23. data/tools/limitsmonitor/HorizontalWidget-CsVhLwZO-a5e1517f3a23b4c73a05.js +1 -0
  24. data/tools/limitsmonitor/HorizontalboxWidget-xC6PADl3-3a6bd6770f5c70369918.js +1 -0
  25. data/tools/limitsmonitor/{HorizontallineWidget-DEODVJCk-958c71273960c0e3edad.js → HorizontallineWidget-NZIxmRVN-270871e30b8dfc92c972.js} +1 -1
  26. data/tools/limitsmonitor/{IframeWidget-n8lNXrpt-f0623ee8cf826b94f2a9.js → IframeWidget-BgzjSfag-12b442d38a22add74a3b.js} +1 -1
  27. data/tools/limitsmonitor/{ImageLoader-CfcErydq-76b0c56a55f5a095c54f.js → ImageLoader-DbFVK1Ui-131cd6bd79766afa7dc3.js} +1 -1
  28. data/tools/limitsmonitor/{ImageviewerWidget-DE8fj06Z-ed8ec54beedaeef86617.js → ImageviewerWidget-BnT5m-nw-80a64449b740564b3730.js} +1 -1
  29. data/tools/limitsmonitor/{LabelWidget-iUIJLhdA-9d9b624b5f48837fab3c.js → LabelWidget-DSDYmz6X-22cab93d8d2efa39351b.js} +1 -1
  30. data/tools/limitsmonitor/LabelledWidget-DMb-myxs-7d384ea54cc6df4ed9db.js +1 -0
  31. data/tools/limitsmonitor/LabelprogressbarWidget-CkjDJBao-d70d5b8c57467f11f595.js +1 -0
  32. data/tools/limitsmonitor/LabelsparklineWidget-DBYPFz3Y-1c4aca8b705bffd6d821.js +1 -0
  33. data/tools/limitsmonitor/{LabelvalueWidget-oiW-JDw6-e39d44fbeb261a290f78.js → LabelvalueWidget-DlTkJC4i-298c5d8a16ca150e39d1.js} +1 -1
  34. data/tools/limitsmonitor/{LabelvaluedescWidget-Ck0AJ9g0-be479177913f1c5882a6.js → LabelvaluedescWidget-dRqnGZub-9e4b54b7536384edaaf2.js} +1 -1
  35. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-CS4NAPJ1-c3631956817cb83dec56.js +1 -0
  36. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-D9x4Ppv8-67023f6d87d2f9349268.js +1 -0
  37. data/tools/limitsmonitor/{LabelvaluerangebarWidget-Bs9locqu-3c7bbc1c31e3f99aadd9.js → LabelvaluerangebarWidget-Dhyng4-n-b1ac8d2088dde9c9a7e5.js} +1 -1
  38. data/tools/limitsmonitor/{Layout-1z8iJV5--17b6be92712eb72f93a5.js → Layout-mWR35VAD-12347d9cb0aec5695d99.js} +1 -1
  39. data/tools/limitsmonitor/LedWidget-D8cq4pUv-5640f836eb08292ca1a6.js +1 -0
  40. data/tools/limitsmonitor/LimitsMonitor-d57f8209525f7ca4c877.js +8 -0
  41. data/tools/limitsmonitor/{LimitsbarWidget-BxxoKTjp-f204a54b40ab4bde6aa1.js → LimitsbarWidget-VGJnDuVM-e0be00ce5b4e50707d37.js} +1 -1
  42. data/tools/limitsmonitor/{LimitscolorWidget-DFDwf4In-4db0bcbee61fd0eae2ab.js → LimitscolorWidget-CG6Pqi12-5179a058e78212ffe602.js} +1 -1
  43. data/tools/limitsmonitor/{LimitscolumnWidget-CdBh2mJu-a30e97928d00f3ad8757.js → LimitscolumnWidget-DjovQdiT-52005a64fc869222570b.js} +1 -1
  44. data/tools/limitsmonitor/LinegraphWidget-DSWAhXgZ-56b3a0906ddde2f60b2a.js +1 -0
  45. data/tools/limitsmonitor/MatrixbycolumnsWidget-C3cuhRxz-5faecb02b20446620c49.js +1 -0
  46. data/tools/limitsmonitor/{ProgressbarWidget-Cdu5nJC3-61939753bf7692536f7d.js → ProgressbarWidget-oCgAEFBO-5ccedb4ec742782b293e.js} +1 -1
  47. data/tools/limitsmonitor/{RadiobuttonWidget-CZZGbvdG-28437a34db5d10ad6a6b.js → RadiobuttonWidget-D4Dak3lc-56388898c1388c0b4da5.js} +1 -1
  48. data/tools/limitsmonitor/{RadiogroupWidget-CQN3v8Ip-442e3a823184a6e59e34.js → RadiogroupWidget-Dbe9T4fp-5e33a16476d53d7d7801.js} +1 -1
  49. data/tools/limitsmonitor/{RangebarWidget-dZN9WjoZ-d21aff9c135c985e837c.js → RangebarWidget-CIVrgqrW-73d561d4cfc4372daa08.js} +1 -1
  50. data/tools/limitsmonitor/{RollupWidget-i9DnNJl6-92c1886b37985b6a5219.js → RollupWidget-CH1-XNLV-fd531ebfef69e96862c1.js} +1 -1
  51. data/tools/limitsmonitor/ScrollwindowWidget-BwFG6Wn8-79afbfdb201a7c89cacf.js +1 -0
  52. data/tools/limitsmonitor/{SignalWidget-B_kA9eCJ-6eaea96636250062677f.js → SignalWidget-Gz2gHrUm-1beaaa0a5f3418f41e18.js} +1 -1
  53. data/tools/limitsmonitor/SpacerWidget-Bg7VDB0k-a9d245a8d3dcc50a7413.js +1 -0
  54. data/tools/limitsmonitor/{SparklineWidget-DQNsvEj9-f152d9d5fba07dba41b3.js → SparklineWidget-D_b5rfJv-f0d90d27432aee0f82da.js} +1 -1
  55. data/tools/limitsmonitor/TabbookWidget-C30f9B6z-774cbad19f175472702b.js +1 -0
  56. data/tools/limitsmonitor/TextboxWidget-CDqxsgys-a9c863f537a70b2b3437.js +1 -0
  57. data/tools/limitsmonitor/{TextfieldWidget-BXr9MkVW-5163f204beb49b092911.js → TextfieldWidget-CAyjKJs6-ddf111b0955964122f64.js} +1 -1
  58. data/tools/limitsmonitor/{TimeWidget-C67uwMGH-4a74d77891861d53cb7a.js → TimeWidget-BQsP0G2X-abe16efce257ade44564.js} +1 -1
  59. data/tools/limitsmonitor/{TitleWidget-t_YLgUMB-acc67703ef3fc62e91bc.js → TitleWidget-DXVba53S-e168a97d113b20e9b815.js} +1 -1
  60. data/tools/limitsmonitor/{VWidget-j2GIGGSX-8edc55a2569eec1b95df.js → VWidget-CFTCukCL-6a12c4d5fcc0d3b4ade3.js} +1 -1
  61. data/tools/limitsmonitor/ValueWidget-B-TWLPdM-2166bc1befd7fef66585.js +1 -0
  62. data/tools/limitsmonitor/ValuelimitsbarWidget-jsDXdPdC-d1b7f776663722797305.js +1 -0
  63. data/tools/limitsmonitor/{ValuelimitscolumnWidget-HR1TNHwQ-ce34617f9bf8f1d13f79.js → ValuelimitscolumnWidget-I-uwnXM2-c8c89597dbf1dce4862d.js} +1 -1
  64. data/tools/limitsmonitor/ValuerangebarWidget-OyhSTScu-633f76b325a10bc8aeda.js +1 -0
  65. data/tools/limitsmonitor/VerticalWidget-CkFbX1Gq-87a7a666526f68ec31d0.js +1 -0
  66. data/tools/limitsmonitor/VerticalboxWidget-FEQgPM9r-5309b1d81b0d45701f85.js +1 -0
  67. data/tools/limitsmonitor/{Widget-Bn_S-zBo-f7f57ba202121d435290.js → Widget-C3-TBgP7-67b8bd3fd0861f456f70.js} +1 -1
  68. data/tools/limitsmonitor/main-788a088d69870dd34b9a.js +1502 -0
  69. data/tools/limitsmonitor/main.js +1 -1
  70. metadata +69 -69
  71. data/tools/limitsmonitor/ArrayplotWidget-ntRLh6-B-c7b89118a3de5d892c0e.js +0 -1
  72. data/tools/limitsmonitor/BlockWidget-DGH3Zz5p-b830051edcbec77a0ab7.js +0 -2
  73. data/tools/limitsmonitor/CanvasWidget-CzG2jYQb-a98b7f61933e17f60776.js +0 -1
  74. data/tools/limitsmonitor/CanvasdotWidget-0FAaw4G2-a5a22f7b03c335dffe61.js +0 -1
  75. data/tools/limitsmonitor/DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js +0 -1
  76. data/tools/limitsmonitor/Graph-DCihpnT0-45bac61be6ea279a9766.js +0 -1
  77. data/tools/limitsmonitor/GraphWidget-cTVq29cY-175fdb00713eac040a49.js +0 -1
  78. data/tools/limitsmonitor/HorizontalWidget-v1pfd94Z-2383b961d54489c7fdf1.js +0 -1
  79. data/tools/limitsmonitor/HorizontalboxWidget-B06-c_n4-657ce396c2dea61773bd.js +0 -1
  80. data/tools/limitsmonitor/LabelledWidget-KI6fMlsr-26be7e4a8b805ede4eef.js +0 -1
  81. data/tools/limitsmonitor/LabelprogressbarWidget-C2lzmqBH-ddb73fc33d6fb09b842a.js +0 -1
  82. data/tools/limitsmonitor/LabelsparklineWidget-Ci6GGm29-8f55dec46126f696335b.js +0 -1
  83. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-aaVLaejn-8419ba809844d75affd4.js +0 -1
  84. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-Uur6aqOg-7a3eefe4649be8207058.js +0 -1
  85. data/tools/limitsmonitor/LedWidget-BN8IgAxJ-da510b28a9ca43fa19d1.js +0 -1
  86. data/tools/limitsmonitor/LimitsMonitor-d8f588e54b52973b0c40.js +0 -8
  87. data/tools/limitsmonitor/LinegraphWidget-jXksfbPb-aa6b72b83bb3c86c6c2a.js +0 -1
  88. data/tools/limitsmonitor/MatrixbycolumnsWidget-DCwxPjwS-692373bd80b9822a822a.js +0 -1
  89. data/tools/limitsmonitor/ScrollwindowWidget-54GU96Ve-5dd5ba73d2ae9bb03df9.js +0 -1
  90. data/tools/limitsmonitor/SpacerWidget-XoMPHak8-2e04111693fecb04e7f8.js +0 -1
  91. data/tools/limitsmonitor/TabbookWidget-_HVA72t5-6b9351e5826232844ee1.js +0 -1
  92. data/tools/limitsmonitor/TextboxWidget-0JXn4bMH-5ad256f7b7f7df7d611f.js +0 -1
  93. data/tools/limitsmonitor/ValueWidget-3jNtnh5i-fd446395a1137b478a0e.js +0 -1
  94. data/tools/limitsmonitor/ValuelimitsbarWidget-JSceOzGS-621874475a2287ebf6df.js +0 -1
  95. data/tools/limitsmonitor/ValuerangebarWidget-DnZrho8S-9e759dadb87a9a2e3f74.js +0 -1
  96. data/tools/limitsmonitor/VerticalWidget-DJvoxqLE-5123f60cf6459691f365.js +0 -1
  97. data/tools/limitsmonitor/VerticalboxWidget-CYYyLBoO-987b1c3bc142eeddc80e.js +0 -1
  98. data/tools/limitsmonitor/main-1f357f4a9ae5d1a695a4.js +0 -1501
@@ -1,8 +0,0 @@
1
- System.register(["./main-1f357f4a9ae5d1a695a4.js","vue","single-spa","./VWidget-j2GIGGSX-8edc55a2569eec1b95df.js","./ValueWidget-3jNtnh5i-fd446395a1137b478a0e.js","./IframeWidget-n8lNXrpt-f0623ee8cf826b94f2a9.js","./ValuelimitsbarWidget-JSceOzGS-621874475a2287ebf6df.js","vue-router","vuex","vuetify","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","./DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js","./LimitsbarWidget-BxxoKTjp-f204a54b40ab4bde6aa1.js","./BarColumn-Bgz2YJ59-792ea8cf842da7644a1b.js"],function(ws,Ii){"use strict";var ct,ge,Fe,lt,ut,dt,y,N,k,ht,g,m,F,H,z,G,ne,j,be,_e,Y,Be,$e,ft,pt;return{setters:[C=>{ct=C.d,ge=C._,Fe=C.R,lt=C.N,ut=C.a,dt=C.v},C=>{y=C.resolveComponent,N=C.createBlock,k=C.openBlock,ht=C.Teleport,g=C.createVNode,m=C.withCtx,F=C.createElementVNode,H=C.toDisplayString,z=C.createElementBlock,G=C.Fragment,ne=C.renderList,j=C.createTextVNode,be=C.mergeProps,_e=C.createSlots,Y=C.createCommentVNode,Be=C.normalizeStyle,$e=C.normalizeClass},null,null,C=>{ft=C.default},null,C=>{pt=C.default},null,null,null,null,null,null,null],execute:function(){var C=document.createElement("style");C.textContent=`.footer[data-v-ed7ec5ac]{padding-top:5px}.v-input[data-v-ed7ec5ac]{background-color:var(--color-background-base-default)}.textfield-green[data-v-ed7ec5ac]{color:#00c800}.textfield-yellow[data-v-ed7ec5ac]{color:#ffdc00}.textfield-red[data-v-ed7ec5ac]{color:#ff2d2d}.limits-table[data-v-ed7ec5ac]{margin-top:5px;margin-bottom:10px}.limits-table[data-v-ed7ec5ac] th{font-weight:700;background-color:var(--color-background-base-default)}.card-height[data-v-210db24e]{height:calc(100vh - 150px)}
2
- /*$vite$:1*/`,document.head.appendChild(C);const vs={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}},Ss={class:"app-title mr-2"};function Es(t,e,s,n,r,i){const o=y("v-col"),a=y("v-row"),l=y("v-icon"),u=y("v-btn"),d=y("v-divider"),h=y("v-list-item-title"),b=y("v-list-item"),f=y("v-list"),w=y("v-menu"),p=y("v-radio"),I=y("v-list-item-action"),R=y("v-radio-group"),E=y("v-checkbox");return k(),N(ht,{to:"#openc3-menu"},[g(a,{"no-gutters":""},{default:m(()=>[g(o,{"align-self":"end"},{default:m(()=>[F("span",Ss,H(s.title),1)]),_:1})]),_:1}),g(a,{dense:"",class:"flex-nowrap"},{default:m(()=>[(k(!0),z(G,null,ne(s.menus,(O,V)=>(k(),N(w,{ref_for:!0,ref:"topmenu",key:V},{activator:m(({props:_})=>[g(u,be({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button",text:O.label,"data-test":i.formatDT(`${s.title} ${O.label}`)}),{append:m(()=>[g(l,{class:"menu-button-icon"},{default:m(()=>e[0]||(e[0]=[j(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:m(()=>[g(f,null,{default:m(()=>[(k(!0),z(G,null,ne(O.items,(_,P)=>(k(),z(G,null,[_.divider?(k(),N(d,{key:P+"-divider"})):_.subMenu&&_.subMenu.length>0?(k(),z("div",{key:P+"-submenu"},[(k(),N(w,{"open-on-hover":"",location:"right",key:P},{activator:m(({props:T})=>[(k(),N(b,be({ref_for:!0},T,{disabled:_.disabled,key:P}),_e({append:m(()=>[g(l,null,{default:m(()=>e[1]||(e[1]=[j(" mdi-chevron-right ")])),_:1})]),default:m(()=>[!_.radio&&!_.checkbox?(k(),N(h,{key:0,style:Be("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:m(()=>[j(H(_.label),1)]),_:2},1032,["style"])):Y("",!0)]),_:2},[_.icon?{name:"prepend",fn:m(()=>[g(l,{disabled:_.disabled},{default:m(()=>[j(H(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:m(()=>[g(f,null,{default:m(()=>[(k(!0),z(G,null,ne(_.subMenu,(T,x)=>(k(),N(b,{key:x,"prepend-icon":T.icon,onClick:L=>i.subMenuClick(T)},{default:m(()=>[g(h,null,{default:m(()=>[j(H(T.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(k(),N(R,{"model-value":_.value,"onUpdate:modelValue":_.command,key:P+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:m(()=>[(k(!0),z(G,null,ne(_.choices,(T,x)=>(k(),N(b,{key:x+"-choice"},{default:m(()=>[g(I,{class:"list-action"},{default:m(()=>[g(p,{color:"secondary",label:T.label,value:T.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(k(),N(b,{onClick:T=>_.command(_),disabled:_.disabled,"data-test":i.formatDT(`${s.title} ${O.label} ${_.label}`),key:P+"-list"},_e({default:m(()=>[_.checkbox?(k(),N(I,{key:0,class:"list-action"},{default:m(()=>[g(E,{modelValue:_.checked,"onUpdate:modelValue":T=>_.checked=T,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Y("",!0),!_.radio&&!_.checkbox?(k(),N(h,{key:1,style:Be("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:m(()=>[j(H(_.label),1)]),_:2},1032,["style"])):Y("",!0)]),_:2},[_.icon?{name:"prepend",fn:m(()=>[g(l,{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 xs=ct(vs,[["render",Es],["__scopeId","data-v-4d454b93"]]);var Cs=Object.defineProperty,Os=(t,e,s)=>e in t?Cs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ye=(t,e,s)=>Os(t,typeof e!="symbol"?e+"":e,s);function mt(t,e){return function(){return t.apply(e,arguments)}}const{toString:ks}=Object.prototype,{getPrototypeOf:qe}=Object,{iterator:we,toStringTag:gt}=Symbol,ve=(t=>e=>{const s=ks.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),M=t=>(t=t.toLowerCase(),e=>ve(e)===t),Se=t=>e=>typeof e===t,{isArray:re}=Array,ce=Se("undefined");function Rs(t){return t!==null&&!ce(t)&&t.constructor!==null&&!ce(t.constructor)&&B(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const bt=M("ArrayBuffer");function Is(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&bt(t.buffer),e}const As=Se("string"),B=Se("function"),_t=Se("number"),Ee=t=>t!==null&&typeof t=="object",Ts=t=>t===!0||t===!1,xe=t=>{if(ve(t)!=="object")return!1;const e=qe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(gt in t)&&!(we in t)},Ls=M("Date"),Ns=M("File"),js=M("Blob"),Ps=M("FileList"),Us=t=>Ee(t)&&B(t.pipe),Ds=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||B(t.append)&&((e=ve(t))==="formdata"||e==="object"&&B(t.toString)&&t.toString()==="[object FormData]"))},Fs=M("URLSearchParams"),[Bs,$s,qs,Vs]=["ReadableStream","Request","Response","Headers"].map(M),zs=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function le(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),re(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{const i=s?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(n=0;n<o;n++)a=i[n],e.call(null,t[a],a,t)}}function yt(t,e){e=e.toLowerCase();const s=Object.keys(t);let n=s.length,r;for(;n-- >0;)if(r=s[n],e===r.toLowerCase())return r;return null}const Z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wt=t=>!ce(t)&&t!==Z;function Ve(){const{caseless:t}=wt(this)&&this||{},e={},s=(n,r)=>{const i=t&&yt(e,r)||r;xe(e[i])&&xe(n)?e[i]=Ve(e[i],n):xe(n)?e[i]=Ve({},n):re(n)?e[i]=n.slice():e[i]=n};for(let n=0,r=arguments.length;n<r;n++)arguments[n]&&le(arguments[n],s);return e}const Ms=(t,e,s,{allOwnKeys:n}={})=>(le(e,(r,i)=>{s&&B(r)?t[i]=mt(r,s):t[i]=r},{allOwnKeys:n}),t),Ws=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Js=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},Hs=(t,e,s,n)=>{let r,i,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=s!==!1&&qe(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},Ks=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const n=t.indexOf(e,s);return n!==-1&&n===s},Gs=t=>{if(!t)return null;if(re(t))return t;let e=t.length;if(!_t(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},Ys=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qe(Uint8Array)),Zs=(t,e)=>{const s=(t&&t[we]).call(t);let n;for(;(n=s.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},Xs=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},Qs=M("HTMLFormElement"),en=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),vt=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),tn=M("RegExp"),St=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};le(s,(r,i)=>{let o;(o=e(r,i,t))!==!1&&(n[i]=o||r)}),Object.defineProperties(t,n)},sn=t=>{St(t,(e,s)=>{if(B(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=t[s];if(B(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},nn=(t,e)=>{const s={},n=r=>{r.forEach(i=>{s[i]=!0})};return re(t)?n(t):n(String(t).split(e)),s},rn=()=>{},on=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function an(t){return!!(t&&B(t.append)&&t[gt]==="FormData"&&t[we])}const cn=t=>{const e=new Array(10),s=(n,r)=>{if(Ee(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[r]=n;const i=re(n)?[]:{};return le(n,(o,a)=>{const l=s(o,r+1);!ce(l)&&(i[a]=l)}),e[r]=void 0,i}}return n};return s(t,0)},ln=M("AsyncFunction"),un=t=>t&&(Ee(t)||B(t))&&B(t.then)&&B(t.catch),Et=((t,e)=>t?setImmediate:e?((s,n)=>(Z.addEventListener("message",({source:r,data:i})=>{r===Z&&i===s&&n.length&&n.shift()()},!1),r=>{n.push(r),Z.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",B(Z.postMessage)),dn=typeof queueMicrotask<"u"?queueMicrotask.bind(Z):typeof process<"u"&&process.nextTick||Et,hn=t=>t!=null&&B(t[we]),c={isArray:re,isArrayBuffer:bt,isBuffer:Rs,isFormData:Ds,isArrayBufferView:Is,isString:As,isNumber:_t,isBoolean:Ts,isObject:Ee,isPlainObject:xe,isReadableStream:Bs,isRequest:$s,isResponse:qs,isHeaders:Vs,isUndefined:ce,isDate:Ls,isFile:Ns,isBlob:js,isRegExp:tn,isFunction:B,isStream:Us,isURLSearchParams:Fs,isTypedArray:Ys,isFileList:Ps,forEach:le,merge:Ve,extend:Ms,trim:zs,stripBOM:Ws,inherits:Js,toFlatObject:Hs,kindOf:ve,kindOfTest:M,endsWith:Ks,toArray:Gs,forEachEntry:Zs,matchAll:Xs,isHTMLForm:Qs,hasOwnProperty:vt,hasOwnProp:vt,reduceDescriptors:St,freezeMethods:sn,toObjectSet:nn,toCamelCase:en,noop:rn,toFiniteNumber:on,findKey:yt,global:Z,isContextDefined:wt,isSpecCompliantForm:an,toJSONObject:cn,isAsyncFn:ln,isThenable:un,setImmediate:Et,asap:dn,isIterable:hn};function v(t,e,s,n,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),s&&(this.config=s),n&&(this.request=n),r&&(this.response=r,this.status=r.status?r.status:null)}c.inherits(v,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const xt=v.prototype,Ct={};["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=>{Ct[t]={value:t}}),Object.defineProperties(v,Ct),Object.defineProperty(xt,"isAxiosError",{value:!0}),v.from=(t,e,s,n,r,i)=>{const o=Object.create(xt);return c.toFlatObject(t,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),v.call(o,t.message,e,s,n,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const fn=null;function ze(t){return c.isPlainObject(t)||c.isArray(t)}function Ot(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function kt(t,e,s){return t?t.concat(e).map(function(n,r){return n=Ot(n),!s&&r?"["+n+"]":n}).join(s?".":""):e}function pn(t){return c.isArray(t)&&!t.some(ze)}const mn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Ce(t,e,s){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=c.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,w){return!c.isUndefined(w[f])});const n=s.metaTokens,r=s.visitor||u,i=s.dots,o=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(!a&&c.isBlob(f))throw new v("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(f)||c.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,w,p){let I=f;if(f&&!p&&typeof f=="object"){if(c.endsWith(w,"{}"))w=n?w:w.slice(0,-2),f=JSON.stringify(f);else if(c.isArray(f)&&pn(f)||(c.isFileList(f)||c.endsWith(w,"[]"))&&(I=c.toArray(f)))return w=Ot(w),I.forEach(function(R,E){!(c.isUndefined(R)||R===null)&&e.append(o===!0?kt([w],E,i):o===null?w:w+"[]",l(R))}),!1}return ze(f)?!0:(e.append(kt(p,w,i),l(f)),!1)}const d=[],h=Object.assign(mn,{defaultVisitor:u,convertValue:l,isVisitable:ze});function b(f,w){if(!c.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+w.join("."));d.push(f),c.forEach(f,function(p,I){(!(c.isUndefined(p)||p===null)&&r.call(e,p,c.isString(I)?I.trim():I,w,h))===!0&&b(p,w?w.concat(I):[I])}),d.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return b(t),e}function Rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Me(t,e){this._pairs=[],t&&Ce(t,this,e)}const It=Me.prototype;It.append=function(t,e){this._pairs.push([t,e])},It.toString=function(t){const e=t?function(s){return t.call(this,s,Rt)}:Rt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function gn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(t,e,s){if(!e)return t;const n=s&&s.encode||gn;c.isFunction(s)&&(s={serialize:s});const r=s&&s.serialize;let i;if(r?i=r(e,s):i=c.isURLSearchParams(e)?e.toString():new Me(e,s).toString(n),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Tt{constructor(){this.handlers=[]}use(e,s,n){return this.handlers.push({fulfilled:e,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bn=typeof URLSearchParams<"u"?URLSearchParams:Me,_n=typeof FormData<"u"?FormData:null,yn=typeof Blob<"u"?Blob:null,wn={isBrowser:!0,classes:{URLSearchParams:bn,FormData:_n,Blob:yn},protocols:["http","https","file","blob","url","data"]},We=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,vn=We&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),Sn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",En=We&&window.location.href||"http://localhost",xn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:We,hasStandardBrowserEnv:vn,hasStandardBrowserWebWorkerEnv:Sn,navigator:Je,origin:En},Symbol.toStringTag,{value:"Module"})),D={...xn,...wn};function Cn(t,e){return Ce(t,new D.classes.URLSearchParams,Object.assign({visitor:function(s,n,r,i){return D.isNode&&c.isBuffer(s)?(this.append(n,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function On(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function kn(t){const e={},s=Object.keys(t);let n;const r=s.length;let i;for(n=0;n<r;n++)i=s[n],e[i]=t[i];return e}function Nt(t){function e(s,n,r,i){let o=s[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=s.length;return o=!o&&c.isArray(r)?r.length:o,l?(c.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):((!r[o]||!c.isObject(r[o]))&&(r[o]=[]),e(s,n,r[o],i)&&c.isArray(r[o])&&(r[o]=kn(r[o])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(n,r)=>{e(On(n),r,s,0)}),s}return null}function Rn(t,e,s){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(t)}const ue={transitional:Lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",n=s.indexOf("application/json")>-1,r=c.isObject(t);if(r&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return n?JSON.stringify(Nt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Cn(t,this.formSerializer).toString();if((i=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ce(i?{"files[]":t}:t,o&&new o,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),Rn(t)):t}],transformResponse:[function(t){const e=this.transitional||ue.transitional,s=e&&e.forcedJSONParsing,n=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(i){if(r)throw i.name==="SyntaxError"?v.from(i,v.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:D.classes.FormData,Blob:D.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{ue.headers[t]={}});const In=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),An=t=>{const e={};let s,n,r;return t&&t.split(`
3
- `).forEach(function(i){r=i.indexOf(":"),s=i.substring(0,r).trim().toLowerCase(),n=i.substring(r+1).trim(),!(!s||e[s]&&In[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e},jt=Symbol("internals");function de(t){return t&&String(t).trim().toLowerCase()}function Oe(t){return t===!1||t==null?t:c.isArray(t)?t.map(Oe):String(t)}function Tn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(t);)e[n[1]]=n[2];return e}const Ln=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function He(t,e,s,n,r){if(c.isFunction(n))return n.call(this,e,s);if(r&&(e=s),!!c.isString(e)){if(c.isString(n))return e.indexOf(n)!==-1;if(c.isRegExp(n))return n.test(e)}}function Nn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function jn(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{value:function(r,i,o){return this[n].call(this,e,r,i,o)},configurable:!0})})}let $=class{constructor(t){t&&this.set(t)}set(t,e,s){const n=this;function r(o,a,l){const u=de(a);if(!u)throw new Error("header name must be a non-empty string");const d=c.findKey(n,u);(!d||n[d]===void 0||l===!0||l===void 0&&n[d]!==!1)&&(n[d||a]=Oe(o))}const i=(o,a)=>c.forEach(o,(l,u)=>r(l,u,a));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(c.isString(t)&&(t=t.trim())&&!Ln(t))i(An(t),e);else if(c.isObject(t)&&c.isIterable(t)){let o={},a,l;for(const u of t){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[l=u[0]]=(a=o[l])?c.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}i(o,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=de(t),t){const s=c.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return Tn(n);if(c.isFunction(e))return e.call(this,n,s);if(c.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=de(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||He(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(i){if(i=de(i),i){const o=c.findKey(s,i);o&&(!e||He(s,s[o],o,e))&&(delete s[o],n=!0)}}return c.isArray(t)?t.forEach(r):r(t),n}clear(t){const e=Object.keys(this);let s=e.length,n=!1;for(;s--;){const r=e[s];(!t||He(this,this[r],r,t,!0))&&(delete this[r],n=!0)}return n}normalize(t){const e=this,s={};return c.forEach(this,(n,r)=>{const i=c.findKey(s,r);if(i){e[i]=Oe(n),delete e[r];return}const o=t?Nn(r):String(r).trim();o!==r&&delete e[r],e[o]=Oe(n),s[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(s,n)=>{s!=null&&s!==!1&&(e[n]=t&&c.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(n=>s.set(n)),s}static accessor(t){const e=(this[jt]=this[jt]={accessors:{}}).accessors,s=this.prototype;function n(r){const i=de(r);e[i]||(jn(s,r),e[i]=!0)}return c.isArray(t)?t.forEach(n):n(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors($.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}}),c.freezeMethods($);function Ke(t,e){const s=this||ue,n=e||s,r=$.from(n.headers);let i=n.data;return c.forEach(t,function(o){i=o.call(s,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function Pt(t){return!!(t&&t.__CANCEL__)}function ie(t,e,s){v.call(this,t??"canceled",v.ERR_CANCELED,e,s),this.name="CanceledError"}c.inherits(ie,v,{__CANCEL__:!0});function Ut(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new v("Request failed with status code "+s.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Pn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Un(t,e){t=t||10;const s=new Array(t),n=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),u=n[i];o||(o=l),s[r]=a,n[r]=l;let d=i,h=0;for(;d!==r;)h+=s[d++],d=d%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-o<e)return;const b=u&&l-u;return b?Math.round(h*1e3/b):void 0}}function Dn(t,e){let s=0,n=1e3/e,r,i;const o=(a,l=Date.now())=>{s=l,r=null,i&&(clearTimeout(i),i=null),t.apply(null,a)};return[(...a)=>{const l=Date.now(),u=l-s;u>=n?o(a,l):(r=a,i||(i=setTimeout(()=>{i=null,o(r)},n-u)))},()=>r&&o(r)]}const ke=(t,e,s=3)=>{let n=0;const r=Un(50,250);return Dn(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-n,u=r(l),d=o<=a;n=o;const h={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},s)},Dt=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},Ft=t=>(...e)=>c.asap(()=>t(...e)),Fn=D.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,D.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(D.origin),D.navigator&&/(msie|trident)/i.test(D.navigator.userAgent)):()=>!0,Bn=D.hasStandardBrowserEnv?{write(t,e,s,n,r,i){const o=[t+"="+encodeURIComponent(e)];c.isNumber(s)&&o.push("expires="+new Date(s).toGMTString()),c.isString(n)&&o.push("path="+n),c.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $n(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Bt(t,e,s){let n=!$n(e);return t&&(n||s==!1)?qn(t,e):e}const $t=t=>t instanceof $?{...t}:t;function X(t,e){e=e||{};const s={};function n(u,d,h,b){return c.isPlainObject(u)&&c.isPlainObject(d)?c.merge.call({caseless:b},u,d):c.isPlainObject(d)?c.merge({},d):c.isArray(d)?d.slice():d}function r(u,d,h,b){if(c.isUndefined(d)){if(!c.isUndefined(u))return n(void 0,u,h,b)}else return n(u,d,h,b)}function i(u,d){if(!c.isUndefined(d))return n(void 0,d)}function o(u,d){if(c.isUndefined(d)){if(!c.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,h){if(h in e)return n(u,d);if(h in t)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d,h)=>r($t(u),$t(d),h,!0)};return c.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=l[u]||r,h=d(t[u],e[u],u);c.isUndefined(h)&&d!==a||(s[u]=h)}),s}const qt=t=>{const e=X({},t);let{data:s,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=$.from(o),e.url=At(Bt(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 l;if(c.isFormData(s)){if(D.hasStandardBrowserEnv||D.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...d]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(D.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(e)),n||n!==!1&&Fn(e.url))){const u=r&&i&&Bn.read(i);u&&o.set(r,u)}return e},Vn=typeof XMLHttpRequest<"u",zn=Vn&&function(t){return new Promise(function(e,s){const n=qt(t);let r=n.data;const i=$.from(n.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=n,u,d,h,b,f;function w(){b&&b(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function I(){if(!p)return;const E=$.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),O={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:t,request:p};Ut(function(V){e(V),w()},function(V){s(V),w()},O),p=null}"onloadend"in p?p.onloadend=I:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(I)},p.onabort=function(){p&&(s(new v("Request aborted",v.ECONNABORTED,t,p)),p=null)},p.onerror=function(){s(new v("Network Error",v.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let E=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const O=n.transitional||Lt;n.timeoutErrorMessage&&(E=n.timeoutErrorMessage),s(new v(E,O.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,t,p)),p=null},r===void 0&&i.setContentType(null),"setRequestHeader"in p&&c.forEach(i.toJSON(),function(E,O){p.setRequestHeader(O,E)}),c.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),o&&o!=="json"&&(p.responseType=n.responseType),l&&([h,f]=ke(l,!0),p.addEventListener("progress",h)),a&&p.upload&&([d,b]=ke(a),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",b)),(n.cancelToken||n.signal)&&(u=E=>{p&&(s(!E||E.type?new ie(null,t,p):E),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const R=Pn(n.url);if(R&&D.protocols.indexOf(R)===-1){s(new v("Unsupported protocol "+R+":",v.ERR_BAD_REQUEST,t));return}p.send(r||null)})},Mn=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let n=new AbortController,r;const i=function(u){if(!r){r=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof v?d:new ie(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,i(new v(`timeout ${e} of ms exceeded`,v.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>c.asap(a),l}},Wn=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let n=0,r;for(;n<s;)r=n+e,yield t.slice(n,r),n=r},Jn=async function*(t,e){for await(const s of Hn(t))yield*Wn(s,e)},Hn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:n}=await e.read();if(s)break;yield n}}finally{await e.cancel()}},Vt=(t,e,s,n)=>{const r=Jn(t,e);let i=0,o,a=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await r.next();if(u){a(),l.close();return}let h=d.byteLength;if(s){let b=i+=h;s(b)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zt=Re&&typeof ReadableStream=="function",Kn=Re&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Mt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Gn=zt&&Mt(()=>{let t=!1;const e=new Request(D.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Wt=64*1024,Ge=zt&&Mt(()=>c.isReadableStream(new Response("").body)),Ie={stream:Ge&&(t=>t.body)};Re&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ie[e]&&(Ie[e]=c.isFunction(t[e])?s=>s[e]():(s,n)=>{throw new v(`Response type '${e}' is not supported`,v.ERR_NOT_SUPPORT,n)})})})(new Response);const Yn=async t=>{if(t==null)return 0;if(c.isBlob(t))return t.size;if(c.isSpecCompliantForm(t))return(await new Request(D.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(c.isArrayBufferView(t)||c.isArrayBuffer(t))return t.byteLength;if(c.isURLSearchParams(t)&&(t=t+""),c.isString(t))return(await Kn(t)).byteLength},Zn=async(t,e)=>c.toFiniteNumber(t.getContentLength())??Yn(e),Xn=Re&&(async t=>{let{url:e,method:s,data:n,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:d,withCredentials:h="same-origin",fetchOptions:b}=qt(t);u=u?(u+"").toLowerCase():"text";let f=Mn([r,i&&i.toAbortSignal()],o),w;const p=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let I;try{if(l&&Gn&&s!=="get"&&s!=="head"&&(I=await Zn(d,n))!==0){let _=new Request(e,{method:"POST",body:n,duplex:"half"}),P;if(c.isFormData(n)&&(P=_.headers.get("content-type"))&&d.setContentType(P),_.body){const[T,x]=Dt(I,ke(Ft(l)));n=Vt(_.body,Wt,T,x)}}c.isString(h)||(h=h?"include":"omit");const R="credentials"in Request.prototype;w=new Request(e,{...b,signal:f,method:s.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:R?h:void 0});let E=await fetch(w);const O=Ge&&(u==="stream"||u==="response");if(Ge&&(a||O&&p)){const _={};["status","statusText","headers"].forEach(L=>{_[L]=E[L]});const P=c.toFiniteNumber(E.headers.get("content-length")),[T,x]=a&&Dt(P,ke(Ft(a),!0))||[];E=new Response(Vt(E.body,Wt,T,()=>{x&&x(),p&&p()}),_)}u=u||"text";let V=await Ie[c.findKey(Ie,u)||"text"](E,t);return!O&&p&&p(),await new Promise((_,P)=>{Ut(_,P,{data:V,headers:$.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:w})})}catch(R){throw p&&p(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,t,w),{cause:R.cause||R}):v.from(R,R&&R.code,t,w)}}),Ye={http:fn,xhr:zn,fetch:Xn};c.forEach(Ye,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jt=t=>`- ${t}`,Qn=t=>c.isFunction(t)||t===null||t===!1,Ht={getAdapter:t=>{t=c.isArray(t)?t:[t];const{length:e}=t;let s,n;const r={};for(let i=0;i<e;i++){s=t[i];let o;if(n=s,!Qn(s)&&(n=Ye[(o=String(s)).toLowerCase()],n===void 0))throw new v(`Unknown adapter '${o}'`);if(n)break;r[o||"#"+i]=n}if(!n){const i=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
5
- `+i.map(Jt).join(`
6
- `):" "+Jt(i[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Ye};function Ze(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ie(null,t)}function Kt(t){return Ze(t),t.headers=$.from(t.headers),t.data=Ke.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ht.getAdapter(t.adapter||ue.adapter)(t).then(function(e){return Ze(t),e.data=Ke.call(t,t.transformResponse,e),e.headers=$.from(e.headers),e},function(e){return Pt(e)||(Ze(t),e&&e.response&&(e.response.data=Ke.call(t,t.transformResponse,e.response),e.response.headers=$.from(e.response.headers))),Promise.reject(e)})}const Gt="1.9.0",Ae={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ae[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Yt={};Ae.transitional=function(t,e,s){function n(r,i){return"[Axios v"+Gt+"] Transitional option '"+r+"'"+i+(s?". "+s:"")}return(r,i,o)=>{if(t===!1)throw new v(n(i," has been removed"+(e?" in "+e:"")),v.ERR_DEPRECATED);return e&&!Yt[i]&&(Yt[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,i,o):!0}},Ae.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function er(t,e,s){if(typeof t!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const i=n[r],o=e[i];if(o){const a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new v("option "+i+" must be "+l,v.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new v("Unknown option "+i,v.ERR_BAD_OPTION)}}const Te={assertOptions:er,validators:Ae},K=Te.validators;let Q=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tt,response:new Tt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const r=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
7
- `+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=X(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&Te.assertOptions(s,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean)},!1),n!=null&&(c.isFunction(n)?e.paramsSerializer={serialize:n}:Te.assertOptions(n,{encode:K.function,serialize:K.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Te.assertOptions(e,{baseUrl:K.spelling("baseURL"),withXsrfToken:K.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=r&&c.merge(r.common,r[e.method]);r&&c.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),e.headers=$.concat(i,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 l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!a){const f=[Kt.bind(this),void 0];for(f.unshift.apply(f,o),f.push.apply(f,l),h=f.length,u=Promise.resolve(e);d<h;)u=u.then(f[d++],f[d++]);return u}h=o.length;let b=e;for(d=0;d<h;){const f=o[d++],w=o[d++];try{b=f(b)}catch(p){w.call(this,p);break}}try{u=Kt.call(this,b)}catch(f){return Promise.reject(f)}for(d=0,h=l.length;d<h;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=X(this.defaults,t);const e=Bt(t.baseURL,t.url,t.allowAbsoluteUrls);return At(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){Q.prototype[t]=function(e,s){return this.request(X(s||{},{method:t,url:e,data:(s||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function e(s){return function(n,r,i){return this.request(X(i||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Q.prototype[t]=e(),Q.prototype[t+"Form"]=e(!0)});let tr=class ys{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{n.subscribe(a),i=a}).then(r);return o.cancel=function(){n.unsubscribe(i)},o},e(function(r,i,o){n.reason||(n.reason=new ie(r,i,o),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=n=>{e.abort(n)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new ys(function(s){e=s}),cancel:e}}};function sr(t){return function(e){return t.apply(null,e)}}function nr(t){return c.isObject(t)&&t.isAxiosError===!0}const Xe={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(Xe).forEach(([t,e])=>{Xe[e]=t});function Zt(t){const e=new Q(t),s=mt(Q.prototype.request,e);return c.extend(s,Q.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return Zt(X(t,n))},s}const A=Zt(ue);A.Axios=Q,A.CanceledError=ie,A.CancelToken=tr,A.isCancel=Pt,A.VERSION=Gt,A.toFormData=Ce,A.AxiosError=v,A.Cancel=A.CanceledError,A.all=function(t){return Promise.all(t)},A.spread=sr,A.isAxiosError=nr,A.mergeConfig=X,A.AxiosHeaders=$,A.formToJSON=t=>Nt(c.isHTMLForm(t)?new FormData(t):t),A.getAdapter=Ht.getAdapter,A.HttpStatusCode=Xe,A.default=A;const{Axios:Ai,AxiosError:Ti,CanceledError:Li,isCancel:Ni,CancelToken:ji,VERSION:Pi,all:Ui,Cancel:Di,isAxiosError:Fi,spread:Bi,toFormData:$i,AxiosHeaders:qi,HttpStatusCode:Vi,formToJSON:zi,getAdapter:Mi,mergeConfig:Wi}=A,Xt=A.create({baseURL:location.origin,timeout:6e4,params:{}});Xt.interceptors.response.use(t=>t,t=>{var e,s,n,r,i,o,a,l,u,d,h;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(w){w&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let b=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(b+=`${t.response.statusText} `),(n=(s=t.response)==null?void 0:s.config)!=null&&n.data&&(b+=`${t.response.config.data} `),(i=(r=t.response)==null?void 0:r.data)!=null&&i.message?b+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?b+=`${t.response.data.exception}`:(d=(u=(l=t.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&d.message?(t.response.data.error.class&&(b+=`${t.response.data.error.class} `),b+=`${t.response.data.error.message}`):b+=`${(h=t.response)==null?void 0:h.data}`;const{$cosmosNotify:f}=window;throw f&&f.serious({title:"Network error",body:b}),t}else throw t});let Le=()=>({emit(t,...e){for(let s=this.events[t]||[],n=0,r=s.length;n<r;n++)s[n](...e)},events:{},on(t,e){var s;return((s=this.events)[t]||(s[t]=[])).push(e),()=>{var n;this.events[t]=(n=this.events[t])==null?void 0:n.filter(r=>e!==r)}}});class he extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class Qe extends he{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class rr extends he{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class W extends he{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class ir extends W{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 s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class or{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:e,info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:n,info:r})=>(s[n]=r,s),{})}}const ee=Symbol("state");class es{constructor(e={}){this.emitter=Le(),this.params=Object.freeze(e),this.presence=new or(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,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,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,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let n=this.receiver?this.receiver.logger:null;n&&n.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let n=[()=>delete this._pendingSubscribe];n.push(this.on("connect",()=>{n.forEach(r=>r()),e()})),n.push(this.on("close",r=>{n.forEach(i=>i()),s(r||new he("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class ar{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(n=>n[e](s[0])):this.channels.forEach(n=>n[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,n={promise:new Promise(i=>{s=i}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(n),1),s(n)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(n),r&&await r.promise,this.gvl&&await this.gvl.acquire(n,e),n.acquired=!0,n}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class cr{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class lr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new cr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:n}){let r=this._subscriptions[e]=new ar(e);return r.remoteId=this._localToRemote[e],r.subscriber=s,r.unsubscriber=n,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let n=this.get(e);n&&(n.remoteId=s)}}class ur{constructor(e={}){this.subscriptions=new lr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let n=s.remoteId;n&&delete this._remoteToLocal[n],this.subscriptions.remove(e)}transmit(e,s,n){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,s,n]);return}let i=this.subscriptions.get(r);i&&i.channels.forEach(o=>{o.receive(s,n)})}notify(e,s,n){let r=this._remoteToLocal[e];if(!r)return;let i=this.subscriptions.get(r);i&&i.channels.forEach(o=>o.emit(s,n))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let n of this._pendingMessages)n[0]===e?this.transmit(n[0],n[1],n[2]):s.push(n);this._pendingMessages=s}}const ts={debug:0,info:1,warn:2,error:3};class ss{constructor(e){this.level=e||"warn"}log(e,s,n){ts[e]<ts[this.level]||this.writeLogEntry(e,s,n)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class fe extends ss{writeLogEntry(){}}class dr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let hr=0;class ns{constructor(e={}){let{logger:s}=e;this.logger=s||new fe,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let n={channel:e};s&&Object.assign(n,s);let r=Qt(n);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,s))},o)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let i=this.subscribeRetryInterval;return new Promise((o,a)=>{let l=++hr;this.pendingSubscriptions[r]={resolve:o,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(l,r,i)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${n}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,n))},n)}maybeExpireSubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(delete this.pendingSubscriptions[s],r.reject(new rr(`Haven't received subscription ack in ${n*2}ms for ${s}`)))},n)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,n){return s==="$whisper"?this.whisper(e,n):(n||(n={}),n.action=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(n)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r,reason:i,reconnect:o}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new W(i);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[n];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:n}),this.unsubscribe(n);return}return delete this.pendingSubscriptions[n],a.resolve(n)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[n];return a?(delete this.pendingSubscriptions[n],a.reject(new Qe)):this.logger.error("subscription not found",{type:s,identifier:n})}if(r)return{identifier:n,message:r};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const rs=()=>Date.now()/1e3|0;class fr extends ns{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=rs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=rs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",n);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",n);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let i=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of i)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(i)}return this.cable.connected(this.sessionId)}if(s==="presence"){let i=r.type;if(i==="info"){let o=this.pendingPresence[n];o&&(delete this.pendingPresence[n],o.resolve(r))}else if(i==="error"){let o=this.pendingPresence[n];o&&(delete this.pendingPresence[n],o.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:n,message:r}}if(r){let i=this.trackStreamPosition(n,e.stream_id,e.epoch,e.offset);return{identifier:n,message:r,meta:i}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,n){switch(s){case"$presence:join":return this.join(e,n);case"$presence:leave":return this.leave(e,n);case"$presence:info":return this.presence(e,n)}return super.perform(e,s,n)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),n=this.historyRequestFor(e);n&&(s.history=n,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(s.presence=r),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},n=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let i=this.streamsPositions[r];i&&(n=!0,s[r]=i)}if(!(!n&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,n,r){if(!(!s||!n))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:n,offset:r},{stream:s,epoch:n,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((n,r)=>{this.pendingPresence[e]={resolve:n,reject:r},this.cable.send({command:"presence",identifier:e,data:s})})}}class pr extends he{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class et extends es{constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}ye(et,"identifier","__ghost__");const mr="$pubsub";class tt extends es{async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}ye(tt,"identifier",mr);const te=Symbol("state");let gr=class{constructor({transport:t,protocol:e,encoder:s,logger:n,lazy:r,hubOptions:i,performFailures:o,transportConfigurator:a}){this.emitter=Le(),this.transport=t,this.encoder=s,this.logger=n||new fe,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new ur(i||{}),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(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[te]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new W("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(n=>{t&&n.remoteId&&t.includes(n.remoteId)?n.notify("restored"):(n.notify("disconnected",new W("recovery_failed")),this._resubscribe(n))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new W(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 W?t:new W(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[te]="closed";let s=e||new W("cable_closed");this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:n,identifier:r,message:i,meta:o}=s;n?this.hub.notify(r,n,i):this.hub.transmit(r,i,o)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new tt({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new tt({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,n;return typeof t=="string"&&(n=t,t=et),s=n?new t(n,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:n=>this._subscribe(n,t.channelId,t.params),unsubscribe:n=>this._unsubscribe(n)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let n=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n});return}this.logger.debug("acquiring subscribe lock",{identifier:n});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:n}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:n}),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:n}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:n}),t.notify("connected"),r.release();return}let i={identifier:e,params:s};this.logger.debug("subscribing",i);try{let o=await this.protocol.subscribe(e,s);this.hub.subscribe(n,o),this.logger.debug("subscribed",{...i,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof Qe&&this.logger.warn("rejected",i),o instanceof W){this.logger.debug("disconnected during subscription; will retry on connect",i),r.release();return}this.logger.error("failed to subscribe",{error:o,...i})}t.close(o),this.hub.unsubscribe(n)}r.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let n=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:n}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(n),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof W?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",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(n){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:n});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new pr;let n=this.hub.subscriptions.get(t);if(!n)throw Error(`Subscription not found: ${t}`);if(await n.pending("subscribed"),n.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=n.remoteId,i={id:r,action:e,payload:s};this.logger.debug("perform",i);try{let o=await this.protocol.perform(r,e,s);return o&&this.logger.debug("perform result",{message:o,request:i}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:i}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...n)=>{s(),e(...n)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(n=>n()),t()})),s.push(this.on("close",n=>{s.forEach(r=>r()),e(n)})),s.push(this.on("disconnect",n=>{s.forEach(r=>r()),e(n)}))}),this._pendingConnect)}};const br={maxMissingPings:2,maxReconnectAttempts:1/0},oe=()=>Date.now(),is=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:n,maxInterval:r}=e;return s=s||2,n===void 0&&(n=.5),i=>{let o=t*s**i,a=o*s,l=o+(a-o)*Math.random(),u=2*(Math.random()-.5)*n;return l=l*(1+u),r&&r<l&&(l=r),l}};let os=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},br,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 fe,this.state="pending_connect",this.attempts=0,this.disconnectedAt=oe()}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=oe(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=oe(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=oe(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=oe()})),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=oe()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ir))}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 _r{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=Le(),this.unbind=[],this.logger=s.logger||new fe}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(n){this.logger.debug(`Failed to connect via ${s.displayName()}: ${n.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(n=>{n.setParam(e,s)})}setToken(e,s){this.transports.forEach(n=>{n.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}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 yr{constructor(e,s={}){this.url=e;let n=s.websocketImplementation;if(n)this.Impl=n;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Le();let{format:r,subprotocol:i,authStrategy:o}=s;this.format=r||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=i}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,n)=>{let r=[];r.push(this.once("open",()=>{r.forEach(i=>i()),s()})),r.push(this.once("close",()=>{r.forEach(i=>i()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let n=new URL(this.url);n.searchParams.set(e,s);let r=`${n.protocol}//${n.host}${n.pathname}?${n.searchParams}`;this.setURL(r)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let n=`x-${s}`.toLowerCase();n=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===n)||n,this.connectionOptions.headers[n]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const as={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function wr(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({},as,e);let{protocol:s,websocketImplementation:n,websocketFormat:r,websocketOptions:i,websocketAuthStrategy:o,fallbacks:a,logLevel:l,logger:u,transport:d,encoder:h,lazy:b,monitor:f,pingInterval:w,reconnectStrategy:p,maxMissingPings:I,maxReconnectAttempts:R,subprotocol:E,tokenRefresher:O,historyTimestamp:V,protocolOptions:_,concurrentSubscribes:P,performFailures:T,transportConfigurator:x,auth:L}=e;if(u=u||new fe(l),typeof s=="string"){E=E||s;let ae=s.substring(0,s.lastIndexOf("-")),q=s.substring(s.lastIndexOf("-")+1);if(_=_||{},ae==="actioncable-v1")s=new ns({logger:u,..._});else if(ae==="actioncable-v1-ext")s=new fr({logger:u,historyTimestamp:V,..._});else throw Error(`Protocol is not supported yet: ${s}`);if(q==="json")h=h||new dr,r=r||"text";else if(q==="msgpack"){if(r="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(q==="protobuf"){if(r=r||"binary",!h)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new yr(t,{websocketImplementation:n,websocketOptions:i,subprotocol:E,authStrategy:o,format:r}),a&&(d=new _r([d,...a],{logger:u})),L&&L.token&&d.setToken(L.token,L.param||"jid"),p=p||is(w),f!==!1&&(f=f||new os({pingInterval:w,reconnectStrategy:p,maxMissingPings:I,maxReconnectAttempts:R,logger:u}));let De={concurrentSubscribes:P},J=new gr({protocol:s,transport:d,encoder:h,logger:u,lazy:b,hubOptions:De,performFailures:T,transportConfigurator:x});return f&&(f.watch(J),J.monitor=f),O&&vr(J,async()=>{try{await O(d)}catch(ae){return u.error("Failed to refresh authentication token: "+ae),!1}return J.connect().catch(()=>{}),!0}),J}function vr(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async n=>{if(n){if(s){t.logger.warn("Token auto-refresh is disabled",n);return}n.reason==="token_expired"&&(s=!0,await e())}})}class Sr{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Er extends et{constructor(e,s,n){super(e,s),this.subscription=new Sr(this),Object.assign(this.subscription,n),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 Qe?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class xr{constructor(e){this.cable=e}create(e,s){let n,r;typeof e=="object"?(n=e.channel,delete e.channel,r=e):(n=e,r={});let i=new Er(n,r,s);return i.subscription.notify("initialized"),this.cable.subscribe(i),i.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Cr{constructor(e){this.cable=e,this.subscriptions=new xr(e)}}class Or extends ss{writeLogEntry(e,s,n){n?console[e](s,n):console[e](s)}}class kr extends os{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},n=()=>this.disconnect(new W("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",n,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",n,!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 Rr=["cable","action-cable"],Ir="/cable",Ne=(t,e)=>{for(let s of Rr){let n=t.head.querySelector(`meta[name='${s}-${e}']`);if(n)return n.getAttribute("content")}},cs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Ar=()=>{if(typeof document<"u"&&document.head){let t=Ne(document,"url");if(t)return cs(t)}return cs(Ir)},Tr=()=>{if(typeof document<"u"&&document.head){let t=Ne(document,"history-timestamp");if(t)return t|0}},Lr=()=>{if(typeof document<"u"&&document.head)return Ne(document,"token")},Nr=()=>{if(typeof document<"u"&&document.head)return Ne(document,"token-param")};function jr(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Ar(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Tr());let s=Lr();if(s){let u=Nr();e.auth=Object.assign({token:s,param:u},e.auth||{})}e=Object.assign({},as,e);let{logLevel:n,logger:r,pingInterval:i,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:l}=e;return r=e.logger=e.logger||new Or(n),o=e.reconnectStrategy=e.reconnectStrategy||is(i),e.monitor!==!1&&(e.monitor=e.monitor||new kr({pingInterval:i,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:l,logger:r})),wr(t,e)}function Pr(t,e){let s=jr(t,e);return new Cr(s)}class ls{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,n={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{if(i&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=Pr(o)}return this._cable.subscriptions.create({channel:e,...r},n)})}recordPing(){}}function je(t){return Ur.test(t)}const Ur=/^-?[0-9]+$/;function us(t){return Dr.test(t)}const Dr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ds(t,e){const s=Number.parseFloat(t),n=String(s),r=hs(t),i=hs(n);return!!(r===i||(e==null?void 0:e.approx)===!0&&!je(t)&&i.length>=14&&r.startsWith(i.substring(0,14)))}let pe=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function Fr(t){if(ds(t,{approx:!1}))return;if(je(t))return pe.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?pe.underflow:pe.truncate_float:pe.overflow}function hs(t){return t.replace(Br,"").replace(qr,"").replace(Vr,"").replace($r,"")}const Br=/[eE][+-]?\d+$/,$r=/^-?(0*)?/,qr=/\./,Vr=/0+$/;class zr{constructor(e){if(ye(this,"isLosslessNumber",!0),!us(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Fr(this.value);if(e===void 0||e===pe.truncate_float)return Number.parseFloat(this.value);if(je(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 Mr(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function Wr(t){return new zr(t)}function Jr(t,e){return st({"":t},"",t,e)}function st(t,e,s,n){return Array.isArray(s)?n.call(t,e,Kr(s,n)):s&&typeof s=="object"&&!Mr(s)?n.call(t,e,Hr(s,n)):n.call(t,e,s)}function Hr(t,e){for(const s of Object.keys(t)){const n=st(t,s,t[s],e);n!==void 0?t[s]=n:delete t[s]}return t}function Kr(t,e){for(let s=0;s<t.length;s++)t[s]=st(t,String(s),t[s],e);return t}function Gr(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wr,n=0;const r=a();return w(r),I(),e?Jr(r,e):r;function i(){if(t.charCodeAt(n)===ti){n++,u();const S={};let U=!0;for(;n<t.length&&t.charCodeAt(n)!==ps;){U?U=!1:(b(),u());const se=n,me=d();if(me===void 0){O();return}u(),f();const at=a();if(at===void 0){L();return}Object.prototype.hasOwnProperty.call(S,me)&&!nt(at,S[me])&&V(me,se+1),S[me]=at}return t.charCodeAt(n)!==ps&&_(),n++,S}}function o(){if(t.charCodeAt(n)===si){n++,u();const S=[];let U=!0;for(;n<t.length&&t.charCodeAt(n)!==ms;){U?U=!1:b();const se=a();p(se),S.push(se)}return t.charCodeAt(n)!==ms&&P(),n++,S}}function a(){u();const S=d()??h()??i()??o()??l("true",!0)??l("false",!1)??l("null",null);return u(),S}function l(S,U){if(t.slice(n,n+S.length)===S)return n+=S.length,U}function u(){for(;Yr(t.charCodeAt(n));)n++}function d(){if(t.charCodeAt(n)===rt){n++;let S="";for(;n<t.length&&t.charCodeAt(n)!==rt;){if(t.charCodeAt(n)===ei){const U=t[n+1],se=Qr[U];se!==void 0?(S+=se,n++):U==="u"?Pe(t.charCodeAt(n+2))&&Pe(t.charCodeAt(n+3))&&Pe(t.charCodeAt(n+4))&&Pe(t.charCodeAt(n+5))?(S+=String.fromCharCode(Number.parseInt(t.slice(n+2,n+6),16)),n+=5):De(n):x(n)}else Xr(t.charCodeAt(n))?S+=t[n]:T(t[n]);n++}return E(),n++,S}}function h(){const S=n;if(t.charCodeAt(n)===gs&&(n++,R(S)),t.charCodeAt(n)===it)n++;else if(Zr(t.charCodeAt(n)))for(n++;Ue(t.charCodeAt(n));)n++;if(t.charCodeAt(n)===ui)for(n++,R(S);Ue(t.charCodeAt(n));)n++;if(t.charCodeAt(n)===mi||t.charCodeAt(n)===pi)for(n++,(t.charCodeAt(n)===gs||t.charCodeAt(n)===ai)&&n++,R(S);Ue(t.charCodeAt(n));)n++;if(n>S)return s(t.slice(S,n))}function b(){if(t.charCodeAt(n)!==li)throw new SyntaxError(`Comma ',' expected after value ${q()}`);n++}function f(){if(t.charCodeAt(n)!==di)throw new SyntaxError(`Colon ':' expected after property name ${q()}`);n++}function w(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${q()}`)}function p(S){if(S===void 0)throw new SyntaxError(`Array item expected ${q()}`)}function I(){if(n<t.length)throw new SyntaxError(`Expected end of input ${q()}`)}function R(S){if(!Ue(t.charCodeAt(n))){const U=t.slice(S,n);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${q()}`)}}function E(){if(t.charCodeAt(n)!==rt)throw new SyntaxError(`End of string '"' expected ${q()}`)}function O(){throw new SyntaxError(`Quoted object key expected ${q()}`)}function V(S,U){throw new SyntaxError(`Duplicate key '${S}' encountered at position ${U}`)}function _(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${q()}`)}function P(){throw new SyntaxError(`Array item or end of array ']' expected ${q()}`)}function T(S){throw new SyntaxError(`Invalid character '${S}' ${J()}`)}function x(S){const U=t.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${U}' ${J()}`)}function L(){throw new SyntaxError(`Object value expected after ':' ${J()}`)}function De(S){const U=t.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${U}' ${J()}`)}function J(){return`at position ${n}`}function ae(){return n<t.length?`but got '${t[n]}'`:"but reached end of input"}function q(){return`${ae()} ${J()}`}}function Yr(t){return t===ni||t===ri||t===ii||t===oi}function Pe(t){return t>=it&&t<=ot||t>=hi&&t<=gi||t>=fi&&t<=bi}function Ue(t){return t>=it&&t<=ot}function Zr(t){return t>=ci&&t<=ot}function Xr(t){return t>=32&&t<=1114111}function nt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,n)=>nt(s,e[n])):fs(t)&&fs(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>nt(t[s],e[s])):!1}function fs(t){return typeof t=="object"&&t!==null}const Qr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
8
- `,r:"\r",t:" "},ei=92,ti=123,ps=125,si=91,ms=93,ni=32,ri=10,ii=9,oi=13,rt=34,ai=43,gs=45,it=48,ci=49,ot=57,li=44,ui=46,di=58,hi=65,fi=97,pi=69,mi=101,gi=70,bi=102;function bs(t,e,s,n){return r(t);function r(l,u){if(Array.isArray(n)){const d=n.find(h=>h.test(l));if(d){const h=d.stringify(l);if(typeof h!="string"||!us(h))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${h})`);return h}}if(typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return i(l);if(l&&typeof l=="object")return o(l)}function i(l,u){if(l.length===0)return"[]";let d="[";for(let h=0;h<l.length;h++){const b=l[h];typeof b<"u"&&typeof b!="function"?d+=r(b):d+="null",h<l.length-1&&(d+=",")}return d+="]",d}function o(l,u){if(typeof l.toJSON=="function")return bs(l.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(l);if(d.length===0)return"{}";let h=!0,b="{";for(const f of d){const w=l[f];if(a(f,w)){h?h=!1:b+=",";const p=JSON.stringify(f);b+=`${p}:`,b+=r(w)}}return b+="}",b}function a(l,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function _i(t){return je(t)&&!ds(t)?BigInt(t):parseFloat(t)}class _s{constructor(){ye(this,"id",1)}async exec(e,s,n={},r={},i=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return n.scope=window.openc3Scope,r.manual=!0,(await Xt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:n},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:i,transformRequest:[(o,a)=>bs(o)],transformResponse:[o=>Gr(o,void 0,_i)]})).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=o,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s){return this.exec("map_target_to_interface",[e,s])}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...n){return this.exec("interface_cmd",[e,s,...n])}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,s,n){return this.exec("get_item",[e,s,n])}get_param(e,s,n){return this.exec("get_param",[e,s,n])}get_parameter(e,s,n){return this.exec("get_param",[e,s,n])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,n,r=30){const i=await this.exec("get_tlm_packet",[e,s],{type:n,stale_time:r});if(i!=null){let o=i.length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(i[l][1]),a!==null&&(i[l][1]=a)}return i}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}async get_tlm_values(e,s=30,n=null){let r={stale_time:s};n!==null&&(r.cache_timeout=n);const i=await this.exec("get_tlm_values",[e],r,{},1e4);let o=i[0].length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(i[0][l]),a!==null&&(i[0][l]=a);return i}get_limits(e,s,n){return this.exec("get_limits",[e,s,n])}async tlm(e,s,n,r="CONVERTED"){let i=null;if(s===void 0)i=await this.exec("tlm",[e]);else if(n===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(s))i=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else i=await this.exec("tlm",[e,s,n],{type:r});let o=this.decode_openc3_type(i);return o!==null&&(i=o),i}async inject_tlm(e,s,n=null,r="CONVERTED"){await this.exec("inject_tlm",[e,s,n],{type:r})}set_tlm(e,s,n,r){return this.exec("set_tlm",[e,s,n],{type:r})}override_tlm(e,s,n,r){return this.exec("override_tlm",[e,s,n],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,n,r){return this.exec("normalize_tlm",[e,s,n],{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,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,n,r="CONVERTED"){return this.exec("get_cmd_value",[e,s,n,r])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,n,r,i){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,[s,n,r],{},i)}get_cmd_hazardous(e,s,n,r={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,s,n,r)}cmd(e,s,n,r={}){return s===void 0?this.exec("cmd",e,{},r):this._cmd("cmd",e,s,n,r)}cmd_no_range_check(e,s,n,r={}){return s===void 0?this.exec("cmd_no_range_check",e,{},r):this._cmd("cmd_no_range_check",e,s,n,r)}cmd_raw(e,s,n,r={}){return s===void 0?this.exec("cmd_raw",e,{},r):this._cmd("cmd_raw",e,s,n,r)}cmd_raw_no_range_check(e,s,n,r={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,{},r):this._cmd("cmd_raw_no_range_check",e,s,n,r)}cmd_no_hazardous_check(e,s,n,r={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,{},r):this._cmd("cmd_no_hazardous_check",e,s,n,r)}cmd_no_checks(e,s,n,r={}){return s===void 0?this.exec("cmd_no_checks",e,{},r):this._cmd("cmd_no_checks",e,s,n,r)}cmd_raw_no_hazardous_check(e,s,n,r={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},r):this._cmd("cmd_raw_no_hazardous_check",e,s,n,r)}cmd_raw_no_checks(e,s,n,r={}){return s===void 0?this.exec("cmd_raw_no_checks",e,{},r):this._cmd("cmd_raw_no_checks",e,s,n,r)}build_cmd(e,s,n){return s===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,s,n)}build_command(e,s,n){return s===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,s,n)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,n){return this.exec("save_config",[e,s,n])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,n){return this.exec("enable_limits",[e,s,n])}disable_limits(e,s,n){return this.exec("disable_limits",[e,s,n])}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,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",s),r=new Uint8Array(n);return Array.from(r).map(i=>i.toString(16).padStart(2,"0")).join("")}}}const yi={components:{ValueWidget:ft,ValuelimitsbarWidget:pt},mixins:[Fe],props:{modelValue:{type:Array,default:()=>[]},timeZone:{type:String,default:"local"}},data(){return{api:null,cable:new ls,ignored:[],ignoredItemsDialog:!1,overallState:"GREEN",currentLimitsSet:"",items:[],itemList:[],screenItems:[],screenValues:{},updateCounter:0,itemsPerPage:25,search:"",headers:[{title:"Timestamp",key:"timestamp",width:"130px",sortable:!0,nowrap:!0},{title:"Item",key:"item",value:t=>t.parameters[2],sortable:!0,minWidth:"100px",width:"200px",maxWidth:"300px"},{title:"Value",key:"value",width:"380px",sortable:!1},{title:"Controls",key:"actions",width:"80px",sortable:!1},{title:"",key:"limits",sortable:!1}],valueLimitsBarWidgetSettings:[["WIDTH","380px"],["0","WIDTH","200px"],["1","WIDTH","180px"]],valueWidgetSettings:[["WIDTH","200px"]]}},computed:{textFieldClass(){return this.overallState?`textfield-${this.overallState.toLowerCase()}`:""},overallStateFormatted(){return this.ignored.length===0?this.overallState:`${this.overallState} (Some items ignored)`},ignoredFormatted(){return this.ignored.map(t=>t.split("__").join(" "))},astroStatus(){switch(this.overallState){case"GREEN":return"normal";case"YELLOW":return"caution";case"RED":return"critical";case"BLUE":return"standby";default:return null}}},created(){this.api=new _s;for(let t of this.modelValue)t.match(/.+__.+__.+/)?this.ignoreItem(t,!0):this.ignorePacket(t,!0);this.updateOutOfLimits(),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,10*1e3),this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing(),this.handleMessages(t)}}).then(t=>{this.limitsSubscription=t}),this.cable.createSubscription("ConfigEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing();const e=JSON.parse(t);this.handleConfigEvents(e)}}).then(t=>{this.configSubscription=t})},mounted(){this.updater=setInterval(()=>{this.update()},1e3)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.limitsSubscription&&this.limitsSubscription.unsubscribe(),this.configSubscription&&this.configSubscription.unsubscribe(),this.cable.disconnect()},methods:{getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})},updateOutOfLimits(){this.items=[],this.itemList=[],this.api.get_out_of_limits().then(t=>{for(const e of t){let s=e.join("__");if(this.ignored.find(r=>s.includes(r)))continue;this.itemList.push(s);let n={key:e.slice(0,3).join("__"),parameters:e.slice(0,3),timestamp:this.formatDateTime(new Date,this.timeZone)};e[3].includes("YELLOW")&&this.overallState!=="RED"&&(this.overallState="YELLOW"),e[3].includes("RED")&&(this.overallState="RED"),e[3]=="YELLOW"||e[3]=="RED"?n.limits=!1:n.limits=!0,this.items.push(n)}this.calcOverallState()})},calcOverallState(){let t="GREEN";for(let e of this.itemList)if(!this.ignored.find(s=>e.includes(s))&&(e.includes("YELLOW")&&t!=="RED"&&(t="YELLOW"),e.includes("RED"))){t="RED";break}this.overallState=t},ignorePacket(t,e){let[s,n,r]=t.split("__"),i=`${s}__${n}`;for(this.ignored.push(i),e||this.updateIgnored();;){let o=this.itemList.findIndex(a=>a.includes(i));if(o===-1)break;{let a=this.itemList[o].lastIndexOf("__");this.removeItem(this.itemList[o].substring(0,a))}}this.calcOverallState()},ignoreItem(t,e){this.ignored.push(t),e||this.updateIgnored(),this.removeItem(t),this.calcOverallState()},restoreItem(t){this.ignored.splice(t,1),this.updateIgnored(),this.updateOutOfLimits()},removeItem(t){const e=this.itemList.findIndex(s=>s.includes(t));this.items.splice(e,1),this.itemList.splice(e,1)},clearAll(){this.ignored=[],this.updateIgnored(),this.updateOutOfLimits()},updateIgnored(){this.$emit("update:modelValue",this.ignored)},handleConfigEvents(t){for(let e of t)e.kind==="deleted"&&e.type==="target"&&this.updateOutOfLimits()},handleMessages(t){for(let e of t){let s=JSON.parse(e.event);if(s.type!="LIMITS_CHANGE")continue;let n=`${s.target_name}__${s.packet_name}__${s.item_name}`;const r=this.itemList.findIndex(o=>o.includes(n));if(r!==-1){this.itemList[r]=`${n}__${s.new_limits_state}`,this.calcOverallState();continue}if(this.ignored.find(o=>n.includes(o))||s.new_limits_state&&!(s.new_limits_state.includes("YELLOW")||s.new_limits_state.includes("RED")))continue;let i={key:n,timestamp:this.formatNanoseconds(s.time_nsec,this.timeZone),parameters:[s.target_name,s.packet_name,s.item_name]};s.new_limits_state=="YELLOW"||s.new_limits_state=="RED"?i.limits=!1:i.limits=!0,this.itemList.push(`${n}__${s.new_limits_state}`),this.items.push(i),this.calcOverallState()}},update(){this.screenItems.length!==0&&this.api.get_tlm_values(this.screenItems).then(t=>{this.updateValues(t)})},updateValues:function(t){this.updateCounter+=1;for(let e=0;e<t.length;e++)t[e].push(this.updateCounter),this.screenValues[this.screenItems[e]]=t[e]},addItem:function(t){this.screenItems.push(t),this.screenValues[t]=[null,null,0]},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.screenItems.splice(e,1)},showIgnored(){this.ignoredItemsDialog=!0},customFilter(t,e,s){if(!e||e.trim()==="")return!0;if(e=e.toLowerCase(),s.parameters&&s.parameters.length>0){for(const n of s.parameters)if(n.toLowerCase().includes(e))return!0}return!!(s.timestamp&&s.timestamp.toLowerCase().includes(e)||s.key&&s.key.toLowerCase().includes(e))}}},wi=["status"],vi={class:"font-weight-black"};function Si(t,e,s,n,r,i){const o=y("v-text-field"),a=y("v-spacer"),l=y("v-row"),u=y("valuelimitsbar-widget"),d=y("value-widget"),h=y("v-btn"),b=y("v-icon"),f=y("v-list-item-title"),w=y("v-list-item"),p=y("v-list"),I=y("v-menu"),R=y("v-data-table"),E=y("v-card"),O=y("v-toolbar"),V=y("v-divider"),_=y("v-card-text"),P=y("v-card-actions"),T=y("v-dialog");return k(),z("div",null,[g(E,{class:"pa-5"},{default:m(()=>[g(l,{class:"ma-1"},{default:m(()=>[g(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Overall Limits State","model-value":i.overallStateFormatted,class:$e(i.textFieldClass),style:{"margin-right":"10px","max-width":"280px"},"data-test":"overall-state"},_e({_:2},[i.astroStatus?{name:"prepend-inner",fn:m(()=>[F("rux-status",{status:i.astroStatus},null,8,wi)]),key:"0"}:void 0]),1032,["model-value","class"]),g(o,{density:"compact",variant:"outlined",readonly:"","hide-details":"",label:"Current Limits Set","model-value":r.currentLimitsSet,style:{"max-width":"200px"},"data-test":"limits-set"},null,8,["model-value"]),g(a),g(o,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=x=>r.search=x),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},"data-test":"search"},null,8,["modelValue"])]),_:1}),g(R,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[1]||(e[1]=x=>r.itemsPerPage=x),headers:r.headers,items:r.items,search:r.search,"custom-filter":i.customFilter,"item-value":"key","data-test":"limits-table",class:"limits-table",density:"compact"},{"item.timestamp":m(({item:x})=>[j(H(x.timestamp),1)]),"item.value":m(({item:x})=>[x.limits?(k(),N(u,{key:0,parameters:x.parameters,settings:r.valueLimitsBarWidgetSettings,"screen-values":r.screenValues,"screen-time-zone":s.timeZone,onAddItem:i.addItem,onDeleteItem:i.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"])):(k(),N(d,{key:1,parameters:x.parameters,settings:r.valueWidgetSettings,"screen-values":r.screenValues,"screen-time-zone":s.timeZone,onAddItem:i.addItem,onDeleteItem:i.deleteItem},null,8,["parameters","settings","screen-values","screen-time-zone","onAddItem","onDeleteItem"]))]),"item.actions":m(({item:x})=>[g(I,null,{activator:m(({props:L})=>[g(h,be({icon:"mdi-dots-horizontal",variant:"text",density:"compact","aria-label":"Item Options"},L),null,16)]),default:m(()=>[g(p,null,{default:m(()=>[g(w,{onClick:L=>i.ignorePacket(x.key)},{prepend:m(()=>[g(b,null,{default:m(()=>e[4]||(e[4]=[j("mdi-close-circle-multiple")])),_:1})]),default:m(()=>[g(f,null,{default:m(()=>e[5]||(e[5]=[j("Ignore Entire Packet")])),_:1})]),_:2},1032,["onClick"]),g(w,{onClick:L=>i.ignoreItem(x.key)},{prepend:m(()=>[g(b,null,{default:m(()=>e[6]||(e[6]=[j("mdi-close-circle")])),_:1})]),default:m(()=>[g(f,null,{default:m(()=>e[7]||(e[7]=[j("Ignore Item")])),_:1})]),_:2},1032,["onClick"]),g(w,{onClick:L=>i.removeItem(x.key)},{prepend:m(()=>[g(b,null,{default:m(()=>e[8]||(e[8]=[j("mdi-eye-off")])),_:1})]),default:m(()=>[g(f,null,{default:m(()=>e[9]||(e[9]=[j("Temporarily Hide Item")])),_:1})]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),"item.limits":m(({item:x})=>[g(a)]),_:1},8,["items-per-page","headers","items","search","custom-filter"]),e[10]||(e[10]=F("div",{class:"footer"},' Note: Timestamp is "now" for items currently out of limits when the page is loaded. ',-1))]),_:1}),g(T,{modelValue:r.ignoredItemsDialog,"onUpdate:modelValue":e[3]||(e[3]=x=>r.ignoredItemsDialog=x),"max-width":"600"},{default:m(()=>[g(E,null,{default:m(()=>[g(O,{height:"24"},{default:m(()=>[g(a),e[11]||(e[11]=F("span",null,"Ignored Items",-1)),g(a)]),_:1}),g(_,{class:"mt-2"},{default:m(()=>[F("div",null,[(k(!0),z(G,null,ne(i.ignoredFormatted,(x,L)=>(k(),z("div",{key:L},[g(l,{class:"ma-1 align-center"},{default:m(()=>[F("span",vi,H(x),1),g(a),g(h,{icon:"mdi-delete",density:"compact",variant:"text","aria-label":"Remove Ignored Item","data-test":`remove-ignore-${L}`,onClick:De=>i.restoreItem(L)},null,8,["data-test","onClick"])]),_:2},1024),L<i.ignoredFormatted.length-1?(k(),N(V,{key:L})):Y("",!0)]))),128))])]),_:1}),g(P,{class:"px-2"},{default:m(()=>[g(h,{variant:"outlined",onClick:i.clearAll},{default:m(()=>e[12]||(e[12]=[j(" Clear All ")])),_:1},8,["onClick"]),g(a),g(h,{variant:"flat",onClick:e[2]||(e[2]=x=>r.ignoredItemsDialog=!1)},{default:m(()=>e[13]||(e[13]=[j(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Ei=ge(yi,[["render",Si],["__scopeId","data-v-ed7ec5ac"]]),xi={props:{historyCount:{type:Number,default:1e3},timeZone:{type:String,default:"local"}},mixins:[Fe],data(){return{data:[],cable:new ls,search:"",headers:[{title:"Time",value:"time_nsec",width:250},{title:"Level",value:"level",sortable:!1},{title:"Message",value:"message"}]}},created(){this.cable.createSubscription("LimitsEventsChannel",window.openc3Scope,{received:t=>{this.cable.recordPing(),this.handleMessages(t)}},{historyCount:1e3}).then(t=>{this.limitsSubscription=t})},unmounted(){this.limitsSubscription&&this.limitsSubscription.unsubscribe(),this.cable.disconnect()},methods:{handleMessages(t){for(let e=0;e<t.length;e++){let s=JSON.parse(t[e].event);this.data.unshift(s)}this.data.length>this.historyCount&&(this.data.length=this.historyCount)},getStatus(t){return t.includes("GREEN")?"normal":t.includes("YELLOW")?"caution":t.includes("RED")?"critical":t.includes("BLUE")?"standby":"off"},getColorClass(t){return t.includes("GREEN")?"openc3-green":t.includes("YELLOW")?"openc3-yellow":t.includes("RED")?"openc3-red":t.includes("BLUE")?"openc3-blue":this.$vuetify.theme.dark?"openc3-white":"openc3-black"},calcTableHeight(){return window.innerHeight-250}}},Ci=["status"];function Oi(t,e,s,n,r,i){const o=y("v-spacer"),a=y("v-text-field"),l=y("v-card-title"),u=y("v-data-table"),d=y("v-card");return k(),N(d,{class:"card-height"},{default:m(()=>[g(l,{class:"d-flex align-center"},{default:m(()=>[e[1]||(e[1]=j(" Limits Events ")),g(o),g(a,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=h=>r.search=h),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),g(u,{headers:r.headers,items:r.data,search:r.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",height:i.calcTableHeight(),hover:"","data-test":"limits-events"},{"item.time_nsec":m(({item:h})=>[F("span",null,H(t.formatNanoseconds(h.time_nsec,s.timeZone)),1)]),"item.level":m(({item:h})=>[F("rux-status",{status:i.getStatus(h.message)},null,8,Ci)]),"item.message":m(({item:h})=>[F("span",{class:$e(i.getColorClass(h.message))},H(h.message),3)]),_:1},8,["headers","items","search","height"])]),_:1})}const ki={components:{LimitsControl:Ei,LimitsEvents:ge(xi,[["render",Oi],["__scopeId","data-v-210db24e"]]),TopBar:xs,OpenConfigDialog:dt,SaveConfigDialog:ut},mixins:[lt],data(){return{title:"Limits Monitor",configKey:"limits_monitor",api:new _s,timeZone:"local",renderKey:0,ignored:[],openConfig:!1,saveConfig:!1,limitsSets:[],currentLimitsSet:null,currentSetRefreshInterval:null,limitsSetDialog:!1,menus:[{label:"File",items:[{label:"Show Ignored",icon:"mdi-magnify-close",command:()=>{this.$refs.control.showIgnored()}},{label:"Change Limits Set",icon:"mdi-swap-horizontal",command:()=>{this.limitsSetDialog=!0}},{divider:!0},{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.ignored=[],this.resetConfigBase(),this.renderKey++}}]}]}},created(){this.api.get_limits_sets().then(t=>{this.limitsSets=t}),this.api.get_setting("time_zone").then(t=>{t&&(this.timeZone=t)}).catch(t=>{})},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.ignored=t,this.renderKey++)}},unmounted:function(){clearInterval(this.currentSetRefreshInterval)},methods:{setLimitsSet:function(){this.api.set_limits_set(this.currentLimitsSet),this.limitsSetDialog=!1,this.renderKey++},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.ignored=s,this.renderKey++})},saveConfiguration:function(t){this.saveConfigBase(t,this.ignored)}}};function Ri(t,e,s,n,r,i){const o=y("top-bar"),a=y("limits-control"),l=y("limits-events"),u=y("open-config-dialog"),d=y("save-config-dialog"),h=y("v-spacer"),b=y("v-toolbar"),f=y("v-select"),w=y("v-card-text"),p=y("v-btn"),I=y("v-card-actions"),R=y("v-card"),E=y("v-dialog");return k(),z("div",null,[g(o,{menus:r.menus,title:r.title},null,8,["menus","title"]),(k(),N(a,{ref:"control",key:r.renderKey,modelValue:r.ignored,"onUpdate:modelValue":e[0]||(e[0]=O=>r.ignored=O),"time-zone":r.timeZone},null,8,["modelValue","time-zone"])),e[11]||(e[11]=F("div",{style:{height:"15px"}},null,-1)),g(l,{"time-zone":r.timeZone},null,8,["time-zone"]),r.openConfig?(k(),N(u,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[1]||(e[1]=O=>r.openConfig=O),"config-key":r.configKey,onSuccess:i.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):Y("",!0),r.saveConfig?(k(),N(d,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[2]||(e[2]=O=>r.saveConfig=O),"config-key":r.configKey,onSuccess:i.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):Y("",!0),g(E,{modelValue:r.limitsSetDialog,"onUpdate:modelValue":e[5]||(e[5]=O=>r.limitsSetDialog=O),"max-width":"650"},{default:m(()=>[g(R,null,{default:m(()=>[g(b,{height:"24"},{default:m(()=>[g(h),e[6]||(e[6]=F("span",null,"Change Limits Set",-1)),g(h)]),_:1}),g(w,{class:"mt-6"},{default:m(()=>[e[7]||(e[7]=F("span",{style:{display:"block"}}," The Limits Set is a global option which changes the Limits Set across all tools. ",-1)),e[8]||(e[8]=F("span",{style:{display:"block"}}," NOTE: Changing this option clears the current list and recalculates based on the new set. ",-1)),g(f,{modelValue:r.currentLimitsSet,"onUpdate:modelValue":e[3]||(e[3]=O=>r.currentLimitsSet=O),label:"Limits Set",items:r.limitsSets,density:"compact",variant:"outlined","data-test":"limits-set","hide-details":"",class:"mt-3",style:{"max-width":"200px"}},null,8,["modelValue","items"])]),_:1}),g(I,{class:"px-2"},{default:m(()=>[g(h),g(p,{variant:"outlined",onClick:e[4]||(e[4]=O=>r.limitsSetDialog=!1)},{default:m(()=>e[9]||(e[9]=[j(" Cancel ")])),_:1}),g(p,{variant:"flat",onClick:i.setLimitsSet},{default:m(()=>e[10]||(e[10]=[j(" Ok ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Hi=ws("default",ge(ki,[["render",Ri]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./GraphWidget-cTVq29cY-175fdb00713eac040a49.js","./main-1f357f4a9ae5d1a695a4.js","vue","./Graph-DCihpnT0-45bac61be6ea279a9766.js","single-spa","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","vuex","vuetify"],function(p,u){"use strict";var s,n,r,o,a,d,l;return{setters:[t=>{s=t._},t=>{n=t.d},t=>{r=t.resolveComponent,o=t.createBlock,a=t.openBlock,d=t.normalizeStyle},t=>{l=t._},null,null,null,null,null],execute:function(){const t={components:{Graph:l},mixins:[s]};function h(e,i,g,v,f,y){const c=r("graph");return a(),o(c,{ref:"graph"+e.id,id:e.id,state:e.state,"selected-graph-id":e.id,startTime:e.startTime,"seconds-graphed":e.secondsGraphed,"points-saved":e.pointsSaved,"points-graphed":e.pointsGraphed,"initial-items":e.items,height:e.size.height,width:e.size.width,style:d(e.computedStyle),"time-zone":this.screenTimeZone,onPause:i[0]||(i[0]=()=>e.state="pause"),onStart:i[1]||(i[1]=()=>e.state="start"),"hide-toolbar":"","hide-overview":""},null,8,["id","state","selected-graph-id","startTime","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style","time-zone"])}const m=p("default",n(t,[["render",h]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Layout-1z8iJV5--17b6be92712eb72f93a5.js","./main-1f357f4a9ae5d1a695a4.js","vue","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","single-spa","vuex","vuetify"],function(f,z){"use strict";var c,o,m,r,n,g,l,a,p,d,y;return{setters:[e=>{c=e.r},e=>{o=e.d,m=e.O},e=>{r=e.createElementBlock,n=e.openBlock,g=e.normalizeStyle,l=e.Fragment,a=e.renderList,p=e.createBlock,d=e.resolveDynamicComponent,y=e.mergeProps},null,null,null,null,null],execute:function(){const e={mixins:[c],computed:{columns(){return parseInt(this.parameters[0])},widgetChunks(){return m.chunk(this.widgets,this.columns)}},created:function(){if(this.parameters[1]){let s=this.parameters[1];this.widgets.forEach(u=>{u.settings.find(i=>i[0]==="MARGIN"||i[0]==="RAW"&&i[1].toUpperCase().includes("MARGIN"))===void 0&&u.settings.push(["MARGIN",s])})}}};function h(s,u,i,S,b,k){return n(),r("table",{style:g(s.computedStyle),role:"presentation"},[(n(!0),r(l,null,a(k.widgetChunks,(v,B)=>(n(),r("tr",{key:"r"+B},[(n(!0),r(l,null,a(v,(t,w)=>(n(),r("td",{key:"c"+w},[(n(),p(d(t.type),y({ref_for:!0},s.listeners,{target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":s.screenValues,"screen-time-zone":s.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))]))),128))],4)}const C=f("default",o(e,[["render",h]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Layout-1z8iJV5--17b6be92712eb72f93a5.js","./VerticalWidget-DJvoxqLE-5123f60cf6459691f365.js","vue","./main-1f357f4a9ae5d1a695a4.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","single-spa","vuex","vuetify"],function(v,k){"use strict";var l,o,i,r,c,u,m,g,p,d,f;return{setters:[e=>{l=e.r},e=>{o=e.default},e=>{i=e.createElementBlock,r=e.openBlock,c=e.normalizeStyle,u=e.Fragment,m=e.renderList,g=e.createBlock,p=e.resolveDynamicComponent,d=e.mergeProps},e=>{f=e.d},null,null,null,null,null],execute:function(){const e={mixins:[l],components:{VerticalWidget:o},created:function(){if(this.setHeight(this.parameters[0],"px",200),this.parameters[1]){let n=this.parameters[1];this.widgets.forEach(a=>{a.settings.find(s=>s[0]==="MARGIN"||s[0]==="RAW"&&s[1].toUpperCase().includes("MARGIN"))===void 0&&a.settings.push(["MARGIN",n])})}}};function y(n,a,s,w,z,x){return r(),i("div",{ref:"container",style:c(n.computedStyle),class:"overflow-y-auto"},[(r(!0),i(u,null,m(n.widgets,(t,h)=>(r(),g(p(t.type),d({ref_for:!0},n.listeners,{key:h,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.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))],4)}const B=v("default",f(e,[["render",y]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue","./main-1f357f4a9ae5d1a695a4.js","vue-router","single-spa","vuex","vuetify"],function(l,a){"use strict";var t,n,s,i,r;return{setters:[e=>{t=e.o},e=>{n=e.createElementBlock,s=e.openBlock,i=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],created(){this.parameters[0]!==void 0&&this.appliedSettings.push(["WIDTH",this.parameters[0]]),this.parameters[1]!==void 0&&this.appliedSettings.push(["HEIGHT",this.parameters[1]])}};function o(u,p,d,m,h,v){return s(),n("div",{style:i(u.computedStyle)},null,4)}const c=l("default",r(e,[["render",o]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Layout-1z8iJV5--17b6be92712eb72f93a5.js","vue","./main-1f357f4a9ae5d1a695a4.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","single-spa","vuex","vuetify"],function(k,N){"use strict";var p,l,s,n,g,v,i,u,c,o,y,f,w,b,V;return{setters:[e=>{p=e.r},e=>{l=e.resolveComponent,s=e.createElementBlock,n=e.openBlock,g=e.createVNode,v=e.normalizeStyle,i=e.withCtx,u=e.Fragment,c=e.renderList,o=e.createBlock,y=e.createTextVNode,f=e.toDisplayString,w=e.resolveDynamicComponent,b=e.mergeProps},e=>{V=e.d},null,null,null,null,null],execute:function(){const e={mixins:[p],data:function(){return{curTab:null}},watch:{curTab:function(){this.$emit("min-max-screen")}}};function B(t,m,h,D,L,j){const T=l("v-tab"),x=l("v-tabs"),S=l("v-window-item"),z=l("v-window");return n(),s("div",null,[g(x,{modelValue:t.curTab,"onUpdate:modelValue":m[0]||(m[0]=a=>t.curTab=a),style:v(t.computedStyle)},{default:i(()=>[(n(!0),s(u,null,c(t.widgets,(a,d)=>(n(),o(T,{key:d},{default:i(()=>[y(f(a.parameters[0]),1)]),_:2},1024))),128))]),_:1},8,["modelValue","style"]),g(z,{modelValue:t.curTab,"onUpdate:modelValue":m[1]||(m[1]=a=>t.curTab=a)},{default:i(()=>[(n(!0),s(u,null,c(t.widgets,(a,d)=>(n(),o(S,{key:d},{default:i(()=>[(n(!0),s(u,null,c(a.widgets,(r,C)=>(n(),o(w(r.type),b({ref_for:!0},t.listeners,{key:`${d}-${C}`,target:r.target,parameters:r.parameters,settings:r.settings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,widgets:r.widgets,name:r.name,line:r.line,"line-number":r.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const _=k("default",V(e,[["render",B]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./main-1f357f4a9ae5d1a695a4.js","vue","./DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js","single-spa","./VWidget-j2GIGGSX-8edc55a2569eec1b95df.js","vue-router","vuex","vuetify","./Widget-Bn_S-zBo-f7f57ba202121d435290.js"],function(y,M){"use strict";var c,a,o,s,n,u,d,l,m,h,g,p,v,x,f,w;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,o=e.createElementBlock,s=e.openBlock,n=e.createVNode,u=e.normalizeStyle,d=e.normalizeClass,l=e.withCtx,m=e.Fragment,h=e.renderList,g=e.createBlock,p=e.withModifiers,v=e.createTextVNode,x=e.toDisplayString},e=>{f=e.P},null,e=>{w=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:f},data:function(){return{width:200,height:200}},mixins:[w],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)},methods:{getType:function(){let t="CONVERTED";return this.parameters[5]&&(t=this.parameters[5]),t}}},C={class:"textbox-widget-container"};function V(t,r,j,L,F,k){const S=a("v-textarea"),B=a("v-list-item-title"),D=a("v-list-item"),_=a("v-list"),z=a("v-menu"),T=a("details-dialog");return s(),o("div",C,[n(S,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":t._value,class:d(t.valueClass),style:u([t.computedStyle,k.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),n(z,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=i=>t.contextMenuShown=i),target:[t.x,t.y]},{default:l(()=>[n(_,null,{default:l(()=>[(s(!0),o(m,null,h(t.contextMenuOptions,(i,E)=>(s(),g(D,{key:E,onClick:p(i.action,["stop"])},{default:l(()=>[n(B,null,{default:l(()=>[v(x(i.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(T,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=i=>t.viewDetails=i)},null,8,["target-name","packet-name","item-name","modelValue"])])}const N=y("default",c(e,[["render",V],["__scopeId","data-v-10f560aa"]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./main-1f357f4a9ae5d1a695a4.js","vue","./DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js","single-spa","./VWidget-j2GIGGSX-8edc55a2569eec1b95df.js","vue-router","vuex","vuetify","./Widget-Bn_S-zBo-f7f57ba202121d435290.js"],function(w,j){"use strict";var c,a,o,r,d,n,l,m,u,p,v,g,h,f,x,y,V,S;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,o=e.createElementBlock,r=e.openBlock,d=e.normalizeStyle,n=e.createVNode,l=e.withCtx,m=e.createElementVNode,u=e.toDisplayString,p=e.mergeProps,v=e.createSlots,g=e.Fragment,h=e.renderList,f=e.createBlock,x=e.withModifiers,y=e.createTextVNode},e=>{V=e.P},null,e=>{S=e.L},null,null,null,null],execute:function(){const _={components:{DetailsDialog:V},mixins:[S],data:function(){return{width:16}},computed:{fullName(){return this.parameters[0]+" "+this.parameters[1]+" "+this.parameters[2]},aging(){return{"--aging":this.grayLevel}}},created(){this.verifyNumParams("VALUE",3,5,"VALUE <TARGET> <PACKET> <ITEM> <TYPE> <WIDTH>"),this.setWidth(parseInt(this.parameters[4])+4,"ch",this.width)}};function C(t,i,U,W,z,k){const E=a("rux-status"),B=a("v-text-field"),D=a("v-tooltip"),N=a("v-list-item-title"),T=a("v-list-item"),L=a("v-list"),M=a("v-menu"),P=a("details-dialog");return r(),o("div",{class:"value-widget-container",style:d([t.computedStyle,k.aging])},[n(D,{"open-delay":600,location:"top"},{activator:l(({props:s})=>[n(B,p({variant:"solo",density:"compact",flat:"",readonly:"","hide-details":"","model-value":t._value,class:t.valueClass,"data-test":"value"},s,{onContextmenu:t.showContextMenu}),v({_:2},[t.astroStatus?{name:"prepend-inner",fn:l(()=>[n(E,{status:t.astroStatus},null,8,["status"])]),key:"0"}:void 0]),1040,["model-value","class","onContextmenu"])]),default:l(()=>[m("span",null,u(k.fullName),1)]),_:1}),n(M,{modelValue:t.contextMenuShown,"onUpdate:modelValue":i[0]||(i[0]=s=>t.contextMenuShown=s),target:[t.x,t.y],style:{"z-index":"3000"}},{default:l(()=>[n(L,null,{default:l(()=>[(r(!0),o(g,null,h(t.contextMenuOptions,(s,I)=>(r(),f(T,{key:I,onClick:x(s.action,["stop"])},{default:l(()=>[n(N,null,{default:l(()=>[y(u(s.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(P,{modelValue:t.viewDetails,"onUpdate:modelValue":i[1]||(i[1]=s=>t.viewDetails=s),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])],4)}const A=w("default",c(_,[["render",C],["__scopeId","data-v-0d38b850"]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./ValueWidget-3jNtnh5i-fd446395a1137b478a0e.js","./LimitsbarWidget-BxxoKTjp-f204a54b40ab4bde6aa1.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue","./main-1f357f4a9ae5d1a695a4.js","./DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js","single-spa","./VWidget-j2GIGGSX-8edc55a2569eec1b95df.js","vue-router","vuex","vuetify","./BarColumn-Bgz2YJ59-792ea8cf842da7644a1b.js"],function(g,f){"use strict";var l,i,a,n,o,u,c,s,r,m;return{setters:[e=>{l=e.default},e=>{i=e.default},e=>{a=e.o},e=>{n=e.resolveComponent,o=e.createElementBlock,u=e.openBlock,c=e.normalizeStyle,s=e.createVNode,r=e.mergeProps},e=>{m=e.d},null,null,null,null,null,null,null],execute:function(){const e={mixins:[a],components:{ValueWidget:l,LimitsbarWidget:i}};function d(t,B,x,S,b,y){const p=n("value-widget"),v=n("limitsbar-widget");return u(),o("div",{ref:"container",class:"d-flex flex-row",style:c(t.computedStyle)},[s(p,r(t.$attrs,{parameters:t.parameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),s(v,r(t.$attrs,{parameters:t.parameters.slice(0,3),settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1,line:t.line,lineNumber:t.lineNumber}),null,16,["parameters","settings","screen-values","line","lineNumber"])],4)}const j=g("default",m(e,[["render",d]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./ValueWidget-3jNtnh5i-fd446395a1137b478a0e.js","./RangebarWidget-dZN9WjoZ-d21aff9c135c985e837c.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue","./main-1f357f4a9ae5d1a695a4.js","./DetailsDialog-BQE0TraI-1fd4f55e2422349e0715.js","single-spa","./VWidget-j2GIGGSX-8edc55a2569eec1b95df.js","vue-router","vuex","vuetify"],function(g,f){"use strict";var n,i,l,r,o,u,m,s,a,p;return{setters:[e=>{n=e.default},e=>{i=e.default},e=>{l=e.o},e=>{r=e.resolveComponent,o=e.createElementBlock,u=e.openBlock,m=e.normalizeStyle,s=e.createVNode,a=e.mergeProps},e=>{p=e.d},null,null,null,null,null,null],execute:function(){const e={mixins:[l],components:{ValueWidget:n,RangebarWidget:i},computed:{valueParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[5],this.parameters[6]]},rangeBarParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[3],this.parameters[4],this.parameters[5],this.parameters[7],this.parameters[8]]}}};function d(t,B,S,x,V,c){const v=r("value-widget"),h=r("rangebar-widget");return u(),o("div",{ref:"container",class:"d-flex flex-row",style:m(t.computedStyle)},[s(v,a(t.$attrs,{parameters:c.valueParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"widget-index":0}),null,16,["parameters","settings","screen-values","screen-time-zone"]),s(h,a(t.$attrs,{parameters:c.rangeBarParameters,settings:[...t.appliedSettings],"screen-values":t.screenValues,"widget-index":1}),null,16,["parameters","settings","screen-values"])],4)}const j=g("default",p(e,[["render",d]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./Layout-1z8iJV5--17b6be92712eb72f93a5.js","vue","./main-1f357f4a9ae5d1a695a4.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","single-spa","vuex","vuetify"],function(f,k){"use strict";var l,i,r,c,o,u,m,g,p,d;return{setters:[e=>{l=e.r},e=>{i=e.createElementBlock,r=e.openBlock,c=e.normalizeStyle,o=e.Fragment,u=e.renderList,m=e.createBlock,g=e.resolveDynamicComponent,p=e.mergeProps},e=>{d=e.d},null,null,null,null,null],execute:function(){const e={mixins:[l],created:function(){if(this.parameters[0]){let n=this.parameters[0];this.widgets.forEach(a=>{a.settings.find(s=>s[0]==="MARGIN"||s[0]==="RAW"&&s[1].toUpperCase().includes("MARGIN"))===void 0&&a.settings.push(["MARGIN",n])})}}};function y(n,a,s,h,z,w){return r(),i("div",{ref:"container",style:c(n.computedStyle)},[(r(!0),i(o,null,u(n.widgets,(t,v)=>(r(),m(g(t.type),p({ref_for:!0},n.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.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))],4)}const B=f("default",d(e,[["render",y]]))}}});
@@ -1 +0,0 @@
1
- System.register(["./LabelWidget-iUIJLhdA-9d9b624b5f48837fab3c.js","./HorizontallineWidget-DEODVJCk-958c71273960c0e3edad.js","./VerticalWidget-DJvoxqLE-5123f60cf6459691f365.js","./Layout-1z8iJV5--17b6be92712eb72f93a5.js","vue","./main-1f357f4a9ae5d1a695a4.js","./Widget-Bn_S-zBo-f7f57ba202121d435290.js","vue-router","single-spa","vuex","vuetify"],function(m,S){"use strict";var l,r,a,o,n,c,s,g,d,i,u,p;return{setters:[e=>{l=e.default},e=>{r=e.default},e=>{a=e.default},e=>{o=e.r},e=>{n=e.resolveComponent,c=e.createElementBlock,s=e.openBlock,g=e.createBlock,d=e.createCommentVNode,i=e.createVNode,u=e.mergeProps},e=>{p=e.d},null,null,null,null,null],execute:function(){const e={mixins:[o],components:{LabelWidget:l,HorizontalLineWidget:r,VerticalWidget:a},created(){this.labelSettings=[...this.appliedSettings],this.labelSettings.find(t=>t[0]==="0"&&t[1]==="RAW"&&t[2]==="font-weight")||this.labelSettings.push(["0","RAW","font-weight","bold"])}};function v(t,W,b,k,B,z){const f=n("label-widget"),w=n("horizontal-line-widget"),h=n("vertical-widget");return s(),c("div",null,[t.parameters.length>0?(s(),g(f,{key:0,parameters:t.parameters.slice(0,1),settings:[...t.labelSettings],"widget-index":0},null,8,["parameters","settings"])):d("",!0),i(w,{settings:[...t.appliedSettings],"widget-index":1},null,8,["settings"]),i(h,u(t.listeners,{parameters:t.parameters.slice(1),settings:t.settings,widgets:t.widgets,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone}),null,16,["parameters","settings","widgets","screen-values","screen-time-zone"])])}const V=m("default",p(e,[["render",v]]))}}});